Sha256: 4308dc2c3f3239c3227db58fcff3fe8c657b9c8094438a684f070298263b76d4
Contents?: true
Size: 1.97 KB
Versions: 1
Compression:
Stored size: 1.97 KB
Contents
module ApiStub module Requests module Resources # Mock class for Resource Group Requests class ResourceGroup def self.create_resource_group_response(client) body = '{ "id": "/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg", "name": "fog-test-rg", "location": "westus", "tags": { "tagname1": "tagvalue1" }, "properties": { "provisioning_state": "Succeeded" } }' result_mapper = Azure::ARM::Resources::Models::ResourceGroup.mapper client.deserialize(result_mapper, Fog::JSON.decode(body), 'result.body') end def self.list_resource_group_response(client) body = '{ "value": [ { "id": "/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg", "name": "fog-test-rg", "location": "westus", "tags": { "tagname1": "tagvalue1" }, "properties": { "provisioning_state": "Succeeded" } } ], "nextLink": "https://management.azure.com/subscriptions/########-####-####-####-############/resourcegroups?api-version=2015-01-01&$skiptoken=######" }' result_mapper = Azure::ARM::Resources::Models::ResourceGroupListResult.mapper client.deserialize(result_mapper, Fog::JSON.decode(body), 'result.body') end def self.list_resource_groups_for_zones resource_group = ::Azure::ARM::Resources::Models::ResourceGroup.new resource_group.id = '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-resource-group' resource_group.name = 'fog-test-resource-group' resource_group.location = 'West US' [resource_group] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.1.1 | test/api_stub/requests/resources/resource_group.rb |