зеркало из
1
0
Форкнуть 0

manual updates to azure_mgmt_service_bus

This commit is contained in:
Veronica Giaudrone 2017-09-14 18:49:37 -07:00
Родитель c62de66f02
Коммит df09e86eb8
7 изменённых файлов: 34 добавлений и 13 удалений

Просмотреть файл

@ -1,3 +1,3 @@
--require spec_helper
--require 2017-04-01/spec_helper
--color
--format documentation

Просмотреть файл

@ -2,4 +2,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
require 'generated/azure_mgmt_service_bus'
require '2017-04-01/generated/azure_mgmt_service_bus'

Просмотреть файл

@ -0,0 +1,9 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure end
module Azure::ARM end
module Azure::ARM::ServiceBus end
module Azure::ARM::ServiceBus::Api_2017_04_01 end

Просмотреть файл

@ -0,0 +1,8 @@
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ARM::ServiceBus
VERSION = '0.11.0'
end

Просмотреть файл

@ -17,13 +17,13 @@ describe 'Service Bus Management Client' do
it 'should create list and delete namespace' do
namespace_name = "smaple34566"
namespace_parameters = Azure::ARM::ServiceBus::Models::SBNamespace.new
namespace_parameters = Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBNamespace.new
namespace_parameters.location = 'westus'
# Create new namespace
namespace = @service_bus_client.namespaces.create_or_update(@resource_group.name, namespace_name, namespace_parameters)
expect(namespace).not_to be_nil
expect(namespace).to be_a(Azure::ARM::ServiceBus::Models::SBNamespace)
expect(namespace).to be_a(Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBNamespace)
expect(namespace.name).to eq(namespace_name)
expect(namespace.provisioning_state).to eq("Succeeded")

Просмотреть файл

@ -18,22 +18,22 @@ describe 'Service Bus Management Client' do
it 'should create list and delete queues' do
namespace_name = "smaple34566"
queue_name = 'queue97832'
namespace_parameters = Azure::ARM::ServiceBus::Models::SBNamespace.new
namespace_parameters = Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBNamespace.new
namespace_parameters.location = 'westus'
queue_parameters = Azure::ARM::ServiceBus::Models::SBQueue.new
queue_parameters = Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBQueue.new
queue_parameters.location = 'westus'
# Create new namespace
namespace = @service_bus_client.namespaces.create_or_update(@resource_group.name, namespace_name, namespace_parameters)
expect(namespace).not_to be_nil
expect(namespace).to be_a(Azure::ARM::ServiceBus::Models::SBNamespace)
expect(namespace).to be_a(Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBNamespace)
expect(namespace.name).to eq(namespace_name)
expect(namespace.provisioning_state).to eq("Succeeded")
# Create a queue
queue = @service_bus_client.queues.create_or_update(@resource_group.name, namespace_name, queue_name, queue_parameters)
expect(queue).not_to be_nil
expect(queue).to be_a(Azure::ARM::ServiceBus::Models::SBQueue)
expect(queue).to be_a(Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBQueue)
expect(queue.name).to eq(queue_name)
expect(queue.status).to eq("Active")
@ -42,7 +42,7 @@ describe 'Service Bus Management Client' do
expect(array_of_queues).not_to be_nil
queue = array_of_queues[0]
expect(queue).not_to be_nil
expect(queue).to be_a(Azure::ARM::ServiceBus::Models::SBQueue)
expect(queue).to be_a(Azure::ARM::ServiceBus::Api_2017_04_01::Models::SBQueue)
expect(queue.name).to eq(queue_name)
expect(queue.status).to eq("Active")

Просмотреть файл

@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
require File.join(File.dirname(__FILE__), '../../../vcr_helper')
require File.join(File.dirname(__FILE__), '../../../../vcr_helper')
require 'azure_mgmt_resources'
require 'azure_mgmt_service_bus'
@ -17,11 +17,15 @@ class ResourceHelper
token_provider = MsRestAzure::ApplicationTokenProvider.new(tenant_id, client_id, secret)
@credentials = MsRest::TokenCredentials.new(token_provider)
VCR.configure do |config|
config.cassette_library_dir = "spec/2017-04-01/vcr_cassettes"
end
end
def service_bus_client
if @service_bus_client.nil?
@service_bus_client = Azure::ARM::ServiceBus::ServiceBusManagementClient.new(@credentials)
@service_bus_client = Azure::ARM::ServiceBus::Api_2017_04_01::ServiceBusManagementClient.new(@credentials)
@service_bus_client.long_running_operation_retry_timeout = ENV.fetch('RETRY_TIMEOUT', 30).to_i
@service_bus_client.subscription_id = @subscription_id
end
@ -30,7 +34,7 @@ class ResourceHelper
def resource_client
if @resource_client.nil?
@resource_client = Azure::ARM::Resources::ResourceManagementClient.new(@credentials)
@resource_client = Azure::ARM::Resources::Api_2017_05_10::ResourceManagementClient.new(@credentials)
@resource_client.subscription_id = @subscription_id
@resource_client.long_running_operation_retry_timeout = ENV.fetch('RETRY_TIMEOUT', 30).to_i
end
@ -39,7 +43,7 @@ class ResourceHelper
def create_resource_group
resource_group_name = 'RubySDKTest_azure_mgmt_service_bus'
params = Azure::ARM::Resources::Models::ResourceGroup.new()
params = Azure::ARM::Resources::Api_2017_05_10::Models::ResourceGroup.new()
params.location = 'westus'
resource_client.resource_groups.create_or_update(resource_group_name, params)