azure_mgmt_devtestlabs 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +1 -3
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +9 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +9 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/arm_template.rb +15 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact.rb +15 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +8 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +8 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +18 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +17 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +5 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +5 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +11 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +11 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/custom_image.rb +15 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/day_details.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/disk.rb +17 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +13 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/event.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/formula.rb +15 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +13 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/hour_details.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +5 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab.rb +17 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +19 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +11 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb +10 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +39 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +37 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +38 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +10 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +10 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +14 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb +13 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +2 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/policy.rb +16 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +15 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/port.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/resource.rb +7 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/schedule.rb +18 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +17 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/secret.rb +10 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/service_runner.rb +8 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +12 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +7 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +7 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +8 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user.rb +12 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +11 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user_identity.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +6 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +3 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +18 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +17 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/week_details.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +4 -0
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +2 -0
- data/lib/profiles/latest/devtestlabs_latest_profile_client.rb +1 -3
- data/lib/version.rb +1 -1
- metadata +10 -8
- data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/version.rb +0 -8
- data/lib/profiles/common/configurable.rb +0 -86
- data/lib/profiles/common/default.rb +0 -57
@@ -26,6 +26,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
26
26
|
#
|
27
27
|
def self.mapper()
|
28
28
|
{
|
29
|
+
client_side_validation: true,
|
29
30
|
required: false,
|
30
31
|
serialized_name: 'WeekDetails',
|
31
32
|
type: {
|
@@ -33,11 +34,13 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
33
34
|
class_name: 'WeekDetails',
|
34
35
|
model_properties: {
|
35
36
|
weekdays: {
|
37
|
+
client_side_validation: true,
|
36
38
|
required: false,
|
37
39
|
serialized_name: 'weekdays',
|
38
40
|
type: {
|
39
41
|
name: 'Sequence',
|
40
42
|
element: {
|
43
|
+
client_side_validation: true,
|
41
44
|
required: false,
|
42
45
|
serialized_name: 'StringElementType',
|
43
46
|
type: {
|
@@ -47,6 +50,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
47
50
|
}
|
48
51
|
},
|
49
52
|
time: {
|
53
|
+
client_side_validation: true,
|
50
54
|
required: false,
|
51
55
|
serialized_name: 'time',
|
52
56
|
type: {
|
@@ -26,6 +26,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
26
26
|
#
|
27
27
|
def self.mapper()
|
28
28
|
{
|
29
|
+
client_side_validation: true,
|
29
30
|
required: false,
|
30
31
|
serialized_name: 'WeekDetailsFragment',
|
31
32
|
type: {
|
@@ -33,11 +34,13 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
33
34
|
class_name: 'WeekDetailsFragment',
|
34
35
|
model_properties: {
|
35
36
|
weekdays: {
|
37
|
+
client_side_validation: true,
|
36
38
|
required: false,
|
37
39
|
serialized_name: 'weekdays',
|
38
40
|
type: {
|
39
41
|
name: 'Sequence',
|
40
42
|
element: {
|
43
|
+
client_side_validation: true,
|
41
44
|
required: false,
|
42
45
|
serialized_name: 'StringElementType',
|
43
46
|
type: {
|
@@ -47,6 +50,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
47
50
|
}
|
48
51
|
},
|
49
52
|
time: {
|
53
|
+
client_side_validation: true,
|
50
54
|
required: false,
|
51
55
|
serialized_name: 'time',
|
52
56
|
type: {
|
@@ -24,6 +24,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
24
24
|
#
|
25
25
|
def self.mapper()
|
26
26
|
{
|
27
|
+
client_side_validation: true,
|
27
28
|
required: false,
|
28
29
|
serialized_name: 'WindowsOsInfo',
|
29
30
|
type: {
|
@@ -31,6 +32,7 @@ module Azure::DevTestLabs::Mgmt::V2016_05_15
|
|
31
32
|
class_name: 'WindowsOsInfo',
|
32
33
|
model_properties: {
|
33
34
|
windows_os_state: {
|
35
|
+
client_side_validation: true,
|
34
36
|
required: false,
|
35
37
|
serialized_name: 'windowsOsState',
|
36
38
|
type: {
|
@@ -4,15 +4,13 @@
|
|
4
4
|
|
5
5
|
require 'profiles/latest/devtestlabs_module_definition'
|
6
6
|
require 'profiles/latest/modules/devtestlabs_profile_module'
|
7
|
-
require 'profiles/common/configurable'
|
8
|
-
require 'profiles/common/default'
|
9
7
|
|
10
8
|
module Azure::DevTestLabs::Profiles::Latest::Mgmt
|
11
9
|
#
|
12
10
|
# Client class for the Latest profile SDK.
|
13
11
|
#
|
14
12
|
class Client < DevTestLabsClass
|
15
|
-
include
|
13
|
+
include MsRestAzure::Common::Configurable
|
16
14
|
|
17
15
|
|
18
16
|
def initialize(options = {})
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_devtestlabs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.10.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.10.0
|
83
83
|
description: Microsoft Azure Dev Test Lab Management Client Library for Ruby
|
84
84
|
email: azrubyteam@microsoft.com
|
85
85
|
executables: []
|
@@ -258,14 +258,11 @@ files:
|
|
258
258
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/secrets.rb
|
259
259
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/service_runners.rb
|
260
260
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/users.rb
|
261
|
-
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/version.rb
|
262
261
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb
|
263
262
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/virtual_machines.rb
|
264
263
|
- lib/2016-05-15/generated/azure_mgmt_devtestlabs/virtual_networks.rb
|
265
264
|
- lib/azure_mgmt_devtestlabs.rb
|
266
265
|
- lib/module_definition.rb
|
267
|
-
- lib/profiles/common/configurable.rb
|
268
|
-
- lib/profiles/common/default.rb
|
269
266
|
- lib/profiles/latest/devtestlabs_latest_profile_client.rb
|
270
267
|
- lib/profiles/latest/devtestlabs_module_definition.rb
|
271
268
|
- lib/profiles/latest/modules/devtestlabs_profile_module.rb
|
@@ -273,7 +270,12 @@ files:
|
|
273
270
|
homepage: https://aka.ms/azure-sdk-for-ruby
|
274
271
|
licenses:
|
275
272
|
- MIT
|
276
|
-
metadata:
|
273
|
+
metadata:
|
274
|
+
bug_tracker_uri: https://github.com/Azure/azure-sdk-for-ruby/issues
|
275
|
+
changelog_uri: https://github.com/Azure/azure-sdk-for-ruby/blob/master/ChangeLog.md
|
276
|
+
documentation_uri: https://azure.microsoft.com/en-us/develop/ruby/
|
277
|
+
homepage_uri: https://aka.ms/azure-sdk-for-ruby
|
278
|
+
source_code_uri: https://github.com/Azure/azure-sdk-for-ruby/tree/master/management/azure_mgmt_devtestlabs
|
277
279
|
post_install_message:
|
278
280
|
rdoc_options: []
|
279
281
|
require_paths:
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
-
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
-
|
5
|
-
module Azure::Common
|
6
|
-
# The Azure::Common::Configurable module provides basic configuration for Azure activities.
|
7
|
-
module Configurable
|
8
|
-
# @return [String] Azure tenant id (also known as domain).
|
9
|
-
attr_accessor :tenant_id
|
10
|
-
|
11
|
-
# @return [String] Azure client id.
|
12
|
-
attr_accessor :client_id
|
13
|
-
|
14
|
-
# @return [String] Azure secret key.
|
15
|
-
attr_accessor :client_secret
|
16
|
-
|
17
|
-
# @return [String] Azure subscription id.
|
18
|
-
attr_accessor :subscription_id
|
19
|
-
|
20
|
-
# @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure active directory service settings.
|
21
|
-
attr_accessor :active_directory_settings
|
22
|
-
|
23
|
-
# @return [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
24
|
-
attr_accessor :credentials
|
25
|
-
|
26
|
-
class << self
|
27
|
-
#
|
28
|
-
# List of configurable keys for {Azure::Common::Client}.
|
29
|
-
# @return [Array] of option keys.
|
30
|
-
#
|
31
|
-
def keys
|
32
|
-
@keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings]
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
#
|
37
|
-
# Set configuration options using a block.
|
38
|
-
#
|
39
|
-
def configure
|
40
|
-
yield self
|
41
|
-
end
|
42
|
-
|
43
|
-
#
|
44
|
-
# Resets the configurable options to provided options or defaults.
|
45
|
-
# This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients.
|
46
|
-
#
|
47
|
-
def reset!(options = {})
|
48
|
-
Azure::Common::Configurable.keys.each do |key|
|
49
|
-
default_value = Azure::Common::Default.options[key]
|
50
|
-
instance_variable_set(:"@#{key}", options.fetch(key, default_value))
|
51
|
-
end
|
52
|
-
|
53
|
-
fail ArgumentError, 'tenant_id is nil' if self.tenant_id.nil?
|
54
|
-
fail ArgumentError, 'client_id is nil' if self.client_id.nil?
|
55
|
-
fail ArgumentError, 'client_secret is nil' if self.client_secret.nil?
|
56
|
-
fail ArgumentError, 'subscription_id is nil' if self.subscription_id.nil?
|
57
|
-
fail ArgumentError, 'active_directory_settings is nil' if self.active_directory_settings.nil?
|
58
|
-
|
59
|
-
default_value = MsRest::TokenCredentials.new(
|
60
|
-
MsRestAzure::ApplicationTokenProvider.new(
|
61
|
-
self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
|
62
|
-
|
63
|
-
instance_variable_set(:"@credentials", options.fetch(:credentials, default_value))
|
64
|
-
|
65
|
-
self
|
66
|
-
end
|
67
|
-
|
68
|
-
def config
|
69
|
-
self
|
70
|
-
end
|
71
|
-
|
72
|
-
private
|
73
|
-
|
74
|
-
#
|
75
|
-
# configures configurable options to default values
|
76
|
-
#
|
77
|
-
def setup_default_options
|
78
|
-
opts = {}
|
79
|
-
Azure::Common::Configurable.keys.map do |key|
|
80
|
-
opts[key] = Azure::Common::Default.options[key]
|
81
|
-
end
|
82
|
-
|
83
|
-
opts
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
-
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
-
|
5
|
-
module Azure::Common
|
6
|
-
module Default
|
7
|
-
class << self
|
8
|
-
#
|
9
|
-
# Default Azure Tenant Id.
|
10
|
-
# @return [String] Azure Tenant Id.
|
11
|
-
#
|
12
|
-
def tenant_id
|
13
|
-
ENV['AZURE_TENANT_ID']
|
14
|
-
end
|
15
|
-
|
16
|
-
#
|
17
|
-
# Default Azure Client Id.
|
18
|
-
# @return [String] Azure Client Id.
|
19
|
-
#
|
20
|
-
def client_id
|
21
|
-
ENV['AZURE_CLIENT_ID']
|
22
|
-
end
|
23
|
-
|
24
|
-
#
|
25
|
-
# Default Azure Client Secret.
|
26
|
-
# @return [String] Azure Client Secret.
|
27
|
-
#
|
28
|
-
def client_secret
|
29
|
-
ENV['AZURE_CLIENT_SECRET']
|
30
|
-
end
|
31
|
-
|
32
|
-
#
|
33
|
-
# Default Azure Subscription Id.
|
34
|
-
# @return [String] Azure Subscription Id.
|
35
|
-
#
|
36
|
-
def subscription_id
|
37
|
-
ENV['AZURE_SUBSCRIPTION_ID']
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Default Azure Active Directory Service Settings.
|
42
|
-
# @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
|
43
|
-
#
|
44
|
-
def active_directory_settings
|
45
|
-
MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
|
46
|
-
end
|
47
|
-
|
48
|
-
#
|
49
|
-
# Configuration options.
|
50
|
-
# @return [Hash] Configuration options.
|
51
|
-
#
|
52
|
-
def options
|
53
|
-
Hash[Azure::Common::Configurable.keys.map { |key| [key, send(key)]}]
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|