fog-azure-rm 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +17 -0
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTING.md +2 -0
- data/CONTRIBUTORS.md +2 -0
- data/Gemfile +3 -0
- data/fog-azure-rm.gemspec +34 -0
- data/lib/fog/azurerm.rb +1 -0
- data/lib/fog/azurerm/compute.rb +0 -1
- data/lib/fog/azurerm/config.rb +4 -0
- data/lib/fog/azurerm/credentials.rb +10 -3
- data/lib/fog/azurerm/docs/compute.md +172 -0
- data/lib/fog/azurerm/docs/dns.md +112 -0
- data/lib/fog/azurerm/docs/network.md +794 -0
- data/lib/fog/azurerm/docs/resources.md +155 -0
- data/lib/fog/azurerm/docs/storage.md +222 -0
- data/lib/fog/azurerm/docs/structure.md +53 -0
- data/lib/fog/azurerm/models/compute/server.rb +3 -2
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +5 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +49 -4
- data/lib/fog/azurerm/models/network/network_interfaces.rb +4 -2
- data/lib/fog/azurerm/models/network/network_security_group.rb +27 -4
- data/lib/fog/azurerm/models/network/network_security_groups.rb +4 -2
- data/lib/fog/azurerm/models/network/network_security_rule.rb +1 -1
- data/lib/fog/azurerm/models/network/subnet.rb +26 -6
- data/lib/fog/azurerm/models/network/subnets.rb +4 -2
- data/lib/fog/azurerm/models/network/virtual_network.rb +72 -10
- data/lib/fog/azurerm/models/network/virtual_networks.rb +4 -2
- data/lib/fog/azurerm/models/resources/azure_resource.rb +25 -0
- data/lib/fog/azurerm/models/resources/azure_resources.rb +31 -0
- data/lib/fog/azurerm/models/resources/dependency.rb +27 -0
- data/lib/fog/azurerm/models/resources/deployment.rb +65 -0
- data/lib/fog/azurerm/models/resources/deployments.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider_resource_type.rb +22 -0
- data/lib/fog/azurerm/models/storage/blob.rb +13 -0
- data/lib/fog/azurerm/models/storage/blobs.rb +22 -0
- data/lib/fog/azurerm/models/storage/container.rb +65 -0
- data/lib/fog/azurerm/models/storage/containers.rb +44 -0
- data/lib/fog/azurerm/models/storage/data_disk.rb +26 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +4 -0
- data/lib/fog/azurerm/network.rb +21 -3
- data/lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb +68 -0
- data/lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb +74 -0
- data/lib/fog/azurerm/requests/network/add_security_rules.rb +152 -0
- data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +59 -0
- data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +88 -0
- data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +4 -4
- data/lib/fog/azurerm/requests/network/{create_network_interface.rb → create_or_update_network_interface.rb} +14 -13
- data/lib/fog/azurerm/requests/network/{create_network_security_group.rb → create_or_update_network_security_group.rb} +17 -35
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +116 -0
- data/lib/fog/azurerm/requests/network/create_subnet.rb +28 -14
- data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +53 -0
- data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +80 -0
- data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +53 -0
- data/lib/fog/azurerm/requests/network/get_network_interface.rb +60 -0
- data/lib/fog/azurerm/requests/network/get_network_security_group.rb +161 -0
- data/lib/fog/azurerm/requests/network/get_subnet.rb +36 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network.rb +64 -0
- data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +67 -0
- data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +67 -0
- data/lib/fog/azurerm/requests/network/remove_security_rule.rb +155 -0
- data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +57 -0
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +90 -0
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +48 -0
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +75 -0
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +46 -0
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +46 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +37 -0
- data/lib/fog/azurerm/requests/storage/delete_container.rb +26 -0
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
- data/lib/fog/azurerm/requests/storage/get_blob_metadata.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_container_access_control_list.rb +29 -0
- data/lib/fog/azurerm/requests/storage/get_container_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +36 -0
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +31 -0
- data/lib/fog/azurerm/requests/storage/list_containers.rb +49 -0
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +0 -1
- data/lib/fog/azurerm/requests/storage/set_blob_metadata.rb +26 -0
- data/lib/fog/azurerm/requests/storage/set_container_metadata.rb +26 -0
- data/lib/fog/azurerm/resources.rb +13 -0
- data/lib/fog/azurerm/storage.rb +46 -6
- data/lib/fog/azurerm/utilities/general.rb +18 -0
- data/lib/fog/azurerm/version.rb +1 -1
- data/rakefile +21 -0
- data/test/api_stub.rb +44 -0
- data/test/api_stub/models/compute/availability_set.rb +21 -0
- data/test/api_stub/models/compute/server.rb +191 -0
- data/test/api_stub/models/dns/record_set.rb +59 -0
- data/test/api_stub/models/dns/zone.rb +47 -0
- data/test/api_stub/models/network/application_gateway.rb +135 -0
- data/test/api_stub/models/network/load_balancer.rb +132 -0
- data/test/api_stub/models/network/network_interface.rb +71 -0
- data/test/api_stub/models/network/network_security_group.rb +94 -0
- data/test/api_stub/models/network/public_ip.rb +35 -0
- data/test/api_stub/models/network/subnet.rb +35 -0
- data/test/api_stub/models/network/traffic_manager_end_point.rb +26 -0
- data/test/api_stub/models/network/traffic_manager_profile.rb +74 -0
- data/test/api_stub/models/network/virtual_network.rb +61 -0
- data/test/api_stub/models/resources/deployment.rb +110 -0
- data/test/api_stub/models/resources/resource.rb +40 -0
- data/test/api_stub/models/resources/resource_group.rb +38 -0
- data/test/api_stub/models/storage/blob.rb +17 -0
- data/test/api_stub/models/storage/container.rb +92 -0
- data/test/api_stub/models/storage/data_disk.rb +30 -0
- data/test/api_stub/models/storage/storageaccount.rb +29 -0
- data/test/api_stub/requests/compute/availability_set.rb +46 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +654 -0
- data/test/api_stub/requests/dns/record_set.rb +105 -0
- data/test/api_stub/requests/dns/zone.rb +67 -0
- data/test/api_stub/requests/network/application_gateway.rb +433 -0
- data/test/api_stub/requests/network/load_balancer.rb +366 -0
- data/test/api_stub/requests/network/network_interface.rb +268 -0
- data/test/api_stub/requests/network/network_security_group.rb +240 -0
- data/test/api_stub/requests/network/public_ip.rb +73 -0
- data/test/api_stub/requests/network/subnet.rb +73 -0
- data/test/api_stub/requests/network/traffic_manager_endpoint.rb +25 -0
- data/test/api_stub/requests/network/traffic_manager_profile.rb +140 -0
- data/test/api_stub/requests/network/virtual_network.rb +127 -0
- data/test/api_stub/requests/resources/deployment.rb +23 -0
- data/test/api_stub/requests/resources/resource.rb +47 -0
- data/test/api_stub/requests/resources/resource_group.rb +53 -0
- data/test/api_stub/requests/storage/blob.rb +24 -0
- data/test/api_stub/requests/storage/container.rb +95 -0
- data/test/api_stub/requests/storage/storageaccount.rb +112 -0
- data/test/integration/README.md +14 -0
- data/test/integration/application_gateway.rb +129 -0
- data/test/integration/availability_set.rb +56 -0
- data/test/integration/container.rb +81 -0
- data/test/integration/credentials/azure.yml +4 -0
- data/test/integration/external_load_balancer.rb +119 -0
- data/test/integration/internal_load_balancer.rb +126 -0
- data/test/integration/network_interface.rb +135 -0
- data/test/integration/network_security_group.rb +104 -0
- data/test/integration/public_ip.rb +63 -0
- data/test/integration/record_set.rb +88 -0
- data/test/integration/server.rb +139 -0
- data/test/integration/storage_account.rb +62 -0
- data/test/integration/subnet.rb +91 -0
- data/test/integration/traffic_manager.rb +81 -0
- data/test/integration/virtual_network.rb +124 -0
- data/test/integration/zone.rb +64 -0
- data/test/models/compute/test_availability_set.rb +53 -0
- data/test/models/compute/test_availability_sets.rb +41 -0
- data/test/models/compute/test_server.rb +143 -0
- data/test/models/compute/test_servers.rb +49 -0
- data/test/models/dns/test_record_set.rb +59 -0
- data/test/models/dns/test_record_sets.rb +51 -0
- data/test/models/dns/test_zone.rb +49 -0
- data/test/models/dns/test_zones.rb +49 -0
- data/test/models/network/test_application_gateway.rb +62 -0
- data/test/models/network/test_application_gateways.rb +42 -0
- data/test/models/network/test_load_balancer.rb +56 -0
- data/test/models/network/test_load_balancers.rb +42 -0
- data/test/models/network/test_network_interface.rb +106 -0
- data/test/models/network/test_network_interfaces.rb +41 -0
- data/test/models/network/test_network_security_group.rb +88 -0
- data/test/models/network/test_network_security_groups.rb +40 -0
- data/test/models/network/test_network_security_rule.rb +30 -0
- data/test/models/network/test_public_ip.rb +58 -0
- data/test/models/network/test_public_ips.rb +55 -0
- data/test/models/network/test_subnet.rb +84 -0
- data/test/models/network/test_subnets.rb +42 -0
- data/test/models/network/test_traffic_manager_end_point.rb +53 -0
- data/test/models/network/test_traffic_manager_end_points.rb +42 -0
- data/test/models/network/test_traffic_manager_profile.rb +54 -0
- data/test/models/network/test_traffic_manager_profiles.rb +41 -0
- data/test/models/network/test_virtual_network.rb +112 -0
- data/test/models/network/test_virtual_networks.rb +54 -0
- data/test/models/resources/test_deployment.rb +54 -0
- data/test/models/resources/test_deployments.rb +37 -0
- data/test/models/resources/test_resource.rb +22 -0
- data/test/models/resources/test_resource_group.rb +43 -0
- data/test/models/resources/test_resource_groups.rb +37 -0
- data/test/models/resources/test_resources.rb +38 -0
- data/test/models/storage/test_blobs.rb +32 -0
- data/test/models/storage/test_container.rb +67 -0
- data/test/models/storage/test_containers.rb +56 -0
- data/test/models/storage/test_data_disk.rb +29 -0
- data/test/models/storage/test_storage_account.rb +62 -0
- data/test/models/storage/test_storage_accounts.rb +65 -0
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +175 -0
- data/test/requests/compute/test_create_availability_set.rb +30 -0
- data/test/requests/compute/test_create_virtual_machine.rb +50 -0
- data/test/requests/compute/test_deallocate_virtual_machine.rb +29 -0
- data/test/requests/compute/test_delete_availability_set.rb +29 -0
- data/test/requests/compute/test_delete_virtual_machine.rb +29 -0
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +53 -0
- data/test/requests/compute/test_generalize_virtual_machine.rb +29 -0
- data/test/requests/compute/test_get_virtual_machine.rb +31 -0
- data/test/requests/compute/test_get_vm_status.rb +31 -0
- data/test/requests/compute/test_list_availability_sets.rb +30 -0
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +31 -0
- data/test/requests/compute/test_list_virtual_machines.rb +30 -0
- data/test/requests/compute/test_power_off_virtual_machine.rb +29 -0
- data/test/requests/compute/test_redeploy_virtual_machine.rb +29 -0
- data/test/requests/compute/test_restart_virtual_machine.rb +29 -0
- data/test/requests/compute/test_start_virtual_machine.rb +29 -0
- data/test/requests/dns/test_check_for_zone.rb +52 -0
- data/test/requests/dns/test_create_record_set.rb +45 -0
- data/test/requests/dns/test_create_zone.rb +36 -0
- data/test/requests/dns/test_delete_record_set.rb +35 -0
- data/test/requests/dns/test_delete_zone.rb +35 -0
- data/test/requests/dns/test_get_records_from_record_set.rb +55 -0
- data/test/requests/dns/test_list_record_sets.rb +36 -0
- data/test/requests/dns/test_list_zones.rb +40 -0
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +45 -0
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +45 -0
- data/test/requests/network/test_add_security_rules.rb +63 -0
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +45 -0
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +33 -0
- data/test/requests/network/test_attach_resource_to_nic.rb +65 -0
- data/test/requests/network/test_attach_route_table_to_subnet.rb +33 -0
- data/test/requests/network/test_check_for_public_ip.rb +38 -0
- data/test/requests/network/test_check_for_virtual_network.rb +38 -0
- data/test/requests/network/test_create_application_gateway.rb +61 -0
- data/test/requests/network/test_create_load_balancer.rb +56 -0
- data/test/requests/network/test_create_network_interface.rb +54 -0
- data/test/requests/network/test_create_network_security_group.rb +45 -0
- data/test/requests/network/test_create_or_update_virtual_network.rb +63 -0
- data/test/requests/network/test_create_public_ip.rb +44 -0
- data/test/requests/network/test_create_subnet.rb +44 -0
- data/test/requests/network/test_create_traffic_manager_endpoint.rb +32 -0
- data/test/requests/network/test_create_traffic_manager_profile.rb +32 -0
- data/test/requests/network/test_delete_application_gateway.rb +30 -0
- data/test/requests/network/test_delete_load_balancer.rb +30 -0
- data/test/requests/network/test_delete_network_interface.rb +30 -0
- data/test/requests/network/test_delete_network_security_group.rb +32 -0
- data/test/requests/network/test_delete_public_ip.rb +30 -0
- data/test/requests/network/test_delete_subnet.rb +30 -0
- data/test/requests/network/test_delete_traffic_manager_endpoint.rb +28 -0
- data/test/requests/network/test_delete_traffic_manager_profile.rb +28 -0
- data/test/requests/network/test_delete_virtual_network.rb +30 -0
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +33 -0
- data/test/requests/network/test_detach_resource_from_nic.rb +60 -0
- data/test/requests/network/test_detach_route_table_from_subnet.rb +33 -0
- data/test/requests/network/test_get_network_interface.rb +31 -0
- data/test/requests/network/test_get_network_security_group.rb +33 -0
- data/test/requests/network/test_get_subnet.rb +33 -0
- data/test/requests/network/test_get_traffic_manager_profile.rb +29 -0
- data/test/requests/network/test_list_application_gateways.rb +31 -0
- data/test/requests/network/test_list_load_balancers.rb +31 -0
- data/test/requests/network/test_list_network_interfaces.rb +31 -0
- data/test/requests/network/test_list_network_security_groups.rb +33 -0
- data/test/requests/network/test_list_public_ips.rb +31 -0
- data/test/requests/network/test_list_subnets.rb +31 -0
- data/test/requests/network/test_list_traffic_manager_profiles.rb +29 -0
- data/test/requests/network/test_list_virtual_networks.rb +31 -0
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +45 -0
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +45 -0
- data/test/requests/network/test_remove_security_rule.rb +49 -0
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +45 -0
- data/test/requests/resources/test_create_deployment.rb +49 -0
- data/test/requests/resources/test_create_resource_group.rb +31 -0
- data/test/requests/resources/test_delete_deployment.rb +31 -0
- data/test/requests/resources/test_delete_resource_group.rb +30 -0
- data/test/requests/resources/test_delete_resource_tag.rb +51 -0
- data/test/requests/resources/test_list_deployments.rb +32 -0
- data/test/requests/resources/test_list_resource_groups.rb +31 -0
- data/test/requests/resources/test_list_tagged_resources.rb +31 -0
- data/test/requests/resources/test_tag_resource.rb +51 -0
- data/test/requests/storage/test_check_storage_account_name_availability.rb +59 -0
- data/test/requests/storage/test_create_container.rb +31 -0
- data/test/requests/storage/test_create_storage_account.rb +56 -0
- data/test/requests/storage/test_delete_container.rb +30 -0
- data/test/requests/storage/test_delete_storage_account.rb +34 -0
- data/test/requests/storage/test_get_blob_metadata.rb +18 -0
- data/test/requests/storage/test_get_container_access_control_list.rb +31 -0
- data/test/requests/storage/test_get_container_metadata.rb +18 -0
- data/test/requests/storage/test_get_container_properties.rb +31 -0
- data/test/requests/storage/test_get_storage_access_keys.rb +31 -0
- data/test/requests/storage/test_list_containers.rb +23 -0
- data/test/requests/storage/test_list_storage_accounts.rb +47 -0
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +51 -0
- data/test/requests/storage/test_set_blob_metadata.rb +17 -0
- data/test/requests/storage/test_set_container_metadata.rb +17 -0
- data/test/test_credentials.rb +39 -0
- data/test/test_helper.rb +428 -0
- metadata +273 -14
- data/lib/fog/azurerm/models/compute/data_disk.rb +0 -26
- data/lib/fog/azurerm/requests/network/create_virtual_network.rb +0 -115
metadata
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-azure-rm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaffan Chaudhry
|
8
8
|
- Samawia Moin
|
9
9
|
- Adnan Khalil
|
10
|
+
- Zeeshan Arshad
|
11
|
+
- Haider Ali
|
10
12
|
autorequire:
|
11
13
|
bindir: bin
|
12
14
|
cert_chain: []
|
13
|
-
date: 2016-
|
15
|
+
date: 2016-08-05 00:00:00.000000000 Z
|
14
16
|
dependencies:
|
15
17
|
- !ruby/object:Gem::Dependency
|
16
18
|
name: rake
|
@@ -186,36 +188,49 @@ dependencies:
|
|
186
188
|
requirements:
|
187
189
|
- - "~>"
|
188
190
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.10.
|
191
|
+
version: 0.10.2.preview
|
190
192
|
type: :runtime
|
191
193
|
prerelease: false
|
192
194
|
version_requirements: !ruby/object:Gem::Requirement
|
193
195
|
requirements:
|
194
196
|
- - "~>"
|
195
197
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.10.
|
198
|
+
version: 0.10.2.preview
|
197
199
|
description: |-
|
198
200
|
This library can be used as a module for 'fog' or as standalone provider
|
199
201
|
to use the Azure Resource Manager cloud services in applications..
|
200
202
|
email:
|
201
203
|
executables: []
|
202
204
|
extensions: []
|
203
|
-
extra_rdoc_files:
|
205
|
+
extra_rdoc_files:
|
206
|
+
- README.md
|
204
207
|
files:
|
208
|
+
- ".codeclimate.yml"
|
209
|
+
- ".gitignore"
|
210
|
+
- ".hound.yml"
|
211
|
+
- ".rubocop.yml"
|
212
|
+
- ".travis.yml"
|
205
213
|
- CHANGELOG.md
|
206
214
|
- CONTRIBUTING.md
|
207
215
|
- CONTRIBUTORS.md
|
216
|
+
- Gemfile
|
208
217
|
- LICENSE.md
|
209
218
|
- README.md
|
219
|
+
- fog-azure-rm.gemspec
|
210
220
|
- lib/fog/azurerm.rb
|
211
221
|
- lib/fog/azurerm/compute.rb
|
212
222
|
- lib/fog/azurerm/config.rb
|
213
223
|
- lib/fog/azurerm/core.rb
|
214
224
|
- lib/fog/azurerm/credentials.rb
|
215
225
|
- lib/fog/azurerm/dns.rb
|
226
|
+
- lib/fog/azurerm/docs/compute.md
|
227
|
+
- lib/fog/azurerm/docs/dns.md
|
228
|
+
- lib/fog/azurerm/docs/network.md
|
229
|
+
- lib/fog/azurerm/docs/resources.md
|
230
|
+
- lib/fog/azurerm/docs/storage.md
|
231
|
+
- lib/fog/azurerm/docs/structure.md
|
216
232
|
- lib/fog/azurerm/models/compute/availability_set.rb
|
217
233
|
- lib/fog/azurerm/models/compute/availability_sets.rb
|
218
|
-
- lib/fog/azurerm/models/compute/data_disk.rb
|
219
234
|
- lib/fog/azurerm/models/compute/server.rb
|
220
235
|
- lib/fog/azurerm/models/compute/servers.rb
|
221
236
|
- lib/fog/azurerm/models/dns/record_set.rb
|
@@ -257,8 +272,20 @@ files:
|
|
257
272
|
- lib/fog/azurerm/models/network/traffic_manager_profiles.rb
|
258
273
|
- lib/fog/azurerm/models/network/virtual_network.rb
|
259
274
|
- lib/fog/azurerm/models/network/virtual_networks.rb
|
275
|
+
- lib/fog/azurerm/models/resources/azure_resource.rb
|
276
|
+
- lib/fog/azurerm/models/resources/azure_resources.rb
|
277
|
+
- lib/fog/azurerm/models/resources/dependency.rb
|
278
|
+
- lib/fog/azurerm/models/resources/deployment.rb
|
279
|
+
- lib/fog/azurerm/models/resources/deployments.rb
|
280
|
+
- lib/fog/azurerm/models/resources/provider.rb
|
281
|
+
- lib/fog/azurerm/models/resources/provider_resource_type.rb
|
260
282
|
- lib/fog/azurerm/models/resources/resource_group.rb
|
261
283
|
- lib/fog/azurerm/models/resources/resource_groups.rb
|
284
|
+
- lib/fog/azurerm/models/storage/blob.rb
|
285
|
+
- lib/fog/azurerm/models/storage/blobs.rb
|
286
|
+
- lib/fog/azurerm/models/storage/container.rb
|
287
|
+
- lib/fog/azurerm/models/storage/containers.rb
|
288
|
+
- lib/fog/azurerm/models/storage/data_disk.rb
|
262
289
|
- lib/fog/azurerm/models/storage/storage_account.rb
|
263
290
|
- lib/fog/azurerm/models/storage/storage_accounts.rb
|
264
291
|
- lib/fog/azurerm/network.rb
|
@@ -287,17 +314,24 @@ files:
|
|
287
314
|
- lib/fog/azurerm/requests/dns/get_records_from_record_set.rb
|
288
315
|
- lib/fog/azurerm/requests/dns/list_record_sets.rb
|
289
316
|
- lib/fog/azurerm/requests/dns/list_zones.rb
|
317
|
+
- lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb
|
318
|
+
- lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb
|
319
|
+
- lib/fog/azurerm/requests/network/add_security_rules.rb
|
320
|
+
- lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb
|
321
|
+
- lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb
|
322
|
+
- lib/fog/azurerm/requests/network/attach_resource_to_nic.rb
|
323
|
+
- lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb
|
290
324
|
- lib/fog/azurerm/requests/network/check_for_public_ip.rb
|
291
325
|
- lib/fog/azurerm/requests/network/check_for_virtual_network.rb
|
292
326
|
- lib/fog/azurerm/requests/network/create_application_gateway.rb
|
293
327
|
- lib/fog/azurerm/requests/network/create_load_balancer.rb
|
294
|
-
- lib/fog/azurerm/requests/network/
|
295
|
-
- lib/fog/azurerm/requests/network/
|
328
|
+
- lib/fog/azurerm/requests/network/create_or_update_network_interface.rb
|
329
|
+
- lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb
|
330
|
+
- lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb
|
296
331
|
- lib/fog/azurerm/requests/network/create_public_ip.rb
|
297
332
|
- lib/fog/azurerm/requests/network/create_subnet.rb
|
298
333
|
- lib/fog/azurerm/requests/network/create_traffic_manager_endpoint.rb
|
299
334
|
- lib/fog/azurerm/requests/network/create_traffic_manager_profile.rb
|
300
|
-
- lib/fog/azurerm/requests/network/create_virtual_network.rb
|
301
335
|
- lib/fog/azurerm/requests/network/delete_application_gateway.rb
|
302
336
|
- lib/fog/azurerm/requests/network/delete_load_balancer.rb
|
303
337
|
- lib/fog/azurerm/requests/network/delete_network_interface.rb
|
@@ -307,7 +341,14 @@ files:
|
|
307
341
|
- lib/fog/azurerm/requests/network/delete_traffic_manager_endpoint.rb
|
308
342
|
- lib/fog/azurerm/requests/network/delete_traffic_manager_profile.rb
|
309
343
|
- lib/fog/azurerm/requests/network/delete_virtual_network.rb
|
344
|
+
- lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb
|
345
|
+
- lib/fog/azurerm/requests/network/detach_resource_from_nic.rb
|
346
|
+
- lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb
|
347
|
+
- lib/fog/azurerm/requests/network/get_network_interface.rb
|
348
|
+
- lib/fog/azurerm/requests/network/get_network_security_group.rb
|
349
|
+
- lib/fog/azurerm/requests/network/get_subnet.rb
|
310
350
|
- lib/fog/azurerm/requests/network/get_traffic_manager_profile.rb
|
351
|
+
- lib/fog/azurerm/requests/network/get_virtual_network.rb
|
311
352
|
- lib/fog/azurerm/requests/network/list_application_gateways.rb
|
312
353
|
- lib/fog/azurerm/requests/network/list_load_balancers.rb
|
313
354
|
- lib/fog/azurerm/requests/network/list_network_interfaces.rb
|
@@ -316,29 +357,247 @@ files:
|
|
316
357
|
- lib/fog/azurerm/requests/network/list_subnets.rb
|
317
358
|
- lib/fog/azurerm/requests/network/list_traffic_manager_profiles.rb
|
318
359
|
- lib/fog/azurerm/requests/network/list_virtual_networks.rb
|
360
|
+
- lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb
|
361
|
+
- lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb
|
362
|
+
- lib/fog/azurerm/requests/network/remove_security_rule.rb
|
363
|
+
- lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb
|
364
|
+
- lib/fog/azurerm/requests/resources/create_deployment.rb
|
319
365
|
- lib/fog/azurerm/requests/resources/create_resource_group.rb
|
366
|
+
- lib/fog/azurerm/requests/resources/delete_deployment.rb
|
320
367
|
- lib/fog/azurerm/requests/resources/delete_resource_group.rb
|
368
|
+
- lib/fog/azurerm/requests/resources/delete_resource_tag.rb
|
369
|
+
- lib/fog/azurerm/requests/resources/list_deployments.rb
|
321
370
|
- lib/fog/azurerm/requests/resources/list_resource_groups.rb
|
371
|
+
- lib/fog/azurerm/requests/resources/list_tagged_resources.rb
|
372
|
+
- lib/fog/azurerm/requests/resources/tag_resource.rb
|
322
373
|
- lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb
|
374
|
+
- lib/fog/azurerm/requests/storage/create_container.rb
|
323
375
|
- lib/fog/azurerm/requests/storage/create_storage_account.rb
|
376
|
+
- lib/fog/azurerm/requests/storage/delete_container.rb
|
377
|
+
- lib/fog/azurerm/requests/storage/delete_disk.rb
|
324
378
|
- lib/fog/azurerm/requests/storage/delete_storage_account.rb
|
379
|
+
- lib/fog/azurerm/requests/storage/get_blob_metadata.rb
|
380
|
+
- lib/fog/azurerm/requests/storage/get_container_access_control_list.rb
|
381
|
+
- lib/fog/azurerm/requests/storage/get_container_metadata.rb
|
382
|
+
- lib/fog/azurerm/requests/storage/get_container_properties.rb
|
383
|
+
- lib/fog/azurerm/requests/storage/get_storage_access_keys.rb
|
384
|
+
- lib/fog/azurerm/requests/storage/list_containers.rb
|
325
385
|
- lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb
|
326
386
|
- lib/fog/azurerm/requests/storage/list_storage_accounts.rb
|
387
|
+
- lib/fog/azurerm/requests/storage/set_blob_metadata.rb
|
388
|
+
- lib/fog/azurerm/requests/storage/set_container_metadata.rb
|
327
389
|
- lib/fog/azurerm/resources.rb
|
328
390
|
- lib/fog/azurerm/storage.rb
|
391
|
+
- lib/fog/azurerm/utilities/general.rb
|
329
392
|
- lib/fog/azurerm/version.rb
|
330
|
-
|
331
|
-
|
393
|
+
- rakefile
|
394
|
+
- test/api_stub.rb
|
395
|
+
- test/api_stub/models/compute/availability_set.rb
|
396
|
+
- test/api_stub/models/compute/server.rb
|
397
|
+
- test/api_stub/models/dns/record_set.rb
|
398
|
+
- test/api_stub/models/dns/zone.rb
|
399
|
+
- test/api_stub/models/network/application_gateway.rb
|
400
|
+
- test/api_stub/models/network/load_balancer.rb
|
401
|
+
- test/api_stub/models/network/network_interface.rb
|
402
|
+
- test/api_stub/models/network/network_security_group.rb
|
403
|
+
- test/api_stub/models/network/public_ip.rb
|
404
|
+
- test/api_stub/models/network/subnet.rb
|
405
|
+
- test/api_stub/models/network/traffic_manager_end_point.rb
|
406
|
+
- test/api_stub/models/network/traffic_manager_profile.rb
|
407
|
+
- test/api_stub/models/network/virtual_network.rb
|
408
|
+
- test/api_stub/models/resources/deployment.rb
|
409
|
+
- test/api_stub/models/resources/resource.rb
|
410
|
+
- test/api_stub/models/resources/resource_group.rb
|
411
|
+
- test/api_stub/models/storage/blob.rb
|
412
|
+
- test/api_stub/models/storage/container.rb
|
413
|
+
- test/api_stub/models/storage/data_disk.rb
|
414
|
+
- test/api_stub/models/storage/storageaccount.rb
|
415
|
+
- test/api_stub/requests/compute/availability_set.rb
|
416
|
+
- test/api_stub/requests/compute/virtual_machine.rb
|
417
|
+
- test/api_stub/requests/dns/record_set.rb
|
418
|
+
- test/api_stub/requests/dns/zone.rb
|
419
|
+
- test/api_stub/requests/network/application_gateway.rb
|
420
|
+
- test/api_stub/requests/network/load_balancer.rb
|
421
|
+
- test/api_stub/requests/network/network_interface.rb
|
422
|
+
- test/api_stub/requests/network/network_security_group.rb
|
423
|
+
- test/api_stub/requests/network/public_ip.rb
|
424
|
+
- test/api_stub/requests/network/subnet.rb
|
425
|
+
- test/api_stub/requests/network/traffic_manager_endpoint.rb
|
426
|
+
- test/api_stub/requests/network/traffic_manager_profile.rb
|
427
|
+
- test/api_stub/requests/network/virtual_network.rb
|
428
|
+
- test/api_stub/requests/resources/deployment.rb
|
429
|
+
- test/api_stub/requests/resources/resource.rb
|
430
|
+
- test/api_stub/requests/resources/resource_group.rb
|
431
|
+
- test/api_stub/requests/storage/blob.rb
|
432
|
+
- test/api_stub/requests/storage/container.rb
|
433
|
+
- test/api_stub/requests/storage/storageaccount.rb
|
434
|
+
- test/integration/README.md
|
435
|
+
- test/integration/application_gateway.rb
|
436
|
+
- test/integration/availability_set.rb
|
437
|
+
- test/integration/container.rb
|
438
|
+
- test/integration/credentials/azure.yml
|
439
|
+
- test/integration/external_load_balancer.rb
|
440
|
+
- test/integration/internal_load_balancer.rb
|
441
|
+
- test/integration/network_interface.rb
|
442
|
+
- test/integration/network_security_group.rb
|
443
|
+
- test/integration/public_ip.rb
|
444
|
+
- test/integration/record_set.rb
|
445
|
+
- test/integration/server.rb
|
446
|
+
- test/integration/storage_account.rb
|
447
|
+
- test/integration/subnet.rb
|
448
|
+
- test/integration/traffic_manager.rb
|
449
|
+
- test/integration/virtual_network.rb
|
450
|
+
- test/integration/zone.rb
|
451
|
+
- test/models/compute/test_availability_set.rb
|
452
|
+
- test/models/compute/test_availability_sets.rb
|
453
|
+
- test/models/compute/test_server.rb
|
454
|
+
- test/models/compute/test_servers.rb
|
455
|
+
- test/models/dns/test_record_set.rb
|
456
|
+
- test/models/dns/test_record_sets.rb
|
457
|
+
- test/models/dns/test_zone.rb
|
458
|
+
- test/models/dns/test_zones.rb
|
459
|
+
- test/models/network/test_application_gateway.rb
|
460
|
+
- test/models/network/test_application_gateways.rb
|
461
|
+
- test/models/network/test_load_balancer.rb
|
462
|
+
- test/models/network/test_load_balancers.rb
|
463
|
+
- test/models/network/test_network_interface.rb
|
464
|
+
- test/models/network/test_network_interfaces.rb
|
465
|
+
- test/models/network/test_network_security_group.rb
|
466
|
+
- test/models/network/test_network_security_groups.rb
|
467
|
+
- test/models/network/test_network_security_rule.rb
|
468
|
+
- test/models/network/test_public_ip.rb
|
469
|
+
- test/models/network/test_public_ips.rb
|
470
|
+
- test/models/network/test_subnet.rb
|
471
|
+
- test/models/network/test_subnets.rb
|
472
|
+
- test/models/network/test_traffic_manager_end_point.rb
|
473
|
+
- test/models/network/test_traffic_manager_end_points.rb
|
474
|
+
- test/models/network/test_traffic_manager_profile.rb
|
475
|
+
- test/models/network/test_traffic_manager_profiles.rb
|
476
|
+
- test/models/network/test_virtual_network.rb
|
477
|
+
- test/models/network/test_virtual_networks.rb
|
478
|
+
- test/models/resources/test_deployment.rb
|
479
|
+
- test/models/resources/test_deployments.rb
|
480
|
+
- test/models/resources/test_resource.rb
|
481
|
+
- test/models/resources/test_resource_group.rb
|
482
|
+
- test/models/resources/test_resource_groups.rb
|
483
|
+
- test/models/resources/test_resources.rb
|
484
|
+
- test/models/storage/test_blobs.rb
|
485
|
+
- test/models/storage/test_container.rb
|
486
|
+
- test/models/storage/test_containers.rb
|
487
|
+
- test/models/storage/test_data_disk.rb
|
488
|
+
- test/models/storage/test_storage_account.rb
|
489
|
+
- test/models/storage/test_storage_accounts.rb
|
490
|
+
- test/requests/compute/test_attach_data_disk_to_vm.rb
|
491
|
+
- test/requests/compute/test_create_availability_set.rb
|
492
|
+
- test/requests/compute/test_create_virtual_machine.rb
|
493
|
+
- test/requests/compute/test_deallocate_virtual_machine.rb
|
494
|
+
- test/requests/compute/test_delete_availability_set.rb
|
495
|
+
- test/requests/compute/test_delete_virtual_machine.rb
|
496
|
+
- test/requests/compute/test_detach_data_disk_from_vm.rb
|
497
|
+
- test/requests/compute/test_generalize_virtual_machine.rb
|
498
|
+
- test/requests/compute/test_get_virtual_machine.rb
|
499
|
+
- test/requests/compute/test_get_vm_status.rb
|
500
|
+
- test/requests/compute/test_list_availability_sets.rb
|
501
|
+
- test/requests/compute/test_list_available_sizes_for_virtual_machine.rb
|
502
|
+
- test/requests/compute/test_list_virtual_machines.rb
|
503
|
+
- test/requests/compute/test_power_off_virtual_machine.rb
|
504
|
+
- test/requests/compute/test_redeploy_virtual_machine.rb
|
505
|
+
- test/requests/compute/test_restart_virtual_machine.rb
|
506
|
+
- test/requests/compute/test_start_virtual_machine.rb
|
507
|
+
- test/requests/dns/test_check_for_zone.rb
|
508
|
+
- test/requests/dns/test_create_record_set.rb
|
509
|
+
- test/requests/dns/test_create_zone.rb
|
510
|
+
- test/requests/dns/test_delete_record_set.rb
|
511
|
+
- test/requests/dns/test_delete_zone.rb
|
512
|
+
- test/requests/dns/test_get_records_from_record_set.rb
|
513
|
+
- test/requests/dns/test_list_record_sets.rb
|
514
|
+
- test/requests/dns/test_list_zones.rb
|
515
|
+
- test/requests/network/test_add_address_prefixes_in_virtual_network.rb
|
516
|
+
- test/requests/network/test_add_dns_servers_in_virtual_network.rb
|
517
|
+
- test/requests/network/test_add_security_rules.rb
|
518
|
+
- test/requests/network/test_add_subnets_in_virtual_network.rb
|
519
|
+
- test/requests/network/test_attach_network_security_group_to_subnet.rb
|
520
|
+
- test/requests/network/test_attach_resource_to_nic.rb
|
521
|
+
- test/requests/network/test_attach_route_table_to_subnet.rb
|
522
|
+
- test/requests/network/test_check_for_public_ip.rb
|
523
|
+
- test/requests/network/test_check_for_virtual_network.rb
|
524
|
+
- test/requests/network/test_create_application_gateway.rb
|
525
|
+
- test/requests/network/test_create_load_balancer.rb
|
526
|
+
- test/requests/network/test_create_network_interface.rb
|
527
|
+
- test/requests/network/test_create_network_security_group.rb
|
528
|
+
- test/requests/network/test_create_or_update_virtual_network.rb
|
529
|
+
- test/requests/network/test_create_public_ip.rb
|
530
|
+
- test/requests/network/test_create_subnet.rb
|
531
|
+
- test/requests/network/test_create_traffic_manager_endpoint.rb
|
532
|
+
- test/requests/network/test_create_traffic_manager_profile.rb
|
533
|
+
- test/requests/network/test_delete_application_gateway.rb
|
534
|
+
- test/requests/network/test_delete_load_balancer.rb
|
535
|
+
- test/requests/network/test_delete_network_interface.rb
|
536
|
+
- test/requests/network/test_delete_network_security_group.rb
|
537
|
+
- test/requests/network/test_delete_public_ip.rb
|
538
|
+
- test/requests/network/test_delete_subnet.rb
|
539
|
+
- test/requests/network/test_delete_traffic_manager_endpoint.rb
|
540
|
+
- test/requests/network/test_delete_traffic_manager_profile.rb
|
541
|
+
- test/requests/network/test_delete_virtual_network.rb
|
542
|
+
- test/requests/network/test_detach_network_security_group_from_subnet.rb
|
543
|
+
- test/requests/network/test_detach_resource_from_nic.rb
|
544
|
+
- test/requests/network/test_detach_route_table_from_subnet.rb
|
545
|
+
- test/requests/network/test_get_network_interface.rb
|
546
|
+
- test/requests/network/test_get_network_security_group.rb
|
547
|
+
- test/requests/network/test_get_subnet.rb
|
548
|
+
- test/requests/network/test_get_traffic_manager_profile.rb
|
549
|
+
- test/requests/network/test_list_application_gateways.rb
|
550
|
+
- test/requests/network/test_list_load_balancers.rb
|
551
|
+
- test/requests/network/test_list_network_interfaces.rb
|
552
|
+
- test/requests/network/test_list_network_security_groups.rb
|
553
|
+
- test/requests/network/test_list_public_ips.rb
|
554
|
+
- test/requests/network/test_list_subnets.rb
|
555
|
+
- test/requests/network/test_list_traffic_manager_profiles.rb
|
556
|
+
- test/requests/network/test_list_virtual_networks.rb
|
557
|
+
- test/requests/network/test_remove_address_prefixes_from_virtual_network.rb
|
558
|
+
- test/requests/network/test_remove_dns_servers_from_virtual_network.rb
|
559
|
+
- test/requests/network/test_remove_security_rule.rb
|
560
|
+
- test/requests/network/test_remove_subnets_from_virtual_network.rb
|
561
|
+
- test/requests/resources/test_create_deployment.rb
|
562
|
+
- test/requests/resources/test_create_resource_group.rb
|
563
|
+
- test/requests/resources/test_delete_deployment.rb
|
564
|
+
- test/requests/resources/test_delete_resource_group.rb
|
565
|
+
- test/requests/resources/test_delete_resource_tag.rb
|
566
|
+
- test/requests/resources/test_list_deployments.rb
|
567
|
+
- test/requests/resources/test_list_resource_groups.rb
|
568
|
+
- test/requests/resources/test_list_tagged_resources.rb
|
569
|
+
- test/requests/resources/test_tag_resource.rb
|
570
|
+
- test/requests/storage/test_check_storage_account_name_availability.rb
|
571
|
+
- test/requests/storage/test_create_container.rb
|
572
|
+
- test/requests/storage/test_create_storage_account.rb
|
573
|
+
- test/requests/storage/test_delete_container.rb
|
574
|
+
- test/requests/storage/test_delete_storage_account.rb
|
575
|
+
- test/requests/storage/test_get_blob_metadata.rb
|
576
|
+
- test/requests/storage/test_get_container_access_control_list.rb
|
577
|
+
- test/requests/storage/test_get_container_metadata.rb
|
578
|
+
- test/requests/storage/test_get_container_properties.rb
|
579
|
+
- test/requests/storage/test_get_storage_access_keys.rb
|
580
|
+
- test/requests/storage/test_list_containers.rb
|
581
|
+
- test/requests/storage/test_list_storage_accounts.rb
|
582
|
+
- test/requests/storage/test_list_storage_accounts_for_rg.rb
|
583
|
+
- test/requests/storage/test_set_blob_metadata.rb
|
584
|
+
- test/requests/storage/test_set_container_metadata.rb
|
585
|
+
- test/test_credentials.rb
|
586
|
+
- test/test_helper.rb
|
587
|
+
homepage: https://github.com/fog/fog-azure-rm
|
588
|
+
licenses:
|
589
|
+
- MIT
|
332
590
|
metadata: {}
|
333
|
-
post_install_message:
|
334
|
-
rdoc_options:
|
591
|
+
post_install_message: Thanks for installing!
|
592
|
+
rdoc_options:
|
593
|
+
- "--charset=UTF-8"
|
335
594
|
require_paths:
|
336
595
|
- lib
|
337
596
|
required_ruby_version: !ruby/object:Gem::Requirement
|
338
597
|
requirements:
|
339
598
|
- - ">="
|
340
599
|
- !ruby/object:Gem::Version
|
341
|
-
version:
|
600
|
+
version: 2.0.0
|
342
601
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
343
602
|
requirements:
|
344
603
|
- - ">="
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class AzureRM
|
4
|
-
# DataDisk Model for Compute Service
|
5
|
-
class DataDisk < Fog::Model
|
6
|
-
identity :name
|
7
|
-
attribute :disk_size_gb
|
8
|
-
attribute :lun
|
9
|
-
attribute :vhd_uri
|
10
|
-
attribute :caching
|
11
|
-
attribute :create_option
|
12
|
-
|
13
|
-
def self.parse(vm)
|
14
|
-
hash = {}
|
15
|
-
hash['name'] = vm['name']
|
16
|
-
hash['disk_size_gb'] = vm['diskSizeGB']
|
17
|
-
hash['lun'] = vm['lun']
|
18
|
-
hash['vhd_uri'] = vm['vhd']['uri']
|
19
|
-
hash['caching'] = vm['caching'] unless vm['caching'].nil?
|
20
|
-
hash['create_option'] = vm['createOption']
|
21
|
-
hash
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,115 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Network
|
3
|
-
class AzureRM
|
4
|
-
# Real class for Network Request
|
5
|
-
class Real
|
6
|
-
def create_virtual_network(resource_group, name, location, dns_list, subnet_address_list, network_address_list)
|
7
|
-
Fog::Logger.debug "Creating Virtual Network: #{name}..."
|
8
|
-
virtual_network = define_vnet_object(location, name, network_address_list, dns_list, subnet_address_list)
|
9
|
-
begin
|
10
|
-
promise = @network_client.virtual_networks.create_or_update(resource_group, name, virtual_network)
|
11
|
-
result = promise.value!
|
12
|
-
Fog::Logger.debug "Virtual Network #{name} created successfully."
|
13
|
-
Azure::ARM::Network::Models::VirtualNetwork.serialize_object(result.body)
|
14
|
-
rescue MsRestAzure::AzureOperationError => e
|
15
|
-
msg = "Exception creating Virtual Network #{name} in Resource Group: #{resource_group}. #{e.body['error']['message']}"
|
16
|
-
raise msg
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def define_vnet_object(location, network_name, network_address_list, dns_list, subnet_address_list)
|
23
|
-
virtual_network = Azure::ARM::Network::Models::VirtualNetwork.new
|
24
|
-
virtual_network.location = location
|
25
|
-
virtual_network_properties = Azure::ARM::Network::Models::VirtualNetworkPropertiesFormat.new
|
26
|
-
|
27
|
-
if network_address_list.nil?
|
28
|
-
address_space = Azure::ARM::Network::Models::AddressSpace.new
|
29
|
-
address_space.address_prefixes = ['10.2.0.0/16']
|
30
|
-
|
31
|
-
else
|
32
|
-
network_address_list = network_address_list.split(',')
|
33
|
-
na_list = []
|
34
|
-
(0...network_address_list.length).each do |i|
|
35
|
-
na_list.push(network_address_list[i].strip)
|
36
|
-
end
|
37
|
-
address_space = Azure::ARM::Network::Models::AddressSpace.new
|
38
|
-
address_space.address_prefixes = na_list
|
39
|
-
end
|
40
|
-
virtual_network_properties.address_space = address_space
|
41
|
-
|
42
|
-
unless dns_list.nil?
|
43
|
-
dns_list = dns_list.split(',')
|
44
|
-
ns_list = []
|
45
|
-
(0...dns_list.length).each do |i|
|
46
|
-
ns_list.push(dns_list[i].strip)
|
47
|
-
end
|
48
|
-
dhcp_options = Azure::ARM::Network::Models::DhcpOptions.new
|
49
|
-
dhcp_options.dns_servers = ns_list unless ns_list.nil?
|
50
|
-
virtual_network_properties.dhcp_options = dhcp_options
|
51
|
-
end
|
52
|
-
|
53
|
-
unless subnet_address_list.nil?
|
54
|
-
subnet_address_list = subnet_address_list.split(',')
|
55
|
-
sub_nets = define_subnet_objects(network_name, subnet_address_list)
|
56
|
-
virtual_network_properties.subnets = sub_nets
|
57
|
-
end
|
58
|
-
|
59
|
-
virtual_network.properties = virtual_network_properties
|
60
|
-
virtual_network
|
61
|
-
end
|
62
|
-
|
63
|
-
def define_subnet_objects(network_name, subnet_address_list)
|
64
|
-
sub_nets = []
|
65
|
-
(0...subnet_address_list.length).each do |i|
|
66
|
-
subnet_properties = Azure::ARM::Network::Models::SubnetPropertiesFormat.new
|
67
|
-
subnet_properties.address_prefix = subnet_address_list[i].strip
|
68
|
-
|
69
|
-
subnet = Azure::ARM::Network::Models::Subnet.new
|
70
|
-
subnet.name = 'subnet_' + i.to_s + '_' + network_name
|
71
|
-
subnet.properties = subnet_properties
|
72
|
-
sub_nets.push(subnet)
|
73
|
-
end
|
74
|
-
sub_nets
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
# Mock class for Network Request
|
79
|
-
class Mock
|
80
|
-
def create_virtual_network(resource_group, name, location, _dns_list, subnet_address_list, network_address_list)
|
81
|
-
{
|
82
|
-
'id' => "/subscriptions/########-####-####-####-############/resourceGroups/#{resource_group}/providers/Microsoft.Network/virtualNetworks/#{name}",
|
83
|
-
'name' => name,
|
84
|
-
'type' => 'Microsoft.Network/virtualNetworks',
|
85
|
-
'location' => location,
|
86
|
-
'properties' =>
|
87
|
-
{
|
88
|
-
'addressSpace' =>
|
89
|
-
{
|
90
|
-
'addressPrefixes' =>
|
91
|
-
[
|
92
|
-
network_address_list
|
93
|
-
]
|
94
|
-
},
|
95
|
-
'subnets' =>
|
96
|
-
[
|
97
|
-
{
|
98
|
-
'id' => "/subscriptions/########-####-####-####-############/resourceGroups/#{resource_group}providers/Microsoft.Network/virtualNetworks/#{name}/subnets/subnet_0_#{name}",
|
99
|
-
'properties' =>
|
100
|
-
{
|
101
|
-
'addressPrefix' => subnet_address_list,
|
102
|
-
'provisioningState' => 'Succeeded'
|
103
|
-
},
|
104
|
-
'name' => "subnet_0_#{name}"
|
105
|
-
}
|
106
|
-
],
|
107
|
-
'resourceGuid' => 'c573f8e2-d916-493f-8b25-a681c31269ef',
|
108
|
-
'provisioningState' => 'Succeeded'
|
109
|
-
}
|
110
|
-
}
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|