azure_mgmt_compute 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/azure_mgmt_compute.gemspec +3 -11
- data/lib/azure_mgmt_compute/availability_sets.rb +226 -241
- data/lib/azure_mgmt_compute/compute_management_client.rb +26 -11
- data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +8 -11
- data/lib/azure_mgmt_compute/models/api_entity_reference.rb +58 -0
- data/lib/azure_mgmt_compute/models/api_error.rb +4 -6
- data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/availability_set_properties.rb +9 -11
- data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +67 -0
- data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +65 -0
- data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +3 -6
- data/lib/azure_mgmt_compute/models/compute_operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/data_disk.rb +27 -26
- data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -3
- data/lib/azure_mgmt_compute/models/delete_operation_result.rb +6 -5
- data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +62 -0
- data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +81 -0
- data/lib/azure_mgmt_compute/models/disk_instance_view.rb +4 -6
- data/lib/azure_mgmt_compute/models/hardware_profile.rb +15 -9
- data/lib/azure_mgmt_compute/models/image_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/inner_error.rb +1 -3
- data/lib/azure_mgmt_compute/models/instance_view_status.rb +3 -5
- data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +74 -0
- data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +75 -0
- data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -3
- data/lib/azure_mgmt_compute/models/list_usages_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/osdisk.rb +54 -26
- data/lib/azure_mgmt_compute/models/osdisk_image.rb +4 -6
- data/lib/azure_mgmt_compute/models/osprofile.rb +4 -6
- data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/plan.rb +1 -3
- data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/purchase_plan.rb +4 -4
- data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/sku.rb +75 -0
- data/lib/azure_mgmt_compute/models/ssh_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -3
- data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/storage_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/{usage_unit.rb → upgrade_mode.rb} +5 -4
- data/lib/azure_mgmt_compute/models/upgrade_policy.rb +60 -0
- data/lib/azure_mgmt_compute/models/usage.rb +7 -9
- data/lib/azure_mgmt_compute/models/usage_name.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_secret_group.rb +6 -8
- data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +68 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +56 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +9 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +28 -14
- data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +29 -5
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +108 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +116 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +125 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +79 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +127 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +80 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +129 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +147 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +90 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +165 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +87 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +59 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +202 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +114 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +190 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +53 -45
- data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +68 -0
- data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +4 -6
- data/lib/azure_mgmt_compute/models/win_rmlistener.rb +3 -5
- data/lib/azure_mgmt_compute/models/windows_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/module_definition.rb +5 -3
- data/lib/azure_mgmt_compute/usage_operations.rb +75 -42
- data/lib/azure_mgmt_compute/version.rb +5 -3
- data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +71 -158
- data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +66 -149
- data/lib/azure_mgmt_compute/virtual_machine_images.rb +121 -264
- data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +750 -0
- data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +1327 -0
- data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +75 -42
- data/lib/azure_mgmt_compute/virtual_machines.rb +397 -623
- data/lib/azure_mgmt_compute.rb +57 -18
- metadata +50 -128
- data/.gitignore +0 -10
- data/.travis.yml +0 -3
- data/Gemfile +0 -17
@@ -0,0 +1,88 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The List Virtual Machine operation response.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetListWithLinkResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<VirtualMachineScaleSet>] Gets or sets the list of
|
16
|
+
# virtual machine scale sets.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets or sets the uri to fetch the next page of
|
20
|
+
# Virtual Machine Scale Sets. Call ListNext() with this to fetch the
|
21
|
+
# next page of Virtual Machine Scale Sets.
|
22
|
+
attr_accessor :next_link
|
23
|
+
|
24
|
+
#
|
25
|
+
# Validate the object. Throws ValidationError if validation fails.
|
26
|
+
#
|
27
|
+
def validate
|
28
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Serializes given Model object into Ruby Hash.
|
33
|
+
# @param object Model object to serialize.
|
34
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
35
|
+
#
|
36
|
+
def self.serialize_object(object)
|
37
|
+
object.validate
|
38
|
+
output_object = {}
|
39
|
+
|
40
|
+
serialized_property = object.value
|
41
|
+
unless serialized_property.nil?
|
42
|
+
serializedArray = []
|
43
|
+
serialized_property.each do |element|
|
44
|
+
unless element.nil?
|
45
|
+
element = VirtualMachineScaleSet.serialize_object(element)
|
46
|
+
end
|
47
|
+
serializedArray.push(element)
|
48
|
+
end
|
49
|
+
serialized_property = serializedArray
|
50
|
+
end
|
51
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.next_link
|
54
|
+
output_object['nextLink'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
output_object
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Deserializes given Ruby Hash into Model object.
|
61
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
62
|
+
# @return [VirtualMachineScaleSetListWithLinkResult] Deserialized object.
|
63
|
+
#
|
64
|
+
def self.deserialize_object(object)
|
65
|
+
return if object.nil?
|
66
|
+
output_object = VirtualMachineScaleSetListWithLinkResult.new
|
67
|
+
|
68
|
+
deserialized_property = object['value']
|
69
|
+
unless deserialized_property.nil?
|
70
|
+
deserialized_array = []
|
71
|
+
deserialized_property.each do |element1|
|
72
|
+
unless element1.nil?
|
73
|
+
element1 = VirtualMachineScaleSet.deserialize_object(element1)
|
74
|
+
end
|
75
|
+
deserialized_array.push(element1)
|
76
|
+
end
|
77
|
+
deserialized_property = deserialized_array
|
78
|
+
end
|
79
|
+
output_object.value = deserialized_property
|
80
|
+
|
81
|
+
deserialized_property = object['nextLink']
|
82
|
+
output_object.next_link = deserialized_property
|
83
|
+
|
84
|
+
output_object
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a virtual machine scale set network profile's network
|
10
|
+
# configurations.
|
11
|
+
#
|
12
|
+
class VirtualMachineScaleSetNetworkConfiguration < MsRestAzure::SubResource
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Gets or sets the network configuration name.
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# @return [VirtualMachineScaleSetNetworkConfigurationProperties]
|
20
|
+
attr_accessor :properties
|
21
|
+
|
22
|
+
#
|
23
|
+
# Validate the object. Throws ValidationError if validation fails.
|
24
|
+
#
|
25
|
+
def validate
|
26
|
+
fail MsRest::ValidationError, 'property name is nil' if @name.nil?
|
27
|
+
@properties.validate unless @properties.nil?
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Serializes given Model object into Ruby Hash.
|
32
|
+
# @param object Model object to serialize.
|
33
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
34
|
+
#
|
35
|
+
def self.serialize_object(object)
|
36
|
+
object.validate
|
37
|
+
output_object = {}
|
38
|
+
|
39
|
+
serialized_property = object.name
|
40
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
41
|
+
|
42
|
+
serialized_property = object.id
|
43
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
44
|
+
|
45
|
+
serialized_property = object.properties
|
46
|
+
unless serialized_property.nil?
|
47
|
+
serialized_property = VirtualMachineScaleSetNetworkConfigurationProperties.serialize_object(serialized_property)
|
48
|
+
end
|
49
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
output_object
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Deserializes given Ruby Hash into Model object.
|
56
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
57
|
+
# @return [VirtualMachineScaleSetNetworkConfiguration] Deserialized
|
58
|
+
# object.
|
59
|
+
#
|
60
|
+
def self.deserialize_object(object)
|
61
|
+
return if object.nil?
|
62
|
+
output_object = VirtualMachineScaleSetNetworkConfiguration.new
|
63
|
+
|
64
|
+
deserialized_property = object['name']
|
65
|
+
output_object.name = deserialized_property
|
66
|
+
|
67
|
+
deserialized_property = object['id']
|
68
|
+
output_object.id = deserialized_property
|
69
|
+
|
70
|
+
deserialized_property = object['properties']
|
71
|
+
unless deserialized_property.nil?
|
72
|
+
deserialized_property = VirtualMachineScaleSetNetworkConfigurationProperties.deserialize_object(deserialized_property)
|
73
|
+
end
|
74
|
+
output_object.properties = deserialized_property
|
75
|
+
|
76
|
+
output_object
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a virtual machine scale set network profile's IP configuration.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetNetworkConfigurationProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Boolean] Gets or sets whether this is a primary NIC on a
|
16
|
+
# virtual machine.
|
17
|
+
attr_accessor :primary
|
18
|
+
|
19
|
+
# @return [Array<VirtualMachineScaleSetIPConfiguration>] Gets or sets
|
20
|
+
# the virtual machine scale set IP Configuration.
|
21
|
+
attr_accessor :ip_configurations
|
22
|
+
|
23
|
+
#
|
24
|
+
# Validate the object. Throws ValidationError if validation fails.
|
25
|
+
#
|
26
|
+
def validate
|
27
|
+
fail MsRest::ValidationError, 'property ip_configurations is nil' if @ip_configurations.nil?
|
28
|
+
@ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil?
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Serializes given Model object into Ruby Hash.
|
33
|
+
# @param object Model object to serialize.
|
34
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
35
|
+
#
|
36
|
+
def self.serialize_object(object)
|
37
|
+
object.validate
|
38
|
+
output_object = {}
|
39
|
+
|
40
|
+
serialized_property = object.ip_configurations
|
41
|
+
unless serialized_property.nil?
|
42
|
+
serializedArray = []
|
43
|
+
serialized_property.each do |element|
|
44
|
+
unless element.nil?
|
45
|
+
element = VirtualMachineScaleSetIPConfiguration.serialize_object(element)
|
46
|
+
end
|
47
|
+
serializedArray.push(element)
|
48
|
+
end
|
49
|
+
serialized_property = serializedArray
|
50
|
+
end
|
51
|
+
output_object['ipConfigurations'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.primary
|
54
|
+
output_object['primary'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
output_object
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Deserializes given Ruby Hash into Model object.
|
61
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
62
|
+
# @return [VirtualMachineScaleSetNetworkConfigurationProperties]
|
63
|
+
# Deserialized object.
|
64
|
+
#
|
65
|
+
def self.deserialize_object(object)
|
66
|
+
return if object.nil?
|
67
|
+
output_object = VirtualMachineScaleSetNetworkConfigurationProperties.new
|
68
|
+
|
69
|
+
deserialized_property = object['ipConfigurations']
|
70
|
+
unless deserialized_property.nil?
|
71
|
+
deserialized_array = []
|
72
|
+
deserialized_property.each do |element1|
|
73
|
+
unless element1.nil?
|
74
|
+
element1 = VirtualMachineScaleSetIPConfiguration.deserialize_object(element1)
|
75
|
+
end
|
76
|
+
deserialized_array.push(element1)
|
77
|
+
end
|
78
|
+
deserialized_property = deserialized_array
|
79
|
+
end
|
80
|
+
output_object.ip_configurations = deserialized_property
|
81
|
+
|
82
|
+
deserialized_property = object['primary']
|
83
|
+
output_object.primary = deserialized_property
|
84
|
+
|
85
|
+
output_object
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a virtual machine scale set network profile.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetNetworkProfile
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<VirtualMachineScaleSetNetworkConfiguration>] Gets or
|
16
|
+
# sets the list of network configurations.
|
17
|
+
attr_accessor :network_interface_configurations
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
@network_interface_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @network_interface_configurations.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Serializes given Model object into Ruby Hash.
|
28
|
+
# @param object Model object to serialize.
|
29
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
30
|
+
#
|
31
|
+
def self.serialize_object(object)
|
32
|
+
object.validate
|
33
|
+
output_object = {}
|
34
|
+
|
35
|
+
serialized_property = object.network_interface_configurations
|
36
|
+
unless serialized_property.nil?
|
37
|
+
serializedArray = []
|
38
|
+
serialized_property.each do |element|
|
39
|
+
unless element.nil?
|
40
|
+
element = VirtualMachineScaleSetNetworkConfiguration.serialize_object(element)
|
41
|
+
end
|
42
|
+
serializedArray.push(element)
|
43
|
+
end
|
44
|
+
serialized_property = serializedArray
|
45
|
+
end
|
46
|
+
output_object['networkInterfaceConfigurations'] = serialized_property unless serialized_property.nil?
|
47
|
+
|
48
|
+
output_object
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Deserializes given Ruby Hash into Model object.
|
53
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
54
|
+
# @return [VirtualMachineScaleSetNetworkProfile] Deserialized object.
|
55
|
+
#
|
56
|
+
def self.deserialize_object(object)
|
57
|
+
return if object.nil?
|
58
|
+
output_object = VirtualMachineScaleSetNetworkProfile.new
|
59
|
+
|
60
|
+
deserialized_property = object['networkInterfaceConfigurations']
|
61
|
+
unless deserialized_property.nil?
|
62
|
+
deserialized_array = []
|
63
|
+
deserialized_property.each do |element1|
|
64
|
+
unless element1.nil?
|
65
|
+
element1 = VirtualMachineScaleSetNetworkConfiguration.deserialize_object(element1)
|
66
|
+
end
|
67
|
+
deserialized_array.push(element1)
|
68
|
+
end
|
69
|
+
deserialized_property = deserialized_array
|
70
|
+
end
|
71
|
+
output_object.network_interface_configurations = deserialized_property
|
72
|
+
|
73
|
+
output_object
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a virtual machine scale set operating system disk.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetOSDisk
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the disk name.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [CachingTypes] Gets or sets the caching type. Possible values
|
19
|
+
# include: 'None', 'ReadOnly', 'ReadWrite'
|
20
|
+
attr_accessor :caching
|
21
|
+
|
22
|
+
# @return [DiskCreateOptionTypes] Gets or sets the create option.
|
23
|
+
# Possible values include: 'fromImage', 'empty', 'attach'
|
24
|
+
attr_accessor :create_option
|
25
|
+
|
26
|
+
# @return [OperatingSystemTypes] Gets or sets the Operating System type.
|
27
|
+
# Possible values include: 'Windows', 'Linux'
|
28
|
+
attr_accessor :os_type
|
29
|
+
|
30
|
+
# @return [VirtualHardDisk] Gets or sets the Source User Image
|
31
|
+
# VirtualHardDisk. This VirtualHardDisk will be copied before using it
|
32
|
+
# to attach to the Virtual Machine.If SourceImage is provided, the
|
33
|
+
# destination VirtualHardDisk should not exist.
|
34
|
+
attr_accessor :image
|
35
|
+
|
36
|
+
# @return [Array<String>] Gets or sets the list of virtual hard disk
|
37
|
+
# container uris.
|
38
|
+
attr_accessor :vhd_containers
|
39
|
+
|
40
|
+
#
|
41
|
+
# Validate the object. Throws ValidationError if validation fails.
|
42
|
+
#
|
43
|
+
def validate
|
44
|
+
fail MsRest::ValidationError, 'property name is nil' if @name.nil?
|
45
|
+
fail MsRest::ValidationError, 'property create_option is nil' if @create_option.nil?
|
46
|
+
@image.validate unless @image.nil?
|
47
|
+
@vhd_containers.each{ |e| e.validate if e.respond_to?(:validate) } unless @vhd_containers.nil?
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Serializes given Model object into Ruby Hash.
|
52
|
+
# @param object Model object to serialize.
|
53
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
54
|
+
#
|
55
|
+
def self.serialize_object(object)
|
56
|
+
object.validate
|
57
|
+
output_object = {}
|
58
|
+
|
59
|
+
serialized_property = object.name
|
60
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.create_option
|
63
|
+
output_object['createOption'] = serialized_property unless serialized_property.nil?
|
64
|
+
|
65
|
+
serialized_property = object.caching
|
66
|
+
output_object['caching'] = serialized_property unless serialized_property.nil?
|
67
|
+
|
68
|
+
serialized_property = object.os_type
|
69
|
+
output_object['osType'] = serialized_property unless serialized_property.nil?
|
70
|
+
|
71
|
+
serialized_property = object.image
|
72
|
+
unless serialized_property.nil?
|
73
|
+
serialized_property = VirtualHardDisk.serialize_object(serialized_property)
|
74
|
+
end
|
75
|
+
output_object['image'] = serialized_property unless serialized_property.nil?
|
76
|
+
|
77
|
+
serialized_property = object.vhd_containers
|
78
|
+
output_object['vhdContainers'] = serialized_property unless serialized_property.nil?
|
79
|
+
|
80
|
+
output_object
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# Deserializes given Ruby Hash into Model object.
|
85
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
86
|
+
# @return [VirtualMachineScaleSetOSDisk] Deserialized object.
|
87
|
+
#
|
88
|
+
def self.deserialize_object(object)
|
89
|
+
return if object.nil?
|
90
|
+
output_object = VirtualMachineScaleSetOSDisk.new
|
91
|
+
|
92
|
+
deserialized_property = object['name']
|
93
|
+
output_object.name = deserialized_property
|
94
|
+
|
95
|
+
deserialized_property = object['createOption']
|
96
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
97
|
+
enum_is_valid = DiskCreateOptionTypes.constants.any? { |e| DiskCreateOptionTypes.const_get(e).to_s.downcase == deserialized_property.downcase }
|
98
|
+
warn 'Enum DiskCreateOptionTypes does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
99
|
+
end
|
100
|
+
output_object.create_option = deserialized_property
|
101
|
+
|
102
|
+
deserialized_property = object['caching']
|
103
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
104
|
+
enum_is_valid = CachingTypes.constants.any? { |e| CachingTypes.const_get(e).to_s.downcase == deserialized_property.downcase }
|
105
|
+
warn 'Enum CachingTypes does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
106
|
+
end
|
107
|
+
output_object.caching = deserialized_property
|
108
|
+
|
109
|
+
deserialized_property = object['osType']
|
110
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
111
|
+
enum_is_valid = OperatingSystemTypes.constants.any? { |e| OperatingSystemTypes.const_get(e).to_s.downcase == deserialized_property.downcase }
|
112
|
+
warn 'Enum OperatingSystemTypes does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
113
|
+
end
|
114
|
+
output_object.os_type = deserialized_property
|
115
|
+
|
116
|
+
deserialized_property = object['image']
|
117
|
+
unless deserialized_property.nil?
|
118
|
+
deserialized_property = VirtualHardDisk.deserialize_object(deserialized_property)
|
119
|
+
end
|
120
|
+
output_object.image = deserialized_property
|
121
|
+
|
122
|
+
deserialized_property = object['vhdContainers']
|
123
|
+
output_object.vhd_containers = deserialized_property
|
124
|
+
|
125
|
+
output_object
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Compute
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a virtual machine scale set OS profile.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetOSProfile
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the computer name prefix.
|
16
|
+
attr_accessor :computer_name_prefix
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the admin user name.
|
19
|
+
attr_accessor :admin_username
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the admin user password.
|
22
|
+
attr_accessor :admin_password
|
23
|
+
|
24
|
+
# @return [String] Gets or sets a base-64 encoded string of custom data.
|
25
|
+
attr_accessor :custom_data
|
26
|
+
|
27
|
+
# @return [WindowsConfiguration] Gets or sets the Windows Configuration
|
28
|
+
# of the OS profile.
|
29
|
+
attr_accessor :windows_configuration
|
30
|
+
|
31
|
+
# @return [LinuxConfiguration] Gets or sets the Linux Configuration of
|
32
|
+
# the OS profile.
|
33
|
+
attr_accessor :linux_configuration
|
34
|
+
|
35
|
+
# @return [Array<VaultSecretGroup>] Gets or sets the List of
|
36
|
+
# certificates for addition to the VM.
|
37
|
+
attr_accessor :secrets
|
38
|
+
|
39
|
+
#
|
40
|
+
# Validate the object. Throws ValidationError if validation fails.
|
41
|
+
#
|
42
|
+
def validate
|
43
|
+
@windows_configuration.validate unless @windows_configuration.nil?
|
44
|
+
@linux_configuration.validate unless @linux_configuration.nil?
|
45
|
+
@secrets.each{ |e| e.validate if e.respond_to?(:validate) } unless @secrets.nil?
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# Serializes given Model object into Ruby Hash.
|
50
|
+
# @param object Model object to serialize.
|
51
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
52
|
+
#
|
53
|
+
def self.serialize_object(object)
|
54
|
+
object.validate
|
55
|
+
output_object = {}
|
56
|
+
|
57
|
+
serialized_property = object.computer_name_prefix
|
58
|
+
output_object['computerNamePrefix'] = serialized_property unless serialized_property.nil?
|
59
|
+
|
60
|
+
serialized_property = object.admin_username
|
61
|
+
output_object['adminUsername'] = serialized_property unless serialized_property.nil?
|
62
|
+
|
63
|
+
serialized_property = object.admin_password
|
64
|
+
output_object['adminPassword'] = serialized_property unless serialized_property.nil?
|
65
|
+
|
66
|
+
serialized_property = object.custom_data
|
67
|
+
output_object['customData'] = serialized_property unless serialized_property.nil?
|
68
|
+
|
69
|
+
serialized_property = object.windows_configuration
|
70
|
+
unless serialized_property.nil?
|
71
|
+
serialized_property = WindowsConfiguration.serialize_object(serialized_property)
|
72
|
+
end
|
73
|
+
output_object['windowsConfiguration'] = serialized_property unless serialized_property.nil?
|
74
|
+
|
75
|
+
serialized_property = object.linux_configuration
|
76
|
+
unless serialized_property.nil?
|
77
|
+
serialized_property = LinuxConfiguration.serialize_object(serialized_property)
|
78
|
+
end
|
79
|
+
output_object['linuxConfiguration'] = serialized_property unless serialized_property.nil?
|
80
|
+
|
81
|
+
serialized_property = object.secrets
|
82
|
+
unless serialized_property.nil?
|
83
|
+
serializedArray = []
|
84
|
+
serialized_property.each do |element|
|
85
|
+
unless element.nil?
|
86
|
+
element = VaultSecretGroup.serialize_object(element)
|
87
|
+
end
|
88
|
+
serializedArray.push(element)
|
89
|
+
end
|
90
|
+
serialized_property = serializedArray
|
91
|
+
end
|
92
|
+
output_object['secrets'] = serialized_property unless serialized_property.nil?
|
93
|
+
|
94
|
+
output_object
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# Deserializes given Ruby Hash into Model object.
|
99
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
100
|
+
# @return [VirtualMachineScaleSetOSProfile] Deserialized object.
|
101
|
+
#
|
102
|
+
def self.deserialize_object(object)
|
103
|
+
return if object.nil?
|
104
|
+
output_object = VirtualMachineScaleSetOSProfile.new
|
105
|
+
|
106
|
+
deserialized_property = object['computerNamePrefix']
|
107
|
+
output_object.computer_name_prefix = deserialized_property
|
108
|
+
|
109
|
+
deserialized_property = object['adminUsername']
|
110
|
+
output_object.admin_username = deserialized_property
|
111
|
+
|
112
|
+
deserialized_property = object['adminPassword']
|
113
|
+
output_object.admin_password = deserialized_property
|
114
|
+
|
115
|
+
deserialized_property = object['customData']
|
116
|
+
output_object.custom_data = deserialized_property
|
117
|
+
|
118
|
+
deserialized_property = object['windowsConfiguration']
|
119
|
+
unless deserialized_property.nil?
|
120
|
+
deserialized_property = WindowsConfiguration.deserialize_object(deserialized_property)
|
121
|
+
end
|
122
|
+
output_object.windows_configuration = deserialized_property
|
123
|
+
|
124
|
+
deserialized_property = object['linuxConfiguration']
|
125
|
+
unless deserialized_property.nil?
|
126
|
+
deserialized_property = LinuxConfiguration.deserialize_object(deserialized_property)
|
127
|
+
end
|
128
|
+
output_object.linux_configuration = deserialized_property
|
129
|
+
|
130
|
+
deserialized_property = object['secrets']
|
131
|
+
unless deserialized_property.nil?
|
132
|
+
deserialized_array = []
|
133
|
+
deserialized_property.each do |element1|
|
134
|
+
unless element1.nil?
|
135
|
+
element1 = VaultSecretGroup.deserialize_object(element1)
|
136
|
+
end
|
137
|
+
deserialized_array.push(element1)
|
138
|
+
end
|
139
|
+
deserialized_property = deserialized_array
|
140
|
+
end
|
141
|
+
output_object.secrets = deserialized_property
|
142
|
+
|
143
|
+
output_object
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|