Updated Role Size.
This commit is contained in:
Родитель
cc3f9aa851
Коммит
bedf1f6d4c
|
@ -422,7 +422,7 @@ options = {
|
|||
:private_key_file => 'c:/private_key.key', #required for ssh or winrm(https) certificate.
|
||||
:certificate_file => 'c:/certificate.pem', #required for ssh or winrm(https) certificate.
|
||||
:ssh_port => 2222,
|
||||
:vm_size => 'Small', #valid choices are (ExtraSmall, Small, Medium, Large, ExtraLarge, A6, A7)
|
||||
:vm_size => 'Small', #valid choices are (ExtraSmall Small Medium Large ExtraLarge A5 A6 A7 Basic_A0 Basic_A1 Basic_A2 Basic_A3 Basic_A4)
|
||||
:affinity_group_name => 'affinity1',
|
||||
:virtual_network_name => 'xplattestvnet',
|
||||
:subnet_name => 'subnet1',
|
||||
|
@ -447,7 +447,7 @@ options = {
|
|||
:certificate_file => 'c:/certificate.pem', #required for ssh or winrm(https) certificate.
|
||||
:winrm_https_port => 5999,
|
||||
:winrm_http_port => 6999, #Used to open different powershell port
|
||||
:vm_size => 'Small', #valid choices are (ExtraSmall, Small, Medium, Large, ExtraLarge, A6, A7)
|
||||
:vm_size => 'Small', #valid choices are (ExtraSmall Small Medium Large ExtraLarge A5 A6 A7 Basic_A0 Basic_A1 Basic_A2 Basic_A3 Basic_A4)
|
||||
:availability_set_name => 'availabiltyset'
|
||||
}
|
||||
virtual_machine_service.add_role(params, options)
|
||||
|
|
|
@ -93,8 +93,7 @@ module Azure
|
|||
vms = Azure::VirtualMachineManagement::Serialization.virtual_machines_from_xml(
|
||||
deployxml, cloud.name
|
||||
)
|
||||
|
||||
vms_in_deployment[deployment_name.to_sym] = vms
|
||||
vms_in_deployment[deployment_name.to_sym] = vms if vms
|
||||
end
|
||||
|
||||
cloud.virtual_machines = vms_in_deployment
|
||||
|
|
|
@ -533,7 +533,7 @@ module Azure
|
|||
end
|
||||
|
||||
def validate_role_size(vm_size)
|
||||
valid_role_sizes = %w(ExtraSmall Small Medium Large ExtraLarge A6 A7)
|
||||
valid_role_sizes = %w(ExtraSmall Small Medium Large ExtraLarge A5 A6 A7 Basic_A0 Basic_A1 Basic_A2 Basic_A3 Basic_A4)
|
||||
if vm_size && !valid_role_sizes.include?(vm_size)
|
||||
Loggerx.error_with_exit "Value '#{vm_size}' specified for parameter 'vm_size' is invalid. Allowed values are 'ExtraSmall,Small,Medium,Large,ExtraLarge,A6,A7'"
|
||||
end
|
||||
|
|
|
@ -50,7 +50,7 @@ describe Azure::VirtualMachineManagementService do
|
|||
{
|
||||
storage_account_name: storage_account_name,
|
||||
cloud_service_name: cloud_service_name,
|
||||
vm_size: 'Small'
|
||||
vm_size: 'Basic_A0'
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -119,7 +119,7 @@ describe Azure::VirtualMachineManagementService do
|
|||
virtual_machine.virtual_network_name.must_equal options[:virtual_network_name]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
it 'should set options hash with valid cloud_service_name, deployment_name, storage_account_name and virtual network' do
|
||||
csn = options[:cloud_service_name]
|
||||
options[:availability_set_name] = 'aval-set-test'
|
||||
|
@ -130,7 +130,7 @@ describe Azure::VirtualMachineManagementService do
|
|||
vm.deployment_name.wont_be_nil
|
||||
vm.deployment_name.must_equal vm.cloud_service_name
|
||||
vm.os_type.must_equal 'Linux'
|
||||
vm.role_size.must_equal 'Small'
|
||||
vm.role_size.must_equal 'Basic_A0'
|
||||
vm.availability_set_name.must_equal 'aval-set-test'
|
||||
options[:storage_account_name].wont_be_nil
|
||||
assert_match(/^#{params[:vm_name] + '-service'}*/, csn)
|
||||
|
|
|
@ -64,7 +64,7 @@ describe Azure::VirtualMachineManagementService do
|
|||
before do
|
||||
subject.shutdown_virtual_machine(vm_name, csn)
|
||||
end
|
||||
|
||||
|
||||
it 'starts virtual machine' do
|
||||
subject.start_virtual_machine(vm_name, csn)
|
||||
vm = subject.get_virtual_machine(vm_name, csn)
|
||||
|
@ -118,7 +118,7 @@ describe Azure::VirtualMachineManagementService do
|
|||
end
|
||||
|
||||
describe 'Add, Update, Delete endpoints' do
|
||||
|
||||
|
||||
it 'should add endpoints to virtual machine.' do
|
||||
ep1 = {
|
||||
name: 'endpoint-1',
|
||||
|
|
Загрузка…
Ссылка в новой задаче