fog-azure-rm 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/.travis.yml +13 -8
  4. data/CHANGELOG.md +23 -10
  5. data/CONTRIBUTORS.md +2 -0
  6. data/lib/fog/azurerm/application_gateway.rb +4 -3
  7. data/lib/fog/azurerm/compute.rb +0 -1
  8. data/lib/fog/azurerm/dns.rb +0 -3
  9. data/lib/fog/azurerm/docs/application_gateway.md +72 -2
  10. data/lib/fog/azurerm/docs/compute.md +8 -5
  11. data/lib/fog/azurerm/docs/network.md +185 -6
  12. data/lib/fog/azurerm/docs/resources.md +2 -2
  13. data/lib/fog/azurerm/docs/storage.md +2 -2
  14. data/lib/fog/azurerm/docs/traffic_manager.md +23 -0
  15. data/lib/fog/azurerm/models/application_gateway/gateway.rb +180 -22
  16. data/lib/fog/azurerm/models/application_gateway/gateways.rb +4 -2
  17. data/lib/fog/azurerm/models/application_gateway/ip_configuration.rb +7 -2
  18. data/lib/fog/azurerm/models/compute/server.rb +5 -2
  19. data/lib/fog/azurerm/models/compute/servers.rb +4 -8
  20. data/lib/fog/azurerm/models/network/express_route_circuit_authorization.rb +58 -0
  21. data/lib/fog/azurerm/models/network/express_route_circuit_authorizations.rb +31 -0
  22. data/lib/fog/azurerm/models/network/load_balancers.rb +4 -2
  23. data/lib/fog/azurerm/models/network/local_network_gateway.rb +68 -0
  24. data/lib/fog/azurerm/models/network/local_network_gateways.rb +29 -0
  25. data/lib/fog/azurerm/models/network/public_ip.rb +16 -1
  26. data/lib/fog/azurerm/models/network/virtual_network_gateway_connection.rb +93 -0
  27. data/lib/fog/azurerm/models/network/virtual_network_gateway_connections.rb +29 -0
  28. data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +1 -1
  29. data/lib/fog/azurerm/models/resources/deployments.rb +4 -2
  30. data/lib/fog/azurerm/models/resources/resource_groups.rb +4 -2
  31. data/lib/fog/azurerm/models/storage/storage_accounts.rb +4 -2
  32. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +23 -6
  33. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +29 -3
  34. data/lib/fog/azurerm/network.rb +23 -3
  35. data/lib/fog/azurerm/requests/application_gateway/{create_application_gateway.rb → create_or_update_application_gateway.rb} +23 -63
  36. data/lib/fog/azurerm/requests/application_gateway/get_application_gateway.rb +159 -0
  37. data/lib/fog/azurerm/requests/application_gateway/update_sku_attributes.rb +28 -0
  38. data/lib/fog/azurerm/requests/application_gateway/update_subnet_id_in_gateway_ip_configuration.rb +29 -0
  39. data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +31 -20
  40. data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +1 -1
  41. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +1 -1
  42. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_authorization.rb +49 -0
  43. data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +78 -0
  44. data/lib/fog/azurerm/requests/network/{create_public_ip.rb → create_or_update_public_ip.rb} +22 -8
  45. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +81 -0
  46. data/lib/fog/azurerm/requests/network/delete_express_route_circuit_authorization.rb +28 -0
  47. data/lib/fog/azurerm/requests/network/delete_local_network_gateway.rb +28 -0
  48. data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway_connection.rb +28 -0
  49. data/lib/fog/azurerm/requests/network/get_connection_shared_key.rb +25 -0
  50. data/lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb +34 -0
  51. data/lib/fog/azurerm/requests/network/get_load_balancer.rb +169 -0
  52. data/lib/fog/azurerm/requests/network/get_local_network_gateway.rb +46 -0
  53. data/lib/fog/azurerm/requests/network/get_virtual_network_gateway_connection.rb +46 -0
  54. data/lib/fog/azurerm/requests/network/list_express_route_circuit_authorizations.rb +36 -0
  55. data/lib/fog/azurerm/requests/network/list_local_network_gateways.rb +49 -0
  56. data/lib/fog/azurerm/requests/network/list_virtual_network_gateway_connections.rb +49 -0
  57. data/lib/fog/azurerm/requests/network/reset_connection_shared_key.rb +36 -0
  58. data/lib/fog/azurerm/requests/network/set_connection_shared_key.rb +36 -0
  59. data/lib/fog/azurerm/requests/resources/create_deployment.rb +5 -4
  60. data/lib/fog/azurerm/requests/resources/create_resource_group.rb +5 -4
  61. data/lib/fog/azurerm/requests/resources/delete_deployment.rb +5 -4
  62. data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +5 -4
  63. data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +6 -4
  64. data/lib/fog/azurerm/requests/resources/get_deployment.rb +81 -0
  65. data/lib/fog/azurerm/requests/resources/get_resource_group.rb +47 -0
  66. data/lib/fog/azurerm/requests/resources/list_deployments.rb +5 -4
  67. data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +6 -5
  68. data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +5 -4
  69. data/lib/fog/azurerm/requests/resources/tag_resource.rb +6 -4
  70. data/lib/fog/azurerm/requests/storage/get_storage_account.rb +36 -0
  71. data/lib/fog/azurerm/requests/traffic_manager/{create_traffic_manager_endpoint.rb → create_or_update_traffic_manager_endpoint.rb} +2 -2
  72. data/lib/fog/azurerm/requests/traffic_manager/{create_traffic_manager_profile.rb → create_or_update_traffic_manager_profile.rb} +6 -6
  73. data/lib/fog/azurerm/requests/traffic_manager/list_traffic_manager_profiles.rb +1 -1
  74. data/lib/fog/azurerm/resources.rb +2 -3
  75. data/lib/fog/azurerm/storage.rb +1 -1
  76. data/lib/fog/azurerm/traffic_manager.rb +2 -3
  77. data/lib/fog/azurerm/utilities/general.rb +5 -0
  78. data/lib/fog/azurerm/version.rb +1 -1
  79. data/lib/fog/azurerm.rb +34 -32
  80. data/test/api_stub/models/application_gateway/gateway.rb +29 -0
  81. data/test/api_stub/models/network/express_route_circuit_authorization.rb +22 -0
  82. data/test/api_stub/models/network/local_network_gateway.rb +31 -0
  83. data/test/api_stub/models/network/virtual_network_gateway_connection.rb +31 -0
  84. data/test/api_stub/requests/application_gateway/gateway.rb +30 -0
  85. data/test/api_stub/requests/compute/virtual_machine.rb +129 -2
  86. data/test/api_stub/requests/network/express_route_circuit_authorization.rb +31 -0
  87. data/test/api_stub/requests/network/local_network_gateway.rb +62 -0
  88. data/test/api_stub/requests/network/virtual_network_gateway_connection.rb +68 -0
  89. data/test/api_stub/requests/traffic_manager/traffic_manager_profile.rb +13 -0
  90. data/test/api_stub.rb +97 -48
  91. data/test/integration/Virtual_network_gateway_connection.rb +212 -0
  92. data/test/integration/application_gateway.rb +125 -54
  93. data/test/integration/deployment.rb +1 -1
  94. data/test/integration/express_route_circuit.rb +43 -4
  95. data/test/integration/external_load_balancer.rb +4 -4
  96. data/test/integration/internal_load_balancer.rb +4 -4
  97. data/test/integration/local_network_gateway.rb +76 -0
  98. data/test/integration/public_ip.rb +7 -0
  99. data/test/integration/server.rb +5 -4
  100. data/test/integration/storage_account.rb +5 -5
  101. data/test/integration/traffic_manager.rb +21 -0
  102. data/test/integration/virtual_network_gateway.rb +51 -22
  103. data/test/models/application_gateway/test_gateway.rb +56 -1
  104. data/test/models/application_gateway/test_gateways.rb +5 -5
  105. data/test/models/compute/test_servers.rb +6 -14
  106. data/test/models/network/test_express_route_circuit_authorization.rb +50 -0
  107. data/test/models/network/test_express_route_circuit_authorizations.rb +43 -0
  108. data/test/models/network/test_load_balancers.rb +6 -6
  109. data/test/models/network/test_local_network_gateway.rb +53 -0
  110. data/test/models/network/test_local_network_gateways.rb +42 -0
  111. data/test/models/network/test_public_ip.rb +16 -12
  112. data/test/models/network/test_virtual_network_gateway_connection.rb +59 -0
  113. data/test/models/network/test_virtual_network_gateway_connections.rb +42 -0
  114. data/test/models/resources/test_deployments.rb +5 -5
  115. data/test/models/resources/test_resource_groups.rb +5 -5
  116. data/test/models/storage/test_storage_accounts.rb +3 -3
  117. data/test/models/traffic_manager/test_traffic_manager_end_point.rb +1 -1
  118. data/test/models/traffic_manager/test_traffic_manager_profile.rb +11 -4
  119. data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +35 -0
  120. data/test/requests/application_gateway/test_get_application_gateway.rb +24 -0
  121. data/test/requests/compute/test_create_virtual_machine.rb +17 -2
  122. data/test/requests/network/test_create_express_route_circuit_authorization.rb +35 -0
  123. data/test/requests/network/test_create_or_update_local_network_gateway.rb +36 -0
  124. data/test/requests/network/test_create_public_ip.rb +3 -3
  125. data/test/requests/network/test_create_virtual_network_gateway_connection.rb +36 -0
  126. data/test/requests/network/test_delete_express_route_circuit_authorization.rb +23 -0
  127. data/test/requests/network/test_delete_local_network_gateway.rb +23 -0
  128. data/test/requests/network/test_delete_virtual_network_gateway.rb +2 -2
  129. data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +23 -0
  130. data/test/requests/network/test_get_connection_shared_key.rb +24 -0
  131. data/test/requests/network/test_get_express_route_circuit_authorization.rb +24 -0
  132. data/test/requests/network/test_get_load_balancer.rb +24 -0
  133. data/test/requests/network/test_get_local_network_gateway.rb +24 -0
  134. data/test/requests/network/test_get_virtual_network_gateway_connection.rb +24 -0
  135. data/test/requests/network/test_list_express_route_circuit_authorizations.rb +24 -0
  136. data/test/requests/network/test_list_local_network_gateways.rb +24 -0
  137. data/test/requests/network/test_list_virtual_network_gateway_connections.rb +24 -0
  138. data/test/requests/network/test_reset_connection_shared_key.rb +23 -0
  139. data/test/requests/network/test_set_connection_shared_key.rb +23 -0
  140. data/test/requests/network/test_update_public_ip.rb +34 -0
  141. data/test/requests/resources/test_create_deployment.rb +1 -1
  142. data/test/requests/resources/test_create_resource_group.rb +1 -1
  143. data/test/requests/resources/test_delete_deployment.rb +1 -1
  144. data/test/requests/resources/test_delete_resource_group.rb +1 -1
  145. data/test/requests/resources/test_delete_resource_tag.rb +1 -1
  146. data/test/requests/resources/test_get_deployment.rb +24 -0
  147. data/test/requests/resources/test_get_resource_group.rb +24 -0
  148. data/test/requests/resources/test_list_deployments.rb +1 -1
  149. data/test/requests/resources/test_list_resource_groups.rb +1 -1
  150. data/test/requests/resources/test_list_tagged_resources.rb +1 -1
  151. data/test/requests/resources/test_tag_resource.rb +1 -1
  152. data/test/requests/storage/test_get_storage_account.rb +25 -0
  153. data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +2 -2
  154. data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +3 -3
  155. data/test/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +27 -0
  156. data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +27 -0
  157. data/test/test_helper.rb +52 -0
  158. metadata +73 -9
  159. data/lib/fog/azurerm/core.rb +0 -14
  160. data/test/requests/application_gateway/test_create_application_gateway.rb +0 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7147604050b637a371e5946a3396930e3ccd4bfe
4
- data.tar.gz: ff41020947f784268c92b827286bdc8dd5325ccd
3
+ metadata.gz: 17db5794c8186b1a029c4bae7d938443d2392db2
4
+ data.tar.gz: 19682802907daf630ab3bd1ad6ce6a0d88cbf678
5
5
  SHA512:
6
- metadata.gz: cedd7061a669158834a74fe6e2fa0f10ae179c87c050925853674889e8e00bfd2e5942a1cd9ac14c5ef8d788b58bf0554f5c0803971111af55d8128c5fcbe7f2
7
- data.tar.gz: 7daa18ecaea944ed8862bcc47d40396bcba15936e3ef67c03f3d40ed4a91d5ffeb45a5da02b1cd5e5afda5163ca79b468d23624d7fa71f522326c39b100e1eee
6
+ metadata.gz: c23376452f1441ef55a1e9a7eff0dbecc2daa024e689151b7db49ee27b44fe35dd90cbd8e5df7c253baae0cad07923298043430baa64a188b7fef9a6e912d1ca
7
+ data.tar.gz: b2ab099ace9089b714a1318bb56603a9b4fee9ba9e7abf76fde9e1c2164aa32f1feff1d2f74d2ba5b5c511336eb8784122762e26313d859a5ef701f8ad0c5ef0
data/.rubocop.yml CHANGED
@@ -34,3 +34,5 @@ StringLiterals:
34
34
  EnforcedStyle: single_quotes
35
35
  SignalException:
36
36
  EnforcedStyle: only_raise
37
+ Style/FrozenStringLiteralComment:
38
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,20 +1,25 @@
1
1
  language: ruby
2
2
  sudo: false
3
+
4
+ before_install:
5
+ - gem install bundler
6
+ - gem update bundler
7
+
3
8
  matrix:
4
9
  fast_finish: true
5
10
  include:
6
- - rvm: 2.1
7
- - rvm: 2.2
11
+ - rvm: 2.0.0
12
+ - rvm: 2.1.0
13
+ - rvm: 2.1.1
14
+ - rvm: 2.1.5
15
+ - rvm: 2.2.0
16
+ - rvm: 2.3.0
17
+ - rvm: jruby-head
8
18
 
9
19
  notifications:
10
20
  email:
11
21
  recipients:
12
- - abbas.sheikh@confiz.com
13
- - shaffan.chaudhry@confiz.com
14
- - zeeshan.arshad@confiz.com
15
- - samawia.moin@confiz.com
16
- - waqar.haider@confiz.com
17
- - bilal.naeem@confiz.com
22
+ - oneops_azure@confiz.com
18
23
  on_success: always
19
24
  on_failure: always
20
25
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 0.0.6
2
+
3
+ **Added:**
4
+ - Compute Service - Added Custom data support for creating Virtual Machine.
5
+ - Network Service - Added Express Route Circuit Authorization.
6
+ - Network Service - Added Virtual Network Gateway Connection support
7
+ - Network Service - Added Local Network Gateway
8
+ - Traffic Manager - Added support for Update Traffic Manager Profile and Endpoint.
9
+
10
+ **Changed:**
11
+ - Used autoload in place of require to avoid loading time issues
12
+ - Used Fog DSL to register services
13
+
1
14
  ## 0.0.5
2
15
 
3
16
  **Added:**
@@ -6,16 +19,16 @@
6
19
  - Network Service - Added VPN Gateway
7
20
 
8
21
  **Changed:**
9
- - Updated fog-azure-rm runtime gem dependencies to latest:
10
- -- azure_mgmt_compute 0.5.0
11
- -- azure_mgmt_network 0.5.0
12
- -- azure_mgmt_resources 0.5.0
13
- -- azure_mgmt_storage 0.5.0
14
- -- azure_mgmt_traffic_manager 0.5.0
15
- -- rest-client 2.0.0
16
- -- fog-core 1.42.0
17
- - Traffic Manager Service - Moved Traffic Manager from Network Service to Traffic Manager Service.
18
- - Application Gateway Service - Moved Application Gateway from Network Service to Application Gateway Service.
22
+ * Updated fog-azure-rm runtime gem dependencies to latest:
23
+ * azure_mgmt_compute 0.5.0
24
+ * azure_mgmt_network 0.5.0
25
+ * azure_mgmt_resources 0.5.0
26
+ * azure_mgmt_storage 0.5.0
27
+ * azure_mgmt_traffic_manager 0.5.0
28
+ * rest-client 2.0.0
29
+ * fog-core 1.42.0
30
+ * Traffic Manager Service - Moved Traffic Manager from Network Service to Traffic Manager Service.
31
+ * Application Gateway Service - Moved Application Gateway from Network Service to Application Gateway Service.
19
32
 
20
33
  ## 0.0.4
21
34
 
data/CONTRIBUTORS.md CHANGED
@@ -4,3 +4,5 @@
4
4
  * Shaffan Chaudhry <shaffan.chaudhry@confiz.com>
5
5
  * Zeeshan Arshad <zeeshan.arshad@confiz.com>
6
6
  * Haider Ali <haider.ali@confiz.com>
7
+ * Waqar Haider <waqar.haider@confiz.com>
8
+ * Bilal Naeem <bilal.naeem@confiz.com>
@@ -1,5 +1,3 @@
1
- require 'fog/azurerm/core'
2
-
3
1
  module Fog
4
2
  module ApplicationGateway
5
3
  # Fog Service Class for AzureRM
@@ -10,9 +8,12 @@ module Fog
10
8
  requires :subscription_id
11
9
 
12
10
  request_path 'fog/azurerm/requests/application_gateway'
13
- request :create_application_gateway
11
+ request :create_or_update_application_gateway
14
12
  request :delete_application_gateway
15
13
  request :list_application_gateways
14
+ request :get_application_gateway
15
+ request :update_subnet_id_in_gateway_ip_configuration
16
+ request :update_sku_attributes
16
17
 
17
18
  model_path 'fog/azurerm/models/application_gateway'
18
19
  model :gateway
@@ -1,4 +1,3 @@
1
- require 'fog/azurerm/core'
2
1
  module Fog
3
2
  module Compute
4
3
  # This class registers models, requests and collections
@@ -1,6 +1,3 @@
1
- require 'fog/azurerm/core'
2
- require 'fog/azurerm/credentials'
3
-
4
1
  module Fog
5
2
  module DNS
6
3
  # This class registers models, requests and collections
@@ -122,11 +122,81 @@ Get a single record of Application Gateway
122
122
 
123
123
  ```ruby
124
124
  gateway = azure_application_gateway_service
125
- .gateways(resource_group: '<Resource Group name>')
126
- .get('<Application Gateway Name>')
125
+ .gateways
126
+ .get('<Resource Group name>', '<Application Gateway Name>')
127
127
  puts "#{gateway.name}"
128
128
  ```
129
129
 
130
+
131
+ ## Update sku attributes (Name and Capacity)
132
+
133
+ ```ruby
134
+ ag.update_sku('Standard_Small', '1')
135
+ ```
136
+
137
+ ## Update gateway ip configuration (Subnet id)
138
+
139
+ ```ruby
140
+ ag.update_gateway_ip_configuration("/subscriptions/<Subscription_id>/<Resource Group name>/<Gateway Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>")
141
+ ```
142
+
143
+ ## Add/Remove SSL Certificates
144
+
145
+ ```ruby
146
+ ag.add_ssl_certificate(
147
+ {
148
+ name: '<SSL Certificate name>',
149
+ data: 'Base-64 encoded pfx certificate',
150
+ password: 'azure',
151
+ public_cert_data: 'Base-64 encoded Public cert data corresponding to pfx specified in data.'
152
+ }
153
+ )
154
+
155
+ ag.remove_ssl_certificate(
156
+ {
157
+ name: '<SSL Certificate name>',
158
+ data: 'Base-64 encoded pfx certificate',
159
+ password: 'azure',
160
+ public_cert_data: 'Base-64 encoded Public cert data corresponding to pfx specified in data.'
161
+ }
162
+ )
163
+ ```
164
+
165
+ ## Add/Remove Frontend ports
166
+
167
+ ```ruby
168
+ ag.add_frontend_port({name: '<Frontend port name>', port: 80})
169
+
170
+ ag.remove_frontend_port({name: '<Frontend port name>', port: 80})
171
+ ```
172
+
173
+ ## Add/Remove Probes
174
+
175
+ ```ruby
176
+ ag.add_probe(
177
+ {
178
+ name: '<Probe name>',
179
+ protocol: 'http',
180
+ host: 'localhost',
181
+ path: '/fog-test',
182
+ interval: 60,
183
+ timeout: 300,
184
+ unhealthy_threshold: 5
185
+ }
186
+ )
187
+ ag.remove__probe(
188
+ {
189
+ name: '<Probe name>',
190
+ protocol: 'http',
191
+ host: 'localhost',
192
+ path: '/fog-test',
193
+ interval: 60,
194
+ timeout: 300,
195
+ unhealthy_threshold: 5
196
+ }
197
+ )
198
+ ```
199
+
130
200
  ## Destroy a single Application Gateway
131
201
 
132
202
  Get a application gateway object from the get method and then destroy that application gateway.
@@ -43,7 +43,8 @@ Create a new linux server
43
43
  offer: 'UbuntuServer',
44
44
  sku: '14.04.2-LTS',
45
45
  version: 'latest',
46
- platform: 'Linux'
46
+ platform: 'Linux',
47
+ custom_data: 'echo customData' # Optional
47
48
  )
48
49
  ```
49
50
  Create a new windows server
@@ -63,9 +64,11 @@ Create a new windows server
63
64
  offer: 'WindowsServerEssentials',
64
65
  sku: 'WindowsServerEssentials',
65
66
  version: 'latest',
66
- platform: 'Windows'
67
+ platform: 'Windows',
68
+ custom_data: 'echo customData' # Optional
67
69
  )
68
70
  ```
71
+ For more information about custom_data; see link: https://msdn.microsoft.com/en-us/library/azure/mt163591.aspx
69
72
 
70
73
  ## List Servers
71
74
 
@@ -112,8 +115,8 @@ Check the status of a Server
112
115
 
113
116
  ```ruby
114
117
  status = azure_compute_service
115
- .servers(resource_group: '<Resource Group name>')
116
- .get('<Server name>')
118
+ .servers
119
+ .get('<Resource Group name>', '<Server name>')
117
120
  .vm_status
118
121
  puts status
119
122
  ```
@@ -155,7 +158,7 @@ Get a single record of Availability Set
155
158
 
156
159
  ```ruby
157
160
  availability_set = azure_compute_service
158
- .availability_sets(resource_group: '<Resource Group name>')
161
+ .availability_sets
159
162
  .get('<Resource Group name>','<Availability Set name>')
160
163
  puts "#{availability_set.name}"
161
164
  ```
@@ -160,8 +160,8 @@ Get a single record of Subnet
160
160
 
161
161
  ```ruby
162
162
  subnet = azure_network_service
163
- .subnets(resource_group: '<Resource Group name>', virtual_network_name: '<Virtual Network name>')
164
- .get('<Subnet name>')
163
+ .subnets
164
+ .get('<Resource Group name>', '<Virtual Network name>', '<Subnet name>')
165
165
  puts "#{subnet.name}"
166
166
  ```
167
167
 
@@ -324,11 +324,23 @@ Get a single record of Public Ip
324
324
 
325
325
  ```ruby
326
326
  pubip = azure_network_service
327
- .public_ips(resource_group: '<Resource Group name>')
328
- .get('<Public IP name>')
327
+ .public_ips
328
+ .get('<Resource Group name>', '<Public IP name>')
329
329
  puts "#{pubip.name}"
330
330
  ```
331
331
 
332
+ ## Update Public Ip
333
+
334
+ Get a Public IP object from the get method and then update that public IP. You can update the Public IP by passing the modifiable attributes in the form of a hash.
335
+
336
+ ```ruby
337
+ pubip.update(
338
+ public_ip_allocation_method: '<IP Allocation Method>',
339
+ idle_timeout_in_minutes: '<Idle Timeout In Minutes>',
340
+ domain_name_label: '<Domain Name Label>'
341
+ )
342
+ ```
343
+
332
344
  ## Destroy a single Public Ip
333
345
 
334
346
  Get a Public IP object from the get method and then destroy that public IP.
@@ -572,8 +584,8 @@ Get a single record of Load Balancer
572
584
 
573
585
  ```ruby
574
586
  lb = azure_network_service
575
- .load_balancers(resource_group: '<Resource Group name>')
576
- .get('<Load Balancer name>')
587
+ .load_balancers
588
+ .get('<Resource Group name>', '<Load Balancer name>')
577
589
  puts "#{lb.name}"
578
590
  ```
579
591
 
@@ -666,6 +678,55 @@ Get a virtual network gateway object from the get method and then destroy that v
666
678
  network_gateway.destroy
667
679
  ```
668
680
 
681
+ ## Create Local Network Gateway
682
+
683
+ Create a new Local Network Gateway.
684
+
685
+ ```ruby
686
+ local_network_gateway = network.local_network_gateways.create(
687
+ name: "<Local Network Gateway Name>",
688
+ location: "eastus",
689
+ tags: {
690
+ key1: "value1",
691
+ key2: "value2"
692
+ },
693
+ resource_group: "<Resource Group Name>",
694
+ gateway_ip_address: '192.168.1.1',
695
+ local_network_address_space_prefixes: [],
696
+ asn: 100,
697
+ bgp_peering_address: '192.168.1.2',
698
+ peer_weight: 3
699
+ )
700
+ ```
701
+
702
+ ## List Local Network Gateways
703
+
704
+ List all local network gateways in a resource group
705
+
706
+ ```ruby
707
+ local_network_gateways = network.local_network_gateways(resource_group: '<Resource Group Name>')
708
+ local_network_gateways.each do |gateway|
709
+ puts "#{gateway.name}"
710
+ end
711
+ ```
712
+
713
+ ## Retrieve single Local Network Gateway
714
+
715
+ Get single record of Local Network Gateway
716
+
717
+ ```ruby
718
+ local_network_gateway = network.local_network_gateways.get('<Resource Group Name>', '<Local Network Gateway Name>')
719
+ puts "#{local_network_gateway.name}"
720
+ ```
721
+
722
+ ## Destroy single Local Network Gateway
723
+
724
+ Get a local network gateway object from the get method and then destroy that local network gateway.
725
+
726
+ ```ruby
727
+ local_network_gateway.destroy
728
+ ```
729
+
669
730
  ## Express Route
670
731
 
671
732
  Microsoft Azure ExpressRoute lets you extend your on-premises networks into the Microsoft cloud over a dedicated private connection facilitated by a connectivity provider.
@@ -734,6 +795,52 @@ Get an express route circuit object from the get method and then destroy that ex
734
795
  ```ruby
735
796
  circuit.destroy
736
797
  ```
798
+ # Express Route Authorization
799
+
800
+ Authorization is part of Express Route circuit.
801
+
802
+ ## Create an Express Route Circuit Authorization
803
+
804
+ Create a new Express Route Circuit Authorization. Parameter 'authorization_status' can be 'Available' or 'InUse'.
805
+
806
+ ```ruby
807
+ authorization = network.express_route_circuit_authorizations.create(
808
+ "resource_group": "<Resourse Group Name>",
809
+ "name": "<Resource-Unique-Name>",
810
+ "circuit_name": "<Circuit Name>",
811
+ "authorization_status": "Available",
812
+ "authorization_name": "<Authorization-Name>",
813
+ )
814
+ ```
815
+
816
+ ## List Express Route Circuit Authorizations
817
+
818
+ List all express route circuit authorizations in a resource group.
819
+
820
+ ```ruby
821
+ authorizations = network.express_route_circuit_authorizations(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
822
+ authorizations.each do |authorization|
823
+ puts "#{authorization.name}"
824
+ end
825
+ ```
826
+
827
+ ## Retrieve single Express Route Circuit Authorization
828
+
829
+ Get a single record of Express Route Circuit Authorization.
830
+
831
+ ```ruby
832
+ authorization = network.express_route_circuit_authorizations.get("<Resource Group Name>", "Circuit Name", "Authorization Name")
833
+ puts "#{authorization.name}"
834
+ ```
835
+
836
+ ## Destroy single Express Route Circuit Authorization
837
+
838
+ Get an express route circuit authorization object from the get method and then destroy that express route circuit authorization.
839
+
840
+ ```ruby
841
+ authorization.destroy
842
+ ```
843
+
737
844
 
738
845
  # Express Route Peering
739
846
 
@@ -797,6 +904,78 @@ List all express route service providers
797
904
  puts service_providers
798
905
  ```
799
906
 
907
+ ## Create Virtual Network Gateway Connection
908
+
909
+ Create a new Virtual Network Gateway Connection.
910
+
911
+ ```ruby
912
+ gateway_connection = network.virtual_network_gateway_connections.create(
913
+ name: '<Virtual Network Gateway Connection Name>',
914
+ location: 'eastus',
915
+ tags: {
916
+ key1: 'value1',
917
+ key2: 'value2'
918
+ },
919
+ resource_group: '<Resource Group Name>',
920
+ virtual_network_gateway1: {
921
+ name: 'firstgateway',
922
+ resource_group: '<Resource Group Name>'
923
+ },
924
+ virtual_network_gateway2: {
925
+ name: 'secondgateway',
926
+ resource_group: '<Resource Group Name>'
927
+ }
928
+ connection_type: 'VNet-to-VNet'
929
+ )
930
+ ```
931
+
932
+ ## List Virtual Network Gateway Connections
933
+
934
+ List all virtual network gateway connections in a resource group
935
+
936
+ ```ruby
937
+ gateway_connections = network.virtual_network_gateway_connections(resource_group: '<Resource Group Name>')
938
+ gateway_connections.each do |connection|
939
+ puts "#{connection.name}"
940
+ end
941
+ ```
942
+
943
+ ## Retrieve single Virtual Network Gateway Connection
944
+
945
+ Get single record of Virtual Network Gateway Connection
946
+
947
+ ```ruby
948
+ gateway_connection = network.virtual_network_gateway_connections.get('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
949
+ puts "#{gateway_connection.name}"
950
+ ```
951
+
952
+ ## Destroy single Virtual Network Gateway Connection
953
+
954
+ Get a virtual network gateway connection object from the get method and then destroy that virtual network gateway connection.
955
+
956
+ ```ruby
957
+ gateway_connection.destroy
958
+ ```
959
+
960
+ ## Get the shared key for a connection
961
+
962
+ ```ruby
963
+ shared_key = network.get_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
964
+ puts gateway_connection
965
+ ```
966
+
967
+ ## Set the shared key for a connection
968
+
969
+ ```ruby
970
+ network.set_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', 'Value')
971
+ ```
972
+
973
+ ## Reset the shared key for a connection
974
+
975
+ ```ruby
976
+ network.reset_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', <Key Length in Integer>)
977
+ ```
978
+
800
979
 
801
980
  ## Support and Feedback
802
981
  Your feedback is highly appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
@@ -138,8 +138,8 @@ Get a single record of Deployment
138
138
 
139
139
  ```ruby
140
140
  deployment = azure_resources_service
141
- .deployments(resource_group: '<Resource Group name>')
142
- .get('<Deployment name>')
141
+ .deployments
142
+ .get('<Resource Group name>', '<Deployment name>')
143
143
  puts "#{deployment.name}"
144
144
  ```
145
145
 
@@ -105,8 +105,8 @@ Get a single record of Storage Account
105
105
 
106
106
  ```ruby
107
107
  storage_acc = azure_storage_service
108
- .storage_accounts(resource_group: '<Resource Group name>')
109
- .get('<Storage Account name>')
108
+ .storage_accounts
109
+ .get('<Resource Group name>', '<Storage Account name>')
110
110
  puts "#{storage_acc.name}"
111
111
  ```
112
112
 
@@ -61,6 +61,20 @@ Get a single record of Traffic Manager Profile
61
61
  puts "#{profile.name}"
62
62
  ```
63
63
 
64
+ ## Update a Traffic Manager Profile
65
+
66
+ Get a Traffic Manager Profile object from the get method and then update that Traffic Manager Profile. You can update the Traffic Manager Profile by passing the modifiable attributes in the form of a hash.
67
+
68
+ ```ruby
69
+ profile.update(
70
+ traffic_routing_method: 'Weighted',
71
+ ttl: '35',
72
+ protocol: 'https',
73
+ port: '90',
74
+ path: '/monitorpage1.aspx'
75
+ )
76
+ ```
77
+
64
78
  ## Destroy a single Traffic Manager Profile
65
79
 
66
80
  Get a Traffic Manager Profile object from the get method and then destroy that Traffic Manager Profile.
@@ -105,6 +119,15 @@ Get a single Traffic Manager Endpoint.
105
119
  .get('<Resource Group name>', '<Profile Name>', '<Endpoint name>', '<Endpoint type>')
106
120
  puts "#{endpoint.name}"
107
121
  ```
122
+ ## Update a Traffic Manager Endpoint
123
+
124
+ Get a Traffic Manager Endpoint object from the get method and then update that Traffic Manager Endpoint. You can update the Traffic Manager Endpoint by passing the modifiable attributes in the form of a hash.
125
+
126
+ ```ruby
127
+ endpoint.update(type: 'externalEndpoints',
128
+ target: 'test1.com',
129
+ endpoint_location: 'Central US')
130
+ ```
108
131
 
109
132
  ## Destroy a single Traffic Manager Endpoint
110
133