diff --git a/test/unit/cloud/affinity_groups_test.go b/test/unit/cloud/affinity_groups_test.go index eb401539..ba6dbfd0 100644 --- a/test/unit/cloud/affinity_groups_test.go +++ b/test/unit/cloud/affinity_groups_test.go @@ -18,6 +18,7 @@ package cloud_test import ( "errors" + "fmt" "github.com/apache/cloudstack-go/v2/cloudstack" "github.com/aws/cluster-api-provider-cloudstack-staging/test/unit/dummies" @@ -71,22 +72,39 @@ var _ = Describe("The AffinityGroup interface", func() { When("using a real CloudStack client", func() { BeforeEach(func() { + fmt.Println("blah2oomuch") client = realCloudClient dummies.AffinityGroup.ID = "" // Force name fetching. }) It("creates an affinity group.", func() { Ω(client.GetOrCreateAffinityGroup(dummies.AffinityGroup)).Should(Succeed()) }) - It("associates an affinity group.", func() { - Ω(client.GetOrCreateVMInstance( - dummies.CSMachine1, dummies.CAPIMachine, dummies.CSCluster, dummies.CSZone1, dummies.CSAffinityGroup, "", - )).Should(Succeed()) - Ω(client.GetOrCreateAffinityGroup(dummies.AffinityGroup)).Should(Succeed()) - Ω(client.AssociateAffinityGroup(dummies.CSMachine1, *dummies.AffinityGroup)).Should(Succeed()) - }) + // Context("with an existing VM", func() { + // BeforeEach(func() { + // Ω(client.ResolveZone(dummies.CSZone1)).Should(Succeed()) + // Ω(dummies.CSZone1.Spec.ID).ShouldNot(BeEmpty()) + // dummies.CSMachine1.Status.ZoneID = dummies.CSZone1.Spec.ID + // dummies.CSMachine1.Spec.DiskOffering.Name = "" + // dummies.CSCluster.Spec.ControlPlaneEndpoint.Host = "" + // Ω(client.GetOrCreateIsolatedNetwork(dummies.CSZone1, dummies.CSISONet1, dummies.CSCluster)).Should(Succeed()) + // dummies.CSZone1.Spec.Network.ID = dummies.CSISONet1.Spec.ID + // Ω(client.GetOrCreateVMInstance( + // dummies.CSMachine1, dummies.CAPIMachine, dummies.CSCluster, dummies.CSZone1, dummies.CSAffinityGroup, "", + // )).Should(Succeed()) + // }) + // AfterEach(func() { + // Ω(client.DestroyVMInstance(dummies.CSMachine1)).Should(MatchError("VM deletion in progress")) + // }) + // It("associates an affinity group and disassociates it", func() { + // Ω(client.GetOrCreateAffinityGroup(dummies.AffinityGroup)).Should(Succeed()) + // Ω(client.AssociateAffinityGroup(dummies.CSMachine1, *dummies.AffinityGroup)).Should(Succeed()) + // Ω(client.DisassociateAffinityGroup(dummies.CSMachine1, *dummies.AffinityGroup)).Should(Succeed()) + // }) + // }) It("deletes an affinity group.", func() { Ω(client.DeleteAffinityGroup(dummies.AffinityGroup)).Should(Succeed()) Ω(client.FetchAffinityGroup(dummies.AffinityGroup)).ShouldNot(Succeed()) }) + Context("del", func() {}) }) }) diff --git a/test/unit/cloud/cloud_suite_test.go b/test/unit/cloud/cloud_suite_test.go index a5a9b07d..6d68465f 100644 --- a/test/unit/cloud/cloud_suite_test.go +++ b/test/unit/cloud/cloud_suite_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/apache/cloudstack-go/v2/cloudstack" + "github.com/aws/cluster-api-provider-cloudstack-staging/test/unit/dummies" "github.com/aws/cluster-api-provider-cloudstack/pkg/cloud" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -28,6 +29,7 @@ import ( var ( realCloudClient cloud.Client + client cloud.Client realCSClient *cloudstack.CloudStackClient ) @@ -36,9 +38,21 @@ var _ = BeforeSuite(func() { var connectionErr error realCloudClient, connectionErr = cloud.NewClient(projDir + "/cloud-config") Ω(connectionErr).ShouldNot(HaveOccurred()) + + Ω().Should(Succeed()) }) func TestCloud(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Cloud Suite") } + +// FetchIntegTestResources runs through basic CloudStack Client setup methods needed to test others. +func FetchIntegTestResources() { + Ω(client.ResolveZone(dummies.CSZone1)).Should(Succeed()) + Ω(dummies.CSZone1.Spec.ID).ShouldNot(BeEmpty()) + dummies.CSMachine1.Status.ZoneID = dummies.CSZone1.Spec.ID + dummies.CSMachine1.Spec.DiskOffering.Name = "" + dummies.CSCluster.Spec.ControlPlaneEndpoint.Host = "" + Ω(client.GetOrCreateIsolatedNetwork(dummies.CSZone1, dummies.CSISONet1, dummies.CSCluster)).Should(Succeed()) +} diff --git a/test/unit/cloud/isolated_network_test.go b/test/unit/cloud/isolated_network_test.go index a43b6a34..8d8931d3 100644 --- a/test/unit/cloud/isolated_network_test.go +++ b/test/unit/cloud/isolated_network_test.go @@ -192,16 +192,8 @@ var _ = Describe("Network", func() { }) Context("Networking Integ Tests", func() { - client, connectionErr := cloud.NewClient("../../cloud-config") - BeforeEach(func() { - if connectionErr != nil { // Only do these tests if an actual ACS instance is available via cloud-config. - Skip("Could not connect to ACS instance.") - } - if err := client.ResolveNetwork(&dummies.Net1); err != nil { - Skip("Could not find network.") - } - + client = realCloudClient // Delete any existing tags existingTags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID) if err != nil { @@ -213,6 +205,17 @@ var _ = Describe("Network", func() { Fail("Failed to delete existing tags. Error: " + err.Error()) } } + dummies.SetDummyVars() + + // Setup Isolated Network Dummy Vars. + dummies.CSISONet1.Spec.ID = "" // Make CAPC methods resolve this. + dummies.CSCluster.Spec.ControlPlaneEndpoint.Host = "" // Make CAPC methods resolve this. + dummies.CSZone1.Spec.ID = "" // Make CAPC methods resolve this. + dummies.CSCluster.Status.Zones = capcv1.ZoneStatusMap{} + + // Get Zone info needed for network testing. + Ω(client.ResolveZone(dummies.CSZone1)).Should(Succeed()) + dummies.CSISONet1.Spec.ID = "" }) It("fetches an isolated network", func() { @@ -231,28 +234,6 @@ var _ = Describe("Network", func() { dummies.CSCluster.Spec.ControlPlaneEndpoint.Host = "" Ω(client.ResolveNetwork(&dummies.ISONet1)).Should(Succeed()) }) - }) - - Context("Network Semi-Integ Tests", func() { - client, connectionErr := cloud.NewClient("../../cloud-config") - - BeforeEach(func() { - if connectionErr != nil { // Only do these tests if an actual ACS instance is available via cloud-config. - Skip("Could not connect to ACS instance.") - } - - dummies.SetDummyVars() - - // Setup Isolated Network Dummy Vars. - dummies.CSISONet1.Spec.ID = "" // Make CAPC methods resolve this. - dummies.CSCluster.Spec.ControlPlaneEndpoint.Host = "" // Make CAPC methods resolve this. - dummies.CSZone1.Spec.ID = "" // Make CAPC methods resolve this. - dummies.CSCluster.Status.Zones = capcv1.ZoneStatusMap{} - - // Get Zone info needed for network testing. - Ω(client.ResolveZone(dummies.CSZone1)).Should(Succeed()) - dummies.CSISONet1.Spec.ID = "" - }) It("adds an isolated network and doesn't fail when asked to GetOrCreateIsolatedNetwork multiple times", func() { Ω(client.GetOrCreateIsolatedNetwork(dummies.CSZone1, dummies.CSISONet1, dummies.CSCluster)).Should(Succeed()) diff --git a/test/unit/cloud/tags_test.go b/test/unit/cloud/tags_test.go index 1f00c428..d4c2c209 100644 --- a/test/unit/cloud/tags_test.go +++ b/test/unit/cloud/tags_test.go @@ -29,23 +29,16 @@ var _ = Describe("Tag Unit Tests", func() { }) Context("Tag Integ Tests", func() { - client, connectionErr := cloud.NewClient("../../cloud-config") - BeforeEach(func() { - if connectionErr != nil { // Only do these tests if an actual ACS instance is available via cloud-config. - Skip("Could not connect to ACS instance.") - } - if err := client.ResolveNetwork(&dummies.Net1); err != nil { - Skip("Could not find network.") - } + client = realCloudClient + FetchIntegTestResources() - // Delete any existing tags - existingTags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID) + existingTags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) if err != nil { Fail("Failed to get existing tags. Error: " + err.Error()) } if len(existingTags) > 0 { - err = client.DeleteTags(cloud.ResourceTypeNetwork, dummies.Net1.ID, existingTags) + err = client.DeleteTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, existingTags) if err != nil { Fail("Failed to delete existing tags. Error: " + err.Error()) } @@ -53,87 +46,87 @@ var _ = Describe("Tag Unit Tests", func() { }) It("adds and gets a resource tag", func() { - Ω(client.AddTags(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.Tags)).Should(Succeed()) - Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Equal(dummies.Tags)) + Ω(client.AddTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.Tags)).Should(Succeed()) + Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Equal(dummies.Tags)) }) It("deletes a resource tag", func() { - Ω(client.AddTags(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.Tags)).Should(Succeed()) - Ω(client.DeleteTags(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.Tags)).Should(Succeed()) - Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Equal(map[string]string{})) + Ω(client.AddTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.Tags)).Should(Succeed()) + Ω(client.DeleteTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.Tags)).Should(Succeed()) + Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Equal(map[string]string{})) }) It("returns an error when you delete a tag that doesn't exist", func() { - Ω(client.DeleteTags(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.Tags)).Should(Succeed()) + Ω(client.DeleteTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.Tags)).Should(Succeed()) }) It("adds the tags for a cluster (resource created by CAPC)", func() { - Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)). + Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)). Should(Succeed()) - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)). + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)). Should(Succeed()) // Verify tags - tags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID) + tags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) Ω(err).ShouldNot(HaveOccurred()) Ω(tags[dummies.CSClusterTagKey]).Should(Equal(dummies.CSClusterTagVal)) }) It("does not fail when the cluster tags are added twice", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) }) It("doesn't adds the tags for a cluster (resource NOT created by CAPC)", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) // Verify tags - tags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID) + tags, err := client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) Ω(err).Should(BeNil()) Ω(tags[dummies.CreatedByCapcKey]).Should(Equal("")) Ω(tags[dummies.CSClusterTagKey]).Should(Equal("")) }) It("deletes a cluster tag", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.Net1.ID)).ShouldNot(HaveKey(dummies.CSClusterTagKey)) + Ω(client.GetTags(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).ShouldNot(HaveKey(dummies.CSClusterTagKey)) }) It("adds and deletes a created by capc tag", func() { - Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Succeed()) - Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Succeed()) + Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Succeed()) + Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Succeed()) }) It("does not fail when cluster and CAPC created tags are deleted twice", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Succeed()) - Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Succeed()) + Ω(client.DeleteCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Succeed()) }) It("does not allow a resource to be deleted when there are no tags", func() { - tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.Net1.ID) + tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) Ω(err).Should(BeNil()) Ω(tagsAllowDisposal).Should(BeFalse()) }) It("does not allow a resource to be deleted when there is a cluster tag", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.Net1.ID) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) Ω(err).Should(BeNil()) Ω(tagsAllowDisposal).Should(BeFalse()) }) It("does allow a resource to be deleted when there are no cluster tags and there is a CAPC created tag", func() { - Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) - Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.Net1.ID)).Should(Succeed()) - Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.Net1.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) + Ω(client.AddCreatedByCAPCTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID)).Should(Succeed()) + Ω(client.DeleteClusterTag(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID, dummies.CSCluster)).Should(Succeed()) - tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.Net1.ID) + tagsAllowDisposal, err := client.DoClusterTagsAllowDisposal(cloud.ResourceTypeNetwork, dummies.CSISONet1.Spec.ID) Ω(err).Should(BeNil()) Ω(tagsAllowDisposal).Should(BeTrue()) }) diff --git a/test/unit/cloud/user_credentials_test.go b/test/unit/cloud/user_credentials_test.go index 65e915d1..2c35198c 100644 --- a/test/unit/cloud/user_credentials_test.go +++ b/test/unit/cloud/user_credentials_test.go @@ -20,7 +20,6 @@ import ( "github.com/aws/cluster-api-provider-cloudstack-staging/test/unit/dummies" "github.com/aws/cluster-api-provider-cloudstack/pkg/cloud" . "github.com/onsi/ginkgo/v2" - "github.com/pkg/errors" . "github.com/onsi/gomega" ) @@ -37,17 +36,14 @@ var _ = Describe("User Credentials", func() { }) Context("UserCred Semi-Integ Tests", func() { - client, connectionErr := cloud.NewClient("../../cloud-config") var domain cloud.Domain var account cloud.Account var user cloud.User BeforeEach(func() { - if connectionErr != nil { // Only do these tests if an actual ACS instance is available via cloud-config. - Skip(errors.Wrapf(connectionErr, "Could not connect to ACS instance").Error()) - } + client = realCloudClient - // Settup dummies. + // Setup dummies. // TODO: move these to the test dummies package. domain = cloud.Domain{Path: "ROOT/blah/blah/subsub"} account = cloud.Account{Name: "SuperNested", Domain: domain} diff --git a/test/unit/dummies/vars.go b/test/unit/dummies/vars.go index e28885a8..4b9bbd78 100644 --- a/test/unit/dummies/vars.go +++ b/test/unit/dummies/vars.go @@ -76,15 +76,6 @@ var ( // Declare exported dummy vars. DiskOffering capcv1.CloudStackResourceDiskOffering ) -// CloudStackResourceIdentifier: capcv1.CloudStackResourceIdentifier{ -// Name: "Small", -// }, -// MountPath: "/data", -// Device: "/dev/vdb", -// Filesystem: "ext4", -// Label: "data_disk", -// } - // variables: // KUBERNETES_VERSION_MANAGEMENT: "v1.20.10" // KUBERNETES_VERSION: "v1.20.10" @@ -129,6 +120,7 @@ func SetDummyVars() { // These need to be in order as they build upon eachother. SetDummyZoneVars() + SetDiskOfferingVars() SetDummyCAPCClusterVars() SetDummyCAPIClusterVars() SetDummyCAPIMachineVars() @@ -138,6 +130,15 @@ func SetDummyVars() { LBRuleID = "FakeLBRuleID" } +func SetDiskOfferingVars() { + DiskOffering = capcv1.CloudStackResourceDiskOffering{CloudStackResourceIdentifier: capcv1.CloudStackResourceIdentifier{Name: "Small"}, + MountPath: "/data", + Device: "/dev/vdb", + Filesystem: "ext4", + Label: "data_disk", + } +} + func CAPCNetToCSAPINet(net *capcv1.Network) *csapi.Network { return &csapi.Network{ Name: net.Name, @@ -197,15 +198,7 @@ func SetDummyCSMachineTemplateVars() { Offering: capcv1.CloudStackResourceIdentifier{ Name: GetYamlVal("CLOUDSTACK_CONTROL_PLANE_MACHINE_OFFERING"), }, - DiskOffering: capcv1.CloudStackResourceDiskOffering{ - CloudStackResourceIdentifier: capcv1.CloudStackResourceIdentifier{ - Name: "DiskOffering", - }, - MountPath: "/data", - Device: "/dev/vdb", - Filesystem: "ext4", - Label: "data_disk", - }, + DiskOffering: DiskOffering, Details: map[string]string{ "memoryOvercommitRatio": "1.2", }, @@ -247,7 +240,6 @@ func SetDummyCSMachineVars() { Filesystem: "ext4", Label: "data_disk", }, - AffinityGroupIDs: []string{"41eeb6e4-946f-4a18-b543-b2184815f1e4"}, Details: map[string]string{ "memoryOvercommitRatio": "1.2", }, @@ -293,7 +285,7 @@ func SetDummyCAPCClusterVars() { ID: "FakeAffinityGroupID"} CSAffinityGroup = &capcv1.CloudStackAffinityGroup{ Spec: capcv1.CloudStackAffinityGroupSpec{Name: AffinityGroup.Name, Type: AffinityGroup.Type, ID: AffinityGroup.ID}} - Net1 = capcv1.Network{Name: "SharedGuestNet1", Type: cloud.NetworkTypeShared, ID: "FakeSharedNetID1"} + Net1 = capcv1.Network{Name: GetYamlVal("CLOUDSTACK_NETWORK_NAME"), Type: cloud.NetworkTypeShared} Net2 = capcv1.Network{Name: "SharedGuestNet2", Type: cloud.NetworkTypeShared, ID: "FakeSharedNetID2"} ISONet1 = capcv1.Network{Name: "IsoGuestNet1", Type: cloud.NetworkTypeIsolated, ID: "FakeIsolatedNetID1"} CSCluster = &capcv1.CloudStackCluster{