From 282d7a7eb31e34a34bd46e494561408dfed3e746 Mon Sep 17 00:00:00 2001 From: andrej Date: Fri, 27 Mar 2026 13:31:04 +0100 Subject: [PATCH] Fixed tests and documented method of running them on NixOS --- .gitignore | 1 + .../models/quota_edit_limit_request.rb | 6 +- .../quota_edit_limit_request_details.rb | 6 +- tests/README.md | 11 +- tests/default.nix | 14 + tests/gemset.nix | 312 ++++++++++++++++++ tests/nix-setup.sh | 37 +++ .../reservations_actions_convert.json | 11 +- ...servations_actions_disable_auto_renew.json | 5 + ...eservations_actions_enable_auto_renew.json | 5 + .../reservations/reservations_get.json | 5 + .../reservations/reservations_get_by_id.json | 5 + .../reservations/reservations_post.json | 11 +- .../servers/servers_action_provision.json | 6 +- .../servers/servers_action_reserve.json | 3 +- .../bmcapi/servers/servers_action_reset.json | 6 +- .../payloads/bmcapi/servers/servers_get.json | 3 +- .../bmcapi/servers/servers_get_by_id.json | 3 +- .../bmcapi/servers/servers_patch_by_id.json | 3 +- .../payloads/bmcapi/servers/servers_post.json | 12 +- .../servers/servers_put_tags_by_id.json | 3 +- .../bgp_peer_groups_delete_by_id.json | 12 + .../networkapi/bgp_peer_groups_get.json | 12 + .../networkapi/bgp_peer_groups_get_by_id.json | 12 + .../bgp_peer_groups_patch_by_id.json | 12 + .../networkapi/bgp_peer_groups_post.json | 12 + .../networkapi/public_networks_get.json | 8 +- .../networkapi/public_networks_get_by_id.json | 8 +- .../public_networks_patch_by_id.json | 8 +- .../networkapi/public_networks_post.json | 4 +- .../public_networks_post_ip_block.json | 8 +- 31 files changed, 535 insertions(+), 29 deletions(-) create mode 100644 tests/default.nix create mode 100644 tests/gemset.nix create mode 100755 tests/nix-setup.sh diff --git a/.gitignore b/.gitignore index d78a16a2..6a6c61fe 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ build-iPhoneSimulator/ /.bundle/ /vendor/bundle /lib/bundler/man/ +vendor # for a library or gem, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: diff --git a/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request.rb b/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request.rb index c1a7fcc9..70778888 100644 --- a/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +++ b/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request.rb @@ -100,7 +100,7 @@ def list_invalid_properties invalid_properties.push('invalid value for "reason", reason cannot be nil.') end - pattern = Regexp.new(/^(?s)(?!\s*$).+/) + pattern = Regexp.new(/^(?m)(?!\s*$).+/) if @reason !~ pattern invalid_properties.push("invalid value for \"reason\", must conform to the pattern #{pattern}.") end @@ -115,7 +115,7 @@ def valid? return false if @limit.nil? return false if @limit < 0 return false if @reason.nil? - return false if @reason !~ Regexp.new(/^(?s)(?!\s*$).+/) + return false if @reason !~ Regexp.new(/^(?m)(?!\s*$).+/) true end @@ -140,7 +140,7 @@ def reason=(reason) fail ArgumentError, 'reason cannot be nil' end - pattern = Regexp.new(/^(?s)(?!\s*$).+/) + pattern = Regexp.new(/^(?m)(?!\s*$).+/) if reason !~ pattern fail ArgumentError, "invalid value for \"reason\", must conform to the pattern #{pattern}." end diff --git a/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb b/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb index a7e768fd..06592945 100644 --- a/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +++ b/BmcApi/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb @@ -117,7 +117,7 @@ def list_invalid_properties invalid_properties.push('invalid value for "reason", reason cannot be nil.') end - pattern = Regexp.new(/^(?s)(?!\s*$).+/) + pattern = Regexp.new(/^(?m)(?!\s*$).+/) if @reason !~ pattern invalid_properties.push("invalid value for \"reason\", must conform to the pattern #{pattern}.") end @@ -136,7 +136,7 @@ def valid? return false if @limit.nil? return false if @limit < 0 return false if @reason.nil? - return false if @reason !~ Regexp.new(/^(?s)(?!\s*$).+/) + return false if @reason !~ Regexp.new(/^(?m)(?!\s*$).+/) return false if @requested_on.nil? true end @@ -162,7 +162,7 @@ def reason=(reason) fail ArgumentError, 'reason cannot be nil' end - pattern = Regexp.new(/^(?s)(?!\s*$).+/) + pattern = Regexp.new(/^(?m)(?!\s*$).+/) if reason !~ pattern fail ArgumentError, "invalid value for \"reason\", must conform to the pattern #{pattern}." end diff --git a/tests/README.md b/tests/README.md index b3432557..7739109a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -27,4 +27,13 @@ Tests can be run per-module by running its respective `tc_` script, or all at on ```sh bundler exec ruby ./ts_sdk.rb -``` \ No newline at end of file +``` + +### NixOS +When using **NixOS** the above *will not work*, as it will not find the `libcurl.so.4` library. + +First, get `bundix` - then run `nix-setup.sh`. One thing to note is that this script will *temporarily* modify the `Gemfile` to use **absolute paths** instead of relative ones. +It will then open a *nix shell* for you, at which point you can just do `bundler exec ruby ./ts_sdk.rb` to run all tests. Once you're done, run `exit` and the shell will close, +with the old `Gemfile` being restored. + +If it *doesn't* get restored, just replace the `Gemfile` with `Gemfile.old`. Otherwise, the absolute paths can be manually changed into relative ones. \ No newline at end of file diff --git a/tests/default.nix b/tests/default.nix new file mode 100644 index 00000000..22000c16 --- /dev/null +++ b/tests/default.nix @@ -0,0 +1,14 @@ +with (import {}); +let + gems = bundlerEnv { + name = "your-package"; + inherit ruby; + gemdir = ./.; + }; +in +mkShell { + packages = [ + gems + gems.wrappedRuby + ]; +} \ No newline at end of file diff --git a/tests/gemset.nix b/tests/gemset.nix new file mode 100644 index 00000000..74f0ea7d --- /dev/null +++ b/tests/gemset.nix @@ -0,0 +1,312 @@ +{ + base64 = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yx9yn47a8lkfcjmigk79fykxvr80r4m1i35q82sxzynpbm7lcr7"; + type = "gem"; + }; + version = "0.3.0"; + }; + bigdecimal = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19y406nx17arzsbc515mjmr6k5p59afprspa1k423yd9cp8d61wb"; + type = "gem"; + }; + version = "4.0.1"; + }; + ethon = { + dependencies = ["ffi" "logger"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1cpwds6mpija1bwh8p89fqa993llssvi81w5ic3cnj04yg4sz65m"; + type = "gem"; + }; + version = "0.18.0"; + }; + faraday = { + dependencies = ["faraday-net_http" "json" "logger"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "077n5ss3z3ds4vj54w201kd12smai853dp9c9n7ii7g3q7nwwg54"; + type = "gem"; + }; + version = "2.14.1"; + }; + faraday-net_http = { + dependencies = ["net-http"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0v4hfmc7d4lrqqj2wl366rm9551gd08zkv2ppwwnjlnkc217aizi"; + type = "gem"; + }; + version = "3.4.2"; + }; + ffi = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1kqasqvy8d7r09ri4n6bkdwbk63j7afd9ilsw34nzlgh0qp69ldw"; + type = "gem"; + }; + version = "1.17.4"; + }; + json = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz"; + type = "gem"; + }; + version = "2.6.1"; + }; + jwt = { + dependencies = ["base64"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1x64l31nkqjwfv51s2vsm0yqq4cwzrlnji12wvaq761myx3fxq9i"; + type = "gem"; + }; + version = "2.10.2"; + }; + logger = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr"; + type = "gem"; + }; + version = "1.7.0"; + }; + multi_json = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1drisvysgvnjlz49a0qcbs294id6mvj3i8iik5rvym68ybwfzvvs"; + type = "gem"; + }; + version = "1.19.1"; + }; + multi_xml = { + dependencies = ["bigdecimal"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0nnzdswa9l6w8k5ndgbv5al9f0jkg14dqwzyic4fjd5c1cls1nxd"; + type = "gem"; + }; + version = "0.8.1"; + }; + net-http = { + dependencies = ["uri"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15k96fj6qwbaiv6g52l538ass95ds1qwgynqdridz29yqrkhpfi5"; + type = "gem"; + }; + version = "0.9.1"; + }; + oauth2 = { + dependencies = ["faraday" "jwt" "multi_json" "multi_xml" "rack"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "16sk9h6a6vzqxf8v1fisa8jq5cj9sw4mwc7azy5gj2w1whkfa5dp"; + type = "gem"; + }; + version = "1.4.9"; + }; + pnap_audit_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/AuditApi; + type = "path"; + }; + version = "2.0.5"; + }; + pnap_billing_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/BillingApi; + type = "path"; + }; + version = "3.0.0"; + }; + pnap_bmc_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/BmcApi; + type = "path"; + }; + version = "2.3.0"; + }; + pnap_invoicing_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/InvoicingApi; + type = "path"; + }; + version = "1.0.5"; + }; + pnap_ip_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/IpApi; + type = "path"; + }; + version = "2.3.0"; + }; + pnap_location_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/LocationApi; + type = "path"; + }; + version = "3.0.0"; + }; + pnap_network_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/NetworkApi; + type = "path"; + }; + version = "2.2.0"; + }; + pnap_network_storage_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/NetworkStorageApi; + type = "path"; + }; + version = "2.0.5"; + }; + pnap_payments_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/PaymentsApi; + type = "path"; + }; + version = "1.0.5"; + }; + pnap_rancher_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/RancherApi; + type = "path"; + }; + version = "2.0.5"; + }; + pnap_tag_api = { + dependencies = ["typhoeus"]; + groups = ["default"]; + platforms = []; + source = { + path = /home/jenk/workspace/sdks/ruby-sdk-bmc/TagApi; + type = "path"; + }; + version = "2.0.5"; + }; + power_assert = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "00s1sfjak8w3f12g66ldb61xjavr5p2wvkflziiyhx6c2rkqgscc"; + type = "gem"; + }; + version = "3.0.1"; + }; + rack = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0hj5yq200wlq1clpdvh44pqwllbxll0k3gjajxnrcn95hxzhpky5"; + type = "gem"; + }; + version = "2.2.22"; + }; + test-unit = { + dependencies = ["power_assert"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0h0gpi3fggfa76sbm5kh48ma79z41yh6y7n3lxmaqrbf3zqyjlcw"; + type = "gem"; + }; + version = "3.5.3"; + }; + test-unit-runner-junitxml = { + dependencies = ["test-unit"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "047jih0v03db1pb4z7c46ky4x4w8hxli8z3fqr760s2mdagrpw1p"; + type = "gem"; + }; + version = "1.0.0"; + }; + typhoeus = { + dependencies = ["ethon"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "079k9j2alxxqn8r3vfm1anwp16v9s5f27p01k3i4g59p7v143k5s"; + type = "gem"; + }; + version = "1.6.0"; + }; + uri = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1ijpbj7mdrq7rhpq2kb51yykhrs2s54wfs6sm9z3icgz4y6sb7rp"; + type = "gem"; + }; + version = "1.1.1"; + }; +} diff --git a/tests/nix-setup.sh b/tests/nix-setup.sh new file mode 100755 index 00000000..4dcaef93 --- /dev/null +++ b/tests/nix-setup.sh @@ -0,0 +1,37 @@ +if command -v bundix >/dev/null 2>&1; then + echo "bundix is installed - continuing..." +else + echo "bundix is missing! please add it to your nix configuration first." + exit 1 +fi + +cp Gemfile Gemfile.old + +cd .. +pwd=$(pwd) +cd tests + +echo "getting parent directory: $pwd" + +escaped_pwd=${pwd//\//\\\/} + +echo "escaping directory: $escaped_pwd" + +echo "turning relative path in Gemfile to absolute..." +sed -i "s/'..\//'$escaped_pwd\//g" Gemfile + +echo "removing lockfile to refresh dependencies..." +rm -f Gemfile.lock + +echo "removing gemset.nix if present..." +rm -f gemset.nix + +echo "executing bundix..." +bundix -l + +echo "entering shell..." +nix-shell + +echo "exited shell..." +echo "undoing changes to Gemfile..." +mv Gemfile.old Gemfile \ No newline at end of file diff --git a/tests/payloads/billingapi/reservations/reservations_actions_convert.json b/tests/payloads/billingapi/reservations/reservations_actions_convert.json index 66f71c0a..34e4b011 100644 --- a/tests/payloads/billingapi/reservations/reservations_actions_convert.json +++ b/tests/payloads/billingapi/reservations/reservations_actions_convert.json @@ -10,7 +10,11 @@ "body": { "type": "JSON", "json": { - "sku": "XXX-XXX-XXX" + "sku": "XXX-XXX-XXX", + "quantity": { + "quantity": 30.0, + "unit": "TB" + } }, "matchType": "STRICT" } @@ -29,6 +33,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/billingapi/reservations/reservations_actions_disable_auto_renew.json b/tests/payloads/billingapi/reservations/reservations_actions_disable_auto_renew.json index ce2b6506..ba5ac42a 100644 --- a/tests/payloads/billingapi/reservations/reservations_actions_disable_auto_renew.json +++ b/tests/payloads/billingapi/reservations/reservations_actions_disable_auto_renew.json @@ -29,6 +29,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/billingapi/reservations/reservations_actions_enable_auto_renew.json b/tests/payloads/billingapi/reservations/reservations_actions_enable_auto_renew.json index 43964817..c909038f 100644 --- a/tests/payloads/billingapi/reservations/reservations_actions_enable_auto_renew.json +++ b/tests/payloads/billingapi/reservations/reservations_actions_enable_auto_renew.json @@ -22,6 +22,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/billingapi/reservations/reservations_get.json b/tests/payloads/billingapi/reservations/reservations_get.json index 43335283..992bf00f 100644 --- a/tests/payloads/billingapi/reservations/reservations_get.json +++ b/tests/payloads/billingapi/reservations/reservations_get.json @@ -26,6 +26,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/billingapi/reservations/reservations_get_by_id.json b/tests/payloads/billingapi/reservations/reservations_get_by_id.json index c7fe5da8..9bb3cb3d 100644 --- a/tests/payloads/billingapi/reservations/reservations_get_by_id.json +++ b/tests/payloads/billingapi/reservations/reservations_get_by_id.json @@ -22,6 +22,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/billingapi/reservations/reservations_post.json b/tests/payloads/billingapi/reservations/reservations_post.json index aaa1de7d..037bf9e8 100644 --- a/tests/payloads/billingapi/reservations/reservations_post.json +++ b/tests/payloads/billingapi/reservations/reservations_post.json @@ -5,7 +5,11 @@ "body": { "type": "JSON", "json": { - "sku": "XXX-XXX-XXX" + "sku": "XXX-XXX-XXX", + "quantity": { + "unit": "TB", + "quantity": 30.0 + } }, "matchType": "STRICT" } @@ -24,6 +28,11 @@ "lastRenewalDateTime": "2020-03-19T16:39:00Z", "nextRenewalDateTime": "2020-03-19T16:39:00Z", "nextBillingDate": "2020-04-19", + "reservationState": "ACTIVE", + "quantity": { + "unit": "TB", + "quantity": 30 + }, "autoRenew": true, "sku": "XXX-XXX-XXX", "price": 175, diff --git a/tests/payloads/bmcapi/servers/servers_action_provision.json b/tests/payloads/bmcapi/servers/servers_action_provision.json index cfc5ce69..74ce8af6 100644 --- a/tests/payloads/bmcapi/servers/servers_action_provision.json +++ b/tests/payloads/bmcapi/servers/servers_action_provision.json @@ -46,7 +46,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", @@ -165,7 +166,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/bmcapi/servers/servers_action_reserve.json b/tests/payloads/bmcapi/servers/servers_action_reserve.json index 63abf91c..00e838a9 100644 --- a/tests/payloads/bmcapi/servers/servers_action_reserve.json +++ b/tests/payloads/bmcapi/servers/servers_action_reserve.json @@ -69,7 +69,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/bmcapi/servers/servers_action_reset.json b/tests/payloads/bmcapi/servers/servers_action_reset.json index 467932b0..a02e52e1 100644 --- a/tests/payloads/bmcapi/servers/servers_action_reset.json +++ b/tests/payloads/bmcapi/servers/servers_action_reset.json @@ -21,7 +21,8 @@ "windows": { "rdpAllowedIps": [ "172.217.22.14" - ] + ], + "bringYourOwnLicense": false }, "esxi": { "rootPassword": "MyP@ssw0rd_01", @@ -51,7 +52,8 @@ "windows": { "rdpAllowedIps": [ "172.217.22.14" - ] + ], + "bringYourOwnLicense": false }, "esxi": { "rootPassword": "MyP@ssw0rd_01", diff --git a/tests/payloads/bmcapi/servers/servers_get.json b/tests/payloads/bmcapi/servers/servers_get.json index 4f514951..709d9bf3 100644 --- a/tests/payloads/bmcapi/servers/servers_get.json +++ b/tests/payloads/bmcapi/servers/servers_get.json @@ -66,7 +66,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/bmcapi/servers/servers_get_by_id.json b/tests/payloads/bmcapi/servers/servers_get_by_id.json index ad468d8b..8b595a17 100644 --- a/tests/payloads/bmcapi/servers/servers_get_by_id.json +++ b/tests/payloads/bmcapi/servers/servers_get_by_id.json @@ -62,7 +62,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/bmcapi/servers/servers_patch_by_id.json b/tests/payloads/bmcapi/servers/servers_patch_by_id.json index 1c9aca9d..d04ef9bb 100644 --- a/tests/payloads/bmcapi/servers/servers_patch_by_id.json +++ b/tests/payloads/bmcapi/servers/servers_patch_by_id.json @@ -70,7 +70,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/bmcapi/servers/servers_post.json b/tests/payloads/bmcapi/servers/servers_post.json index 5d8651bf..8dfb3962 100644 --- a/tests/payloads/bmcapi/servers/servers_post.json +++ b/tests/payloads/bmcapi/servers/servers_post.json @@ -51,7 +51,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", @@ -188,7 +189,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", @@ -261,6 +263,12 @@ ] } }, + "storageConfiguration": { + "rootPartition": { + "raid": "NO_RAID", + "size": -1 + } + }, "supersededBy": "64a539b8d9c2c9ba8424ca31", "supersedes": "64a539b8d9c2c9ba8424ca31" } diff --git a/tests/payloads/bmcapi/servers/servers_put_tags_by_id.json b/tests/payloads/bmcapi/servers/servers_put_tags_by_id.json index 12e8f2a2..3fc3186b 100644 --- a/tests/payloads/bmcapi/servers/servers_put_tags_by_id.json +++ b/tests/payloads/bmcapi/servers/servers_put_tags_by_id.json @@ -72,7 +72,8 @@ "172.217.22.14", "10.111.14.40/29", "10.111.14.66 - 10.111.14.71" - ] + ], + "bringYourOwnLicense": false }, "rootPassword": "MyP@ssw0rd_01", "managementUiUrl": "https://172.217.22.14", diff --git a/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json index 46baf859..a433c81e 100644 --- a/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json +++ b/tests/payloads/networkapi/bgp_peer_groups_delete_by_id.json @@ -23,6 +23,14 @@ "inUse": false } ], + "ipPrefixes": [ + { + "ipAllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "ipVersion": "v6" + } + ], "targetAsnDetails": { "asn": 9131072, "isBringYourOwn": true, @@ -42,6 +50,10 @@ "peeringLoopbacksV4": [ "test" ], + "peeringLoopbacksV6": [ + "1000::", + "1000::" + ], "keepAliveTimerSeconds": 3600, "holdTimerSeconds": 7200, "createdOn": "2022-04-07T13:20:30.491Z", diff --git a/tests/payloads/networkapi/bgp_peer_groups_get.json b/tests/payloads/networkapi/bgp_peer_groups_get.json index de9166ef..5a1596f4 100644 --- a/tests/payloads/networkapi/bgp_peer_groups_get.json +++ b/tests/payloads/networkapi/bgp_peer_groups_get.json @@ -27,6 +27,14 @@ "inUse": false } ], + "ipPrefixes": [ + { + "ipAllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "ipVersion": "v6" + } + ], "targetAsnDetails": { "asn": 9131072, "isBringYourOwn": true, @@ -46,6 +54,10 @@ "peeringLoopbacksV4": [ "test" ], + "peeringLoopbacksV6": [ + "1000::", + "1000::" + ], "keepAliveTimerSeconds": 3600, "holdTimerSeconds": 7200, "createdOn": "2022-04-07T13:20:30.491Z", diff --git a/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json index d481ba0c..9ea0f22f 100644 --- a/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json +++ b/tests/payloads/networkapi/bgp_peer_groups_get_by_id.json @@ -23,6 +23,14 @@ "inUse": false } ], + "ipPrefixes": [ + { + "ipAllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "ipVersion": "v6" + } + ], "targetAsnDetails": { "asn": 9131072, "isBringYourOwn": true, @@ -42,6 +50,10 @@ "peeringLoopbacksV4": [ "test" ], + "peeringLoopbacksV6": [ + "1000::", + "1000::" + ], "keepAliveTimerSeconds": 3600, "holdTimerSeconds": 7200, "createdOn": "2022-04-07T13:20:30.491Z", diff --git a/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json b/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json index f24b5c6d..94ade9e3 100644 --- a/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json +++ b/tests/payloads/networkapi/bgp_peer_groups_patch_by_id.json @@ -32,6 +32,14 @@ "inUse": false } ], + "ipPrefixes": [ + { + "ipAllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "ipVersion": "v6" + } + ], "targetAsnDetails": { "asn": 9131072, "isBringYourOwn": true, @@ -51,6 +59,10 @@ "peeringLoopbacksV4": [ "test" ], + "peeringLoopbacksV6": [ + "1000::", + "1000::" + ], "keepAliveTimerSeconds": 3600, "holdTimerSeconds": 7200, "createdOn": "2022-04-07T13:20:30.491Z", diff --git a/tests/payloads/networkapi/bgp_peer_groups_post.json b/tests/payloads/networkapi/bgp_peer_groups_post.json index f30af5a1..9e5ead60 100644 --- a/tests/payloads/networkapi/bgp_peer_groups_post.json +++ b/tests/payloads/networkapi/bgp_peer_groups_post.json @@ -28,6 +28,14 @@ "inUse": false } ], + "ipPrefixes": [ + { + "ipAllocationId": "6047127fed34ecc3ba8402d2", + "cidr": "10.111.14.40/29", + "status": "READY", + "ipVersion": "v6" + } + ], "targetAsnDetails": { "asn": 9131072, "isBringYourOwn": true, @@ -47,6 +55,10 @@ "peeringLoopbacksV4": [ "test" ], + "peeringLoopbacksV6": [ + "1000::", + "1000::" + ], "keepAliveTimerSeconds": 3600, "holdTimerSeconds": 7200, "createdOn": "2022-04-07T13:20:30.491Z", diff --git a/tests/payloads/networkapi/public_networks_get.json b/tests/payloads/networkapi/public_networks_get.json index de5b5102..fa7df10a 100644 --- a/tests/payloads/networkapi/public_networks_get.json +++ b/tests/payloads/networkapi/public_networks_get.json @@ -21,10 +21,14 @@ "description": "My first public network #1", "ipBlocks": [ { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" }, { - "id": "616e6ec6d66b406a45ab8797" + "id": "616e6ec6d66b406a45ab8797", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" } ], "status": "BUSY", diff --git a/tests/payloads/networkapi/public_networks_get_by_id.json b/tests/payloads/networkapi/public_networks_get_by_id.json index 9ef18ae4..188c602f 100644 --- a/tests/payloads/networkapi/public_networks_get_by_id.json +++ b/tests/payloads/networkapi/public_networks_get_by_id.json @@ -17,10 +17,14 @@ "description": "My first public network #1", "ipBlocks": [ { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" }, { - "id": "616e6ec6d66b406a45ab8797" + "id": "616e6ec6d66b406a45ab8797", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" } ], "status": "BUSY", diff --git a/tests/payloads/networkapi/public_networks_patch_by_id.json b/tests/payloads/networkapi/public_networks_patch_by_id.json index cdcc6142..d4d69343 100644 --- a/tests/payloads/networkapi/public_networks_patch_by_id.json +++ b/tests/payloads/networkapi/public_networks_patch_by_id.json @@ -25,10 +25,14 @@ "description": "My first public network #1", "ipBlocks": [ { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" }, { - "id": "616e6ec6d66b406a45ab8797" + "id": "616e6ec6d66b406a45ab8797", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" } ], "status": "BUSY", diff --git a/tests/payloads/networkapi/public_networks_post.json b/tests/payloads/networkapi/public_networks_post.json index dcf653ee..4dc1a148 100644 --- a/tests/payloads/networkapi/public_networks_post.json +++ b/tests/payloads/networkapi/public_networks_post.json @@ -27,7 +27,9 @@ "description": "My first public network #1", "ipBlocks": [ { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" } ], "status": "BUSY", diff --git a/tests/payloads/networkapi/public_networks_post_ip_block.json b/tests/payloads/networkapi/public_networks_post_ip_block.json index d1dd9b9a..fd65feb1 100644 --- a/tests/payloads/networkapi/public_networks_post_ip_block.json +++ b/tests/payloads/networkapi/public_networks_post_ip_block.json @@ -10,7 +10,9 @@ "body": { "type": "JSON", "json": { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" }, "matchType": "STRICT" } @@ -18,7 +20,9 @@ "response": { "statusCode": 202, "body": { - "id": "60473a6115e34466c9f8f083" + "id": "60473a6115e34466c9f8f083", + "cidr": "10.0.0.0/24", + "usedIpsCount": "99" } } }