Update test parsing to ensure ID is present (#39) main v2.13.2
authorDavid Jumani <dj.davidjumani1994@gmail.com>
Mon, 13 Jun 2022 03:54:01 +0000 (09:24 +0530)
committerGitHub <noreply@github.com>
Mon, 13 Jun 2022 03:54:01 +0000 (09:24 +0530)
57 files changed:
cloudstack/DiskOfferingService.go
cloudstack/HostService.go
cloudstack/ISOService.go
cloudstack/KubernetesService.go
cloudstack/cloudstack.go
generate/generate.go
test/AccountService_test.go
test/AddressService_test.go
test/AffinityGroupService_test.go
test/AnnotationService_test.go
test/AutoScaleService_test.go
test/BaremetalService_test.go
test/ClusterService_test.go
test/DiskOfferingService_test.go
test/DomainService_test.go
test/FirewallService_test.go
test/GuestOSService_test.go
test/HostService_test.go
test/HypervisorService_test.go
test/ISOService_test.go
test/ImageStoreService_test.go
test/InternalLBService_test.go
test/KubernetesService_test.go
test/LDAPService_test.go
test/LoadBalancerService_test.go
test/NATService_test.go
test/NetworkACLService_test.go
test/NetworkDeviceService_test.go
test/NetworkOfferingService_test.go
test/NetworkService_test.go
test/NicService_test.go
test/OvsElementService_test.go
test/PodService_test.go
test/PoolService_test.go
test/PortableIPService_test.go
test/ProjectService_test.go
test/RoleService_test.go
test/RouterService_test.go
test/SSHService_test.go
test/SecurityGroupService_test.go
test/ServiceOfferingService_test.go
test/SnapshotService_test.go
test/StoragePoolService_test.go
test/SwiftService_test.go
test/SystemVMService_test.go
test/TemplateService_test.go
test/UCSService_test.go
test/UsageService_test.go
test/UserService_test.go
test/VLANService_test.go
test/VMGroupService_test.go
test/VPCService_test.go
test/VPNService_test.go
test/VirtualMachineService_test.go
test/VolumeService_test.go
test/ZoneService_test.go
test/testdata/SSHService.json

index 863a04604aac001d287b5e2ab979cb73a4f01f50..85b886a7f62e3f222cb0a3a3c7f146ed6184d702 100644 (file)
@@ -616,6 +616,10 @@ func (s *DiskOfferingService) CreateDiskOffering(p *CreateDiskOfferingParams) (*
                return nil, err
        }
 
+       if resp, err = getRawValue(resp); err != nil {
+               return nil, err
+       }
+
        var r CreateDiskOfferingResponse
        if err := json.Unmarshal(resp, &r); err != nil {
                return nil, err
index b241677101d60f158f3c41221669bc8ecafd8035..54e3b4411e963488eb988a7128e53135cf5f51b3 100644 (file)
@@ -744,6 +744,10 @@ func (s *HostService) AddHost(p *AddHostParams) (*AddHostResponse, error) {
                return nil, err
        }
 
+       if resp, err = getRawValue(resp); err != nil {
+               return nil, err
+       }
+
        var r AddHostResponse
        if err := json.Unmarshal(resp, &r); err != nil {
                return nil, err
index db285a387f9a7e201bd8b9a9035ca230873c48aa..7ed08ff9903dc3313818c545f54d76b493903813 100644 (file)
@@ -2033,6 +2033,10 @@ func (s *ISOService) RegisterIso(p *RegisterIsoParams) (*RegisterIsoResponse, er
                return nil, err
        }
 
+       if resp, err = getRawValue(resp); err != nil {
+               return nil, err
+       }
+
        var r RegisterIsoResponse
        if err := json.Unmarshal(resp, &r); err != nil {
                return nil, err
index c01dbffc30eef25e6c225986af02e3576513ba66..ba9a8703b86d65cc1171b2e2e97a47bd8dfd7d76 100644 (file)
@@ -218,6 +218,10 @@ func (s *KubernetesService) AddKubernetesSupportedVersion(p *AddKubernetesSuppor
                return nil, err
        }
 
+       if resp, err = getRawValue(resp); err != nil {
+               return nil, err
+       }
+
        var r AddKubernetesSupportedVersionResponse
        if err := json.Unmarshal(resp, &r); err != nil {
                return nil, err
index 0ca6a126c0da7f5b90db4d68b746370dcafc268e..256a257f388b5e88dada9b820119f2a513c949e0 100644 (file)
@@ -39,7 +39,7 @@ import (
        "strings"
        "time"
 
-       "github.com/golang/mock/gomock"
+       gomock "github.com/golang/mock/gomock"
 )
 
 // UnlimitedResourceID is a special ID to define an unlimited resource
@@ -533,14 +533,33 @@ func encodeValues(v url.Values) string {
        return buf.String()
 }
 
-// Generic function to get the first raw value from a response as json.RawMessage
+// Generic function to get the first non-count raw value from a response as json.RawMessage
 func getRawValue(b json.RawMessage) (json.RawMessage, error) {
        var m map[string]json.RawMessage
        if err := json.Unmarshal(b, &m); err != nil {
                return nil, err
        }
-       for _, v := range m {
-               return v, nil
+       getArrayResponse := false
+       for k := range m {
+               if k == "count" {
+                       getArrayResponse = true
+               }
+       }
+       if getArrayResponse {
+               var resp []json.RawMessage
+               for k, v := range m {
+                       if k != "count" {
+                               if err := json.Unmarshal(v, &resp); err != nil {
+                                       return nil, err
+                               }
+                               return resp[0], nil
+                       }
+               }
+
+       } else {
+               for _, v := range m {
+                       return v, nil
+               }
        }
        return nil, fmt.Errorf("Unable to extract the raw value from:\n\n%s\n\n", string(b))
 }
index a41fe862e47c0fc5b4119d29feb77987964e57a1..70a199b3b70af28385d158e60a8a69ed76d7b4ba 100644 (file)
@@ -584,14 +584,33 @@ func (as *allServices) GeneralCode() ([]byte, error) {
        pn("    return buf.String()")
        pn("}")
        pn("")
-       pn("// Generic function to get the first raw value from a response as json.RawMessage")
+       pn("// Generic function to get the first non-count raw value from a response as json.RawMessage")
        pn("func getRawValue(b json.RawMessage) (json.RawMessage, error) {")
        pn("    var m map[string]json.RawMessage")
        pn("    if err := json.Unmarshal(b, &m); err != nil {")
        pn("            return nil, err")
        pn("    }")
-       pn("    for _, v := range m {")
-       pn("            return v, nil")
+       pn("    getArrayResponse := false")
+       pn("    for k := range m {")
+       pn("            if k == \"count\" {")
+       pn("                    getArrayResponse = true")
+       pn("            }")
+       pn("    }")
+       pn("    if getArrayResponse {")
+       pn("            var resp []json.RawMessage")
+       pn("            for k, v := range m {")
+       pn("                    if k != \"count\" {")
+       pn("                            if err := json.Unmarshal(v, &resp); err != nil {")
+       pn("                                    return nil, err")
+       pn("                            }")
+       pn("                            return resp[0], nil")
+       pn("                    }")
+       pn("            }")
+       pn("")
+       pn("    } else {")
+       pn("            for _, v := range m {")
+       pn("                    return v, nil")
+       pn("            }")
        pn("    }")
        pn("    return nil, fmt.Errorf(\"Unable to extract the raw value from:\\n\\n%%s\\n\\n\", string(b))")
        pn("}")
@@ -1068,10 +1087,27 @@ func (s *service) generateAPITest(a *API) {
                }
        }
        pn(")")
-       pn("            _, err := client.%s.%s(p)", strings.TrimSuffix(s.name, "Service"), capitalize(a.Name))
+       idPresent := false
+       if !(strings.HasPrefix(a.Name, "list") || a.Name == "registerTemplate") {
+               for _, ap := range a.Response {
+                       if ap.Name == "id" && ap.Type == "string" {
+                               pn("            r, err := client.%s.%s(p)", strings.TrimSuffix(s.name, "Service"), capitalize(a.Name))
+                               idPresent = true
+                               break
+                       }
+               }
+       }
+       if !idPresent {
+               pn("            _, err := client.%s.%s(p)", strings.TrimSuffix(s.name, "Service"), capitalize(a.Name))
+       }
        pn("            if err != nil {")
        pn("                    t.Errorf(err.Error())")
        pn("            }")
+       if idPresent {
+               pn("            if r.Id == \"\" {")
+               pn("                    t.Errorf(\"Failed to parse response. ID not found\")")
+               pn("            }")
+       }
        pn("    }")
        pn("    t.Run(\"%s\", test%s)", capitalize(a.Name), a.Name)
        pn("")
@@ -1624,7 +1660,11 @@ func (s *service) generateNewAPICallFunc(a *API) {
                "RegisterUserKeys",
                "GetUserKeys",
                "AddAnnotation",
-               "RemoveAnnotation":
+               "RemoveAnnotation",
+               "AddKubernetesSupportedVersion",
+               "CreateDiskOffering",
+               "AddHost",
+               "RegisterIso":
                pn("    if resp, err = getRawValue(resp); err != nil {")
                pn("            return nil, err")
                pn("    }")
index bc9487e0ac62dd428a1b089d61c87ce263b02000..be0bbf85143e729a07a70bc8d0959ea4cbbd5f97 100644 (file)
@@ -40,10 +40,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewCreateAccountParams("email", "firstname", "lastname", "password", "username")
-               _, err := client.Account.CreateAccount(p)
+               r, err := client.Account.CreateAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateAccount", testcreateAccount)
 
@@ -64,10 +67,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewDisableAccountParams(true)
-               _, err := client.Account.DisableAccount(p)
+               r, err := client.Account.DisableAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DisableAccount", testdisableAccount)
 
@@ -76,10 +82,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewEnableAccountParams()
-               _, err := client.Account.EnableAccount(p)
+               r, err := client.Account.EnableAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("EnableAccount", testenableAccount)
 
@@ -124,10 +133,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewLockAccountParams("account", "domainid")
-               _, err := client.Account.LockAccount(p)
+               r, err := client.Account.LockAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("LockAccount", testlockAccount)
 
@@ -136,10 +148,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewMarkDefaultZoneForAccountParams("account", "domainid", "zoneid")
-               _, err := client.Account.MarkDefaultZoneForAccount(p)
+               r, err := client.Account.MarkDefaultZoneForAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("MarkDefaultZoneForAccount", testmarkDefaultZoneForAccount)
 
@@ -148,10 +163,13 @@ func TestAccountService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Account.NewUpdateAccountParams()
-               _, err := client.Account.UpdateAccount(p)
+               r, err := client.Account.UpdateAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateAccount", testupdateAccount)
 
index 5a71b7169a2bdb1f8954384c6c4aa9b21cd396be..39a05c8205deaa4d7fc40d72ecf9e8d26fa91963 100644 (file)
@@ -40,10 +40,13 @@ func TestAddressService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Address.NewAssociateIpAddressParams()
-               _, err := client.Address.AssociateIpAddress(p)
+               r, err := client.Address.AssociateIpAddress(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AssociateIpAddress", testassociateIpAddress)
 
@@ -76,10 +79,13 @@ func TestAddressService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Address.NewUpdateIpAddressParams("id")
-               _, err := client.Address.UpdateIpAddress(p)
+               r, err := client.Address.UpdateIpAddress(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateIpAddress", testupdateIpAddress)
 
index e841b4a89da8c1ce1e4274e9bc2ec1a1b7db2e32..ecddf8e6ce433664e7c6186f8d5cb4329462c17a 100644 (file)
@@ -40,10 +40,13 @@ func TestAffinityGroupService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AffinityGroup.NewCreateAffinityGroupParams("name", "type")
-               _, err := client.AffinityGroup.CreateAffinityGroup(p)
+               r, err := client.AffinityGroup.CreateAffinityGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateAffinityGroup", testcreateAffinityGroup)
 
@@ -88,10 +91,13 @@ func TestAffinityGroupService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AffinityGroup.NewUpdateVMAffinityGroupParams("id")
-               _, err := client.AffinityGroup.UpdateVMAffinityGroup(p)
+               r, err := client.AffinityGroup.UpdateVMAffinityGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVMAffinityGroup", testupdateVMAffinityGroup)
 
index 3747ff304d91041895760e8166a262bc28cde965..8784c8f76ad2967b8a0292fc8aec0bf1fc0a8fb4 100644 (file)
@@ -40,10 +40,13 @@ func TestAnnotationService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Annotation.NewAddAnnotationParams()
-               _, err := client.Annotation.AddAnnotation(p)
+               r, err := client.Annotation.AddAnnotation(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddAnnotation", testaddAnnotation)
 
@@ -64,10 +67,13 @@ func TestAnnotationService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Annotation.NewRemoveAnnotationParams("id")
-               _, err := client.Annotation.RemoveAnnotation(p)
+               r, err := client.Annotation.RemoveAnnotation(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RemoveAnnotation", testremoveAnnotation)
 
@@ -76,10 +82,13 @@ func TestAnnotationService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Annotation.NewUpdateAnnotationVisibilityParams(true, "id")
-               _, err := client.Annotation.UpdateAnnotationVisibility(p)
+               r, err := client.Annotation.UpdateAnnotationVisibility(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateAnnotationVisibility", testupdateAnnotationVisibility)
 
index 0eb73f8c404982aec5ced7225ea3cd92e6baedf9..18d48a3d89ed54b622c4c32163d5f4d0f3779a5a 100644 (file)
@@ -40,10 +40,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewCreateAutoScalePolicyParams("action", []string{}, 0)
-               _, err := client.AutoScale.CreateAutoScalePolicy(p)
+               r, err := client.AutoScale.CreateAutoScalePolicy(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateAutoScalePolicy", testcreateAutoScalePolicy)
 
@@ -52,10 +55,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewCreateAutoScaleVmGroupParams("lbruleid", 0, 0, []string{}, []string{}, "vmprofileid")
-               _, err := client.AutoScale.CreateAutoScaleVmGroup(p)
+               r, err := client.AutoScale.CreateAutoScaleVmGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateAutoScaleVmGroup", testcreateAutoScaleVmGroup)
 
@@ -64,10 +70,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewCreateAutoScaleVmProfileParams("serviceofferingid", "templateid", "zoneid")
-               _, err := client.AutoScale.CreateAutoScaleVmProfile(p)
+               r, err := client.AutoScale.CreateAutoScaleVmProfile(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateAutoScaleVmProfile", testcreateAutoScaleVmProfile)
 
@@ -76,10 +85,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewCreateConditionParams("counterid", "relationaloperator", 0)
-               _, err := client.AutoScale.CreateCondition(p)
+               r, err := client.AutoScale.CreateCondition(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateCondition", testcreateCondition)
 
@@ -88,10 +100,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewCreateCounterParams("name", "source", "value")
-               _, err := client.AutoScale.CreateCounter(p)
+               r, err := client.AutoScale.CreateCounter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateCounter", testcreateCounter)
 
@@ -160,10 +175,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewDisableAutoScaleVmGroupParams("id")
-               _, err := client.AutoScale.DisableAutoScaleVmGroup(p)
+               r, err := client.AutoScale.DisableAutoScaleVmGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DisableAutoScaleVmGroup", testdisableAutoScaleVmGroup)
 
@@ -172,10 +190,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewEnableAutoScaleVmGroupParams("id")
-               _, err := client.AutoScale.EnableAutoScaleVmGroup(p)
+               r, err := client.AutoScale.EnableAutoScaleVmGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("EnableAutoScaleVmGroup", testenableAutoScaleVmGroup)
 
@@ -244,10 +265,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewUpdateAutoScalePolicyParams("id")
-               _, err := client.AutoScale.UpdateAutoScalePolicy(p)
+               r, err := client.AutoScale.UpdateAutoScalePolicy(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateAutoScalePolicy", testupdateAutoScalePolicy)
 
@@ -256,10 +280,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewUpdateAutoScaleVmGroupParams("id")
-               _, err := client.AutoScale.UpdateAutoScaleVmGroup(p)
+               r, err := client.AutoScale.UpdateAutoScaleVmGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateAutoScaleVmGroup", testupdateAutoScaleVmGroup)
 
@@ -268,10 +295,13 @@ func TestAutoScaleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.AutoScale.NewUpdateAutoScaleVmProfileParams("id")
-               _, err := client.AutoScale.UpdateAutoScaleVmProfile(p)
+               r, err := client.AutoScale.UpdateAutoScaleVmProfile(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateAutoScaleVmProfile", testupdateAutoScaleVmProfile)
 
index 77a53ba69b8dc3408716503bb47e61b4fe0fbd83..a8f4b8b11ffd2da3cf823b3bd6d74bd1df17e897 100644 (file)
@@ -40,10 +40,13 @@ func TestBaremetalService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Baremetal.NewAddBaremetalDhcpParams("dhcpservertype", "password", "physicalnetworkid", "url", "username")
-               _, err := client.Baremetal.AddBaremetalDhcp(p)
+               r, err := client.Baremetal.AddBaremetalDhcp(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddBaremetalDhcp", testaddBaremetalDhcp)
 
@@ -52,10 +55,13 @@ func TestBaremetalService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Baremetal.NewAddBaremetalPxeKickStartServerParams("password", "physicalnetworkid", "pxeservertype", "tftpdir", "url", "username")
-               _, err := client.Baremetal.AddBaremetalPxeKickStartServer(p)
+               r, err := client.Baremetal.AddBaremetalPxeKickStartServer(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddBaremetalPxeKickStartServer", testaddBaremetalPxeKickStartServer)
 
@@ -64,10 +70,13 @@ func TestBaremetalService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Baremetal.NewAddBaremetalPxePingServerParams("password", "physicalnetworkid", "pingdir", "pingstorageserverip", "pxeservertype", "tftpdir", "url", "username")
-               _, err := client.Baremetal.AddBaremetalPxePingServer(p)
+               r, err := client.Baremetal.AddBaremetalPxePingServer(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddBaremetalPxePingServer", testaddBaremetalPxePingServer)
 
@@ -76,10 +85,13 @@ func TestBaremetalService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Baremetal.NewAddBaremetalRctParams("baremetalrcturl")
-               _, err := client.Baremetal.AddBaremetalRct(p)
+               r, err := client.Baremetal.AddBaremetalRct(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddBaremetalRct", testaddBaremetalRct)
 
index d08f0b1f43d84adf23d7a93642092ab380405cb1..93595aa0a714c05e99aa04e565104cfcba965a48 100644 (file)
@@ -40,10 +40,13 @@ func TestClusterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Cluster.NewAddClusterParams("clustername", "clustertype", "hypervisor", "podid", "zoneid")
-               _, err := client.Cluster.AddCluster(p)
+               r, err := client.Cluster.AddCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddCluster", testaddCluster)
 
@@ -52,10 +55,13 @@ func TestClusterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Cluster.NewDedicateClusterParams("clusterid", "domainid")
-               _, err := client.Cluster.DedicateCluster(p)
+               r, err := client.Cluster.DedicateCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicateCluster", testdedicateCluster)
 
@@ -172,10 +178,13 @@ func TestClusterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Cluster.NewUpdateClusterParams("id")
-               _, err := client.Cluster.UpdateCluster(p)
+               r, err := client.Cluster.UpdateCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateCluster", testupdateCluster)
 
index 87ed9a9c4d9c9f904b1132999a07348fb451d492..efe301b984b74c897d9f392410525669ecf1756a 100644 (file)
@@ -40,10 +40,13 @@ func TestDiskOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.DiskOffering.NewCreateDiskOfferingParams("displaytext", "name")
-               _, err := client.DiskOffering.CreateDiskOffering(p)
+               r, err := client.DiskOffering.CreateDiskOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateDiskOffering", testcreateDiskOffering)
 
@@ -76,10 +79,13 @@ func TestDiskOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.DiskOffering.NewUpdateDiskOfferingParams("id")
-               _, err := client.DiskOffering.UpdateDiskOffering(p)
+               r, err := client.DiskOffering.UpdateDiskOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateDiskOffering", testupdateDiskOffering)
 
index cd8dfa5be8db5eeda88007366a2cefc2dea65599..8d2617d404af99bf483a05f4da60766a0f17a169 100644 (file)
@@ -40,10 +40,13 @@ func TestDomainService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Domain.NewCreateDomainParams("name")
-               _, err := client.Domain.CreateDomain(p)
+               r, err := client.Domain.CreateDomain(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateDomain", testcreateDomain)
 
@@ -88,10 +91,13 @@ func TestDomainService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Domain.NewUpdateDomainParams("id")
-               _, err := client.Domain.UpdateDomain(p)
+               r, err := client.Domain.UpdateDomain(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateDomain", testupdateDomain)
 
index f49ef899647507860b1f8d0f641a1fde9fe7e98d..daef84541359883e4be11fef006e9378aa5dfaaf 100644 (file)
@@ -64,10 +64,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewCreateEgressFirewallRuleParams("networkid", "protocol")
-               _, err := client.Firewall.CreateEgressFirewallRule(p)
+               r, err := client.Firewall.CreateEgressFirewallRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateEgressFirewallRule", testcreateEgressFirewallRule)
 
@@ -76,10 +79,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewCreateFirewallRuleParams("ipaddressid", "protocol")
-               _, err := client.Firewall.CreateFirewallRule(p)
+               r, err := client.Firewall.CreateFirewallRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateFirewallRule", testcreateFirewallRule)
 
@@ -88,10 +94,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewCreatePortForwardingRuleParams("ipaddressid", 0, "protocol", 0, "virtualmachineid")
-               _, err := client.Firewall.CreatePortForwardingRule(p)
+               r, err := client.Firewall.CreatePortForwardingRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreatePortForwardingRule", testcreatePortForwardingRule)
 
@@ -196,10 +205,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewUpdateEgressFirewallRuleParams("id")
-               _, err := client.Firewall.UpdateEgressFirewallRule(p)
+               r, err := client.Firewall.UpdateEgressFirewallRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateEgressFirewallRule", testupdateEgressFirewallRule)
 
@@ -208,10 +220,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewUpdateFirewallRuleParams("id")
-               _, err := client.Firewall.UpdateFirewallRule(p)
+               r, err := client.Firewall.UpdateFirewallRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateFirewallRule", testupdateFirewallRule)
 
@@ -220,10 +235,13 @@ func TestFirewallService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Firewall.NewUpdatePortForwardingRuleParams("id")
-               _, err := client.Firewall.UpdatePortForwardingRule(p)
+               r, err := client.Firewall.UpdatePortForwardingRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdatePortForwardingRule", testupdatePortForwardingRule)
 
index 7877db2ccaca89e7948269660b7c078b486c96fa..fd794cdda108d81edf09d4ebb4bf45d3edfac191 100644 (file)
@@ -40,10 +40,13 @@ func TestGuestOSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.GuestOS.NewAddGuestOsParams(map[string]string{}, "oscategoryid", "osdisplayname")
-               _, err := client.GuestOS.AddGuestOs(p)
+               r, err := client.GuestOS.AddGuestOs(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddGuestOs", testaddGuestOs)
 
@@ -52,10 +55,13 @@ func TestGuestOSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.GuestOS.NewAddGuestOsMappingParams("hypervisor", "hypervisorversion", "osnameforhypervisor")
-               _, err := client.GuestOS.AddGuestOsMapping(p)
+               r, err := client.GuestOS.AddGuestOsMapping(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddGuestOsMapping", testaddGuestOsMapping)
 
@@ -124,10 +130,13 @@ func TestGuestOSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.GuestOS.NewUpdateGuestOsParams(map[string]string{}, "id", "osdisplayname")
-               _, err := client.GuestOS.UpdateGuestOs(p)
+               r, err := client.GuestOS.UpdateGuestOs(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateGuestOs", testupdateGuestOs)
 
@@ -136,10 +145,13 @@ func TestGuestOSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.GuestOS.NewUpdateGuestOsMappingParams("id", "osnameforhypervisor")
-               _, err := client.GuestOS.UpdateGuestOsMapping(p)
+               r, err := client.GuestOS.UpdateGuestOsMapping(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateGuestOsMapping", testupdateGuestOsMapping)
 
index 1ad6e25827acdee01d2d59f712af5d61d03bc18f..ab46ec9efee0b9f137956fdc9fd31cbe469b1523 100644 (file)
@@ -40,10 +40,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewAddBaremetalHostParams("hypervisor", "podid", "url", "zoneid")
-               _, err := client.Host.AddBaremetalHost(p)
+               r, err := client.Host.AddBaremetalHost(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddBaremetalHost", testaddBaremetalHost)
 
@@ -64,10 +67,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewAddHostParams("hypervisor", "podid", "url", "zoneid")
-               _, err := client.Host.AddHost(p)
+               r, err := client.Host.AddHost(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddHost", testaddHost)
 
@@ -76,10 +82,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewAddSecondaryStorageParams("url")
-               _, err := client.Host.AddSecondaryStorage(p)
+               r, err := client.Host.AddSecondaryStorage(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddSecondaryStorage", testaddSecondaryStorage)
 
@@ -88,10 +97,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewCancelHostMaintenanceParams("id")
-               _, err := client.Host.CancelHostMaintenance(p)
+               r, err := client.Host.CancelHostMaintenance(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CancelHostMaintenance", testcancelHostMaintenance)
 
@@ -124,10 +136,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewDedicateHostParams("domainid", "hostid")
-               _, err := client.Host.DedicateHost(p)
+               r, err := client.Host.DedicateHost(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicateHost", testdedicateHost)
 
@@ -172,10 +187,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewFindHostsForMigrationParams("virtualmachineid")
-               _, err := client.Host.FindHostsForMigration(p)
+               r, err := client.Host.FindHostsForMigration(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("FindHostsForMigration", testfindHostsForMigration)
 
@@ -232,10 +250,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewPrepareHostForMaintenanceParams("id")
-               _, err := client.Host.PrepareHostForMaintenance(p)
+               r, err := client.Host.PrepareHostForMaintenance(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("PrepareHostForMaintenance", testprepareHostForMaintenance)
 
@@ -244,10 +265,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewReconnectHostParams("id")
-               _, err := client.Host.ReconnectHost(p)
+               r, err := client.Host.ReconnectHost(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ReconnectHost", testreconnectHost)
 
@@ -280,10 +304,13 @@ func TestHostService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Host.NewUpdateHostParams("id")
-               _, err := client.Host.UpdateHost(p)
+               r, err := client.Host.UpdateHost(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateHost", testupdateHost)
 
index e0ec6cacdcbe76108feaefc791b7162b895a1688..27facfb1a0750bb12c9f934c82bf041837335ae0 100644 (file)
@@ -64,10 +64,13 @@ func TestHypervisorService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Hypervisor.NewUpdateHypervisorCapabilitiesParams()
-               _, err := client.Hypervisor.UpdateHypervisorCapabilities(p)
+               r, err := client.Hypervisor.UpdateHypervisorCapabilities(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateHypervisorCapabilities", testupdateHypervisorCapabilities)
 
index 01d397ceecc90f8b317630f4438555743317fdba..b9e6d8905dfeea884f458533fb2247d855ef8671 100644 (file)
@@ -40,10 +40,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewAttachIsoParams("id", "virtualmachineid")
-               _, err := client.ISO.AttachIso(p)
+               r, err := client.ISO.AttachIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AttachIso", testattachIso)
 
@@ -52,10 +55,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewCopyIsoParams("id")
-               _, err := client.ISO.CopyIso(p)
+               r, err := client.ISO.CopyIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CopyIso", testcopyIso)
 
@@ -76,10 +82,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewDetachIsoParams("virtualmachineid")
-               _, err := client.ISO.DetachIso(p)
+               r, err := client.ISO.DetachIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DetachIso", testdetachIso)
 
@@ -88,10 +97,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewExtractIsoParams("id", "mode")
-               _, err := client.ISO.ExtractIso(p)
+               r, err := client.ISO.ExtractIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ExtractIso", testextractIso)
 
@@ -124,10 +136,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewRegisterIsoParams("displaytext", "name", "url", "zoneid")
-               _, err := client.ISO.RegisterIso(p)
+               r, err := client.ISO.RegisterIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RegisterIso", testregisterIso)
 
@@ -136,10 +151,13 @@ func TestISOService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ISO.NewUpdateIsoParams("id")
-               _, err := client.ISO.UpdateIso(p)
+               r, err := client.ISO.UpdateIso(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateIso", testupdateIso)
 
index 31fee6a1e4add3eafda8fc2b2dc5a21cbc5a3560..1b04fa11af322a3959cbc0412b897fa60295c3d9 100644 (file)
@@ -40,10 +40,13 @@ func TestImageStoreService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ImageStore.NewAddImageStoreParams("provider")
-               _, err := client.ImageStore.AddImageStore(p)
+               r, err := client.ImageStore.AddImageStore(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddImageStore", testaddImageStore)
 
@@ -52,10 +55,13 @@ func TestImageStoreService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ImageStore.NewAddImageStoreS3Params("accesskey", "bucket", "endpoint", "secretkey")
-               _, err := client.ImageStore.AddImageStoreS3(p)
+               r, err := client.ImageStore.AddImageStoreS3(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddImageStoreS3", testaddImageStoreS3)
 
@@ -64,10 +70,13 @@ func TestImageStoreService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ImageStore.NewCreateSecondaryStagingStoreParams("url")
-               _, err := client.ImageStore.CreateSecondaryStagingStore(p)
+               r, err := client.ImageStore.CreateSecondaryStagingStore(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateSecondaryStagingStore", testcreateSecondaryStagingStore)
 
@@ -124,10 +133,13 @@ func TestImageStoreService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ImageStore.NewUpdateCloudToUseObjectStoreParams("provider")
-               _, err := client.ImageStore.UpdateCloudToUseObjectStore(p)
+               r, err := client.ImageStore.UpdateCloudToUseObjectStore(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateCloudToUseObjectStore", testupdateCloudToUseObjectStore)
 
index 7477127f7f256cd0febc7f25d4e6228e6686c93e..c389f2d6946b1d57ba3f8e5963846fb4e09cc642 100644 (file)
@@ -40,10 +40,13 @@ func TestInternalLBService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.InternalLB.NewConfigureInternalLoadBalancerElementParams(true, "id")
-               _, err := client.InternalLB.ConfigureInternalLoadBalancerElement(p)
+               r, err := client.InternalLB.ConfigureInternalLoadBalancerElement(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ConfigureInternalLoadBalancerElement", testconfigureInternalLoadBalancerElement)
 
@@ -52,10 +55,13 @@ func TestInternalLBService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.InternalLB.NewCreateInternalLoadBalancerElementParams("nspid")
-               _, err := client.InternalLB.CreateInternalLoadBalancerElement(p)
+               r, err := client.InternalLB.CreateInternalLoadBalancerElement(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateInternalLoadBalancerElement", testcreateInternalLoadBalancerElement)
 
@@ -88,10 +94,13 @@ func TestInternalLBService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.InternalLB.NewStartInternalLoadBalancerVMParams("id")
-               _, err := client.InternalLB.StartInternalLoadBalancerVM(p)
+               r, err := client.InternalLB.StartInternalLoadBalancerVM(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StartInternalLoadBalancerVM", teststartInternalLoadBalancerVM)
 
@@ -100,10 +109,13 @@ func TestInternalLBService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.InternalLB.NewStopInternalLoadBalancerVMParams("id")
-               _, err := client.InternalLB.StopInternalLoadBalancerVM(p)
+               r, err := client.InternalLB.StopInternalLoadBalancerVM(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StopInternalLoadBalancerVM", teststopInternalLoadBalancerVM)
 
index 4b4ceb696beda9ec3ceeab27d51e3df0e3e2a0e9..350b3e72415ee8772e693618409881af8e8ff547 100644 (file)
@@ -40,10 +40,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewAddKubernetesSupportedVersionParams(0, 0, "semanticversion")
-               _, err := client.Kubernetes.AddKubernetesSupportedVersion(p)
+               r, err := client.Kubernetes.AddKubernetesSupportedVersion(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddKubernetesSupportedVersion", testaddKubernetesSupportedVersion)
 
@@ -52,10 +55,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewCreateKubernetesClusterParams("description", "kubernetesversionid", "name", "serviceofferingid", 0, "zoneid")
-               _, err := client.Kubernetes.CreateKubernetesCluster(p)
+               r, err := client.Kubernetes.CreateKubernetesCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateKubernetesCluster", testcreateKubernetesCluster)
 
@@ -88,10 +94,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewGetKubernetesClusterConfigParams()
-               _, err := client.Kubernetes.GetKubernetesClusterConfig(p)
+               r, err := client.Kubernetes.GetKubernetesClusterConfig(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("GetKubernetesClusterConfig", testgetKubernetesClusterConfig)
 
@@ -124,10 +133,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewScaleKubernetesClusterParams("id")
-               _, err := client.Kubernetes.ScaleKubernetesCluster(p)
+               r, err := client.Kubernetes.ScaleKubernetesCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ScaleKubernetesCluster", testscaleKubernetesCluster)
 
@@ -136,10 +148,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewStartKubernetesClusterParams("id")
-               _, err := client.Kubernetes.StartKubernetesCluster(p)
+               r, err := client.Kubernetes.StartKubernetesCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StartKubernetesCluster", teststartKubernetesCluster)
 
@@ -160,10 +175,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewUpdateKubernetesSupportedVersionParams("id", "state")
-               _, err := client.Kubernetes.UpdateKubernetesSupportedVersion(p)
+               r, err := client.Kubernetes.UpdateKubernetesSupportedVersion(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateKubernetesSupportedVersion", testupdateKubernetesSupportedVersion)
 
@@ -172,10 +190,13 @@ func TestKubernetesService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Kubernetes.NewUpgradeKubernetesClusterParams("id", "kubernetesversionid")
-               _, err := client.Kubernetes.UpgradeKubernetesCluster(p)
+               r, err := client.Kubernetes.UpgradeKubernetesCluster(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpgradeKubernetesCluster", testupgradeKubernetesCluster)
 
index 15e852db4ca53a305233e439089cf13b0a592a8e..eb3632ded2906ce499031a083dacd738ba77d922 100644 (file)
@@ -88,10 +88,13 @@ func TestLDAPService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LDAP.NewLdapCreateAccountParams("username")
-               _, err := client.LDAP.LdapCreateAccount(p)
+               r, err := client.LDAP.LdapCreateAccount(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("LdapCreateAccount", testldapCreateAccount)
 
index 00131f127b50927ba1aea25ba19a5fea6614b634..ac7dd43c9c5a592803c262380122aff831336fca 100644 (file)
@@ -100,10 +100,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewCreateGlobalLoadBalancerRuleParams("gslbdomainname", "gslbservicetype", "name", 0)
-               _, err := client.LoadBalancer.CreateGlobalLoadBalancerRule(p)
+               r, err := client.LoadBalancer.CreateGlobalLoadBalancerRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateGlobalLoadBalancerRule", testcreateGlobalLoadBalancerRule)
 
@@ -136,10 +139,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewCreateLoadBalancerParams("algorithm", 0, "name", "networkid", "scheme", "sourceipaddressnetworkid", 0)
-               _, err := client.LoadBalancer.CreateLoadBalancer(p)
+               r, err := client.LoadBalancer.CreateLoadBalancer(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateLoadBalancer", testcreateLoadBalancer)
 
@@ -148,10 +154,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewCreateLoadBalancerRuleParams("algorithm", "name", 0, 0)
-               _, err := client.LoadBalancer.CreateLoadBalancerRule(p)
+               r, err := client.LoadBalancer.CreateLoadBalancerRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateLoadBalancerRule", testcreateLoadBalancerRule)
 
@@ -376,10 +385,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewUpdateGlobalLoadBalancerRuleParams("id")
-               _, err := client.LoadBalancer.UpdateGlobalLoadBalancerRule(p)
+               r, err := client.LoadBalancer.UpdateGlobalLoadBalancerRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateGlobalLoadBalancerRule", testupdateGlobalLoadBalancerRule)
 
@@ -412,10 +424,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewUpdateLoadBalancerParams("id")
-               _, err := client.LoadBalancer.UpdateLoadBalancer(p)
+               r, err := client.LoadBalancer.UpdateLoadBalancer(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateLoadBalancer", testupdateLoadBalancer)
 
@@ -424,10 +439,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewUpdateLoadBalancerRuleParams("id")
-               _, err := client.LoadBalancer.UpdateLoadBalancerRule(p)
+               r, err := client.LoadBalancer.UpdateLoadBalancerRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateLoadBalancerRule", testupdateLoadBalancerRule)
 
@@ -436,10 +454,13 @@ func TestLoadBalancerService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.LoadBalancer.NewUploadSslCertParams("certificate", "name", "privatekey")
-               _, err := client.LoadBalancer.UploadSslCert(p)
+               r, err := client.LoadBalancer.UploadSslCert(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UploadSslCert", testuploadSslCert)
 
index b57322ad1fb1baacc54335a11159294c4f43dc7b..b79e1d68dcd81d0fa1714b3e239d5ea9642cb44e 100644 (file)
@@ -40,10 +40,13 @@ func TestNATService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NAT.NewCreateIpForwardingRuleParams("ipaddressid", "protocol", 0)
-               _, err := client.NAT.CreateIpForwardingRule(p)
+               r, err := client.NAT.CreateIpForwardingRule(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateIpForwardingRule", testcreateIpForwardingRule)
 
index 4364ecf1576bb6af6dce49c69f61f80475f52ef2..b20e352a014132b19bf39a047f425058047cd6d2 100644 (file)
@@ -40,10 +40,13 @@ func TestNetworkACLService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkACL.NewCreateNetworkACLParams("protocol")
-               _, err := client.NetworkACL.CreateNetworkACL(p)
+               r, err := client.NetworkACL.CreateNetworkACL(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateNetworkACL", testcreateNetworkACL)
 
@@ -52,10 +55,13 @@ func TestNetworkACLService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkACL.NewCreateNetworkACLListParams("name", "vpcid")
-               _, err := client.NetworkACL.CreateNetworkACLList(p)
+               r, err := client.NetworkACL.CreateNetworkACLList(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateNetworkACLList", testcreateNetworkACLList)
 
@@ -124,10 +130,13 @@ func TestNetworkACLService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkACL.NewUpdateNetworkACLItemParams("id")
-               _, err := client.NetworkACL.UpdateNetworkACLItem(p)
+               r, err := client.NetworkACL.UpdateNetworkACLItem(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateNetworkACLItem", testupdateNetworkACLItem)
 
index 47b8613977ddd633786d7086fdeadcd304c17509..fdc4b55ff96f05a070329819d5cc74f672d82201 100644 (file)
@@ -40,10 +40,13 @@ func TestNetworkDeviceService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkDevice.NewAddNetworkDeviceParams()
-               _, err := client.NetworkDevice.AddNetworkDevice(p)
+               r, err := client.NetworkDevice.AddNetworkDevice(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddNetworkDevice", testaddNetworkDevice)
 
index 839b0a20b4846fd36ea8e94e63574125134ddb17..50bcb34fbdd0b07cfcb15aaddef7dd33eb6acf9b 100644 (file)
@@ -40,10 +40,13 @@ func TestNetworkOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkOffering.NewCreateNetworkOfferingParams("displaytext", "guestiptype", "name", "traffictype")
-               _, err := client.NetworkOffering.CreateNetworkOffering(p)
+               r, err := client.NetworkOffering.CreateNetworkOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateNetworkOffering", testcreateNetworkOffering)
 
@@ -76,10 +79,13 @@ func TestNetworkOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.NetworkOffering.NewUpdateNetworkOfferingParams()
-               _, err := client.NetworkOffering.UpdateNetworkOffering(p)
+               r, err := client.NetworkOffering.UpdateNetworkOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateNetworkOffering", testupdateNetworkOffering)
 
index e1c5d9a5c92e882f9c47095df2bd61274acd9def..930cea80a80421b7b1e9b0e8e062ff07be1c679b 100644 (file)
@@ -40,10 +40,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewAddNetworkServiceProviderParams("name", "physicalnetworkid")
-               _, err := client.Network.AddNetworkServiceProvider(p)
+               r, err := client.Network.AddNetworkServiceProvider(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddNetworkServiceProvider", testaddNetworkServiceProvider)
 
@@ -52,10 +55,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewAddOpenDaylightControllerParams("password", "physicalnetworkid", "url", "username")
-               _, err := client.Network.AddOpenDaylightController(p)
+               r, err := client.Network.AddOpenDaylightController(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddOpenDaylightController", testaddOpenDaylightController)
 
@@ -64,10 +70,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewCreateNetworkParams("displaytext", "name", "networkofferingid", "zoneid")
-               _, err := client.Network.CreateNetwork(p)
+               r, err := client.Network.CreateNetwork(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateNetwork", testcreateNetwork)
 
@@ -76,10 +85,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewCreatePhysicalNetworkParams("name", "zoneid")
-               _, err := client.Network.CreatePhysicalNetwork(p)
+               r, err := client.Network.CreatePhysicalNetwork(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreatePhysicalNetwork", testcreatePhysicalNetwork)
 
@@ -88,10 +100,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewCreateServiceInstanceParams("leftnetworkid", "name", "rightnetworkid", "serviceofferingid", "templateid", "zoneid")
-               _, err := client.Network.CreateServiceInstance(p)
+               r, err := client.Network.CreateServiceInstance(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateServiceInstance", testcreateServiceInstance)
 
@@ -100,10 +115,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewCreateStorageNetworkIpRangeParams("gateway", "netmask", "podid", "startip")
-               _, err := client.Network.CreateStorageNetworkIpRange(p)
+               r, err := client.Network.CreateStorageNetworkIpRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateStorageNetworkIpRange", testcreateStorageNetworkIpRange)
 
@@ -112,10 +130,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewDedicatePublicIpRangeParams("domainid", "id")
-               _, err := client.Network.DedicatePublicIpRange(p)
+               r, err := client.Network.DedicatePublicIpRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicatePublicIpRange", testdedicatePublicIpRange)
 
@@ -148,10 +169,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewDeleteOpenDaylightControllerParams("id")
-               _, err := client.Network.DeleteOpenDaylightController(p)
+               r, err := client.Network.DeleteOpenDaylightController(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DeleteOpenDaylightController", testdeleteOpenDaylightController)
 
@@ -328,10 +352,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewUpdateNetworkParams("id")
-               _, err := client.Network.UpdateNetwork(p)
+               r, err := client.Network.UpdateNetwork(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateNetwork", testupdateNetwork)
 
@@ -340,10 +367,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewUpdateNetworkServiceProviderParams("id")
-               _, err := client.Network.UpdateNetworkServiceProvider(p)
+               r, err := client.Network.UpdateNetworkServiceProvider(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateNetworkServiceProvider", testupdateNetworkServiceProvider)
 
@@ -352,10 +382,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewUpdatePhysicalNetworkParams("id")
-               _, err := client.Network.UpdatePhysicalNetwork(p)
+               r, err := client.Network.UpdatePhysicalNetwork(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdatePhysicalNetwork", testupdatePhysicalNetwork)
 
@@ -364,10 +397,13 @@ func TestNetworkService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Network.NewUpdateStorageNetworkIpRangeParams("id")
-               _, err := client.Network.UpdateStorageNetworkIpRange(p)
+               r, err := client.Network.UpdateStorageNetworkIpRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateStorageNetworkIpRange", testupdateStorageNetworkIpRange)
 
index 67caa2821955c96f15557db7f4e3d858b43fcfdc..e61039c544996c6f41c2b4ec6461120a18491f01 100644 (file)
@@ -40,10 +40,13 @@ func TestNicService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Nic.NewAddIpToNicParams("nicid")
-               _, err := client.Nic.AddIpToNic(p)
+               r, err := client.Nic.AddIpToNic(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddIpToNic", testaddIpToNic)
 
@@ -76,10 +79,13 @@ func TestNicService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Nic.NewUpdateVmNicIpParams("nicid")
-               _, err := client.Nic.UpdateVmNicIp(p)
+               r, err := client.Nic.UpdateVmNicIp(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVmNicIp", testupdateVmNicIp)
 
index 31722470d22c886b732c453d4d49c078ab6a6972..485afb4fe02ac137f64ba4b5e0670beb11457d1f 100644 (file)
@@ -40,10 +40,13 @@ func TestOvsElementService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.OvsElement.NewConfigureOvsElementParams(true, "id")
-               _, err := client.OvsElement.ConfigureOvsElement(p)
+               r, err := client.OvsElement.ConfigureOvsElement(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ConfigureOvsElement", testconfigureOvsElement)
 
index ab461e06062a8c570eb4b5a8bc4f0dceb427ea25..56b923a657269c9f23898852bd099d2729db7ea3 100644 (file)
@@ -40,10 +40,13 @@ func TestPodService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pod.NewCreatePodParams("gateway", "name", "netmask", "startip", "zoneid")
-               _, err := client.Pod.CreatePod(p)
+               r, err := client.Pod.CreatePod(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreatePod", testcreatePod)
 
@@ -52,10 +55,13 @@ func TestPodService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pod.NewDedicatePodParams("domainid", "podid")
-               _, err := client.Pod.DedicatePod(p)
+               r, err := client.Pod.DedicatePod(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicatePod", testdedicatePod)
 
@@ -112,10 +118,13 @@ func TestPodService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pod.NewUpdatePodParams("id")
-               _, err := client.Pod.UpdatePod(p)
+               r, err := client.Pod.UpdatePod(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdatePod", testupdatePod)
 
index cde6f06507e0f46052d43dd37927c3ea9033d30a..8d2337e3068fe85d93856214a62e0d7aa478e5b5 100644 (file)
@@ -40,10 +40,13 @@ func TestPoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pool.NewCreateStoragePoolParams("name", "url", "zoneid")
-               _, err := client.Pool.CreateStoragePool(p)
+               r, err := client.Pool.CreateStoragePool(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateStoragePool", testcreateStoragePool)
 
@@ -64,10 +67,13 @@ func TestPoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pool.NewFindStoragePoolsForMigrationParams("id")
-               _, err := client.Pool.FindStoragePoolsForMigration(p)
+               r, err := client.Pool.FindStoragePoolsForMigration(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("FindStoragePoolsForMigration", testfindStoragePoolsForMigration)
 
@@ -88,10 +94,13 @@ func TestPoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pool.NewSyncStoragePoolParams("id")
-               _, err := client.Pool.SyncStoragePool(p)
+               r, err := client.Pool.SyncStoragePool(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("SyncStoragePool", testsyncStoragePool)
 
@@ -100,10 +109,13 @@ func TestPoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Pool.NewUpdateStoragePoolParams("id")
-               _, err := client.Pool.UpdateStoragePool(p)
+               r, err := client.Pool.UpdateStoragePool(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateStoragePool", testupdateStoragePool)
 
index aafcdf094ff641b1d655f85a30d8f652ec221574..c1001fa856ec52146a63d0748bbb16d6b73c3ce5 100644 (file)
@@ -40,10 +40,13 @@ func TestPortableIPService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.PortableIP.NewCreatePortableIpRangeParams("endip", "gateway", "netmask", 0, "startip")
-               _, err := client.PortableIP.CreatePortableIpRange(p)
+               r, err := client.PortableIP.CreatePortableIpRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreatePortableIpRange", testcreatePortableIpRange)
 
index 3133edc013e6d9b9580cd484c23bb1e36dfd8762..be48b6b70ab3111f8f060d939882b85363c6adb3 100644 (file)
@@ -40,10 +40,13 @@ func TestProjectService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Project.NewActivateProjectParams("id")
-               _, err := client.Project.ActivateProject(p)
+               r, err := client.Project.ActivateProject(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ActivateProject", testactivateProject)
 
@@ -76,10 +79,13 @@ func TestProjectService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Project.NewCreateProjectParams("displaytext", "name")
-               _, err := client.Project.CreateProject(p)
+               r, err := client.Project.CreateProject(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateProject", testcreateProject)
 
@@ -160,10 +166,13 @@ func TestProjectService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Project.NewSuspendProjectParams("id")
-               _, err := client.Project.SuspendProject(p)
+               r, err := client.Project.SuspendProject(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("SuspendProject", testsuspendProject)
 
@@ -172,10 +181,13 @@ func TestProjectService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Project.NewUpdateProjectParams("id")
-               _, err := client.Project.UpdateProject(p)
+               r, err := client.Project.UpdateProject(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateProject", testupdateProject)
 
@@ -208,10 +220,13 @@ func TestProjectService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Project.NewCreateProjectRolePermissionParams("permission", "projectid", "projectroleid", "rule")
-               _, err := client.Project.CreateProjectRolePermission(p)
+               r, err := client.Project.CreateProjectRolePermission(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateProjectRolePermission", testcreateProjectRolePermission)
 
index 360400d6b9591feab6f3cb14eea23a301c3aa66d..6ec14adb10c2589ef588111ff973ee602242afb4 100644 (file)
@@ -40,10 +40,13 @@ func TestRoleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Role.NewCreateRoleParams("name")
-               _, err := client.Role.CreateRole(p)
+               r, err := client.Role.CreateRole(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateRole", testcreateRole)
 
@@ -52,10 +55,13 @@ func TestRoleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Role.NewCreateRolePermissionParams("permission", "roleid", "rule")
-               _, err := client.Role.CreateRolePermission(p)
+               r, err := client.Role.CreateRolePermission(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateRolePermission", testcreateRolePermission)
 
@@ -88,10 +94,13 @@ func TestRoleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Role.NewImportRoleParams("name", map[string]string{})
-               _, err := client.Role.ImportRole(p)
+               r, err := client.Role.ImportRole(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ImportRole", testimportRole)
 
@@ -124,10 +133,13 @@ func TestRoleService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Role.NewUpdateRoleParams("id")
-               _, err := client.Role.UpdateRole(p)
+               r, err := client.Role.UpdateRole(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateRole", testupdateRole)
 
index cf3e7cb8144f2e7eaca3d26ae73e5553ea1e9e01..7557c410a8d5486c500cbaaa3aeeae7bc8c2fa05 100644 (file)
@@ -40,10 +40,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewChangeServiceForRouterParams("id", "serviceofferingid")
-               _, err := client.Router.ChangeServiceForRouter(p)
+               r, err := client.Router.ChangeServiceForRouter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ChangeServiceForRouter", testchangeServiceForRouter)
 
@@ -52,10 +55,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewConfigureVirtualRouterElementParams(true, "id")
-               _, err := client.Router.ConfigureVirtualRouterElement(p)
+               r, err := client.Router.ConfigureVirtualRouterElement(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ConfigureVirtualRouterElement", testconfigureVirtualRouterElement)
 
@@ -64,10 +70,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewCreateVirtualRouterElementParams("nspid")
-               _, err := client.Router.CreateVirtualRouterElement(p)
+               r, err := client.Router.CreateVirtualRouterElement(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVirtualRouterElement", testcreateVirtualRouterElement)
 
@@ -76,10 +85,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewDestroyRouterParams("id")
-               _, err := client.Router.DestroyRouter(p)
+               r, err := client.Router.DestroyRouter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DestroyRouter", testdestroyRouter)
 
@@ -112,10 +124,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewRebootRouterParams("id")
-               _, err := client.Router.RebootRouter(p)
+               r, err := client.Router.RebootRouter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RebootRouter", testrebootRouter)
 
@@ -124,10 +139,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewStartRouterParams("id")
-               _, err := client.Router.StartRouter(p)
+               r, err := client.Router.StartRouter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StartRouter", teststartRouter)
 
@@ -136,10 +154,13 @@ func TestRouterService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Router.NewStopRouterParams("id")
-               _, err := client.Router.StopRouter(p)
+               r, err := client.Router.StopRouter(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StopRouter", teststopRouter)
 
index e402656c51f5561bf931c6374e11f63eeb7487dd..5995106b7f81b73b72a67ab0b79169f906bda0e8 100644 (file)
@@ -40,10 +40,13 @@ func TestSSHService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SSH.NewCreateSSHKeyPairParams("name")
-               _, err := client.SSH.CreateSSHKeyPair(p)
+               r, err := client.SSH.CreateSSHKeyPair(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateSSHKeyPair", testcreateSSHKeyPair)
 
@@ -76,10 +79,13 @@ func TestSSHService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SSH.NewRegisterSSHKeyPairParams("name", "publickey")
-               _, err := client.SSH.RegisterSSHKeyPair(p)
+               r, err := client.SSH.RegisterSSHKeyPair(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RegisterSSHKeyPair", testregisterSSHKeyPair)
 
@@ -88,10 +94,13 @@ func TestSSHService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SSH.NewResetSSHKeyForVirtualMachineParams("id", "keypair")
-               _, err := client.SSH.ResetSSHKeyForVirtualMachine(p)
+               r, err := client.SSH.ResetSSHKeyForVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ResetSSHKeyForVirtualMachine", testresetSSHKeyForVirtualMachine)
 
index 55259d88bc78ac199a7cfc3eac0cce078928ffb7..bd30cbff60017f82572b445bf84bf35a7d034d00 100644 (file)
@@ -64,10 +64,13 @@ func TestSecurityGroupService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SecurityGroup.NewCreateSecurityGroupParams("name")
-               _, err := client.SecurityGroup.CreateSecurityGroup(p)
+               r, err := client.SecurityGroup.CreateSecurityGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateSecurityGroup", testcreateSecurityGroup)
 
index 7305541cc7a98b9ca61cb8265031a5690cb2d573..b66c608da6a78bd3ce034bb6d685603a66106dfc 100644 (file)
@@ -40,10 +40,13 @@ func TestServiceOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ServiceOffering.NewCreateServiceOfferingParams("displaytext", "name")
-               _, err := client.ServiceOffering.CreateServiceOffering(p)
+               r, err := client.ServiceOffering.CreateServiceOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateServiceOffering", testcreateServiceOffering)
 
@@ -76,10 +79,13 @@ func TestServiceOfferingService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.ServiceOffering.NewUpdateServiceOfferingParams("id")
-               _, err := client.ServiceOffering.UpdateServiceOffering(p)
+               r, err := client.ServiceOffering.UpdateServiceOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateServiceOffering", testupdateServiceOffering)
 
index 513c3aea4ea4d237effc360aee4d09403828709f..db6edc4b4187ca440473215ca1ca7165558e9842 100644 (file)
@@ -40,10 +40,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewCreateSnapshotParams("volumeid")
-               _, err := client.Snapshot.CreateSnapshot(p)
+               r, err := client.Snapshot.CreateSnapshot(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateSnapshot", testcreateSnapshot)
 
@@ -52,10 +55,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewCreateSnapshotPolicyParams("intervaltype", 0, "schedule", "timezone", "volumeid")
-               _, err := client.Snapshot.CreateSnapshotPolicy(p)
+               r, err := client.Snapshot.CreateSnapshotPolicy(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateSnapshotPolicy", testcreateSnapshotPolicy)
 
@@ -64,10 +70,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewCreateVMSnapshotParams("virtualmachineid")
-               _, err := client.Snapshot.CreateVMSnapshot(p)
+               r, err := client.Snapshot.CreateVMSnapshot(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVMSnapshot", testcreateVMSnapshot)
 
@@ -148,10 +157,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewRevertSnapshotParams("id")
-               _, err := client.Snapshot.RevertSnapshot(p)
+               r, err := client.Snapshot.RevertSnapshot(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RevertSnapshot", testrevertSnapshot)
 
@@ -160,10 +172,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewRevertToVMSnapshotParams("vmsnapshotid")
-               _, err := client.Snapshot.RevertToVMSnapshot(p)
+               r, err := client.Snapshot.RevertToVMSnapshot(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RevertToVMSnapshot", testrevertToVMSnapshot)
 
@@ -172,10 +187,13 @@ func TestSnapshotService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Snapshot.NewUpdateSnapshotPolicyParams()
-               _, err := client.Snapshot.UpdateSnapshotPolicy(p)
+               r, err := client.Snapshot.UpdateSnapshotPolicy(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateSnapshotPolicy", testupdateSnapshotPolicy)
 
index 364c1536a51449405d9037e51ba161c2e98413ce..439ca0a9c4185d0fc0f75c4c9a6729a29f2871c2 100644 (file)
@@ -40,10 +40,13 @@ func TestStoragePoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.StoragePool.NewCancelStorageMaintenanceParams("id")
-               _, err := client.StoragePool.CancelStorageMaintenance(p)
+               r, err := client.StoragePool.CancelStorageMaintenance(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CancelStorageMaintenance", testcancelStorageMaintenance)
 
@@ -52,10 +55,13 @@ func TestStoragePoolService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.StoragePool.NewEnableStorageMaintenanceParams("id")
-               _, err := client.StoragePool.EnableStorageMaintenance(p)
+               r, err := client.StoragePool.EnableStorageMaintenance(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("EnableStorageMaintenance", testenableStorageMaintenance)
 
index 5c7bceb97e8e281adff6522b2aeb551f7c751973..b2fd697382802b69eb2449d9ec2798faa37bbbe0 100644 (file)
@@ -40,10 +40,13 @@ func TestSwiftService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Swift.NewAddSwiftParams("url")
-               _, err := client.Swift.AddSwift(p)
+               r, err := client.Swift.AddSwift(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddSwift", testaddSwift)
 
index 587efccb6ec499487667893d075014166257376e..480789b69006058ae0002a984b32acaf44c56d2a 100644 (file)
@@ -40,10 +40,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewChangeServiceForSystemVmParams("id", "serviceofferingid")
-               _, err := client.SystemVM.ChangeServiceForSystemVm(p)
+               r, err := client.SystemVM.ChangeServiceForSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ChangeServiceForSystemVm", testchangeServiceForSystemVm)
 
@@ -52,10 +55,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewDestroySystemVmParams("id")
-               _, err := client.SystemVM.DestroySystemVm(p)
+               r, err := client.SystemVM.DestroySystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DestroySystemVm", testdestroySystemVm)
 
@@ -76,10 +82,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewMigrateSystemVmParams("virtualmachineid")
-               _, err := client.SystemVM.MigrateSystemVm(p)
+               r, err := client.SystemVM.MigrateSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("MigrateSystemVm", testmigrateSystemVm)
 
@@ -88,10 +97,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewRebootSystemVmParams("id")
-               _, err := client.SystemVM.RebootSystemVm(p)
+               r, err := client.SystemVM.RebootSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RebootSystemVm", testrebootSystemVm)
 
@@ -100,10 +112,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewScaleSystemVmParams("id", "serviceofferingid")
-               _, err := client.SystemVM.ScaleSystemVm(p)
+               r, err := client.SystemVM.ScaleSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ScaleSystemVm", testscaleSystemVm)
 
@@ -112,10 +127,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewStartSystemVmParams("id")
-               _, err := client.SystemVM.StartSystemVm(p)
+               r, err := client.SystemVM.StartSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StartSystemVm", teststartSystemVm)
 
@@ -124,10 +142,13 @@ func TestSystemVMService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.SystemVM.NewStopSystemVmParams("id")
-               _, err := client.SystemVM.StopSystemVm(p)
+               r, err := client.SystemVM.StopSystemVm(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StopSystemVm", teststopSystemVm)
 
index ea4035d675da93a77975104542192389e6cda1dd..cacd61f0c1489e46b6e712a9ea4f3d4841741e71 100644 (file)
@@ -40,10 +40,13 @@ func TestTemplateService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Template.NewCopyTemplateParams("id")
-               _, err := client.Template.CopyTemplate(p)
+               r, err := client.Template.CopyTemplate(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CopyTemplate", testcopyTemplate)
 
@@ -52,10 +55,13 @@ func TestTemplateService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Template.NewCreateTemplateParams("displaytext", "name", "ostypeid")
-               _, err := client.Template.CreateTemplate(p)
+               r, err := client.Template.CreateTemplate(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateTemplate", testcreateTemplate)
 
@@ -76,10 +82,13 @@ func TestTemplateService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Template.NewExtractTemplateParams("id", "mode")
-               _, err := client.Template.ExtractTemplate(p)
+               r, err := client.Template.ExtractTemplate(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ExtractTemplate", testextractTemplate)
 
@@ -124,10 +133,13 @@ func TestTemplateService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Template.NewPrepareTemplateParams("templateid", "zoneid")
-               _, err := client.Template.PrepareTemplate(p)
+               r, err := client.Template.PrepareTemplate(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("PrepareTemplate", testprepareTemplate)
 
@@ -148,10 +160,13 @@ func TestTemplateService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Template.NewUpdateTemplateParams("id")
-               _, err := client.Template.UpdateTemplate(p)
+               r, err := client.Template.UpdateTemplate(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateTemplate", testupdateTemplate)
 
index 46108f2696cc83d9f892e952f6d4d661012151e9..9df5d66f269d61068de70b80f9439cb8dec122cd 100644 (file)
@@ -40,10 +40,13 @@ func TestUCSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.UCS.NewAddUcsManagerParams("password", "url", "username", "zoneid")
-               _, err := client.UCS.AddUcsManager(p)
+               r, err := client.UCS.AddUcsManager(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddUcsManager", testaddUcsManager)
 
@@ -52,10 +55,13 @@ func TestUCSService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.UCS.NewAssociateUcsProfileToBladeParams("bladeid", "profiledn", "ucsmanagerid")
-               _, err := client.UCS.AssociateUcsProfileToBlade(p)
+               r, err := client.UCS.AssociateUcsProfileToBlade(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AssociateUcsProfileToBlade", testassociateUcsProfileToBlade)
 
index 012dc52bc40714fb59667ab8c38362fe026ab95b..992ce028e0ca91876e7f3c5dadaf3e24972ce1e8 100644 (file)
@@ -40,10 +40,13 @@ func TestUsageService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Usage.NewAddTrafficMonitorParams("url", "zoneid")
-               _, err := client.Usage.AddTrafficMonitor(p)
+               r, err := client.Usage.AddTrafficMonitor(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddTrafficMonitor", testaddTrafficMonitor)
 
@@ -52,10 +55,13 @@ func TestUsageService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Usage.NewAddTrafficTypeParams("physicalnetworkid", "traffictype")
-               _, err := client.Usage.AddTrafficType(p)
+               r, err := client.Usage.AddTrafficType(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddTrafficType", testaddTrafficType)
 
@@ -172,10 +178,13 @@ func TestUsageService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Usage.NewUpdateTrafficTypeParams("id")
-               _, err := client.Usage.UpdateTrafficType(p)
+               r, err := client.Usage.UpdateTrafficType(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateTrafficType", testupdateTrafficType)
 
index f5579a9f389eca04aa723802160c50ccae8b5e3d..4ec0cba599bea8b00f764977819db02d5046940e 100644 (file)
@@ -40,10 +40,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewCreateUserParams("account", "email", "firstname", "lastname", "password", "username")
-               _, err := client.User.CreateUser(p)
+               r, err := client.User.CreateUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateUser", testcreateUser)
 
@@ -64,10 +67,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewDisableUserParams("id")
-               _, err := client.User.DisableUser(p)
+               r, err := client.User.DisableUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DisableUser", testdisableUser)
 
@@ -76,10 +82,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewEnableUserParams("id")
-               _, err := client.User.EnableUser(p)
+               r, err := client.User.EnableUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("EnableUser", testenableUser)
 
@@ -88,10 +97,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewGetUserParams("userapikey")
-               _, err := client.User.GetUser(p)
+               r, err := client.User.GetUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("GetUser", testgetUser)
 
@@ -136,10 +148,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewLockUserParams("id")
-               _, err := client.User.LockUser(p)
+               r, err := client.User.LockUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("LockUser", testlockUser)
 
@@ -160,10 +175,13 @@ func TestUserService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.User.NewUpdateUserParams("id")
-               _, err := client.User.UpdateUser(p)
+               r, err := client.User.UpdateUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateUser", testupdateUser)
 
index ca58ac790ddbf3c1e5c70001153a700f47e531f0..e7b1bfe5ea6b3df20561fc5f56dc4a056758afa6 100644 (file)
@@ -40,10 +40,13 @@ func TestVLANService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VLAN.NewCreateVlanIpRangeParams()
-               _, err := client.VLAN.CreateVlanIpRange(p)
+               r, err := client.VLAN.CreateVlanIpRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVlanIpRange", testcreateVlanIpRange)
 
@@ -52,10 +55,13 @@ func TestVLANService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VLAN.NewDedicateGuestVlanRangeParams("physicalnetworkid", "vlanrange")
-               _, err := client.VLAN.DedicateGuestVlanRange(p)
+               r, err := client.VLAN.DedicateGuestVlanRange(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicateGuestVlanRange", testdedicateGuestVlanRange)
 
index 3382f5ce9474c68c66523d085a8dfd08679f33c4..711b178612da24ccc9149b5ed473ea0db238dedf 100644 (file)
@@ -40,10 +40,13 @@ func TestVMGroupService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VMGroup.NewCreateInstanceGroupParams("name")
-               _, err := client.VMGroup.CreateInstanceGroup(p)
+               r, err := client.VMGroup.CreateInstanceGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateInstanceGroup", testcreateInstanceGroup)
 
@@ -76,10 +79,13 @@ func TestVMGroupService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VMGroup.NewUpdateInstanceGroupParams("id")
-               _, err := client.VMGroup.UpdateInstanceGroup(p)
+               r, err := client.VMGroup.UpdateInstanceGroup(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateInstanceGroup", testupdateInstanceGroup)
 
index 782c9deebe4ffc009adb6a587f4f8110ebcb3f73..511e20d6d966516508154322305c26a9b65dde6e 100644 (file)
@@ -40,10 +40,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewCreatePrivateGatewayParams("gateway", "ipaddress", "netmask", "vlan", "vpcid")
-               _, err := client.VPC.CreatePrivateGateway(p)
+               r, err := client.VPC.CreatePrivateGateway(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreatePrivateGateway", testcreatePrivateGateway)
 
@@ -52,10 +55,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewCreateStaticRouteParams("cidr", "gatewayid")
-               _, err := client.VPC.CreateStaticRoute(p)
+               r, err := client.VPC.CreateStaticRoute(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateStaticRoute", testcreateStaticRoute)
 
@@ -64,10 +70,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewCreateVPCParams("cidr", "displaytext", "name", "vpcofferingid", "zoneid")
-               _, err := client.VPC.CreateVPC(p)
+               r, err := client.VPC.CreateVPC(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVPC", testcreateVPC)
 
@@ -76,10 +85,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewCreateVPCOfferingParams("displaytext", "name", []string{})
-               _, err := client.VPC.CreateVPCOffering(p)
+               r, err := client.VPC.CreateVPCOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVPCOffering", testcreateVPCOffering)
 
@@ -196,10 +208,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewUpdateVPCParams("id")
-               _, err := client.VPC.UpdateVPC(p)
+               r, err := client.VPC.UpdateVPC(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVPC", testupdateVPC)
 
@@ -208,10 +223,13 @@ func TestVPCService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPC.NewUpdateVPCOfferingParams("id")
-               _, err := client.VPC.UpdateVPCOffering(p)
+               r, err := client.VPC.UpdateVPCOffering(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVPCOffering", testupdateVPCOffering)
 
index ae7d0bb7ffce186f73b942b7222b52209197dd58..20cb349dde9c8490d5c5d812f2edd8fe7c02e8eb 100644 (file)
@@ -40,10 +40,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewAddVpnUserParams("password", "username")
-               _, err := client.VPN.AddVpnUser(p)
+               r, err := client.VPN.AddVpnUser(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddVpnUser", testaddVpnUser)
 
@@ -52,10 +55,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewCreateRemoteAccessVpnParams("publicipid")
-               _, err := client.VPN.CreateRemoteAccessVpn(p)
+               r, err := client.VPN.CreateRemoteAccessVpn(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateRemoteAccessVpn", testcreateRemoteAccessVpn)
 
@@ -64,10 +70,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewCreateVpnConnectionParams("s2scustomergatewayid", "s2svpngatewayid")
-               _, err := client.VPN.CreateVpnConnection(p)
+               r, err := client.VPN.CreateVpnConnection(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVpnConnection", testcreateVpnConnection)
 
@@ -76,10 +85,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewCreateVpnCustomerGatewayParams("cidrlist", "esppolicy", "gateway", "ikepolicy", "ipsecpsk")
-               _, err := client.VPN.CreateVpnCustomerGateway(p)
+               r, err := client.VPN.CreateVpnCustomerGateway(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVpnCustomerGateway", testcreateVpnCustomerGateway)
 
@@ -88,10 +100,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewCreateVpnGatewayParams("vpcid")
-               _, err := client.VPN.CreateVpnGateway(p)
+               r, err := client.VPN.CreateVpnGateway(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVpnGateway", testcreateVpnGateway)
 
@@ -220,10 +235,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewResetVpnConnectionParams("id")
-               _, err := client.VPN.ResetVpnConnection(p)
+               r, err := client.VPN.ResetVpnConnection(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ResetVpnConnection", testresetVpnConnection)
 
@@ -232,10 +250,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewUpdateRemoteAccessVpnParams("id")
-               _, err := client.VPN.UpdateRemoteAccessVpn(p)
+               r, err := client.VPN.UpdateRemoteAccessVpn(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateRemoteAccessVpn", testupdateRemoteAccessVpn)
 
@@ -244,10 +265,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewUpdateVpnConnectionParams("id")
-               _, err := client.VPN.UpdateVpnConnection(p)
+               r, err := client.VPN.UpdateVpnConnection(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVpnConnection", testupdateVpnConnection)
 
@@ -256,10 +280,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewUpdateVpnCustomerGatewayParams("cidrlist", "esppolicy", "gateway", "id", "ikepolicy", "ipsecpsk")
-               _, err := client.VPN.UpdateVpnCustomerGateway(p)
+               r, err := client.VPN.UpdateVpnCustomerGateway(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVpnCustomerGateway", testupdateVpnCustomerGateway)
 
@@ -268,10 +295,13 @@ func TestVPNService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VPN.NewUpdateVpnGatewayParams("id")
-               _, err := client.VPN.UpdateVpnGateway(p)
+               r, err := client.VPN.UpdateVpnGateway(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVpnGateway", testupdateVpnGateway)
 
index 71822e7f24b812618cb7f420662c389410fe9d53..4a8785f87a15408485b020a97867c4d0723bdb02 100644 (file)
@@ -40,10 +40,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewAddNicToVirtualMachineParams("networkid", "virtualmachineid")
-               _, err := client.VirtualMachine.AddNicToVirtualMachine(p)
+               r, err := client.VirtualMachine.AddNicToVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AddNicToVirtualMachine", testaddNicToVirtualMachine)
 
@@ -52,10 +55,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewAssignVirtualMachineParams("virtualmachineid")
-               _, err := client.VirtualMachine.AssignVirtualMachine(p)
+               r, err := client.VirtualMachine.AssignVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AssignVirtualMachine", testassignVirtualMachine)
 
@@ -64,10 +70,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewChangeServiceForVirtualMachineParams("id", "serviceofferingid")
-               _, err := client.VirtualMachine.ChangeServiceForVirtualMachine(p)
+               r, err := client.VirtualMachine.ChangeServiceForVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ChangeServiceForVirtualMachine", testchangeServiceForVirtualMachine)
 
@@ -88,10 +97,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewDeployVirtualMachineParams("serviceofferingid", "templateid", "zoneid")
-               _, err := client.VirtualMachine.DeployVirtualMachine(p)
+               r, err := client.VirtualMachine.DeployVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DeployVirtualMachine", testdeployVirtualMachine)
 
@@ -100,10 +112,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewDestroyVirtualMachineParams("id")
-               _, err := client.VirtualMachine.DestroyVirtualMachine(p)
+               r, err := client.VirtualMachine.DestroyVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DestroyVirtualMachine", testdestroyVirtualMachine)
 
@@ -160,10 +175,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewMigrateVirtualMachineParams("virtualmachineid")
-               _, err := client.VirtualMachine.MigrateVirtualMachine(p)
+               r, err := client.VirtualMachine.MigrateVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("MigrateVirtualMachine", testmigrateVirtualMachine)
 
@@ -172,10 +190,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewMigrateVirtualMachineWithVolumeParams("virtualmachineid")
-               _, err := client.VirtualMachine.MigrateVirtualMachineWithVolume(p)
+               r, err := client.VirtualMachine.MigrateVirtualMachineWithVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("MigrateVirtualMachineWithVolume", testmigrateVirtualMachineWithVolume)
 
@@ -184,10 +205,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewRebootVirtualMachineParams("id")
-               _, err := client.VirtualMachine.RebootVirtualMachine(p)
+               r, err := client.VirtualMachine.RebootVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RebootVirtualMachine", testrebootVirtualMachine)
 
@@ -196,10 +220,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewRecoverVirtualMachineParams("id")
-               _, err := client.VirtualMachine.RecoverVirtualMachine(p)
+               r, err := client.VirtualMachine.RecoverVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RecoverVirtualMachine", testrecoverVirtualMachine)
 
@@ -208,10 +235,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewRemoveNicFromVirtualMachineParams("nicid", "virtualmachineid")
-               _, err := client.VirtualMachine.RemoveNicFromVirtualMachine(p)
+               r, err := client.VirtualMachine.RemoveNicFromVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RemoveNicFromVirtualMachine", testremoveNicFromVirtualMachine)
 
@@ -220,10 +250,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewResetPasswordForVirtualMachineParams("id")
-               _, err := client.VirtualMachine.ResetPasswordForVirtualMachine(p)
+               r, err := client.VirtualMachine.ResetPasswordForVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ResetPasswordForVirtualMachine", testresetPasswordForVirtualMachine)
 
@@ -232,10 +265,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewRestoreVirtualMachineParams("virtualmachineid")
-               _, err := client.VirtualMachine.RestoreVirtualMachine(p)
+               r, err := client.VirtualMachine.RestoreVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RestoreVirtualMachine", testrestoreVirtualMachine)
 
@@ -256,10 +292,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewStartVirtualMachineParams("id")
-               _, err := client.VirtualMachine.StartVirtualMachine(p)
+               r, err := client.VirtualMachine.StartVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StartVirtualMachine", teststartVirtualMachine)
 
@@ -268,10 +307,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewStopVirtualMachineParams("id")
-               _, err := client.VirtualMachine.StopVirtualMachine(p)
+               r, err := client.VirtualMachine.StopVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("StopVirtualMachine", teststopVirtualMachine)
 
@@ -280,10 +322,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewUpdateDefaultNicForVirtualMachineParams("nicid", "virtualmachineid")
-               _, err := client.VirtualMachine.UpdateDefaultNicForVirtualMachine(p)
+               r, err := client.VirtualMachine.UpdateDefaultNicForVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateDefaultNicForVirtualMachine", testupdateDefaultNicForVirtualMachine)
 
@@ -292,10 +337,13 @@ func TestVirtualMachineService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.VirtualMachine.NewUpdateVirtualMachineParams("id")
-               _, err := client.VirtualMachine.UpdateVirtualMachine(p)
+               r, err := client.VirtualMachine.UpdateVirtualMachine(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVirtualMachine", testupdateVirtualMachine)
 
index 239cb5337ab744ae5ec7d3178b0e0eebaa628986..1869db296e8390309b128b860408e2dd101543b1 100644 (file)
@@ -40,10 +40,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewAttachVolumeParams("id", "virtualmachineid")
-               _, err := client.Volume.AttachVolume(p)
+               r, err := client.Volume.AttachVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("AttachVolume", testattachVolume)
 
@@ -52,10 +55,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewCreateVolumeParams()
-               _, err := client.Volume.CreateVolume(p)
+               r, err := client.Volume.CreateVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateVolume", testcreateVolume)
 
@@ -76,10 +82,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewDestroyVolumeParams("id")
-               _, err := client.Volume.DestroyVolume(p)
+               r, err := client.Volume.DestroyVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DestroyVolume", testdestroyVolume)
 
@@ -88,10 +97,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewDetachVolumeParams()
-               _, err := client.Volume.DetachVolume(p)
+               r, err := client.Volume.DetachVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DetachVolume", testdetachVolume)
 
@@ -100,10 +112,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewExtractVolumeParams("id", "mode", "zoneid")
-               _, err := client.Volume.ExtractVolume(p)
+               r, err := client.Volume.ExtractVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ExtractVolume", testextractVolume)
 
@@ -184,10 +199,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewMigrateVolumeParams("storageid", "volumeid")
-               _, err := client.Volume.MigrateVolume(p)
+               r, err := client.Volume.MigrateVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("MigrateVolume", testmigrateVolume)
 
@@ -196,10 +214,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewRecoverVolumeParams("id")
-               _, err := client.Volume.RecoverVolume(p)
+               r, err := client.Volume.RecoverVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("RecoverVolume", testrecoverVolume)
 
@@ -208,10 +229,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewResizeVolumeParams("id")
-               _, err := client.Volume.ResizeVolume(p)
+               r, err := client.Volume.ResizeVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("ResizeVolume", testresizeVolume)
 
@@ -220,10 +244,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewUpdateVolumeParams()
-               _, err := client.Volume.UpdateVolume(p)
+               r, err := client.Volume.UpdateVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateVolume", testupdateVolume)
 
@@ -232,10 +259,13 @@ func TestVolumeService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Volume.NewUploadVolumeParams("format", "name", "url", "zoneid")
-               _, err := client.Volume.UploadVolume(p)
+               r, err := client.Volume.UploadVolume(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UploadVolume", testuploadVolume)
 
index 15b272791d58b491bd115144963654202c2d23c5..8cbb310520ceb1757a5fa8cff39a611302c6d7e7 100644 (file)
@@ -40,10 +40,13 @@ func TestZoneService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Zone.NewCreateZoneParams("dns1", "internaldns1", "name", "networktype")
-               _, err := client.Zone.CreateZone(p)
+               r, err := client.Zone.CreateZone(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("CreateZone", testcreateZone)
 
@@ -52,10 +55,13 @@ func TestZoneService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Zone.NewDedicateZoneParams("domainid", "zoneid")
-               _, err := client.Zone.DedicateZone(p)
+               r, err := client.Zone.DedicateZone(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("DedicateZone", testdedicateZone)
 
@@ -172,10 +178,13 @@ func TestZoneService(t *testing.T) {
                        t.Skipf("Skipping as no json response is provided in testdata")
                }
                p := client.Zone.NewUpdateZoneParams("id")
-               _, err := client.Zone.UpdateZone(p)
+               r, err := client.Zone.UpdateZone(p)
                if err != nil {
                        t.Errorf(err.Error())
                }
+               if r.Id == "" {
+                       t.Errorf("Failed to parse response. ID not found")
+               }
        }
        t.Run("UpdateZone", testupdateZone)
 
index ab3a1b0176a8714fa76c7a22ff85c4aa86ed30a9..5fcf3b1c822dd29c0b0d6d71beb807215bd8e796 100644 (file)
@@ -2,6 +2,7 @@
   "createSSHKeyPair": {
     "createsshkeypairresponse": {
       "keypair": {
+        "id": "e4874e10-5fdf-11ea-9a56-1e006800018c",
         "privatekey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAlMDlCrzlmEBwmPmQBhvD4PeRdEUV2tyoEuLLwkg7FkZFrjdd\nZaC8+N82Jm/lr27sqq5xVoo6n54k3hG9HVxNZjQBY5IiRNeQIF30Ye5c6TzboCCH\nAJVZYf4Dj5ucJvxg+V1+rZMNNJs6y2tMRGfmQ9zdrHZwOutKBeWTlGLtXyMabc5o\nVVe4hjngxh7s+CbEAA8oE9KFk1ZyhJ7SDj6G9vrMoBYNgqNGG6DHF/NM0A0yaEnj\nZU5MECXnw9qT7W8ggy5UM9AYtfzAyWBrS3jDwFgOjEZ+TW7vvC1Q3lnGkzpTHlye\nRppPm/7Xa8xapIdDV2UdEXnChHj9+Jwpa5nBJQIDAQABAoIBABaReW56oD7MMAkV\ne+NhXQOJq/i+7oTpC1rqK83LFaPYf4PiBHqBu4nqm5WTTn6iTqfKlYlyqVhELwW+\nHToSIfAKnddUeXyGU+iFOKmO92uvfwa5SKIvBoOWfUXRbwx/J9tNcwW0lMFRd8ca\n/VQ3izjqjns28OoPfoiMfyp5I9hWCNoC0KmIqHClqSVU5rpYpEcm70jA1PhLMItf\n8ECEPRQBBoFAEQSnyqohFBOKxna0Urs8qUOJ38FfK883h+ltRSzna7D9QetC+lny\n9OTuAMYe7ytnzGPJITLXjIN3Nj40n+dNmcRl7y0u00FdVpN92HlosCJvQqeJYY5V\nhcfi/aECgYEAxSKvGknRtQjuT+emmG4TmC110ZCcQY1tgIMwkPL++rR9Qp8M5t5p\nocxpK5NYhGgai4Kep5F4P2nePHFemwgP1jHawxsc3G/IA+0c27Y+9uAZSM2mDCcf\nXIvBxkOGcI1UcJYUTwAYdfgtJmVkS3Mj519r1lk2+pJAN14NkC87wekCgYEAwSvS\no7ILlqZo//DThhHakFFLFRKD82ghNMc0b8yheSY+V+tkzW+nugqvm5rhH3GH+M8U\nMLm5sdWauT2/1l7kaUla923lwMDxhd4Buv6v6IZYVNyzJLA5DAT3T7i5fmixE1MG\ncpmZhbpsuikFRUP3Z2td1D8cuZxHN6OrWtCso90CgYEAtJIGji/b1NVvZOWtZaY+\ncIADkYfCeREQokyIqdzKzd2Rdvq1GKvVWg0gsHdw9ydcWTm2FYtb98oDdJ3rqFoE\nF5Dm7xvgndIOBfqlGmOe3Qd8YYFtfWhAg8bIIdEsTeBG3jG6PHq77SL8SFVLPwki\ndAalgluJzo80HwMZrV52gDECgYA5JXm/K6D6BGjzro8lDosWPrZzmXKnw5pvPq9o\nk6UBbirrX5wGmo2IIDkrU3peDvwmwzw53fftgD+xpW7nQFNaQnVC1aQujeXlsHPa\nmhX4OCZRlKj6pZd60s1HLGLT3qzkBp/Vr1MXmLspp5EDmMPMOJsdez5IOs9mymib\nCTjJkQKBgFv0d3RnnxOU9EuTA6DmqxrYnWCQVEl1jwTJwfX6+1hfiBzLMCKWxEZ4\nla4rcmvMkL+uWwfLp/R29ciZC+G08Tc7tPVmZunqT3XBgSAt0y3Q3WXkkZG9RHlS\nCK2YbtViHML+G5dackvASf1p7+w2b3WS8fHFH2GTSTiM/OqReBVF\n-----END RSA PRIVATE KEY-----\n",
         "name": "testSSHKey",
         "account": "admin",