test/api_stub/models/compute/availability_set.rb in fog-azure-rm-0.3.2 vs test/api_stub/models/compute/availability_set.rb in fog-azure-rm-0.3.3

- old
+ new

@@ -1,19 +1,37 @@ module ApiStub module Models module Compute # Mock class for Availability Set Model class AvailabilitySet - def self.create_availability_set_response(sdk_compute_client) + def self.create_unmanaged_availability_set_response(sdk_compute_client) avail_set = { 'id' => '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Compute/availabilitySets/fog-test-availability-set', 'name' => 'fog-test-availability-set', 'type' => 'Microsoft.Compute/availabilitySets', 'location' => 'westus', 'platformUpdateDomainCount' => UPDATE_DOMAIN_COUNT, - 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT + 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT, + 'sku' => { + 'name' => 'Classic' + } + } + result_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper + sdk_compute_client.deserialize(result_mapper, avail_set, 'result.body') + end + def self.create_managed_availability_set_response(sdk_compute_client) + avail_set = { + 'id' => '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Compute/availabilitySets/fog-test-availability-set', + 'name' => 'fog-test-availability-set', + 'type' => 'Microsoft.Compute/availabilitySets', + 'location' => 'westus', + 'platformUpdateDomainCount' => UPDATE_DOMAIN_COUNT, + 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT, + 'sku' => { + 'name' => 'Aligned' + } } result_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper sdk_compute_client.deserialize(result_mapper, avail_set, 'result.body') end @@ -23,11 +41,10 @@ 'name' => 'fog-test-availability-set', 'type' => 'Microsoft.Compute/availabilitySets', 'location' => 'westus', 'platformUpdateDomainCount' => UPDATE_DOMAIN_COUNT, 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT - } result_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper sdk_compute_client.deserialize(result_mapper, avail_set, 'result.body') end @@ -36,11 +53,13 @@ 'id' => '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Compute/availabilitySets/fog-test-availability-set', 'name' => 'fog-test-availability-set', 'type' => 'Microsoft.Compute/availabilitySets', 'location' => 'westus', 'platformUpdateDomainCount' => UPDATE_DOMAIN_COUNT, - 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT - + 'platformFaultDomainCount' => FAULT_DOMAIN_COUNT, + 'sku' => { + 'name' => 'Classic' + } } result_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper sdk_compute_client.deserialize(result_mapper, avail_set, 'result.body') end end