fog-azure-rm-temp 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.arclint +8 -0
- data/.travis.yml +28 -14
- data/CHANGELOG.md +77 -0
- data/CONTRIBUTORS.md +4 -0
- data/fog-azure-rm.gemspec +3 -2
- data/lib/fog/azurerm.rb +1 -0
- data/lib/fog/azurerm/async_response.rb +9 -1
- data/lib/fog/azurerm/compute.rb +3 -1
- data/lib/fog/azurerm/constants.rb +11 -3
- data/lib/fog/azurerm/dns.rb +3 -1
- data/lib/fog/azurerm/docs/application_gateway.md +119 -117
- data/lib/fog/azurerm/docs/compute.md +299 -202
- data/lib/fog/azurerm/docs/dns.md +44 -43
- data/lib/fog/azurerm/docs/key_vault.md +31 -28
- data/lib/fog/azurerm/docs/network.md +407 -404
- data/lib/fog/azurerm/docs/resources.md +52 -49
- data/lib/fog/azurerm/docs/sql.md +56 -54
- data/lib/fog/azurerm/docs/storage.md +92 -157
- data/lib/fog/azurerm/docs/traffic_manager.md +55 -53
- data/lib/fog/azurerm/models/application_gateway/gateway.rb +5 -1
- data/lib/fog/azurerm/models/compute/availability_set.rb +4 -1
- data/lib/fog/azurerm/models/compute/managed_disk.rb +0 -1
- data/lib/fog/azurerm/models/compute/server.rb +61 -11
- data/lib/fog/azurerm/models/compute/servers.rb +2 -2
- data/lib/fog/azurerm/models/dns/a_record.rb +15 -0
- data/lib/fog/azurerm/models/dns/cname_record.rb +15 -0
- data/lib/fog/azurerm/models/dns/record_set.rb +20 -8
- data/lib/fog/azurerm/models/key_vault/vault.rb +3 -1
- data/lib/fog/azurerm/models/network/load_balancer.rb +3 -1
- data/lib/fog/azurerm/models/network/local_network_gateway.rb +3 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +3 -1
- data/lib/fog/azurerm/models/network/network_security_group.rb +4 -2
- data/lib/fog/azurerm/models/network/public_ip.rb +4 -2
- data/lib/fog/azurerm/models/network/virtual_network.rb +4 -2
- data/lib/fog/azurerm/models/resources/resource_group.rb +3 -1
- data/lib/fog/azurerm/models/sql/sql_database.rb +3 -3
- data/lib/fog/azurerm/models/sql/sql_server.rb +3 -2
- data/lib/fog/azurerm/models/storage/directories.rb +6 -1
- data/lib/fog/azurerm/models/storage/file.rb +2 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +4 -1
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +7 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +3 -1
- data/lib/fog/azurerm/requests/application_gateway/check_ag_exists.rb +1 -1
- data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +1 -0
- data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +2 -2
- data/lib/fog/azurerm/requests/compute/check_availability_set_exists.rb +1 -1
- data/lib/fog/azurerm/requests/compute/check_managed_disk_exists.rb +1 -1
- data/lib/fog/azurerm/requests/compute/check_vm_exists.rb +1 -1
- data/lib/fog/azurerm/requests/compute/check_vm_extension_exists.rb +2 -2
- data/lib/fog/azurerm/requests/compute/create_availability_set.rb +4 -2
- data/lib/fog/azurerm/requests/compute/create_image.rb +68 -0
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +302 -135
- data/lib/fog/azurerm/requests/compute/delete_image.rb +29 -0
- data/lib/fog/azurerm/requests/compute/get_image.rb +45 -0
- data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +4 -2
- data/lib/fog/azurerm/requests/dns/check_record_set_exists.rb +1 -1
- data/lib/fog/azurerm/requests/dns/check_zone_exists.rb +3 -2
- data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +3 -2
- data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +1 -2
- data/lib/fog/azurerm/requests/key_vault/check_vault_exists.rb +1 -1
- data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +1 -0
- data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_express_route_circuit_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_load_balancer_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_local_net_gateway_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_net_sec_group_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_net_sec_rule_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_network_interface_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_public_ip_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_subnet_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_virtual_network_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_connection_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +4 -4
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +1 -1
- data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +1 -2
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +5 -3
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +1 -1
- data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +4 -4
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +2 -1
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +4 -4
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +4 -4
- data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +13 -10
- data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +8 -5
- data/lib/fog/azurerm/requests/storage/check_storage_account_exists.rb +1 -1
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +4 -2
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_endpoint_exists.rb +1 -1
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_profile_exists.rb +1 -1
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +13 -3
- data/lib/fog/azurerm/storage.rb +0 -18
- data/lib/fog/azurerm/utilities/general.rb +21 -10
- data/lib/fog/azurerm/version.rb +1 -1
- data/rake-script.sh +7 -1
- data/rakefile +1 -1
- data/test/api_stub.rb +19 -2
- data/test/api_stub/models/compute/server.rb +21 -5
- data/test/api_stub/requests/compute/image.rb +41 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +60 -62
- data/test/api_stub/requests/resources/resource_group.rb +1 -1
- data/test/integration/application_gateway.rb +8 -1
- data/test/integration/availability_set.rb +9 -2
- data/test/integration/external_load_balancer.rb +2 -1
- data/test/integration/internal_load_balancer.rb +2 -1
- data/test/integration/key_vault.rb +2 -1
- data/test/integration/managed_disk.rb +10 -5
- data/test/integration/network_interface.rb +2 -1
- data/test/integration/network_security_group.rb +2 -1
- data/test/integration/public_ip.rb +2 -1
- data/test/integration/record_set.rb +5 -5
- data/test/integration/resource_group.rb +5 -2
- data/test/integration/resource_tag.rb +4 -2
- data/test/integration/server.rb +113 -23
- data/test/integration/server_custom_image.rb +120 -20
- data/test/integration/sql_server.rb +10 -2
- data/test/integration/storage_account.rb +32 -20
- data/test/integration/traffic_manager.rb +6 -1
- data/test/integration/virtual_network.rb +2 -1
- data/test/integration/virtual_network_gateway_connection.rb +3 -3
- data/test/models/application_gateway/test_gateway.rb +2 -1
- data/test/models/compute/test_availability_set.rb +2 -1
- data/test/models/compute/test_managed_disk.rb +2 -1
- data/test/models/compute/test_server.rb +13 -4
- data/test/models/dns/test_zone.rb +2 -1
- data/test/models/key_vault/test_vault.rb +2 -1
- data/test/models/network/test_load_balancer.rb +2 -1
- data/test/models/network/test_network_interface.rb +2 -1
- data/test/models/network/test_network_security_group.rb +2 -1
- data/test/models/network/test_public_ip.rb +2 -1
- data/test/models/network/test_virtual_network.rb +2 -1
- data/test/models/resources/test_resource_group.rb +2 -1
- data/test/models/sql/test_database.rb +2 -1
- data/test/models/sql/test_sql_server.rb +2 -1
- data/test/models/storage/test_storage_account.rb +2 -1
- data/test/models/traffic_manager/test_traffic_manager_profile.rb +2 -1
- data/test/requests/application_gateway/test_check_ag_exists.rb +11 -4
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +2 -2
- data/test/requests/compute/test_check_availability_set_exists.rb +9 -2
- data/test/requests/compute/test_check_managed_disk_exists.rb +9 -2
- data/test/requests/compute/test_check_vm_exists.rb +9 -2
- data/test/requests/compute/test_check_vm_extension_exists.rb +9 -2
- data/test/requests/compute/test_create_image.rb +27 -0
- data/test/requests/compute/test_create_virtual_machine.rb +41 -17
- data/test/requests/compute/test_delete_image.rb +23 -0
- data/test/requests/compute/test_get_image.rb +23 -0
- data/test/requests/dns/test_check_record_set_exists.rb +9 -2
- data/test/requests/dns/test_check_zone_exists.rb +16 -2
- data/test/requests/key_vault/test_check_vault_exists.rb +9 -2
- data/test/requests/network/test_check_express_route_cir_auth_exists.rb +9 -2
- data/test/requests/network/test_check_express_route_circuit_exists.rb +9 -2
- data/test/requests/network/test_check_load_balancer_exists.rb +9 -2
- data/test/requests/network/test_check_local_net_gateway_exists.rb +11 -4
- data/test/requests/network/test_check_net_sec_group_exists.rb +9 -2
- data/test/requests/network/test_check_net_sec_rule_exists.rb +9 -2
- data/test/requests/network/test_check_network_interface_exists.rb +9 -2
- data/test/requests/network/test_check_public_ip_exists.rb +9 -2
- data/test/requests/network/test_check_subnet_exists.rb +9 -2
- data/test/requests/network/test_check_virtual_network_exists.rb +10 -4
- data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +9 -2
- data/test/requests/network/test_check_vnet_gateway_exists.rb +9 -2
- data/test/requests/network/test_create_load_balancer.rb +3 -2
- data/test/requests/network/test_create_network_interface.rb +4 -3
- data/test/requests/network/test_create_or_update_network_security_group.rb +3 -2
- data/test/requests/network/test_create_or_update_virtual_network.rb +5 -3
- data/test/requests/network/test_create_public_ip.rb +3 -2
- data/test/requests/network/test_update_public_ip.rb +3 -2
- data/test/requests/resources/test_create_resource_group.rb +3 -2
- data/test/requests/resources/test_delete_resource_tag.rb +3 -3
- data/test/requests/resources/test_tag_resource.rb +3 -3
- data/test/requests/storage/test_check_storage_account_exists.rb +8 -1
- data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +9 -2
- data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +9 -2
- data/test/test_helper.rb +5 -14
- metadata +67 -75
- data/lib/fog/azurerm/models/storage/recovery_vault.rb +0 -50
- data/lib/fog/azurerm/models/storage/recovery_vaults.rb +0 -27
- data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +0 -54
- data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +0 -35
- data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +0 -60
- data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +0 -61
- data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +0 -56
- data/lib/fog/azurerm/requests/storage/get_backup_container.rb +0 -53
- data/lib/fog/azurerm/requests/storage/get_backup_item.rb +0 -58
- data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +0 -53
- data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +0 -64
- data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +0 -49
- data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +0 -48
- data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +0 -36
- data/lib/fog/azurerm/requests/storage/start_backup.rb +0 -54
- data/test/api_stub/models/storage/recovery_vault.rb +0 -23
- data/test/api_stub/requests/storage/recovery_vault.rb +0 -189
- data/test/models/storage/test_recovery_vault.rb +0 -61
- data/test/models/storage/test_recovery_vaults.rb +0 -47
- data/test/requests/storage/test_create_recovery_vault.rb +0 -35
- data/test/requests/storage/test_delete_recovery_vault.rb +0 -34
- data/test/requests/storage/test_disable_backup_protection.rb +0 -52
- data/test/requests/storage/test_enable_backup_protection.rb +0 -66
- data/test/requests/storage/test_get_all_backup_jobs.rb +0 -35
- data/test/requests/storage/test_get_backup_container.rb +0 -35
- data/test/requests/storage/test_get_backup_item.rb +0 -35
- data/test/requests/storage/test_get_backup_job_for_vm.rb +0 -26
- data/test/requests/storage/test_get_backup_protection_policy.rb +0 -35
- data/test/requests/storage/test_get_recovery_vault.rb +0 -35
- data/test/requests/storage/test_list_recovery_vault.rb +0 -35
- data/test/requests/storage/test_set_recovery_vault_context.rb +0 -34
- data/test/requests/storage/test_start_backup.rb +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a5dc36c698b58237c9cb5eb8c30b3b0aec94169
|
4
|
+
data.tar.gz: 0bda6033bb7da5d2225738239c829c79c1b7f217
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 730c145e96454b933f6cdbebea147599b275950f086d67b178d8bebbb9dd7b48a11c9551ecef486ddde7de437cfa9f9486e4eca98fe78c05042e1d3855dc3f9d
|
7
|
+
data.tar.gz: d66dae285b3269e412575c1d453d4f567e648228af4b7592e2a74dcc1db64b5c5ab0e543fefbdf14f6b6702ab6f35ff8dfd7779563b75d52b21ceb0ab6024665
|
data/.arclint
ADDED
data/.travis.yml
CHANGED
@@ -4,30 +4,44 @@ sudo: false
|
|
4
4
|
before_install:
|
5
5
|
- gem install bundler
|
6
6
|
- gem update bundler
|
7
|
+
- gem uninstall -aIx nokogiri -i /home/travis/.rvm/gems/ruby-2.4.1@global nokogiri
|
7
8
|
|
8
|
-
script:
|
9
|
+
script: bash ./rake-script.sh
|
10
|
+
|
11
|
+
rvm:
|
12
|
+
- 2.0.0
|
13
|
+
- 2.1.0
|
14
|
+
- 2.1.1
|
15
|
+
- 2.1.5
|
16
|
+
- 2.2.0
|
17
|
+
- 2.3.0
|
18
|
+
- jruby-head
|
9
19
|
|
10
20
|
matrix:
|
11
21
|
fast_finish: true
|
12
|
-
include:
|
13
|
-
- rvm: 2.0.0
|
14
|
-
- rvm: 2.1.0
|
15
|
-
- rvm: 2.1.1
|
16
|
-
- rvm: 2.1.5
|
17
|
-
- rvm: 2.2.0
|
18
|
-
- rvm: 2.3.0
|
19
|
-
- rvm: jruby-head
|
20
22
|
allow_failures:
|
21
23
|
- rvm: jruby-head
|
22
24
|
|
23
25
|
notifications:
|
24
26
|
email:
|
25
27
|
recipients:
|
26
|
-
-
|
28
|
+
- dev-oneops@confiz.com
|
27
29
|
on_success: always
|
28
30
|
on_failure: always
|
29
|
-
|
30
|
-
|
31
|
+
|
31
32
|
addons:
|
32
|
-
|
33
|
-
|
33
|
+
code_climate:
|
34
|
+
repo_token: b1401494baa004d90402414cb33a7fc6420fd3693e60c677a120ddefd7d84cfd
|
35
|
+
|
36
|
+
jobs:
|
37
|
+
include:
|
38
|
+
- stage: gem release
|
39
|
+
deploy:
|
40
|
+
provider: rubygems
|
41
|
+
api_key:
|
42
|
+
secure: "aKIOqa6gFMQOcwdNBNsfRoAQm+LVCRf9JpEFnDH8YLRp9A+roj0BL3hZ+pP+pb2sQSEQqU46bfBBrhB2b6Xmjnmv5d0878bl+eYOXeu90CfqRf+v/y+2k/pMsVsKs3Su7M0bHGOeHYT+segRqDHaZaJHkAW8RwLLm5A+0TyEeVjkkpFcyX8fjr5sfvD+XbEmXmmPWPuShQjKTTj1HFYJknRLLNXVYd7ZM9eKgiQfuyomdUTk8yguqNDBWW1BjiEE/0JYqx4wJxdGKPHYT+enP1xIebJVx1gEEnc/OgyBZqtmOirlh2Rnuk58NZfArzwMzIvVclJvPmynmEAlHEWtXwUgQMW5Wu/RYpxRRpr5tDRfru99hll4N9bcA439GlsNHTNJf82zmGNFIdDJ8kUJ08tVPwTvEnWGzLIdKAKWyRV+SESmZb5u3m9e4VTd06/q8gdbW9pG9UGmoes/j32lKzk9DkheCVzQjdxfRs81Z/7uTB3OhhpQnrRlf7qa2OnMDZKrip67UQHiruzAX6naQ7D5fEHR64DGZG7fQ/xRi0oG21UdNl1n/Bioj6ChFXLyInKeA0fiEwwquWK2S/2Sr5ERTBzbv9TkvbJ/1vv8FWcYYmb7bL22699V9yWcsOxEdZEYDucg71g6OrPeNeFZDsJ1749fZzW2X444+4Xtwys="
|
43
|
+
gem: fog-azure-rm
|
44
|
+
gemspec: fog-azure-rm.gemspec
|
45
|
+
on:
|
46
|
+
tags: true
|
47
|
+
branch: master
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,80 @@
|
|
1
|
+
## 0.4.4
|
2
|
+
|
3
|
+
**Fixed:**
|
4
|
+
- Compute Service - Fixed customData Update Issue
|
5
|
+
|
6
|
+
## 0.4.3
|
7
|
+
|
8
|
+
**Fixed:**
|
9
|
+
- Compute Service - Fixed Server Update Scenario
|
10
|
+
|
11
|
+
## 0.4.2
|
12
|
+
|
13
|
+
**Fixed:**
|
14
|
+
- Fixed 'raise_azure_exception' method
|
15
|
+
|
16
|
+
## 0.4.1
|
17
|
+
|
18
|
+
**Fixed:**
|
19
|
+
- Fixed check existence methods for all resources
|
20
|
+
- Fixed mime-types dependency issue
|
21
|
+
|
22
|
+
## 0.4.0
|
23
|
+
|
24
|
+
**Added**
|
25
|
+
- Support added for custom vm image reference
|
26
|
+
|
27
|
+
## 0.3.9
|
28
|
+
|
29
|
+
**Changed**
|
30
|
+
- Fixed Fog::Storage issue of requiring the 'mime-types' gem
|
31
|
+
|
32
|
+
## 0.3.8
|
33
|
+
|
34
|
+
**Changed:**
|
35
|
+
- Updated documentation
|
36
|
+
|
37
|
+
**Fixed:**
|
38
|
+
- Compute Service - Fixed issue with fault/update domain not populating
|
39
|
+
|
40
|
+
## 0.3.7
|
41
|
+
|
42
|
+
**Fixed:**
|
43
|
+
- DNS Service - Fixed bug in DNS service
|
44
|
+
|
45
|
+
## 0.3.6
|
46
|
+
|
47
|
+
**Added:**
|
48
|
+
- Compute Service - Added support for custom image provisioning with managed disk
|
49
|
+
- DNS Service - Fog Models for RecordSet Types 'A' and 'CNAME'
|
50
|
+
- Automated gem publishing on release tagging
|
51
|
+
|
52
|
+
**Changed:**
|
53
|
+
- Loosened dependency on fog-core
|
54
|
+
- Updated documentation
|
55
|
+
|
56
|
+
## 0.3.5
|
57
|
+
|
58
|
+
**Added:**
|
59
|
+
- Compute Service - Added platform update domain and platform fault domain propertied in server model
|
60
|
+
- Compute Service - Added custom image support for managed VM
|
61
|
+
|
62
|
+
**Changed:**
|
63
|
+
- Compute Service - Changed required arguments for server create method
|
64
|
+
|
65
|
+
**Fixed**
|
66
|
+
- Compute Service - Fixed issue with creating VM with custom image
|
67
|
+
|
68
|
+
## 0.3.4
|
69
|
+
|
70
|
+
**Added:**
|
71
|
+
- Compute Service - Added support for custom OS disk size during VM creation
|
72
|
+
- Compute Service - Added support to attach Managed Disk to VM
|
73
|
+
- Added resource tagging support on creation
|
74
|
+
|
75
|
+
**Removed:**
|
76
|
+
- Recovery Vault Support
|
77
|
+
|
1
78
|
## 0.3.3
|
2
79
|
|
3
80
|
**Added:**
|
data/CONTRIBUTORS.md
CHANGED
@@ -6,3 +6,7 @@
|
|
6
6
|
* Haider Ali <haider.ali@confiz.com>
|
7
7
|
* Waqar Haider <waqar.haider@confiz.com>
|
8
8
|
* Bilal Naeem <bilal.naeem@confiz.com>
|
9
|
+
* Azeem Sajid <azeem.sajid@confiz.com>
|
10
|
+
* Maham Nazir <maham.nazir@confiz.com>
|
11
|
+
* Muhammad Asad <muhammad.asad@confiz.com>
|
12
|
+
* Muhammad Abbas Sheikh <abbas.sheikh@confiz.com>
|
data/fog-azure-rm.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.8.4'
|
23
23
|
spec.add_development_dependency 'simplecov'
|
24
24
|
spec.add_development_dependency 'codeclimate-test-reporter' , '~> 1.0.0'
|
25
|
-
spec.add_dependency 'fog-core', '~> 1.43
|
26
|
-
spec.add_dependency 'fog-json', '~> 1.0'
|
25
|
+
spec.add_dependency 'fog-core', '~> 1.43'
|
26
|
+
spec.add_dependency 'fog-json', '~> 1.0.2'
|
27
27
|
spec.add_dependency 'azure_mgmt_compute', '~> 0.9.0'
|
28
28
|
spec.add_dependency 'azure_mgmt_resources', '~> 0.9.0'
|
29
29
|
spec.add_dependency 'azure_mgmt_storage', '~> 0.9.0'
|
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_dependency 'azure_mgmt_key_vault', '~> 0.9.0'
|
35
35
|
spec.add_dependency 'azure-storage', '= 0.11.5.preview'
|
36
36
|
spec.add_dependency 'vhd', '0.0.4'
|
37
|
+
spec.add_dependency 'mime-types', '~> 1.25'
|
37
38
|
end
|
data/lib/fog/azurerm.rb
CHANGED
@@ -2,14 +2,22 @@ module Fog
|
|
2
2
|
module AzureRM
|
3
3
|
# class for Async Response
|
4
4
|
class AsyncResponse
|
5
|
-
def initialize(model, promise)
|
5
|
+
def initialize(model, promise, delete_extra_resource = false, post_method_execute = nil)
|
6
6
|
@fog_model = model
|
7
7
|
@promise = promise
|
8
|
+
@delete_extra_resource = delete_extra_resource
|
9
|
+
@post_method_execute = post_method_execute
|
8
10
|
end
|
9
11
|
|
10
12
|
def value
|
11
13
|
response = @promise.value.body
|
12
14
|
@fog_model.merge_attributes(@fog_model.class.parse(response))
|
15
|
+
@fog_model.delete_extra_resources if @delete_extra_resource
|
16
|
+
# This code block will execute the method mentioned in post_method_execute after getting the response
|
17
|
+
unless @post_method_execute.nil?
|
18
|
+
@fog_model.public_send(@post_method_execute) if @fog_model.respond_to? @post_method_execute
|
19
|
+
end
|
20
|
+
@fog_model
|
13
21
|
end
|
14
22
|
|
15
23
|
def state
|
data/lib/fog/azurerm/compute.rb
CHANGED
@@ -41,7 +41,9 @@ module Fog
|
|
41
41
|
request :list_managed_disks_in_subscription
|
42
42
|
request :revoke_access_to_managed_disk
|
43
43
|
request :grant_access_to_managed_disk
|
44
|
-
|
44
|
+
request :create_image
|
45
|
+
request :delete_image
|
46
|
+
request :get_image
|
45
47
|
|
46
48
|
model_path 'fog/azurerm/models/compute'
|
47
49
|
model :availability_set
|
@@ -5,7 +5,7 @@ PUBLIC_IP = 'Public-IP-Address'.freeze
|
|
5
5
|
NETWORK_SECURITY_GROUP = 'Network-Security-Group'.freeze
|
6
6
|
STANDARD_STORAGE = 'Standard'.freeze
|
7
7
|
PREMIUM_STORAGE = 'Premium'.freeze
|
8
|
-
ALLOWED_STANDARD_REPLICATION = %w
|
8
|
+
ALLOWED_STANDARD_REPLICATION = %w[LRS ZRS GRS RAGRS].freeze
|
9
9
|
API_VERSION = '2016-06-01'.freeze
|
10
10
|
FAULT_DOMAIN_COUNT = 2
|
11
11
|
UPDATE_DOMAIN_COUNT = 5
|
@@ -17,7 +17,7 @@ RESOURCE_PROVIDER_NAMESPACE = 6
|
|
17
17
|
RESOURCE_TYPE = 7
|
18
18
|
RESOURCE_NAME = 8
|
19
19
|
ENDPOINT_PREFIX = 'Microsoft.Network/trafficManagerProfiles'.freeze
|
20
|
-
DISK_PREFIX = 'Microsoft.Compute/disks'
|
20
|
+
DISK_PREFIX = 'Microsoft.Compute/disks'.freeze
|
21
21
|
AZURE_ENDPOINTS = 'azureEndpoints'.freeze
|
22
22
|
EXTERNAL_ENDPOINTS = 'externalEndpoints'.freeze
|
23
23
|
NESTED_ENDPOINTS = 'nestedEndpoints'.freeze
|
@@ -34,6 +34,8 @@ ENVIRONMENT_AZURE_GERMAN_CLOUD = 'AzureGermanCloud'.freeze
|
|
34
34
|
# MsRestAzure::AzureOperationError class Error Codes
|
35
35
|
ERROR_CODE_RESOURCE_NOT_FOUND = 'ResourceNotFound'.freeze
|
36
36
|
ERROR_CODE_NOT_FOUND = 'NotFound'.freeze
|
37
|
+
ERROR_CODE_RESOURCE_GROUP_NOT_FOUND = 'ResourceGroupNotFound'.freeze
|
38
|
+
ERROR_CODE_PARENT_RESOURCE_NOT_FOUND = 'ParentResourceNotFound'.freeze
|
37
39
|
|
38
40
|
PLATFORM_LINUX = 'linux'.freeze
|
39
41
|
|
@@ -58,6 +60,12 @@ MAXIMUM_CHUNK_SIZE = 4 * 1024 * 1024
|
|
58
60
|
|
59
61
|
# The hash value of 4MB empty content
|
60
62
|
HASH_OF_4MB_EMPTY_CONTENT = 'b5cfa9d6c8febd618f91ac2843d50a1c'.freeze
|
61
|
-
REST_CLIENT_API_VERSION = %w
|
63
|
+
REST_CLIENT_API_VERSION = %w[2014-04-01-preview 2016-05-01].freeze
|
62
64
|
AS_SKU_CLASSIC = 'Classic'.freeze
|
63
65
|
AS_SKU_ALIGNED = 'Aligned'.freeze
|
66
|
+
|
67
|
+
# The tag key and tag value for creating a temporary storage account for generalized image
|
68
|
+
TEMPORARY_STORAGE_ACCOUNT_TAG_KEY = 'generalized_image'.freeze
|
69
|
+
TEMPORARY_STORAGE_ACCOUNT_TAG_VALUE = 'delete'.freeze
|
70
|
+
|
71
|
+
HTTP_NOT_FOUND = 404
|
data/lib/fog/azurerm/dns.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Application Gateway
|
2
2
|
|
3
|
-
This document explains how to get started using Azure Network Service with Fog to manage Application Gateway. With this gem you can create
|
3
|
+
This document explains how to get started using Azure Network Service with Fog to manage Application Gateway. With this gem you can create, update, list or delete Application Gateway.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
@@ -14,19 +14,20 @@ require 'fog/azurerm'
|
|
14
14
|
Next, create a connection to the Application Gateway Service:
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
fog_application_gateway_service = Fog::ApplicationGateway::AzureRM.new(
|
18
|
+
tenant_id: '<Tenant Id>', # Tenant Id of Azure Active Directory Application
|
19
|
+
client_id: '<Client Id>', # Client Id of Azure Active Directory Application
|
20
|
+
client_secret: '<Client Secret>', # Client Secret of Azure Active Directory Application
|
21
|
+
subscription_id: '<Subscription Id>', # Subscription Id of an Azure Account
|
22
|
+
environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
23
23
|
)
|
24
24
|
```
|
25
25
|
|
26
26
|
## Check Application Gateway Existence
|
27
27
|
|
28
28
|
```ruby
|
29
|
-
|
29
|
+
fog_application_gateway_service.gateways.check_application_gateway_exists('<Resource Group Name>', '<Gateway Name>')
|
30
|
+
|
30
31
|
```
|
31
32
|
|
32
33
|
## Create Application Gateway
|
@@ -34,43 +35,44 @@ azure_application_gateway_service.gateways.check_application_gateway_exists(<Res
|
|
34
35
|
Create a new Application Gateway.
|
35
36
|
|
36
37
|
```ruby
|
37
|
-
|
38
|
+
gateway = fog_application_gateway_service.gateways.create(
|
39
|
+
|
38
40
|
name: '<Gateway Name>',
|
39
|
-
location: '
|
41
|
+
location: '<Location>',
|
40
42
|
resource_group: '<Resource Group name>',
|
41
|
-
sku_name: '
|
42
|
-
sku_tier: '
|
43
|
-
sku_capacity: '
|
43
|
+
sku_name: '<SKU Name>',
|
44
|
+
sku_tier: '<SKU Tier>',
|
45
|
+
sku_capacity: '<SKU Capacity>',
|
44
46
|
gateway_ip_configurations:
|
45
47
|
[
|
46
48
|
{
|
47
|
-
name: '
|
48
|
-
subnet_id: '/subscriptions/<
|
49
|
+
name: '<Gateway IP Config Name>',
|
50
|
+
subnet_id: '/subscriptions/<Subscription Id>/resourcegroups/<Resource Group Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>'
|
49
51
|
}
|
50
52
|
],
|
51
53
|
frontend_ip_configurations:
|
52
54
|
[
|
53
55
|
{
|
54
|
-
name: '
|
55
|
-
private_ip_allocation_method:
|
56
|
-
public_ip_address_id: '/subscriptions/<
|
57
|
-
private_ip_address: '
|
56
|
+
name: '<Frontend IP Config Name>',
|
57
|
+
private_ip_allocation_method: '<IP Allocation Method>',
|
58
|
+
public_ip_address_id: '/subscriptions/<Subscription Id>/resourcegroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Address Name>',
|
59
|
+
private_ip_address: '<IP Address>'
|
58
60
|
}
|
59
61
|
],
|
60
62
|
frontend_ports:
|
61
63
|
[
|
62
64
|
{
|
63
|
-
name: '
|
64
|
-
port:
|
65
|
+
name: '<Frontend Port Name>',
|
66
|
+
port: <Port Number>
|
65
67
|
}
|
66
68
|
],
|
67
69
|
backend_address_pools:
|
68
70
|
[
|
69
71
|
{
|
70
|
-
name: '
|
72
|
+
name: '<Backend Address Pool Name>',
|
71
73
|
ip_addresses: [
|
72
74
|
{
|
73
|
-
ipAddress: '
|
75
|
+
ipAddress: '<IP Address>'
|
74
76
|
}
|
75
77
|
]
|
76
78
|
}
|
@@ -78,76 +80,74 @@ Create a new Application Gateway.
|
|
78
80
|
backend_http_settings_list:
|
79
81
|
[
|
80
82
|
{
|
81
|
-
name: '
|
82
|
-
port:
|
83
|
-
protocol: '
|
84
|
-
cookie_based_affinity: 'Enabled',
|
85
|
-
request_timeout: '
|
83
|
+
name: '<Gateway Settings Name>',
|
84
|
+
port: <Port Number>,
|
85
|
+
protocol: '<Protocol Name>',
|
86
|
+
cookie_based_affinity: '<Enabled/Disabled>',
|
87
|
+
request_timeout: '<Timeout Time>'
|
86
88
|
}
|
87
89
|
],
|
88
90
|
http_listeners:
|
89
91
|
[
|
90
92
|
{
|
91
|
-
name: '
|
92
|
-
frontend_ip_config_id: '/subscriptions/<
|
93
|
-
frontend_port_id: '/subscriptions/<
|
94
|
-
protocol: '
|
93
|
+
name: '<Gateway Listener Name>',
|
94
|
+
frontend_ip_config_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/frontendIPConfigurations/<Frontend IP Config Name>',
|
95
|
+
frontend_port_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/frontendPorts/<Frontend Port Name>',
|
96
|
+
protocol: '<Protocol Name>',
|
95
97
|
host_name: '',
|
96
|
-
require_server_name_indication: '
|
98
|
+
require_server_name_indication: '<True/False>'
|
97
99
|
}
|
98
100
|
],
|
99
101
|
request_routing_rules:
|
100
102
|
[
|
101
103
|
{
|
102
|
-
name: '
|
103
|
-
type: '
|
104
|
-
http_listener_id: '/subscriptions/<
|
105
|
-
backend_address_pool_id: '/subscriptions/<
|
106
|
-
backend_http_settings_id: '/subscriptions/<
|
104
|
+
name: '<Gateway Request Route Rule Name>',
|
105
|
+
type: '<Type>',
|
106
|
+
http_listener_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/httpListeners/<Gateway Listener Name>',
|
107
|
+
backend_address_pool_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/backendAddressPools/<Backend Address Pool Name>',
|
108
|
+
backend_http_settings_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/backendHttpSettingsCollection/<Gateway Settings Name>',
|
107
109
|
url_path_map: ''
|
108
110
|
}
|
109
|
-
]
|
110
|
-
|
111
|
-
|
112
|
-
)
|
111
|
+
],
|
112
|
+
tags: { key1: 'value1', key2: 'value2', keyN: 'valueN' } # [Optional]
|
113
|
+
)
|
113
114
|
```
|
114
115
|
|
115
116
|
There can be two ways of giving `frontend_ip_configurations` while creating application gateway
|
116
117
|
|
117
|
-
1. When giving public
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
118
|
+
1. When giving public IP, then we need to provide `public_ip_address_id` as follows
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
frontend_ip_configurations:
|
122
|
+
[
|
123
|
+
{
|
124
|
+
name: '<Frontend IP Config Name>',
|
125
|
+
private_ip_allocation_method: '<IP Allocation Method>',
|
126
|
+
public_ip_address_id: '/subscriptions/<Subscription Id>/resourcegroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Address Name>',
|
127
|
+
private_ip_address: '<IP Address>'
|
128
|
+
}
|
129
|
+
]
|
129
130
|
2. When giving subnet id, then we need to provide `subnet_id` as follows
|
130
131
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
132
|
+
```ruby
|
133
|
+
frontend_ip_configurations:
|
134
|
+
[
|
135
|
+
{
|
136
|
+
name: '<Frontend IP Config Name>',
|
137
|
+
private_ip_allocation_method: '<IP Allocation Method>',
|
138
|
+
subnet_id: '<Subnet ID>',
|
139
|
+
private_ip_address: '<IP Address>'
|
140
|
+
}
|
141
|
+
]
|
142
142
|
## List Application Gateways
|
143
143
|
|
144
144
|
List all application gateways in a resource group
|
145
145
|
|
146
146
|
```ruby
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
147
|
+
gateways = fog_application_gateway_service.gateways(resource_group: '<Resource Group Name>')
|
148
|
+
gateways.each do |gateway|
|
149
|
+
puts "#{gateway.name}"
|
150
|
+
end
|
151
151
|
```
|
152
152
|
|
153
153
|
## Retrieve a single Application Gateway
|
@@ -155,79 +155,81 @@ List all application gateways in a resource group
|
|
155
155
|
Get a single record of Application Gateway
|
156
156
|
|
157
157
|
```ruby
|
158
|
-
|
158
|
+
gateway = fog_application_gateway_service
|
159
159
|
.gateways
|
160
|
-
.get('<Resource Group
|
161
|
-
|
160
|
+
.get('<Resource Group Name>', '<Application Gateway Name>')
|
161
|
+
puts "#{gateway.name}"
|
162
162
|
```
|
163
163
|
|
164
164
|
|
165
|
-
## Update
|
165
|
+
## Update SKU attributes (Name and Capacity)
|
166
166
|
|
167
167
|
```ruby
|
168
|
-
|
168
|
+
ag.update_sku('<SKU Name>', '<SKU Capacity>')
|
169
169
|
```
|
170
170
|
|
171
|
-
## Update gateway
|
171
|
+
## Update gateway IP configuration (Subnet Id)
|
172
|
+
|
172
173
|
|
173
174
|
```ruby
|
174
|
-
|
175
|
+
ag.update_gateway_ip_configuration('/subscriptions/<Subscription Id>/<Resource Group Name>/<Gateway Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>')
|
175
176
|
```
|
176
177
|
|
177
|
-
## Add/Remove SSL Certificates
|
178
|
+
## Add/ Remove SSL Certificates
|
178
179
|
|
179
180
|
```ruby
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
181
|
+
ag.add_ssl_certificate(
|
182
|
+
{
|
183
|
+
name: '<SSL Certificate Name>',
|
184
|
+
data: '<SSL Certificate Data>',
|
185
|
+
password: '<Password>',
|
186
|
+
public_cert_data: '<Public Certificate Data>'
|
187
|
+
}
|
188
|
+
)
|
188
189
|
|
189
|
-
|
190
|
-
|
191
|
-
name: '<SSL Certificate
|
192
|
-
data: '
|
193
|
-
password: '
|
194
|
-
public_cert_data: '
|
195
|
-
|
196
|
-
|
190
|
+
ag.remove_ssl_certificate(
|
191
|
+
{
|
192
|
+
name: '<SSL Certificate Name>',
|
193
|
+
data: '<SSL Certificate Data>',
|
194
|
+
password: '<Password>',
|
195
|
+
public_cert_data: '<Public Certificate Data>'
|
196
|
+
}
|
197
|
+
)
|
197
198
|
```
|
198
199
|
|
199
|
-
## Add/Remove Frontend ports
|
200
|
+
## Add/ Remove Frontend ports
|
200
201
|
|
201
202
|
```ruby
|
202
|
-
|
203
|
+
ag.add_frontend_port({name: '<Frontend Port Name>', port: <Port Number>})
|
203
204
|
|
204
|
-
|
205
|
+
ag.remove_frontend_port({name: '<Frontend Port Name>', port: <Port Number>})
|
205
206
|
```
|
206
207
|
|
207
|
-
## Add/Remove Probes
|
208
|
+
## Add/ Remove Probes
|
208
209
|
|
209
210
|
```ruby
|
210
|
-
|
211
|
+
ag.add_probe(
|
211
212
|
{
|
212
|
-
name: '<Probe
|
213
|
-
protocol: '
|
214
|
-
host: '
|
215
|
-
path: '
|
216
|
-
interval:
|
217
|
-
timeout:
|
218
|
-
unhealthy_threshold:
|
219
|
-
|
220
|
-
|
221
|
-
|
213
|
+
name: '<Probe Name>',
|
214
|
+
protocol: '<Protocol Name>',
|
215
|
+
host: '<Host Name>',
|
216
|
+
path: '<Probe Path>',
|
217
|
+
interval: <Interval Time>,
|
218
|
+
timeout: <Timeout Time>,
|
219
|
+
unhealthy_threshold: <Threshold Value>
|
220
|
+
}
|
221
|
+
)
|
222
|
+
|
223
|
+
ag.remove__probe(
|
222
224
|
{
|
223
225
|
name: '<Probe name>',
|
224
|
-
protocol: '
|
225
|
-
host: '
|
226
|
-
path: '
|
227
|
-
interval:
|
228
|
-
timeout:
|
229
|
-
unhealthy_threshold:
|
230
|
-
|
226
|
+
protocol: '<Protocol Name>',
|
227
|
+
host: '<Protocol Name>',
|
228
|
+
path: '<Probe Path>',
|
229
|
+
interval: <Interval Time>,
|
230
|
+
timeout: <Timeout Time>,
|
231
|
+
unhealthy_threshold: <Threshold Value>
|
232
|
+
}
|
231
233
|
)
|
232
234
|
```
|
233
235
|
|
@@ -236,8 +238,8 @@ Get a single record of Application Gateway
|
|
236
238
|
Get a application gateway object from the get method and then destroy that application gateway.
|
237
239
|
|
238
240
|
```ruby
|
239
|
-
|
241
|
+
gateway.destroy
|
240
242
|
```
|
241
243
|
|
242
244
|
## Support and Feedback
|
243
|
-
Your feedback is highly appreciated! If you have specific issues with the
|
245
|
+
Your feedback is highly appreciated! If you have specific issues with the Fog ARM, you should file an issue via Github.
|