diff --git a/auditapi/VERSION.go b/auditapi/VERSION.go index b8762891..7c68c517 100644 --- a/auditapi/VERSION.go +++ b/auditapi/VERSION.go @@ -1,3 +1,3 @@ package auditapi -const SdkVersion = "3.0.2" +const SdkVersion = "3.0.3" diff --git a/billingapi/VERSION.go b/billingapi/VERSION.go index a1d0cb59..002e61f5 100644 --- a/billingapi/VERSION.go +++ b/billingapi/VERSION.go @@ -1,3 +1,3 @@ package billingapi -const SdkVersion = "3.0.0" +const SdkVersion = "3.1.0" diff --git a/bmcapi/VERSION.go b/bmcapi/VERSION.go index d5563778..642ca315 100644 --- a/bmcapi/VERSION.go +++ b/bmcapi/VERSION.go @@ -1,3 +1,3 @@ package bmcapi -const SdkVersion = "3.1.0" +const SdkVersion = "3.2.0" diff --git a/invoicingapi/VERSION.go b/invoicingapi/VERSION.go index 53d2ff32..13dc8eb8 100644 --- a/invoicingapi/VERSION.go +++ b/invoicingapi/VERSION.go @@ -1,3 +1,3 @@ package invoicingapi -const SdkVersion = "1.0.2" +const SdkVersion = "1.0.3" diff --git a/ipapi/VERSION.go b/ipapi/VERSION.go index 3361a3d8..e07707b6 100644 --- a/ipapi/VERSION.go +++ b/ipapi/VERSION.go @@ -1,3 +1,3 @@ package ipapi -const SdkVersion = "3.0.2" +const SdkVersion = "3.0.3" diff --git a/locationapi/VERSION.go b/locationapi/VERSION.go index 713d9829..f37fa15f 100644 --- a/locationapi/VERSION.go +++ b/locationapi/VERSION.go @@ -1,3 +1,3 @@ package locationapi -const SdkVersion = "3.0.0" +const SdkVersion = "3.0.1" diff --git a/networkapi/VERSION.go b/networkapi/VERSION.go index cd20843e..20bcd5e1 100644 --- a/networkapi/VERSION.go +++ b/networkapi/VERSION.go @@ -1,3 +1,3 @@ package networkapi -const SdkVersion = "3.0.2" +const SdkVersion = "3.1.0" diff --git a/networkstorageapi/VERSION.go b/networkstorageapi/VERSION.go index 5aa4309f..b66a37ad 100644 --- a/networkstorageapi/VERSION.go +++ b/networkstorageapi/VERSION.go @@ -1,3 +1,3 @@ package networkstorageapi -const SdkVersion = "3.0.0" +const SdkVersion = "3.0.1" diff --git a/paymentsapi/VERSION.go b/paymentsapi/VERSION.go index aedd8ab7..dbe0f9b8 100644 --- a/paymentsapi/VERSION.go +++ b/paymentsapi/VERSION.go @@ -1,3 +1,3 @@ package paymentsapi -const SdkVersion = "1.0.2" +const SdkVersion = "1.0.3" diff --git a/ranchersolutionapi/VERSION.go b/ranchersolutionapi/VERSION.go index 95209635..77bc1c8f 100644 --- a/ranchersolutionapi/VERSION.go +++ b/ranchersolutionapi/VERSION.go @@ -1,3 +1,3 @@ package ranchersolutionapi -const SdkVersion = "3.0.2" +const SdkVersion = "3.1.0" diff --git a/tagapi/VERSION.go b/tagapi/VERSION.go index b750aa9a..ecb3abdd 100644 --- a/tagapi/VERSION.go +++ b/tagapi/VERSION.go @@ -1,3 +1,3 @@ package tagapi -const SdkVersion = "3.0.2" +const SdkVersion = "3.0.3" diff --git a/tests/network_api_test.go b/tests/network_api_test.go index 793499bd..b790cf3d 100644 --- a/tests/network_api_test.go +++ b/tests/network_api_test.go @@ -339,6 +339,125 @@ func (suite *NetworkApiTestSuite) TestDeletePublicNetworkIpBlocksByPublicNetwork suite.verifyCalledOnce(expectationId) } +func (suite *NetworkApiTestSuite) TestGetBgpPeerGroups() { + // Generate payload + request, response := TestUtilsImpl{}.generatePayloadsFrom("networkapi/bgp_peer_groups_get", "./payloads") + + // Extract the response expectation id + expectationId := TestUtilsImpl{}.setupExpectation(request, response, 1) + + // Fetch a map of query parameters + qpMap := TestUtilsImpl{}.generateQueryParams(request) + + loc := fmt.Sprintf("%v", qpMap["location"]) + + // Operation Execution + result, _, _ := suite.apiClient.BGPPeerGroupsAPI.BgpPeerGroupsGet(suite.ctx).Location(loc).Execute() + + // Convert the result and response body to json strings + jsonResult, _ := json.Marshal(result) + jsonResponseBody, _ := json.Marshal(response.Body) + + suite.Equal(string(jsonResult), string(jsonResponseBody)) + + // Verify + suite.verifyCalledOnce(expectationId) +} + +func (suite *NetworkApiTestSuite) TestCreateBgpPeerGroups() { + // Generate payload + request, response := TestUtilsImpl{}.generatePayloadsFrom("networkapi/bgp_peer_groups_post", "./payloads") + + // Extract the response expectation id + expectationId := TestUtilsImpl{}.setupExpectation(request, response, 1) + + body, _ := json.Marshal(request.Body.Json) + var bgpPeerGroupCreate networkapi.BgpPeerGroupCreate + json.Unmarshal(body, &bgpPeerGroupCreate) + + // Operation Execution + result, _, _ := suite.apiClient.BGPPeerGroupsAPI.BgpPeerGroupsPost(suite.ctx).BgpPeerGroupCreate(bgpPeerGroupCreate).Execute() + + // Convert the result and response body to json strings + jsonResult, _ := json.Marshal(result) + jsonResponseBody, _ := json.Marshal(response.Body) + + suite.Equal(string(jsonResult), string(jsonResponseBody)) + + // Verify + suite.verifyCalledOnce(expectationId) +} + +func (suite *NetworkApiTestSuite) TestGetBgpPeerGroupsByID() { + // Generate payload + request, response := TestUtilsImpl{}.generatePayloadsFrom("networkapi/bgp_peer_groups_get_by_id", "./payloads") + + // Extract the response expectation id + expectationId := TestUtilsImpl{}.setupExpectation(request, response, 1) + + bgpPeerGroupId := request.PathParameters["id"][0] + + // Operation Execution + result, _, _ := suite.apiClient.BGPPeerGroupsAPI.BgpPeerGroupsPeerGroupIdGet(suite.ctx, bgpPeerGroupId).Execute() + + // Convert the result and response body to json strings + jsonResult, _ := json.Marshal(result) + jsonResponseBody, _ := json.Marshal(response.Body) + + suite.Equal(string(jsonResult), string(jsonResponseBody)) + + // Verify + suite.verifyCalledOnce(expectationId) +} + +func (suite *NetworkApiTestSuite) TestDeleteBgpPeerGroupsByID() { + // Generate payload + request, response := TestUtilsImpl{}.generatePayloadsFrom("networkapi/bgp_peer_groups_delete_by_id", "./payloads") + + // Extract the response expectation id + expectationId := TestUtilsImpl{}.setupExpectation(request, response, 1) + + bgpPeerGroupId := request.PathParameters["id"][0] + + // Operation Execution + result, _, _ := suite.apiClient.BGPPeerGroupsAPI.BgpPeerGroupsPeerGroupIdDelete(suite.ctx, bgpPeerGroupId).Execute() + + // Convert the result and response body to json strings + jsonResult, _ := json.Marshal(result) + jsonResponseBody, _ := json.Marshal(response.Body) + + suite.Equal(string(jsonResult), string(jsonResponseBody)) + + // Verify + suite.verifyCalledOnce(expectationId) +} + +func (suite *NetworkApiTestSuite) TestPatchBgpPeerGroupsByID() { + // Generate payload + request, response := TestUtilsImpl{}.generatePayloadsFrom("networkapi/bgp_peer_groups_patch_by_id", "./payloads") + + // Extract the response expectation id + expectationId := TestUtilsImpl{}.setupExpectation(request, response, 1) + + bgpPeerGroupId := request.PathParameters["id"][0] + + body, _ := json.Marshal(request.Body.Json) + var bgpPeerGroupPatch networkapi.BgpPeerGroupPatch + json.Unmarshal(body, &bgpPeerGroupPatch) + + // Operation Execution + result, _, _ := suite.apiClient.BGPPeerGroupsAPI.BgpPeerGroupsPeerGroupIdPatch(suite.ctx, bgpPeerGroupId).BgpPeerGroupPatch(bgpPeerGroupPatch).Execute() + + // Convert the result and response body to json strings + jsonResult, _ := json.Marshal(result) + jsonResponseBody, _ := json.Marshal(response.Body) + + suite.Equal(string(jsonResult), string(jsonResponseBody)) + + // Verify + suite.verifyCalledOnce(expectationId) +} + func TestNetworkApiTestSuite(t *testing.T) { suite.Run(t, new(NetworkApiTestSuite)) } diff --git a/tests/payloads/billingapi/products/products_get.json b/tests/payloads/billingapi/products/products_get.json index 2226effd..e31ddc10 100644 --- a/tests/payloads/billingapi/products/products_get.json +++ b/tests/payloads/billingapi/products/products_get.json @@ -55,7 +55,13 @@ "coresPerCpu" : 5, "cpuFrequency" : 5, "network" : "network", - "storage" : "storage" + "storage" : "storage", + "gpuConfigurations": [ + { + "count": 10, + "name": "gpu" + } + ] } } ] diff --git a/tests/payloads/bmcapi/servers/servers_action_provision.json b/tests/payloads/bmcapi/servers/servers_action_provision.json index 4c063225..77c90105 100644 --- a/tests/payloads/bmcapi/servers/servers_action_provision.json +++ b/tests/payloads/bmcapi/servers/servers_action_provision.json @@ -182,6 +182,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } } diff --git a/tests/payloads/bmcapi/servers/servers_action_reserve.json b/tests/payloads/bmcapi/servers/servers_action_reserve.json index add1c627..bc90c2cd 100644 --- a/tests/payloads/bmcapi/servers/servers_action_reserve.json +++ b/tests/payloads/bmcapi/servers/servers_action_reserve.json @@ -137,6 +137,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } } diff --git a/tests/payloads/bmcapi/servers/servers_get.json b/tests/payloads/bmcapi/servers/servers_get.json index 656ab3f5..44d67c62 100644 --- a/tests/payloads/bmcapi/servers/servers_get.json +++ b/tests/payloads/bmcapi/servers/servers_get.json @@ -134,6 +134,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } ] diff --git a/tests/payloads/bmcapi/servers/servers_get_by_id.json b/tests/payloads/bmcapi/servers/servers_get_by_id.json index c8863745..ba0bb277 100644 --- a/tests/payloads/bmcapi/servers/servers_get_by_id.json +++ b/tests/payloads/bmcapi/servers/servers_get_by_id.json @@ -130,6 +130,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } } diff --git a/tests/payloads/bmcapi/servers/servers_patch_by_id.json b/tests/payloads/bmcapi/servers/servers_patch_by_id.json index dc232e37..18550160 100644 --- a/tests/payloads/bmcapi/servers/servers_patch_by_id.json +++ b/tests/payloads/bmcapi/servers/servers_patch_by_id.json @@ -138,6 +138,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } } diff --git a/tests/payloads/bmcapi/servers/servers_post.json b/tests/payloads/bmcapi/servers/servers_post.json index 5a196ce2..571d92f5 100644 --- a/tests/payloads/bmcapi/servers/servers_post.json +++ b/tests/payloads/bmcapi/servers/servers_post.json @@ -233,6 +233,10 @@ "raid": "NO_RAID", "size": -1 } + }, + "gpuConfiguration": { + "longName": "Nvideo PTX 5090X", + "count": 3 } } } diff --git a/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json new file mode 100644 index 00000000..3d2bd5d9 --- /dev/null +++ b/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json @@ -0,0 +1,50 @@ +{ + "request": { + "method": "DELETE", + "path": "/networks/v1/bgp-peer-groups/{id}", + "pathParameters": { + "id": [ + "e6afba51-7de8-4080-83ab-0f915570659c" + ] + } + }, + "response": { + "statusCode": 202, + "body": { + "id": "60473c2509268bc77fd06d29", + "status": "PENDING", + "location": "ASH", + "ipv4Prefixes": [ + { + "ipv4AllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "isBringYourOwnIp": false, + "inUse": false + } + ], + "targetAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "activeAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE", + "rpkiRoaOriginAsn": 19437, + "eBgpMultiHop": 7, + "peeringLoopbacksV4": [ + "169.254.247.0", + "169.254.247.1" + ], + "keepAliveTimerSeconds": 10, + "holdTimerSeconds": 30, + "createdOn": "2024-03-01T10:30:00Z", + "lastUpdatedOn": "2024-03-01T14:30:00Z" + } + } +} \ No newline at end of file diff --git a/tests/payloads/networkapi/bgp_peer_groups_get.json b/tests/payloads/networkapi/bgp_peer_groups_get.json new file mode 100644 index 00000000..422963ab --- /dev/null +++ b/tests/payloads/networkapi/bgp_peer_groups_get.json @@ -0,0 +1,55 @@ +{ + "request": { + "method": "GET", + "path": "/networks/v1/bgp-peer-groups", + "queryStringParameters": [ + { + "name": "location", + "values": [ + "PHX" + ] + } + ] + }, + "response": { + "statusCode": 200, + "body": [ + { + "id": "60473c2509268bc77fd06d29", + "status": "PENDING", + "location": "ASH", + "ipv4Prefixes": [ + { + "ipv4AllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "isBringYourOwnIp": false, + "inUse": false + } + ], + "targetAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "activeAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE", + "rpkiRoaOriginAsn": 19437, + "eBgpMultiHop": 7, + "peeringLoopbacksV4": [ + "169.254.247.0", + "169.254.247.1" + ], + "keepAliveTimerSeconds": 10, + "holdTimerSeconds": 30, + "createdOn": "2024-03-01T10:30:00Z", + "lastUpdatedOn": "2024-03-01T14:30:00Z" + } + ] + } +} \ No newline at end of file diff --git a/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json new file mode 100644 index 00000000..c6e19971 --- /dev/null +++ b/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json @@ -0,0 +1,50 @@ +{ + "request": { + "method": "GET", + "path": "/networks/v1/bgp-peer-groups/{id}", + "pathParameters": { + "id": [ + "e6afba51-7de8-4080-83ab-0f915570659c" + ] + } + }, + "response": { + "statusCode": 200, + "body": { + "id": "60473c2509268bc77fd06d29", + "status": "PENDING", + "location": "ASH", + "ipv4Prefixes": [ + { + "ipv4AllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "isBringYourOwnIp": false, + "inUse": false + } + ], + "targetAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "activeAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE", + "rpkiRoaOriginAsn": 19437, + "eBgpMultiHop": 7, + "peeringLoopbacksV4": [ + "169.254.247.0", + "169.254.247.1" + ], + "keepAliveTimerSeconds": 10, + "holdTimerSeconds": 30, + "createdOn": "2024-03-01T10:30:00Z", + "lastUpdatedOn": "2024-03-01T14:30:00Z" + } + } +} \ No newline at end of file diff --git a/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json new file mode 100644 index 00000000..00caef7d --- /dev/null +++ b/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json @@ -0,0 +1,58 @@ +{ + "request": { + "method": "PATCH", + "path": "/networks/v1/bgp-peer-groups/{id}", + "pathParameters": { + "id": [ + "e6afba51-7de8-4080-83ab-0f915570659c" + ] + }, + "body": { + "type": "JSON", + "json": { + "asn": 65401, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE" + } + } + }, + "response": { + "statusCode": 202, + "body": { + "id": "60473c2509268bc77fd06d29", + "status": "PENDING", + "location": "ASH", + "ipv4Prefixes": [ + { + "ipv4AllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "isBringYourOwnIp": false, + "inUse": false + } + ], + "targetAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "activeAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE", + "rpkiRoaOriginAsn": 19437, + "eBgpMultiHop": 7, + "peeringLoopbacksV4": [ + "169.254.247.0", + "169.254.247.1" + ], + "keepAliveTimerSeconds": 10, + "holdTimerSeconds": 30, + "createdOn": "2024-03-01T10:30:00Z", + "lastUpdatedOn": "2024-03-01T14:30:00Z" + } + } +} \ No newline at end of file diff --git a/tests/payloads/networkapi/bgp_peer_groups_post.json b/tests/payloads/networkapi/bgp_peer_groups_post.json new file mode 100644 index 00000000..b59e9f1a --- /dev/null +++ b/tests/payloads/networkapi/bgp_peer_groups_post.json @@ -0,0 +1,54 @@ +{ + "request": { + "method": "POST", + "path": "/networks/v1/bgp-peer-groups", + "body": { + "type": "JSON", + "json": { + "location": "ASH", + "asn": 65401, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE" + } + } + }, + "response": { + "statusCode": 202, + "body": { + "id": "60473c2509268bc77fd06d29", + "status": "PENDING", + "location": "ASH", + "ipv4Prefixes": [ + { + "ipv4AllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "isBringYourOwnIp": false, + "inUse": false + } + ], + "targetAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "activeAsnDetails": { + "asn": 65401, + "isBringYourOwn": false, + "verificationStatus": "VERIFIED" + }, + "password": "E!73423ghhjfge45", + "advertisedRoutes": "NONE", + "rpkiRoaOriginAsn": 19437, + "eBgpMultiHop": 7, + "peeringLoopbacksV4": [ + "169.254.247.0", + "169.254.247.1" + ], + "keepAliveTimerSeconds": 10, + "holdTimerSeconds": 30, + "createdOn": "2024-03-01T10:30:00Z", + "lastUpdatedOn": "2024-03-01T14:30:00Z" + } + } +} \ No newline at end of file