fog-azure-rm-temp 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (793) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +17 -0
  3. data/.gitignore +6 -0
  4. data/.hound.yml +2 -0
  5. data/.rubocop.yml +38 -0
  6. data/.travis.yml +33 -0
  7. data/CHANGELOG.md +271 -0
  8. data/CONTRIBUTING.md +40 -0
  9. data/CONTRIBUTORS.md +8 -0
  10. data/Gemfile +3 -0
  11. data/LICENSE.md +20 -0
  12. data/README.md +96 -0
  13. data/fog-azure-rm.gemspec +37 -0
  14. data/lib/fog/azurerm.rb +89 -0
  15. data/lib/fog/azurerm/application_gateway.rb +75 -0
  16. data/lib/fog/azurerm/async_response.rb +36 -0
  17. data/lib/fog/azurerm/compute.rb +98 -0
  18. data/lib/fog/azurerm/config.rb +1 -0
  19. data/lib/fog/azurerm/constants.rb +61 -0
  20. data/lib/fog/azurerm/credentials.rb +40 -0
  21. data/lib/fog/azurerm/dns.rb +68 -0
  22. data/lib/fog/azurerm/docs/application_gateway.md +243 -0
  23. data/lib/fog/azurerm/docs/compute.md +400 -0
  24. data/lib/fog/azurerm/docs/dns.md +148 -0
  25. data/lib/fog/azurerm/docs/key_vault.md +88 -0
  26. data/lib/fog/azurerm/docs/network.md +1129 -0
  27. data/lib/fog/azurerm/docs/resources.md +175 -0
  28. data/lib/fog/azurerm/docs/sql.md +168 -0
  29. data/lib/fog/azurerm/docs/storage.md +463 -0
  30. data/lib/fog/azurerm/docs/structure.md +53 -0
  31. data/lib/fog/azurerm/docs/traffic_manager.md +159 -0
  32. data/lib/fog/azurerm/key_vault.rb +51 -0
  33. data/lib/fog/azurerm/models/application_gateway/backend_address_pool.rb +24 -0
  34. data/lib/fog/azurerm/models/application_gateway/backend_http_setting.rb +28 -0
  35. data/lib/fog/azurerm/models/application_gateway/frontend_ip_configuration.rb +26 -0
  36. data/lib/fog/azurerm/models/application_gateway/frontend_port.rb +20 -0
  37. data/lib/fog/azurerm/models/application_gateway/gateway.rb +613 -0
  38. data/lib/fog/azurerm/models/application_gateway/gateways.rb +30 -0
  39. data/lib/fog/azurerm/models/application_gateway/http_listener.rb +30 -0
  40. data/lib/fog/azurerm/models/application_gateway/ip_configuration.rb +26 -0
  41. data/lib/fog/azurerm/models/application_gateway/probe.rb +30 -0
  42. data/lib/fog/azurerm/models/application_gateway/request_routing_rule.rb +27 -0
  43. data/lib/fog/azurerm/models/application_gateway/ssl_certificate.rb +24 -0
  44. data/lib/fog/azurerm/models/application_gateway/url_path_map.rb +30 -0
  45. data/lib/fog/azurerm/models/compute/availability_set.rb +43 -0
  46. data/lib/fog/azurerm/models/compute/availability_sets.rb +35 -0
  47. data/lib/fog/azurerm/models/compute/caching_types.rb +13 -0
  48. data/lib/fog/azurerm/models/compute/creation_data.rb +21 -0
  49. data/lib/fog/azurerm/models/compute/disk_create_option.rb +16 -0
  50. data/lib/fog/azurerm/models/compute/disk_create_option_types.rb +13 -0
  51. data/lib/fog/azurerm/models/compute/encryption_settings.rb +29 -0
  52. data/lib/fog/azurerm/models/compute/image_disk_reference.rb +15 -0
  53. data/lib/fog/azurerm/models/compute/managed_disk.rb +77 -0
  54. data/lib/fog/azurerm/models/compute/managed_disks.rb +43 -0
  55. data/lib/fog/azurerm/models/compute/operation_status_response.rb +18 -0
  56. data/lib/fog/azurerm/models/compute/server.rb +199 -0
  57. data/lib/fog/azurerm/models/compute/servers.rb +47 -0
  58. data/lib/fog/azurerm/models/compute/virtual_machine_extension.rb +76 -0
  59. data/lib/fog/azurerm/models/compute/virtual_machine_extensions.rb +31 -0
  60. data/lib/fog/azurerm/models/dns/record_set.rb +91 -0
  61. data/lib/fog/azurerm/models/dns/record_sets.rb +34 -0
  62. data/lib/fog/azurerm/models/dns/zone.rb +58 -0
  63. data/lib/fog/azurerm/models/dns/zones.rb +29 -0
  64. data/lib/fog/azurerm/models/key_vault/access_policy_entry.rb +31 -0
  65. data/lib/fog/azurerm/models/key_vault/vault.rb +76 -0
  66. data/lib/fog/azurerm/models/key_vault/vaults.rb +27 -0
  67. data/lib/fog/azurerm/models/network/express_route_circuit.rb +86 -0
  68. data/lib/fog/azurerm/models/network/express_route_circuit_authorization.rb +50 -0
  69. data/lib/fog/azurerm/models/network/express_route_circuit_authorizations.rb +28 -0
  70. data/lib/fog/azurerm/models/network/express_route_circuit_peering.rb +91 -0
  71. data/lib/fog/azurerm/models/network/express_route_circuit_peerings.rb +27 -0
  72. data/lib/fog/azurerm/models/network/express_route_circuits.rb +30 -0
  73. data/lib/fog/azurerm/models/network/express_route_service_provider.rb +29 -0
  74. data/lib/fog/azurerm/models/network/express_route_service_providers.rb +18 -0
  75. data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +27 -0
  76. data/lib/fog/azurerm/models/network/inbound_nat_pool.rb +26 -0
  77. data/lib/fog/azurerm/models/network/inbound_nat_rule.rb +26 -0
  78. data/lib/fog/azurerm/models/network/ipallocation_method.rb +12 -0
  79. data/lib/fog/azurerm/models/network/load_balancer.rb +247 -0
  80. data/lib/fog/azurerm/models/network/load_balancers.rb +36 -0
  81. data/lib/fog/azurerm/models/network/load_balancing_rule.rb +37 -0
  82. data/lib/fog/azurerm/models/network/local_network_gateway.rb +60 -0
  83. data/lib/fog/azurerm/models/network/local_network_gateways.rb +27 -0
  84. data/lib/fog/azurerm/models/network/network_interface.rb +121 -0
  85. data/lib/fog/azurerm/models/network/network_interfaces.rb +30 -0
  86. data/lib/fog/azurerm/models/network/network_security_group.rb +112 -0
  87. data/lib/fog/azurerm/models/network/network_security_groups.rb +30 -0
  88. data/lib/fog/azurerm/models/network/network_security_rule.rb +66 -0
  89. data/lib/fog/azurerm/models/network/network_security_rules.rb +31 -0
  90. data/lib/fog/azurerm/models/network/path_rule.rb +30 -0
  91. data/lib/fog/azurerm/models/network/probe.rb +28 -0
  92. data/lib/fog/azurerm/models/network/public_ip.rb +68 -0
  93. data/lib/fog/azurerm/models/network/public_ips.rb +30 -0
  94. data/lib/fog/azurerm/models/network/security_rule_access.rb +12 -0
  95. data/lib/fog/azurerm/models/network/security_rule_direction.rb +12 -0
  96. data/lib/fog/azurerm/models/network/security_rule_protocol.rb +13 -0
  97. data/lib/fog/azurerm/models/network/subnet.rb +66 -0
  98. data/lib/fog/azurerm/models/network/subnets.rb +31 -0
  99. data/lib/fog/azurerm/models/network/virtual_network.rb +107 -0
  100. data/lib/fog/azurerm/models/network/virtual_network_gateway.rb +137 -0
  101. data/lib/fog/azurerm/models/network/virtual_network_gateway_connection.rb +76 -0
  102. data/lib/fog/azurerm/models/network/virtual_network_gateway_connections.rb +27 -0
  103. data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +30 -0
  104. data/lib/fog/azurerm/models/network/virtual_networks.rb +36 -0
  105. data/lib/fog/azurerm/models/network/vpn_client_configuration.rb +34 -0
  106. data/lib/fog/azurerm/models/network/vpn_client_revoked_certificates.rb +22 -0
  107. data/lib/fog/azurerm/models/network/vpn_client_root_certificates.rb +22 -0
  108. data/lib/fog/azurerm/models/resources/azure_resource.rb +25 -0
  109. data/lib/fog/azurerm/models/resources/azure_resources.rb +32 -0
  110. data/lib/fog/azurerm/models/resources/dependency.rb +27 -0
  111. data/lib/fog/azurerm/models/resources/deployment.rb +65 -0
  112. data/lib/fog/azurerm/models/resources/deployments.rb +30 -0
  113. data/lib/fog/azurerm/models/resources/provider.rb +27 -0
  114. data/lib/fog/azurerm/models/resources/provider_resource_type.rb +22 -0
  115. data/lib/fog/azurerm/models/resources/resource_group.rb +32 -0
  116. data/lib/fog/azurerm/models/resources/resource_groups.rb +29 -0
  117. data/lib/fog/azurerm/models/sql/firewall_rule.rb +48 -0
  118. data/lib/fog/azurerm/models/sql/firewall_rules.rb +32 -0
  119. data/lib/fog/azurerm/models/sql/sql_database.rb +67 -0
  120. data/lib/fog/azurerm/models/sql/sql_databases.rb +32 -0
  121. data/lib/fog/azurerm/models/sql/sql_server.rb +49 -0
  122. data/lib/fog/azurerm/models/sql/sql_servers.rb +31 -0
  123. data/lib/fog/azurerm/models/storage/data_disk.rb +27 -0
  124. data/lib/fog/azurerm/models/storage/directories.rb +70 -0
  125. data/lib/fog/azurerm/models/storage/directory.rb +151 -0
  126. data/lib/fog/azurerm/models/storage/file.rb +263 -0
  127. data/lib/fog/azurerm/models/storage/files.rb +183 -0
  128. data/lib/fog/azurerm/models/storage/kind.rb +12 -0
  129. data/lib/fog/azurerm/models/storage/recovery_vault.rb +50 -0
  130. data/lib/fog/azurerm/models/storage/recovery_vaults.rb +27 -0
  131. data/lib/fog/azurerm/models/storage/sku_name.rb +15 -0
  132. data/lib/fog/azurerm/models/storage/sku_tier.rb +12 -0
  133. data/lib/fog/azurerm/models/storage/storage_account.rb +89 -0
  134. data/lib/fog/azurerm/models/storage/storage_accounts.rb +40 -0
  135. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +82 -0
  136. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb +30 -0
  137. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +88 -0
  138. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb +27 -0
  139. data/lib/fog/azurerm/network.rb +178 -0
  140. data/lib/fog/azurerm/requests/application_gateway/check_ag_exists.rb +31 -0
  141. data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +301 -0
  142. data/lib/fog/azurerm/requests/application_gateway/delete_application_gateway.rb +26 -0
  143. data/lib/fog/azurerm/requests/application_gateway/get_application_gateway.rb +159 -0
  144. data/lib/fog/azurerm/requests/application_gateway/list_application_gateways.rb +29 -0
  145. data/lib/fog/azurerm/requests/application_gateway/start_application_gateway.rb +27 -0
  146. data/lib/fog/azurerm/requests/application_gateway/stop_application_gateway.rb +27 -0
  147. data/lib/fog/azurerm/requests/application_gateway/update_sku_attributes.rb +28 -0
  148. data/lib/fog/azurerm/requests/application_gateway/update_subnet_id_in_gateway_ip_configuration.rb +29 -0
  149. data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +172 -0
  150. data/lib/fog/azurerm/requests/compute/check_availability_set_exists.rb +31 -0
  151. data/lib/fog/azurerm/requests/compute/check_managed_disk_exists.rb +33 -0
  152. data/lib/fog/azurerm/requests/compute/check_vm_exists.rb +39 -0
  153. data/lib/fog/azurerm/requests/compute/check_vm_extension_exists.rb +31 -0
  154. data/lib/fog/azurerm/requests/compute/check_vm_status.rb +38 -0
  155. data/lib/fog/azurerm/requests/compute/create_availability_set.rb +48 -0
  156. data/lib/fog/azurerm/requests/compute/create_or_update_managed_disk.rb +121 -0
  157. data/lib/fog/azurerm/requests/compute/create_or_update_vm_extension.rb +63 -0
  158. data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +264 -0
  159. data/lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb +35 -0
  160. data/lib/fog/azurerm/requests/compute/delete_availability_set.rb +27 -0
  161. data/lib/fog/azurerm/requests/compute/delete_managed_disk.rb +29 -0
  162. data/lib/fog/azurerm/requests/compute/delete_virtual_machine.rb +35 -0
  163. data/lib/fog/azurerm/requests/compute/delete_vm_extension.rb +28 -0
  164. data/lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb +103 -0
  165. data/lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb +35 -0
  166. data/lib/fog/azurerm/requests/compute/get_availability_set.rb +32 -0
  167. data/lib/fog/azurerm/requests/compute/get_managed_disk.rb +64 -0
  168. data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +86 -0
  169. data/lib/fog/azurerm/requests/compute/get_vm_extension.rb +46 -0
  170. data/lib/fog/azurerm/requests/compute/grant_access_to_managed_disk.rb +30 -0
  171. data/lib/fog/azurerm/requests/compute/list_availability_sets.rb +40 -0
  172. data/lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb +64 -0
  173. data/lib/fog/azurerm/requests/compute/list_managed_disks_by_rg.rb +66 -0
  174. data/lib/fog/azurerm/requests/compute/list_managed_disks_in_subscription.rb +66 -0
  175. data/lib/fog/azurerm/requests/compute/list_virtual_machines.rb +69 -0
  176. data/lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb +35 -0
  177. data/lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb +35 -0
  178. data/lib/fog/azurerm/requests/compute/restart_virtual_machine.rb +35 -0
  179. data/lib/fog/azurerm/requests/compute/revoke_access_to_managed_disk.rb +33 -0
  180. data/lib/fog/azurerm/requests/compute/start_virtual_machine.rb +35 -0
  181. data/lib/fog/azurerm/requests/dns/check_record_set_exists.rb +31 -0
  182. data/lib/fog/azurerm/requests/dns/check_zone_exists.rb +33 -0
  183. data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +71 -0
  184. data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +57 -0
  185. data/lib/fog/azurerm/requests/dns/delete_record_set.rb +28 -0
  186. data/lib/fog/azurerm/requests/dns/delete_zone.rb +28 -0
  187. data/lib/fog/azurerm/requests/dns/get_record_set.rb +47 -0
  188. data/lib/fog/azurerm/requests/dns/get_records_from_record_set.rb +32 -0
  189. data/lib/fog/azurerm/requests/dns/get_zone.rb +41 -0
  190. data/lib/fog/azurerm/requests/dns/list_record_sets.rb +63 -0
  191. data/lib/fog/azurerm/requests/dns/list_zones.rb +72 -0
  192. data/lib/fog/azurerm/requests/key_vault/check_vault_exists.rb +31 -0
  193. data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +105 -0
  194. data/lib/fog/azurerm/requests/key_vault/delete_vault.rb +28 -0
  195. data/lib/fog/azurerm/requests/key_vault/get_vault.rb +54 -0
  196. data/lib/fog/azurerm/requests/key_vault/list_vaults.rb +56 -0
  197. data/lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb +68 -0
  198. data/lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb +76 -0
  199. data/lib/fog/azurerm/requests/network/add_security_rules.rb +154 -0
  200. data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +71 -0
  201. data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +57 -0
  202. data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +89 -0
  203. data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +57 -0
  204. data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +31 -0
  205. data/lib/fog/azurerm/requests/network/check_express_route_circuit_exists.rb +31 -0
  206. data/lib/fog/azurerm/requests/network/check_load_balancer_exists.rb +31 -0
  207. data/lib/fog/azurerm/requests/network/check_local_net_gateway_exists.rb +31 -0
  208. data/lib/fog/azurerm/requests/network/check_net_sec_group_exists.rb +31 -0
  209. data/lib/fog/azurerm/requests/network/check_net_sec_rule_exists.rb +31 -0
  210. data/lib/fog/azurerm/requests/network/check_network_interface_exists.rb +31 -0
  211. data/lib/fog/azurerm/requests/network/check_public_ip_exists.rb +33 -0
  212. data/lib/fog/azurerm/requests/network/check_subnet_exists.rb +32 -0
  213. data/lib/fog/azurerm/requests/network/check_virtual_network_exists.rb +33 -0
  214. data/lib/fog/azurerm/requests/network/check_vnet_gateway_connection_exists.rb +32 -0
  215. data/lib/fog/azurerm/requests/network/check_vnet_gateway_exists.rb +32 -0
  216. data/lib/fog/azurerm/requests/network/create_load_balancer.rb +189 -0
  217. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +111 -0
  218. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_authorization.rb +51 -0
  219. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_peering.rb +79 -0
  220. data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +80 -0
  221. data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +120 -0
  222. data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +177 -0
  223. data/lib/fog/azurerm/requests/network/create_or_update_network_security_rule.rb +59 -0
  224. data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +59 -0
  225. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +110 -0
  226. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway.rb +159 -0
  227. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +83 -0
  228. data/lib/fog/azurerm/requests/network/create_subnet.rb +54 -0
  229. data/lib/fog/azurerm/requests/network/delete_express_route_circuit.rb +28 -0
  230. data/lib/fog/azurerm/requests/network/delete_express_route_circuit_authorization.rb +29 -0
  231. data/lib/fog/azurerm/requests/network/delete_express_route_circuit_peering.rb +28 -0
  232. data/lib/fog/azurerm/requests/network/delete_load_balancer.rb +28 -0
  233. data/lib/fog/azurerm/requests/network/delete_local_network_gateway.rb +29 -0
  234. data/lib/fog/azurerm/requests/network/delete_network_interface.rb +28 -0
  235. data/lib/fog/azurerm/requests/network/delete_network_security_group.rb +30 -0
  236. data/lib/fog/azurerm/requests/network/delete_network_security_rule.rb +30 -0
  237. data/lib/fog/azurerm/requests/network/delete_public_ip.rb +27 -0
  238. data/lib/fog/azurerm/requests/network/delete_subnet.rb +28 -0
  239. data/lib/fog/azurerm/requests/network/delete_virtual_network.rb +28 -0
  240. data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway.rb +28 -0
  241. data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway_connection.rb +29 -0
  242. data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +51 -0
  243. data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +81 -0
  244. data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +51 -0
  245. data/lib/fog/azurerm/requests/network/get_available_ipaddresses_count.rb +23 -0
  246. data/lib/fog/azurerm/requests/network/get_connection_shared_key.rb +25 -0
  247. data/lib/fog/azurerm/requests/network/get_express_route_circuit.rb +51 -0
  248. data/lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb +35 -0
  249. data/lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb +48 -0
  250. data/lib/fog/azurerm/requests/network/get_load_balancer.rb +170 -0
  251. data/lib/fog/azurerm/requests/network/get_local_network_gateway.rb +47 -0
  252. data/lib/fog/azurerm/requests/network/get_network_interface.rb +60 -0
  253. data/lib/fog/azurerm/requests/network/get_network_security_group.rb +165 -0
  254. data/lib/fog/azurerm/requests/network/get_network_security_rule.rb +47 -0
  255. data/lib/fog/azurerm/requests/network/get_public_ip.rb +41 -0
  256. data/lib/fog/azurerm/requests/network/get_subnet.rb +37 -0
  257. data/lib/fog/azurerm/requests/network/get_virtual_network.rb +62 -0
  258. data/lib/fog/azurerm/requests/network/get_virtual_network_gateway.rb +45 -0
  259. data/lib/fog/azurerm/requests/network/get_virtual_network_gateway_connection.rb +47 -0
  260. data/lib/fog/azurerm/requests/network/list_express_route_circuit_authorizations.rb +37 -0
  261. data/lib/fog/azurerm/requests/network/list_express_route_circuit_peerings.rb +44 -0
  262. data/lib/fog/azurerm/requests/network/list_express_route_circuits.rb +53 -0
  263. data/lib/fog/azurerm/requests/network/list_express_route_service_providers.rb +37 -0
  264. data/lib/fog/azurerm/requests/network/list_load_balancers.rb +31 -0
  265. data/lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb +31 -0
  266. data/lib/fog/azurerm/requests/network/list_local_network_gateways.rb +50 -0
  267. data/lib/fog/azurerm/requests/network/list_network_interfaces.rb +67 -0
  268. data/lib/fog/azurerm/requests/network/list_network_security_groups.rb +169 -0
  269. data/lib/fog/azurerm/requests/network/list_network_security_rules.rb +51 -0
  270. data/lib/fog/azurerm/requests/network/list_public_ips.rb +46 -0
  271. data/lib/fog/azurerm/requests/network/list_subnets.rb +55 -0
  272. data/lib/fog/azurerm/requests/network/list_virtual_network_gateway_connections.rb +50 -0
  273. data/lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb +43 -0
  274. data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +74 -0
  275. data/lib/fog/azurerm/requests/network/list_virtual_networks_in_subscription.rb +74 -0
  276. data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +69 -0
  277. data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +69 -0
  278. data/lib/fog/azurerm/requests/network/remove_security_rule.rb +157 -0
  279. data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +59 -0
  280. data/lib/fog/azurerm/requests/network/reset_connection_shared_key.rb +36 -0
  281. data/lib/fog/azurerm/requests/network/set_connection_shared_key.rb +36 -0
  282. data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +40 -0
  283. data/lib/fog/azurerm/requests/resources/check_deployment_exists.rb +30 -0
  284. data/lib/fog/azurerm/requests/resources/check_resource_group_exists.rb +30 -0
  285. data/lib/fog/azurerm/requests/resources/create_deployment.rb +97 -0
  286. data/lib/fog/azurerm/requests/resources/create_resource_group.rb +39 -0
  287. data/lib/fog/azurerm/requests/resources/delete_deployment.rb +28 -0
  288. data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +28 -0
  289. data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +44 -0
  290. data/lib/fog/azurerm/requests/resources/get_deployment.rb +81 -0
  291. data/lib/fog/azurerm/requests/resources/get_resource_group.rb +47 -0
  292. data/lib/fog/azurerm/requests/resources/list_deployments.rb +77 -0
  293. data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +51 -0
  294. data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +50 -0
  295. data/lib/fog/azurerm/requests/resources/tag_resource.rb +43 -0
  296. data/lib/fog/azurerm/requests/sql/check_database_exists.rb +21 -0
  297. data/lib/fog/azurerm/requests/sql/check_firewall_rule_exists.rb +21 -0
  298. data/lib/fog/azurerm/requests/sql/check_sql_server_exists.rb +21 -0
  299. data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +68 -0
  300. data/lib/fog/azurerm/requests/sql/create_or_update_firewall_rule.rb +42 -0
  301. data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +50 -0
  302. data/lib/fog/azurerm/requests/sql/delete_database.rb +28 -0
  303. data/lib/fog/azurerm/requests/sql/delete_firewall_rule.rb +29 -0
  304. data/lib/fog/azurerm/requests/sql/delete_sql_server.rb +29 -0
  305. data/lib/fog/azurerm/requests/sql/get_database.rb +42 -0
  306. data/lib/fog/azurerm/requests/sql/get_firewall_rule.rb +37 -0
  307. data/lib/fog/azurerm/requests/sql/get_sql_server.rb +34 -0
  308. data/lib/fog/azurerm/requests/sql/list_databases.rb +58 -0
  309. data/lib/fog/azurerm/requests/sql/list_firewall_rules.rb +49 -0
  310. data/lib/fog/azurerm/requests/sql/list_sql_servers.rb +44 -0
  311. data/lib/fog/azurerm/requests/storage/acquire_blob_lease.rb +32 -0
  312. data/lib/fog/azurerm/requests/storage/acquire_container_lease.rb +32 -0
  313. data/lib/fog/azurerm/requests/storage/check_container_exists.rb +30 -0
  314. data/lib/fog/azurerm/requests/storage/check_storage_account_exists.rb +37 -0
  315. data/lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb +44 -0
  316. data/lib/fog/azurerm/requests/storage/commit_blob_blocks.rb +30 -0
  317. data/lib/fog/azurerm/requests/storage/compare_container_blobs.rb +148 -0
  318. data/lib/fog/azurerm/requests/storage/copy_blob.rb +30 -0
  319. data/lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb +30 -0
  320. data/lib/fog/azurerm/requests/storage/create_block_blob.rb +108 -0
  321. data/lib/fog/azurerm/requests/storage/create_container.rb +40 -0
  322. data/lib/fog/azurerm/requests/storage/create_disk.rb +62 -0
  323. data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +54 -0
  324. data/lib/fog/azurerm/requests/storage/create_page_blob.rb +31 -0
  325. data/lib/fog/azurerm/requests/storage/create_storage_account.rb +64 -0
  326. data/lib/fog/azurerm/requests/storage/delete_blob.rb +32 -0
  327. data/lib/fog/azurerm/requests/storage/delete_container.rb +31 -0
  328. data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
  329. data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +35 -0
  330. data/lib/fog/azurerm/requests/storage/delete_storage_account.rb +27 -0
  331. data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +60 -0
  332. data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +61 -0
  333. data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +56 -0
  334. data/lib/fog/azurerm/requests/storage/get_backup_container.rb +53 -0
  335. data/lib/fog/azurerm/requests/storage/get_backup_item.rb +58 -0
  336. data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +53 -0
  337. data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +64 -0
  338. data/lib/fog/azurerm/requests/storage/get_blob.rb +163 -0
  339. data/lib/fog/azurerm/requests/storage/get_blob_http_url.rb +39 -0
  340. data/lib/fog/azurerm/requests/storage/get_blob_https_url.rb +39 -0
  341. data/lib/fog/azurerm/requests/storage/get_blob_properties.rb +55 -0
  342. data/lib/fog/azurerm/requests/storage/get_blob_url.rb +28 -0
  343. data/lib/fog/azurerm/requests/storage/get_container_acl.rb +30 -0
  344. data/lib/fog/azurerm/requests/storage/get_container_properties.rb +41 -0
  345. data/lib/fog/azurerm/requests/storage/get_container_url.rb +34 -0
  346. data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +49 -0
  347. data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +32 -0
  348. data/lib/fog/azurerm/requests/storage/get_storage_account.rb +36 -0
  349. data/lib/fog/azurerm/requests/storage/list_blobs.rb +168 -0
  350. data/lib/fog/azurerm/requests/storage/list_containers.rb +73 -0
  351. data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +48 -0
  352. data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +49 -0
  353. data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +49 -0
  354. data/lib/fog/azurerm/requests/storage/multipart_save_block_blob.rb +110 -0
  355. data/lib/fog/azurerm/requests/storage/put_blob_block.rb +30 -0
  356. data/lib/fog/azurerm/requests/storage/put_blob_metadata.rb +31 -0
  357. data/lib/fog/azurerm/requests/storage/put_blob_pages.rb +30 -0
  358. data/lib/fog/azurerm/requests/storage/put_blob_properties.rb +31 -0
  359. data/lib/fog/azurerm/requests/storage/put_container_acl.rb +31 -0
  360. data/lib/fog/azurerm/requests/storage/put_container_metadata.rb +31 -0
  361. data/lib/fog/azurerm/requests/storage/release_blob_lease.rb +30 -0
  362. data/lib/fog/azurerm/requests/storage/release_container_lease.rb +30 -0
  363. data/lib/fog/azurerm/requests/storage/save_page_blob.rb +111 -0
  364. data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +36 -0
  365. data/lib/fog/azurerm/requests/storage/start_backup.rb +54 -0
  366. data/lib/fog/azurerm/requests/storage/update_storage_account.rb +59 -0
  367. data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +56 -0
  368. data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_endpoint_exists.rb +31 -0
  369. data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_profile_exists.rb +31 -0
  370. data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_endpoint.rb +54 -0
  371. data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +120 -0
  372. data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_endpoint.rb +28 -0
  373. data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_profile.rb +26 -0
  374. data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_endpoint.rb +39 -0
  375. data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_profile.rb +80 -0
  376. data/lib/fog/azurerm/requests/traffic_manager/list_traffic_manager_profiles.rb +82 -0
  377. data/lib/fog/azurerm/resources.rb +71 -0
  378. data/lib/fog/azurerm/sql.rb +66 -0
  379. data/lib/fog/azurerm/storage.rb +155 -0
  380. data/lib/fog/azurerm/traffic_manager.rb +62 -0
  381. data/lib/fog/azurerm/utilities/general.rb +168 -0
  382. data/lib/fog/azurerm/utilities/logger_messages.yml +19 -0
  383. data/lib/fog/azurerm/version.rb +5 -0
  384. data/rake-script.sh +4 -0
  385. data/rakefile +29 -0
  386. data/test/api_stub.rb +128 -0
  387. data/test/api_stub/models/application_gateway/gateway.rb +165 -0
  388. data/test/api_stub/models/compute/availability_set.rb +50 -0
  389. data/test/api_stub/models/compute/managed_disk.rb +59 -0
  390. data/test/api_stub/models/compute/server.rb +190 -0
  391. data/test/api_stub/models/compute/virtual_machine_extension.rb +31 -0
  392. data/test/api_stub/models/dns/record_set.rb +57 -0
  393. data/test/api_stub/models/dns/zone.rb +29 -0
  394. data/test/api_stub/models/key_vault/vault.rb +39 -0
  395. data/test/api_stub/models/network/express_route_circuit.rb +47 -0
  396. data/test/api_stub/models/network/express_route_circuit_authorization.rb +22 -0
  397. data/test/api_stub/models/network/express_route_circuit_peering.rb +33 -0
  398. data/test/api_stub/models/network/express_route_service_provider.rb +29 -0
  399. data/test/api_stub/models/network/load_balancer.rb +154 -0
  400. data/test/api_stub/models/network/local_network_gateway.rb +31 -0
  401. data/test/api_stub/models/network/network_interface.rb +72 -0
  402. data/test/api_stub/models/network/network_security_group.rb +95 -0
  403. data/test/api_stub/models/network/network_security_rule.rb +30 -0
  404. data/test/api_stub/models/network/public_ip.rb +36 -0
  405. data/test/api_stub/models/network/subnet.rb +36 -0
  406. data/test/api_stub/models/network/virtual_network.rb +62 -0
  407. data/test/api_stub/models/network/virtual_network_gateway.rb +26 -0
  408. data/test/api_stub/models/network/virtual_network_gateway_connection.rb +31 -0
  409. data/test/api_stub/models/resources/deployment.rb +116 -0
  410. data/test/api_stub/models/resources/resource.rb +43 -0
  411. data/test/api_stub/models/resources/resource_group.rb +24 -0
  412. data/test/api_stub/models/sql/sql_database.rb +30 -0
  413. data/test/api_stub/models/sql/sql_firewall_rule.rb +24 -0
  414. data/test/api_stub/models/sql/sql_server.rb +24 -0
  415. data/test/api_stub/models/storage/directory.rb +178 -0
  416. data/test/api_stub/models/storage/file.rb +181 -0
  417. data/test/api_stub/models/storage/recovery_vault.rb +23 -0
  418. data/test/api_stub/models/storage/storageaccount.rb +22 -0
  419. data/test/api_stub/models/traffic_manager/traffic_manager_end_point.rb +27 -0
  420. data/test/api_stub/models/traffic_manager/traffic_manager_profile.rb +75 -0
  421. data/test/api_stub/requests/application_gateway/gateway.rb +461 -0
  422. data/test/api_stub/requests/compute/availability_set.rb +57 -0
  423. data/test/api_stub/requests/compute/managed_disk.rb +102 -0
  424. data/test/api_stub/requests/compute/virtual_machine.rb +943 -0
  425. data/test/api_stub/requests/compute/virtual_machine_extension.rb +46 -0
  426. data/test/api_stub/requests/dns/record_set.rb +75 -0
  427. data/test/api_stub/requests/dns/zone.rb +52 -0
  428. data/test/api_stub/requests/key_vault/vault.rb +95 -0
  429. data/test/api_stub/requests/network/express_route_circuit.rb +100 -0
  430. data/test/api_stub/requests/network/express_route_circuit_authorization.rb +31 -0
  431. data/test/api_stub/requests/network/express_route_circuit_peering.rb +62 -0
  432. data/test/api_stub/requests/network/express_route_service_provider.rb +30 -0
  433. data/test/api_stub/requests/network/load_balancer.rb +388 -0
  434. data/test/api_stub/requests/network/local_network_gateway.rb +62 -0
  435. data/test/api_stub/requests/network/network_interface.rb +264 -0
  436. data/test/api_stub/requests/network/network_security_group.rb +225 -0
  437. data/test/api_stub/requests/network/network_security_rule.rb +72 -0
  438. data/test/api_stub/requests/network/public_ip.rb +71 -0
  439. data/test/api_stub/requests/network/subnet.rb +71 -0
  440. data/test/api_stub/requests/network/virtual_network.rb +125 -0
  441. data/test/api_stub/requests/network/virtual_network_gateway.rb +49 -0
  442. data/test/api_stub/requests/network/virtual_network_gateway_connection.rb +68 -0
  443. data/test/api_stub/requests/resources/deployment.rb +68 -0
  444. data/test/api_stub/requests/resources/resource.rb +45 -0
  445. data/test/api_stub/requests/resources/resource_group.rb +51 -0
  446. data/test/api_stub/requests/sql/database.rb +71 -0
  447. data/test/api_stub/requests/sql/firewall_rule.rb +50 -0
  448. data/test/api_stub/requests/sql/sql_server.rb +49 -0
  449. data/test/api_stub/requests/storage/directory.rb +89 -0
  450. data/test/api_stub/requests/storage/file.rb +243 -0
  451. data/test/api_stub/requests/storage/recovery_vault.rb +189 -0
  452. data/test/api_stub/requests/storage/storageaccount.rb +126 -0
  453. data/test/api_stub/requests/traffic_manager/traffic_manager_endpoint.rb +41 -0
  454. data/test/api_stub/requests/traffic_manager/traffic_manager_profile.rb +166 -0
  455. data/test/integration/README.md +14 -0
  456. data/test/integration/Virtual_network_gateway_connection.rb +220 -0
  457. data/test/integration/application_gateway.rb +253 -0
  458. data/test/integration/availability_set.rb +90 -0
  459. data/test/integration/blob.rb +297 -0
  460. data/test/integration/container.rb +160 -0
  461. data/test/integration/credentials/azure.yml +5 -0
  462. data/test/integration/data_disk.rb +90 -0
  463. data/test/integration/deployment.rb +78 -0
  464. data/test/integration/express_route_circuit.rb +139 -0
  465. data/test/integration/external_load_balancer.rb +155 -0
  466. data/test/integration/internal_load_balancer.rb +144 -0
  467. data/test/integration/key_vault.rb +98 -0
  468. data/test/integration/local_network_gateway.rb +91 -0
  469. data/test/integration/managed_disk.rb +113 -0
  470. data/test/integration/network_interface.rb +156 -0
  471. data/test/integration/network_security_group.rb +133 -0
  472. data/test/integration/network_security_rule.rb +102 -0
  473. data/test/integration/public_ip.rb +83 -0
  474. data/test/integration/record_set.rb +126 -0
  475. data/test/integration/resource_group.rb +59 -0
  476. data/test/integration/resource_tag.rb +91 -0
  477. data/test/integration/server.rb +266 -0
  478. data/test/integration/server_custom_image.rb +127 -0
  479. data/test/integration/sql_server.rb +175 -0
  480. data/test/integration/storage_account.rb +123 -0
  481. data/test/integration/subnet.rb +122 -0
  482. data/test/integration/traffic_manager.rb +137 -0
  483. data/test/integration/virtual_machine_extension.rb +165 -0
  484. data/test/integration/virtual_network.rb +162 -0
  485. data/test/integration/virtual_network_gateway.rb +125 -0
  486. data/test/integration/virtual_network_gateway_connection_to_express_route.rb +123 -0
  487. data/test/integration/zone.rb +81 -0
  488. data/test/models/application_gateway/test_gateway.rb +135 -0
  489. data/test/models/application_gateway/test_gateways.rb +55 -0
  490. data/test/models/compute/test_availability_set.rb +54 -0
  491. data/test/models/compute/test_availability_sets.rb +55 -0
  492. data/test/models/compute/test_managed_disk.rb +61 -0
  493. data/test/models/compute/test_managed_disks.rb +68 -0
  494. data/test/models/compute/test_server.rb +201 -0
  495. data/test/models/compute/test_servers.rb +56 -0
  496. data/test/models/compute/test_virtual_machine_extension.rb +61 -0
  497. data/test/models/compute/test_virtual_machine_extensions.rb +49 -0
  498. data/test/models/dns/test_record_set.rb +86 -0
  499. data/test/models/dns/test_record_sets.rb +66 -0
  500. data/test/models/dns/test_zone.rb +50 -0
  501. data/test/models/dns/test_zones.rb +51 -0
  502. data/test/models/key_vault/test_vault.rb +39 -0
  503. data/test/models/key_vault/test_vaults.rb +55 -0
  504. data/test/models/network/test_express_route_circuit.rb +52 -0
  505. data/test/models/network/test_express_route_circuit_authorization.rb +50 -0
  506. data/test/models/network/test_express_route_circuit_authorizations.rb +56 -0
  507. data/test/models/network/test_express_route_circuit_peering.rb +53 -0
  508. data/test/models/network/test_express_route_circuit_peerings.rb +43 -0
  509. data/test/models/network/test_express_route_circuits.rb +55 -0
  510. data/test/models/network/test_express_route_service_providers.rb +30 -0
  511. data/test/models/network/test_load_balancer.rb +51 -0
  512. data/test/models/network/test_load_balancers.rb +55 -0
  513. data/test/models/network/test_local_network_gateway.rb +53 -0
  514. data/test/models/network/test_local_network_gateways.rb +55 -0
  515. data/test/models/network/test_network_interface.rb +96 -0
  516. data/test/models/network/test_network_interfaces.rb +55 -0
  517. data/test/models/network/test_network_security_group.rb +86 -0
  518. data/test/models/network/test_network_security_groups.rb +54 -0
  519. data/test/models/network/test_network_security_rule.rb +44 -0
  520. data/test/models/network/test_network_security_rules.rb +55 -0
  521. data/test/models/network/test_public_ip.rb +61 -0
  522. data/test/models/network/test_public_ips.rb +55 -0
  523. data/test/models/network/test_subnet.rb +83 -0
  524. data/test/models/network/test_subnets.rb +56 -0
  525. data/test/models/network/test_virtual_network.rb +106 -0
  526. data/test/models/network/test_virtual_network_gateway.rb +62 -0
  527. data/test/models/network/test_virtual_network_gateway_connection.rb +59 -0
  528. data/test/models/network/test_virtual_network_gateway_connections.rb +55 -0
  529. data/test/models/network/test_virtual_network_gateways.rb +55 -0
  530. data/test/models/network/test_virtual_networks.rb +67 -0
  531. data/test/models/resources/test_deployment.rb +55 -0
  532. data/test/models/resources/test_deployments.rb +51 -0
  533. data/test/models/resources/test_resource.rb +22 -0
  534. data/test/models/resources/test_resource_group.rb +44 -0
  535. data/test/models/resources/test_resource_groups.rb +51 -0
  536. data/test/models/resources/test_resources.rb +52 -0
  537. data/test/models/sql/test_database.rb +67 -0
  538. data/test/models/sql/test_databases.rb +42 -0
  539. data/test/models/sql/test_firewall_rule.rb +55 -0
  540. data/test/models/sql/test_firewall_rules.rb +42 -0
  541. data/test/models/sql/test_sql_server.rb +57 -0
  542. data/test/models/sql/test_sql_servers.rb +41 -0
  543. data/test/models/storage/test_data_disk.rb +23 -0
  544. data/test/models/storage/test_directories.rb +74 -0
  545. data/test/models/storage/test_directory.rb +178 -0
  546. data/test/models/storage/test_file.rb +294 -0
  547. data/test/models/storage/test_files.rb +234 -0
  548. data/test/models/storage/test_recovery_vault.rb +61 -0
  549. data/test/models/storage/test_recovery_vaults.rb +47 -0
  550. data/test/models/storage/test_storage_account.rb +88 -0
  551. data/test/models/storage/test_storage_accounts.rb +78 -0
  552. data/test/models/traffic_manager/test_traffic_manager_end_point.rb +54 -0
  553. data/test/models/traffic_manager/test_traffic_manager_end_points.rb +56 -0
  554. data/test/models/traffic_manager/test_traffic_manager_profile.rb +62 -0
  555. data/test/models/traffic_manager/test_traffic_manager_profiles.rb +55 -0
  556. data/test/requests/application_gateway/test_check_ag_exists.rb +31 -0
  557. data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +35 -0
  558. data/test/requests/application_gateway/test_delete_application_gateway.rb +23 -0
  559. data/test/requests/application_gateway/test_get_application_gateway.rb +24 -0
  560. data/test/requests/application_gateway/test_list_application_gateways.rb +24 -0
  561. data/test/requests/application_gateway/test_start_application_gateway.rb +25 -0
  562. data/test/requests/application_gateway/test_stop_application_gateway.rb +25 -0
  563. data/test/requests/compute/test_attach_data_disk_to_vm.rb +90 -0
  564. data/test/requests/compute/test_check_availability_set_exists.rb +31 -0
  565. data/test/requests/compute/test_check_managed_disk_exists.rb +31 -0
  566. data/test/requests/compute/test_check_vm_exists.rb +31 -0
  567. data/test/requests/compute/test_check_vm_extension_exists.rb +31 -0
  568. data/test/requests/compute/test_create_availability_set.rb +28 -0
  569. data/test/requests/compute/test_create_or_update_managed_disk.rb +38 -0
  570. data/test/requests/compute/test_create_virtual_machine.rb +90 -0
  571. data/test/requests/compute/test_create_vm_extension.rb +35 -0
  572. data/test/requests/compute/test_deallocate_virtual_machine.rb +32 -0
  573. data/test/requests/compute/test_delete_availability_set.rb +23 -0
  574. data/test/requests/compute/test_delete_managed_disk.rb +23 -0
  575. data/test/requests/compute/test_delete_virtual_machine.rb +32 -0
  576. data/test/requests/compute/test_detach_data_disk_from_vm.rb +32 -0
  577. data/test/requests/compute/test_generalize_virtual_machine.rb +32 -0
  578. data/test/requests/compute/test_get_availability_set.rb +24 -0
  579. data/test/requests/compute/test_get_managed_disk.rb +24 -0
  580. data/test/requests/compute/test_get_virtual_machine.rb +24 -0
  581. data/test/requests/compute/test_get_vm_extension.rb +26 -0
  582. data/test/requests/compute/test_get_vm_status.rb +25 -0
  583. data/test/requests/compute/test_grant_access_to_managed_disk.rb +26 -0
  584. data/test/requests/compute/test_list_availability_sets.rb +24 -0
  585. data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +33 -0
  586. data/test/requests/compute/test_list_managed_disks_by_rg.rb +24 -0
  587. data/test/requests/compute/test_list_managed_disks_in_subscription.rb +24 -0
  588. data/test/requests/compute/test_list_virtual_machines.rb +24 -0
  589. data/test/requests/compute/test_power_off_virtual_machine.rb +32 -0
  590. data/test/requests/compute/test_redeploy_virtual_machine.rb +33 -0
  591. data/test/requests/compute/test_restart_virtual_machine.rb +32 -0
  592. data/test/requests/compute/test_revoke_access_to_managed_disk.rb +24 -0
  593. data/test/requests/compute/test_start_virtual_machine.rb +32 -0
  594. data/test/requests/compute/test_update_vm_extension.rb +35 -0
  595. data/test/requests/dns/test_check_record_set_exists.rb +31 -0
  596. data/test/requests/dns/test_check_zone_exists.rb +35 -0
  597. data/test/requests/dns/test_create_record_set.rb +46 -0
  598. data/test/requests/dns/test_create_zone.rb +37 -0
  599. data/test/requests/dns/test_delete_record_set.rb +24 -0
  600. data/test/requests/dns/test_delete_zone.rb +24 -0
  601. data/test/requests/dns/test_get_record_set.rb +24 -0
  602. data/test/requests/dns/test_get_records_from_record_set.rb +42 -0
  603. data/test/requests/dns/test_get_zone.rb +35 -0
  604. data/test/requests/dns/test_list_record_sets.rb +35 -0
  605. data/test/requests/dns/test_list_zones.rb +26 -0
  606. data/test/requests/key_vault/test_check_vault_exists.rb +31 -0
  607. data/test/requests/key_vault/test_create_or_update_vault.rb +25 -0
  608. data/test/requests/key_vault/test_delete_vault.rb +23 -0
  609. data/test/requests/key_vault/test_get_vault.rb +24 -0
  610. data/test/requests/key_vault/test_list_vaults.rb +24 -0
  611. data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +29 -0
  612. data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +29 -0
  613. data/test/requests/network/test_add_security_rules.rb +43 -0
  614. data/test/requests/network/test_add_subnets_in_virtual_network.rb +29 -0
  615. data/test/requests/network/test_attach_network_security_group_to_subnet.rb +26 -0
  616. data/test/requests/network/test_attach_resource_to_nic.rb +43 -0
  617. data/test/requests/network/test_attach_route_table_to_subnet.rb +26 -0
  618. data/test/requests/network/test_check_express_route_cir_auth_exists.rb +31 -0
  619. data/test/requests/network/test_check_express_route_circuit_exists.rb +31 -0
  620. data/test/requests/network/test_check_load_balancer_exists.rb +31 -0
  621. data/test/requests/network/test_check_local_net_gateway_exists.rb +31 -0
  622. data/test/requests/network/test_check_net_sec_group_exists.rb +31 -0
  623. data/test/requests/network/test_check_net_sec_rule_exists.rb +31 -0
  624. data/test/requests/network/test_check_network_interface_exists.rb +31 -0
  625. data/test/requests/network/test_check_public_ip_exists.rb +30 -0
  626. data/test/requests/network/test_check_subnet_exists.rb +31 -0
  627. data/test/requests/network/test_check_virtual_network_exists.rb +34 -0
  628. data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +31 -0
  629. data/test/requests/network/test_check_vnet_gateway_exists.rb +31 -0
  630. data/test/requests/network/test_create_express_route_circuit.rb +39 -0
  631. data/test/requests/network/test_create_express_route_circuit_authorization.rb +35 -0
  632. data/test/requests/network/test_create_express_route_circuit_peering.rb +37 -0
  633. data/test/requests/network/test_create_load_balancer.rb +49 -0
  634. data/test/requests/network/test_create_local_network_gateway.rb +36 -0
  635. data/test/requests/network/test_create_network_interface.rb +42 -0
  636. data/test/requests/network/test_create_or_update_network_security_group.rb +38 -0
  637. data/test/requests/network/test_create_or_update_network_security_rule.rb +28 -0
  638. data/test/requests/network/test_create_or_update_virtual_network.rb +55 -0
  639. data/test/requests/network/test_create_public_ip.rb +35 -0
  640. data/test/requests/network/test_create_subnet.rb +35 -0
  641. data/test/requests/network/test_create_virtual_network_gateway.rb +37 -0
  642. data/test/requests/network/test_create_virtual_network_gateway_connection.rb +36 -0
  643. data/test/requests/network/test_delete_express_route_circuit.rb +24 -0
  644. data/test/requests/network/test_delete_express_route_circuit_authorization.rb +23 -0
  645. data/test/requests/network/test_delete_express_route_circuit_peering.rb +24 -0
  646. data/test/requests/network/test_delete_load_balancer.rb +24 -0
  647. data/test/requests/network/test_delete_local_network_gateway.rb +23 -0
  648. data/test/requests/network/test_delete_network_interface.rb +24 -0
  649. data/test/requests/network/test_delete_network_security_group.rb +25 -0
  650. data/test/requests/network/test_delete_network_security_rule.rb +25 -0
  651. data/test/requests/network/test_delete_public_ip.rb +24 -0
  652. data/test/requests/network/test_delete_subnet.rb +24 -0
  653. data/test/requests/network/test_delete_virtual_network.rb +24 -0
  654. data/test/requests/network/test_delete_virtual_network_gateway.rb +24 -0
  655. data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +23 -0
  656. data/test/requests/network/test_detach_network_security_group_from_subnet.rb +26 -0
  657. data/test/requests/network/test_detach_resource_from_nic.rb +41 -0
  658. data/test/requests/network/test_detach_route_table_from_subnet.rb +26 -0
  659. data/test/requests/network/test_get_available_ipaddresses_count.rb +18 -0
  660. data/test/requests/network/test_get_connection_shared_key.rb +24 -0
  661. data/test/requests/network/test_get_express_route_circuit.rb +24 -0
  662. data/test/requests/network/test_get_express_route_circuit_authorization.rb +24 -0
  663. data/test/requests/network/test_get_express_route_circuit_peering.rb +24 -0
  664. data/test/requests/network/test_get_load_balancer.rb +24 -0
  665. data/test/requests/network/test_get_local_network_gateway.rb +24 -0
  666. data/test/requests/network/test_get_network_interface.rb +24 -0
  667. data/test/requests/network/test_get_network_security_group.rb +26 -0
  668. data/test/requests/network/test_get_network_security_rule.rb +26 -0
  669. data/test/requests/network/test_get_public_ip.rb +26 -0
  670. data/test/requests/network/test_get_subnet.rb +26 -0
  671. data/test/requests/network/test_get_virtual_network.rb +26 -0
  672. data/test/requests/network/test_get_virtual_network_gateway.rb +24 -0
  673. data/test/requests/network/test_get_virtual_network_gateway_connection.rb +24 -0
  674. data/test/requests/network/test_list_express_route_circuit_authorizations.rb +24 -0
  675. data/test/requests/network/test_list_express_route_circuit_peerings.rb +24 -0
  676. data/test/requests/network/test_list_express_route_circuits.rb +26 -0
  677. data/test/requests/network/test_list_express_route_service_providers.rb +24 -0
  678. data/test/requests/network/test_list_load_balancers.rb +24 -0
  679. data/test/requests/network/test_list_local_network_gateways.rb +24 -0
  680. data/test/requests/network/test_list_network_interfaces.rb +24 -0
  681. data/test/requests/network/test_list_network_security_groups.rb +26 -0
  682. data/test/requests/network/test_list_network_security_rules.rb +26 -0
  683. data/test/requests/network/test_list_public_ips.rb +24 -0
  684. data/test/requests/network/test_list_subnets.rb +24 -0
  685. data/test/requests/network/test_list_virtual_network_gateway_connections.rb +24 -0
  686. data/test/requests/network/test_list_virtual_network_gateways.rb +24 -0
  687. data/test/requests/network/test_list_virtual_networks.rb +24 -0
  688. data/test/requests/network/test_list_virtual_networks_in_subscription.rb +24 -0
  689. data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +29 -0
  690. data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +29 -0
  691. data/test/requests/network/test_remove_security_rule.rb +29 -0
  692. data/test/requests/network/test_remove_subnets_from_virtual_network.rb +29 -0
  693. data/test/requests/network/test_reset_connection_shared_key.rb +23 -0
  694. data/test/requests/network/test_set_connection_shared_key.rb +23 -0
  695. data/test/requests/network/test_update_public_ip.rb +34 -0
  696. data/test/requests/resources/test_check_azure_resource_exists.rb +22 -0
  697. data/test/requests/resources/test_check_deployment_exists.rb +29 -0
  698. data/test/requests/resources/test_check_resource_group_exists.rb +29 -0
  699. data/test/requests/resources/test_create_deployment.rb +32 -0
  700. data/test/requests/resources/test_create_resource_group.rb +24 -0
  701. data/test/requests/resources/test_delete_deployment.rb +25 -0
  702. data/test/requests/resources/test_delete_resource_group.rb +24 -0
  703. data/test/requests/resources/test_delete_resource_tag.rb +35 -0
  704. data/test/requests/resources/test_get_deployment.rb +24 -0
  705. data/test/requests/resources/test_get_resource_group.rb +24 -0
  706. data/test/requests/resources/test_list_deployments.rb +25 -0
  707. data/test/requests/resources/test_list_resource_groups.rb +24 -0
  708. data/test/requests/resources/test_list_tagged_resources.rb +24 -0
  709. data/test/requests/resources/test_tag_resource.rb +35 -0
  710. data/test/requests/sql/test_create_or_update_database.rb +25 -0
  711. data/test/requests/sql/test_create_or_update_firewall_rule.rb +25 -0
  712. data/test/requests/sql/test_create_or_update_sql_server.rb +25 -0
  713. data/test/requests/sql/test_delete_database.rb +23 -0
  714. data/test/requests/sql/test_delete_firewall_rule.rb +23 -0
  715. data/test/requests/sql/test_delete_sql_server.rb +23 -0
  716. data/test/requests/sql/test_get_database.rb +24 -0
  717. data/test/requests/sql/test_get_firewall_rule.rb +24 -0
  718. data/test/requests/sql/test_get_sql_server.rb +24 -0
  719. data/test/requests/sql/test_list_databases.rb +24 -0
  720. data/test/requests/sql/test_list_firewall_rules.rb +24 -0
  721. data/test/requests/sql/test_list_sql_servers.rb +24 -0
  722. data/test/requests/storage/test_acquire_blob_lease.rb +36 -0
  723. data/test/requests/storage/test_acquire_container_lease.rb +36 -0
  724. data/test/requests/storage/test_check_container_exists.rb +18 -0
  725. data/test/requests/storage/test_check_storage_account_exists.rb +34 -0
  726. data/test/requests/storage/test_check_storage_account_name_availability.rb +35 -0
  727. data/test/requests/storage/test_commit_blob_blocks.rb +34 -0
  728. data/test/requests/storage/test_compare_container_blobs.rb +36 -0
  729. data/test/requests/storage/test_copy_blob.rb +36 -0
  730. data/test/requests/storage/test_copy_blob_from_uri.rb +36 -0
  731. data/test/requests/storage/test_create_block_blob.rb +80 -0
  732. data/test/requests/storage/test_create_container.rb +36 -0
  733. data/test/requests/storage/test_create_disk.rb +70 -0
  734. data/test/requests/storage/test_create_page_blob.rb +34 -0
  735. data/test/requests/storage/test_create_recovery_vault.rb +35 -0
  736. data/test/requests/storage/test_create_storage_account.rb +34 -0
  737. data/test/requests/storage/test_delete_blob.rb +42 -0
  738. data/test/requests/storage/test_delete_container.rb +42 -0
  739. data/test/requests/storage/test_delete_disk.rb +30 -0
  740. data/test/requests/storage/test_delete_recovery_vault.rb +34 -0
  741. data/test/requests/storage/test_delete_storage_account.rb +28 -0
  742. data/test/requests/storage/test_disable_backup_protection.rb +52 -0
  743. data/test/requests/storage/test_enable_backup_protection.rb +66 -0
  744. data/test/requests/storage/test_get_all_backup_jobs.rb +35 -0
  745. data/test/requests/storage/test_get_backup_container.rb +35 -0
  746. data/test/requests/storage/test_get_backup_item.rb +35 -0
  747. data/test/requests/storage/test_get_backup_job_for_vm.rb +26 -0
  748. data/test/requests/storage/test_get_backup_protection_policy.rb +35 -0
  749. data/test/requests/storage/test_get_blob.rb +141 -0
  750. data/test/requests/storage/test_get_blob_http_url.rb +30 -0
  751. data/test/requests/storage/test_get_blob_https_url.rb +30 -0
  752. data/test/requests/storage/test_get_blob_properties.rb +45 -0
  753. data/test/requests/storage/test_get_blob_url.rb +75 -0
  754. data/test/requests/storage/test_get_container_acl.rb +37 -0
  755. data/test/requests/storage/test_get_container_properties.rb +45 -0
  756. data/test/requests/storage/test_get_container_url.rb +33 -0
  757. data/test/requests/storage/test_get_recovery_vault.rb +35 -0
  758. data/test/requests/storage/test_get_storage_access_keys.rb +24 -0
  759. data/test/requests/storage/test_get_storage_account.rb +25 -0
  760. data/test/requests/storage/test_list_blobs.rb +77 -0
  761. data/test/requests/storage/test_list_containers.rb +54 -0
  762. data/test/requests/storage/test_list_recovery_vault.rb +35 -0
  763. data/test/requests/storage/test_list_storage_accounts.rb +37 -0
  764. data/test/requests/storage/test_list_storage_accounts_for_rg.rb +37 -0
  765. data/test/requests/storage/test_multipart_save_block_blob.rb +105 -0
  766. data/test/requests/storage/test_put_blob_block.rb +34 -0
  767. data/test/requests/storage/test_put_blob_metadata.rb +36 -0
  768. data/test/requests/storage/test_put_blob_pages.rb +34 -0
  769. data/test/requests/storage/test_put_blob_properties.rb +39 -0
  770. data/test/requests/storage/test_put_container_acl.rb +34 -0
  771. data/test/requests/storage/test_put_container_metadata.rb +36 -0
  772. data/test/requests/storage/test_release_blob_lease.rb +34 -0
  773. data/test/requests/storage/test_release_container_lease.rb +34 -0
  774. data/test/requests/storage/test_save_page_blob.rb +115 -0
  775. data/test/requests/storage/test_set_recovery_vault_context.rb +34 -0
  776. data/test/requests/storage/test_start_backup.rb +55 -0
  777. data/test/requests/storage/test_update_storage_account.rb +34 -0
  778. data/test/requests/storage/test_wait_blob_copy_operation_to_finish.rb +148 -0
  779. data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +31 -0
  780. data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +31 -0
  781. data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +25 -0
  782. data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +25 -0
  783. data/test/requests/traffic_manager/test_delete_traffic_manager_endpoint.rb +23 -0
  784. data/test/requests/traffic_manager/test_delete_traffic_manager_profile.rb +23 -0
  785. data/test/requests/traffic_manager/test_get_traffic_manager_endpoint.rb +24 -0
  786. data/test/requests/traffic_manager/test_get_traffic_manager_profile.rb +24 -0
  787. data/test/requests/traffic_manager/test_list_traffic_manager_profiles.rb +24 -0
  788. data/test/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +27 -0
  789. data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +27 -0
  790. data/test/smoke_tests/compute/test_resource_group_smoke.rb +37 -0
  791. data/test/test_credentials.rb +63 -0
  792. data/test/test_helper.rb +817 -0
  793. metadata +1074 -0
@@ -0,0 +1,40 @@
1
+ module Fog
2
+ module Credentials
3
+ # This class is managing credentials token
4
+ class AzureRM
5
+ def self.get_credentials(tenant_id, client_id, client_secret, environment = ENVIRONMENT_AZURE_CLOUD)
6
+ if @credentials.nil? || new_management_credential?(tenant_id, client_id, client_secret, environment)
7
+ get_new_credentials(tenant_id, client_id, client_secret, environment)
8
+ else
9
+ @credentials
10
+ end
11
+ end
12
+
13
+ def self.get_token(tenant_id, client_id, client_secret, environment = ENVIRONMENT_AZURE_CLOUD)
14
+ get_credentials(tenant_id, client_id, client_secret, environment) if @credentials.nil?
15
+ @token_provider.get_authentication_header
16
+ end
17
+
18
+ def self.get_new_credentials(tenant_id, client_id, client_secret, environment)
19
+ @tenant_id = tenant_id
20
+ @client_id = client_id
21
+ @client_secret = client_secret
22
+ @environment = environment
23
+ return if @tenant_id.nil? || @client_id.nil? || @client_secret.nil?
24
+ @token_provider = MsRestAzure::ApplicationTokenProvider.new(@tenant_id, @client_id, @client_secret, active_directory_service_settings(environment))
25
+ @credentials = MsRest::TokenCredentials.new(@token_provider)
26
+ @credentials
27
+ end
28
+
29
+ def self.new_management_credential?(tenant_id, client_id, client_secret, environment)
30
+ @tenant_id != tenant_id ||
31
+ @client_id != client_id ||
32
+ @client_secret != client_secret ||
33
+ @environment != environment
34
+ end
35
+
36
+ private_class_method :get_new_credentials
37
+ private_class_method :new_management_credential?
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,68 @@
1
+ module Fog
2
+ module DNS
3
+ # This class registers models, requests and collections
4
+ class AzureRM < Fog::Service
5
+ requires :tenant_id
6
+ requires :client_id
7
+ requires :client_secret
8
+ requires :subscription_id
9
+ recognizes :environment
10
+
11
+ request_path 'fog/azurerm/requests/dns'
12
+ request :create_or_update_zone
13
+ request :delete_zone
14
+ request :check_zone_exists
15
+ request :list_zones
16
+ request :get_zone
17
+ request :create_or_update_record_set
18
+ request :delete_record_set
19
+ request :list_record_sets
20
+ request :get_records_from_record_set
21
+ request :get_record_set
22
+ request :check_record_set_exists
23
+
24
+ model_path 'fog/azurerm/models/dns'
25
+ model :zone
26
+ collection :zones
27
+ model :record_set
28
+ collection :record_sets
29
+
30
+ # This class provides the mock implementation for unit tests.
31
+ class Mock
32
+ def initialize(_options = {})
33
+ end
34
+ end
35
+
36
+ # This class provides the actual implementation for service calls.
37
+ class Real
38
+ def initialize(options)
39
+ begin
40
+ require 'azure_mgmt_dns'
41
+ rescue LoadError => e
42
+ retry if require('rubygems')
43
+ raise e.message
44
+ end
45
+
46
+ options[:environment] = 'AzureCloud' if options[:environment].nil?
47
+
48
+ credentials = Fog::Credentials::AzureRM.get_credentials(options[:tenant_id], options[:client_id], options[:client_secret], options[:environment])
49
+ telemetry = "fog-azure-rm/#{Fog::AzureRM::VERSION}"
50
+ @dns_client = ::Azure::ARM::Dns::DnsManagementClient.new(credentials, resource_manager_endpoint_url(options[:environment]))
51
+ @dns_client.subscription_id = options[:subscription_id]
52
+ @dns_client.add_user_agent_information(telemetry)
53
+ @tenant_id = options[:tenant_id]
54
+ @client_id = options[:client_id]
55
+ @client_secret = options[:client_secret]
56
+ @environment = options[:environment]
57
+ @resources = Fog::Resources::AzureRM.new(
58
+ tenant_id: options[:tenant_id],
59
+ client_id: options[:client_id],
60
+ client_secret: options[:client_secret],
61
+ subscription_id: options[:subscription_id],
62
+ environment: options[:environment]
63
+ )
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,243 @@
1
+ # Application Gateway
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/update/list/delete Application Gateway.
4
+
5
+ ## Usage
6
+
7
+ First of all, you need to require the Fog library by executing:
8
+
9
+ ```ruby
10
+ require 'fog/azurerm'
11
+ ```
12
+ ## Create Connection
13
+
14
+ Next, create a connection to the Application Gateway Service:
15
+
16
+ ```ruby
17
+ azure_application_gateway_service = Fog::ApplicationGateway::AzureRM.new(
18
+ tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
19
+ client_id: '<Clientid>', # Client id of Azure Active Directory Application
20
+ client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
21
+ subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
22
+ :environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
23
+ )
24
+ ```
25
+
26
+ ## Check Application Gateway Existence
27
+
28
+ ```ruby
29
+ azure_application_gateway_service.gateways.check_application_gateway_exists(<Resource Group name>, <Gateway Name>)
30
+ ```
31
+
32
+ ## Create Application Gateway
33
+
34
+ Create a new Application Gateway.
35
+
36
+ ```ruby
37
+ gateway = azure_application_gateway_service.gateways.create(
38
+ name: '<Gateway Name>',
39
+ location: 'eastus',
40
+ resource_group: '<Resource Group name>',
41
+ sku_name: 'Standard_Medium',
42
+ sku_tier: 'Standard',
43
+ sku_capacity: '2',
44
+ gateway_ip_configurations:
45
+ [
46
+ {
47
+ name: 'gatewayIpConfigName',
48
+ subnet_id: '/subscriptions/<Subscription_id>/resourcegroups/<Resource Group name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>'
49
+ }
50
+ ],
51
+ frontend_ip_configurations:
52
+ [
53
+ {
54
+ name: 'frontendIpConfig',
55
+ private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
56
+ public_ip_address_id: '/subscriptions/<Subscription_id>/resourcegroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Address Name>',
57
+ private_ip_address: '10.0.1.5'
58
+ }
59
+ ],
60
+ frontend_ports:
61
+ [
62
+ {
63
+ name: 'frontendPort',
64
+ port: 443
65
+ }
66
+ ],
67
+ backend_address_pools:
68
+ [
69
+ {
70
+ name: 'backendAddressPool',
71
+ ip_addresses: [
72
+ {
73
+ ipAddress: '10.0.1.6'
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ backend_http_settings_list:
79
+ [
80
+ {
81
+ name: 'gateway_settings',
82
+ port: 80,
83
+ protocol: 'Http',
84
+ cookie_based_affinity: 'Enabled',
85
+ request_timeout: '30'
86
+ }
87
+ ],
88
+ http_listeners:
89
+ [
90
+ {
91
+ name: 'gateway_listener',
92
+ frontend_ip_config_id: '/subscriptions/<Subscription_id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/frontendIPConfigurations/frontendIpConfig',
93
+ frontend_port_id: '/subscriptions/<Subscription_id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/frontendPorts/frontendPort',
94
+ protocol: 'Http',
95
+ host_name: '',
96
+ require_server_name_indication: 'false'
97
+ }
98
+ ],
99
+ request_routing_rules:
100
+ [
101
+ {
102
+ name: 'gateway_request_route_rule',
103
+ type: 'Basic',
104
+ http_listener_id: '/subscriptions/<Subscription_id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/httpListeners/gateway_listener',
105
+ backend_address_pool_id: '/subscriptions/<Subscription_id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/backendAddressPools/backendAddressPool',
106
+ backend_http_settings_id: '/subscriptions/<Subscription_id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/applicationGateways/<Gateway Name>/backendHttpSettingsCollection/gateway_settings',
107
+ url_path_map: ''
108
+ }
109
+ ]
110
+
111
+
112
+ )
113
+ ```
114
+
115
+ There can be two ways of giving `frontend_ip_configurations` while creating application gateway
116
+
117
+ 1. When giving public ip, then we need to provide `public_ip_address_id` as follows
118
+
119
+ `frontend_ip_configurations:
120
+ [
121
+ {
122
+ name: 'frontendIpConfig',
123
+ private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
124
+ public_ip_address_id: '/subscriptions/<Subscription_id>/resourcegroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Address Name>',
125
+ private_ip_address: '10.0.1.5'
126
+ }
127
+ ]`
128
+
129
+ 2. When giving subnet id, then we need to provide `subnet_id` as follows
130
+
131
+ `frontend_ip_configurations:
132
+ [
133
+ {
134
+ name: 'frontendIpConfig',
135
+ private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
136
+ subnet_id: '<Subnet ID',
137
+ private_ip_address: '10.0.1.5'
138
+ }
139
+ ]`
140
+
141
+
142
+ ## List Application Gateways
143
+
144
+ List all application gateways in a resource group
145
+
146
+ ```ruby
147
+ gateways = azure_application_gateway_service.gateways(resource_group: '<Resource Group Name>')
148
+ gateways.each do |gateway|
149
+ puts "#{gateway.name}"
150
+ end
151
+ ```
152
+
153
+ ## Retrieve a single Application Gateway
154
+
155
+ Get a single record of Application Gateway
156
+
157
+ ```ruby
158
+ gateway = azure_application_gateway_service
159
+ .gateways
160
+ .get('<Resource Group name>', '<Application Gateway Name>')
161
+ puts "#{gateway.name}"
162
+ ```
163
+
164
+
165
+ ## Update sku attributes (Name and Capacity)
166
+
167
+ ```ruby
168
+ ag.update_sku('Standard_Small', '1')
169
+ ```
170
+
171
+ ## Update gateway ip configuration (Subnet id)
172
+
173
+ ```ruby
174
+ 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
+
177
+ ## Add/Remove SSL Certificates
178
+
179
+ ```ruby
180
+ ag.add_ssl_certificate(
181
+ {
182
+ name: '<SSL Certificate name>',
183
+ data: 'Base-64 encoded pfx certificate',
184
+ password: 'azure',
185
+ public_cert_data: 'Base-64 encoded Public cert data corresponding to pfx specified in data.'
186
+ }
187
+ )
188
+
189
+ ag.remove_ssl_certificate(
190
+ {
191
+ name: '<SSL Certificate name>',
192
+ data: 'Base-64 encoded pfx certificate',
193
+ password: 'azure',
194
+ public_cert_data: 'Base-64 encoded Public cert data corresponding to pfx specified in data.'
195
+ }
196
+ )
197
+ ```
198
+
199
+ ## Add/Remove Frontend ports
200
+
201
+ ```ruby
202
+ ag.add_frontend_port({name: '<Frontend port name>', port: 80})
203
+
204
+ ag.remove_frontend_port({name: '<Frontend port name>', port: 80})
205
+ ```
206
+
207
+ ## Add/Remove Probes
208
+
209
+ ```ruby
210
+ ag.add_probe(
211
+ {
212
+ name: '<Probe name>',
213
+ protocol: 'http',
214
+ host: 'localhost',
215
+ path: '/fog-test',
216
+ interval: 60,
217
+ timeout: 300,
218
+ unhealthy_threshold: 5
219
+ }
220
+ )
221
+ ag.remove__probe(
222
+ {
223
+ name: '<Probe name>',
224
+ protocol: 'http',
225
+ host: 'localhost',
226
+ path: '/fog-test',
227
+ interval: 60,
228
+ timeout: 300,
229
+ unhealthy_threshold: 5
230
+ }
231
+ )
232
+ ```
233
+
234
+ ## Destroy a single Application Gateway
235
+
236
+ Get a application gateway object from the get method and then destroy that application gateway.
237
+
238
+ ```ruby
239
+ gateway.destroy
240
+ ```
241
+
242
+ ## Support and Feedback
243
+ Your feedback is highly appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
@@ -0,0 +1,400 @@
1
+ # Compute
2
+
3
+ This document explains how to get started using Azure Compute Service with Fog. With this gem you can create/update/list/delete availability sets and virtual machines.
4
+
5
+ ## Usage
6
+
7
+ First of all, you need to require the Fog library by executing:
8
+
9
+ ```ruby
10
+ require 'fog/azurerm'
11
+ ```
12
+
13
+ ## Create Connection
14
+
15
+ Next, create a connection to the Compute Service:
16
+
17
+ ```ruby
18
+ azure_compute_service = Fog::Compute.new(
19
+ provider: 'AzureRM',
20
+ tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
21
+ client_id: '<Clientid>', # Client id of Azure Active Directory Application
22
+ client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
23
+ subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
24
+ :environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
25
+ )
26
+ ```
27
+
28
+ ## Check Server Existence
29
+
30
+ ```ruby
31
+ azure_compute_service.servers.check_vm_exists(<Resource Group name>, <VM Name>)
32
+ ```
33
+
34
+ ## Create Server
35
+
36
+ Create a new linux server
37
+
38
+ **Info:**
39
+ Attribute **network_interface_card_ids** is an array of NICs ids. The NIC id at index zero will become primary NIC of this server(virtual machine) by default.
40
+
41
+ **Info:**
42
+ When using **managed_disk_storage_type** you should not pass the **vhd_path** as the managed disk will be used for the OS disk. Also, data disks cannot be attached to a VM which uses managed disks for the OS disk.
43
+
44
+ ```ruby
45
+ azure_compute_service.servers.create(
46
+ name: '<VM Name>',
47
+ location: 'West US',
48
+ resource_group: '<Resource Group Name>',
49
+ vm_size: 'Basic_A0',
50
+ storage_account_name: '<Storage Account Name>',
51
+ username: '<Username for VM>',
52
+ password: '<Password for VM>', # Optional, if 'platform' partameter is 'Linux'.
53
+ disable_password_authentication: false,
54
+ network_interface_card_ids: ['/subscriptions/{Subscription-Id}/resourceGroups/{Resource-Group-Name}/providers/Microsoft.Network/networkInterfaces/{Network-Interface-Id}'],
55
+ publisher: 'Canonical', # Not required if custom image is being used
56
+ offer: 'UbuntuServer', # Not required if custom image is being used
57
+ sku: '14.04.2-LTS', # Not required if custom image is being used
58
+ version: 'latest', # Not required if custom image is being used
59
+ platform: 'Linux',
60
+ vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
61
+ custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
62
+ os_disk_caching: Fog::ARM::Compute::Models::CachingTypes::None, # Optional, can be one of None, ReadOnly, ReadWrite
63
+ managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
64
+ )
65
+ ```
66
+
67
+ Create a new windows server
68
+
69
+ ```ruby
70
+ azure_compute_service.servers.create(
71
+ name: '<VM Name>',
72
+ location: 'West US',
73
+ resource_group: '<Resource Group Name>',
74
+ vm_size: 'Basic_A0',
75
+ storage_account_name: '<Storage Account Name>',
76
+ username: '<Username for VM>',
77
+ password: '<Password for VM>',
78
+ disable_password_authentication: false,
79
+ network_interface_card_ids: ['/subscriptions/{Subscription-Id}/resourceGroups/{Resource-Group-Name}/providers/Microsoft.Network/networkInterfaces/{Network-Interface-Id}'],
80
+ publisher: 'MicrosoftWindowsServerEssentials', # Not required if custom image is being used
81
+ offer: 'WindowsServerEssentials', # Not required if custom image is being used
82
+ sku: 'WindowsServerEssentials', # Not required if custom image is being used
83
+ version: 'latest', # Not required if custom image is being used
84
+ platform: 'Windows',
85
+ vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
86
+ custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
87
+ managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
88
+ )
89
+ ```
90
+
91
+ ## Create Server Asynchronously
92
+
93
+ Create a new linux server asynchronously
94
+
95
+ ```ruby
96
+ async_response = azure_compute_service.servers.create_async(
97
+ name: '<VM Name>',
98
+ location: 'West US',
99
+ resource_group: '<Resource Group Name>',
100
+ vm_size: 'Basic_A0',
101
+ storage_account_name: '<Storage Account Name>',
102
+ username: '<Username for VM>',
103
+ password: '<Password for VM>', # Optional, if 'platform' partameter is 'Linux'.
104
+ disable_password_authentication: false,
105
+ network_interface_card_ids: ['/subscriptions/{Subscription-Id}/resourceGroups/{Resource-Group-Name}/providers/Microsoft.Network/networkInterfaces/{Network-Interface-Id}'],
106
+ publisher: 'Canonical', # Not required if custom image is being used
107
+ offer: 'UbuntuServer', # Not required if custom image is being used
108
+ sku: '14.04.2-LTS', # Not required if custom image is being used
109
+ version: 'latest', # Not required if custom image is being used
110
+ platform: 'Linux',
111
+ vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
112
+ custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
113
+ os_disk_caching: Fog::ARM::Compute::Models::CachingTypes::None, # Optional, can be one of None, ReadOnly, ReadWrite
114
+ managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
115
+ )
116
+ ```
117
+ Following methods are available to handle async respoonse:
118
+ - state
119
+ - pending?
120
+ - rejected?
121
+ - reason
122
+ - fulfilled?
123
+ - value
124
+
125
+ An example of handling async response is given below:
126
+
127
+ ```ruby
128
+ while 1
129
+ puts async_response.state
130
+
131
+ if async_response.pending?
132
+ sleep(2)
133
+ end
134
+
135
+ if async_response.fulfilled?
136
+ puts async_response.value.inspect
137
+ break
138
+ end
139
+
140
+ if async_response.rejected?
141
+ puts async_response.reason.inspect
142
+ break
143
+ end
144
+ end
145
+ ```
146
+
147
+ For more information about custom_data; see link: https://msdn.microsoft.com/en-us/library/azure/mt163591.aspx
148
+
149
+ ## List Servers
150
+
151
+ List servers in a resource group
152
+
153
+ ```ruby
154
+ servers = azure_compute_service.servers(resource_group: '<Resource Group name>')
155
+ servers.each do |server|
156
+ puts "#{server.name}"
157
+ puts "#{server.location}"
158
+ end
159
+ ```
160
+
161
+ ## Retrieve a single Server
162
+
163
+ Get a single record of Server
164
+
165
+ ```ruby
166
+ server = azure_compute_service
167
+ .servers(resource_group: '<Resource Group name>')
168
+ .get('<Resource Group name>', 'Server name>')
169
+ puts "#{server.name}"
170
+ ```
171
+
172
+ ## Attach a Data Disk to Server
173
+
174
+ Get the server object and attach a Data Disk to it.
175
+
176
+ ```ruby
177
+ server.attach_data_disk('<Disk Name>', <Size in GB>, '<Storage Account Name>')
178
+ ```
179
+
180
+ ## Detach a Data Disk from Server
181
+
182
+ Get the server object and detach a Data Disk from it.
183
+
184
+ ```ruby
185
+ server.detach_data_disk('<Disk Name>')
186
+ ```
187
+
188
+ ## Get a Server's status
189
+
190
+ Check the status of a Server
191
+
192
+ ```ruby
193
+ status = azure_compute_service
194
+ .servers
195
+ .get('<Resource Group name>', '<Server name>')
196
+ .vm_status
197
+ puts status
198
+ ```
199
+
200
+ ## Destroy a single Server
201
+
202
+ Get a server object from the get method(described above) and then destroy that server.
203
+
204
+ ```ruby
205
+ server.destroy
206
+ ```
207
+
208
+ ## Check Availability Set Existence
209
+
210
+ ```ruby
211
+ azure_compute_service.availability_sets.check_availability_set_exists(<Resource Group name>, <Availability Set name>)
212
+ ```
213
+
214
+ ## Create Availability Set
215
+
216
+ Create a new availability set
217
+
218
+ ```ruby
219
+ azure_compute_service.availability_sets.create(
220
+ name: '<Availability Set name>',
221
+ location: 'West US',
222
+ resource_group: '<Resource Group name>'
223
+ )
224
+ ```
225
+ ## List Availability Sets
226
+
227
+ List availability sets in a resource group
228
+
229
+ ```ruby
230
+ availability_sets = azure_compute_service.availability_sets(resource_group: '<Resource Group name>')
231
+ availability_sets.each do |availability_set|
232
+ puts "#{availability_set.name}"
233
+ puts "#{availability_set.location}"
234
+ end
235
+ ```
236
+
237
+ ## Retrieve a single Availability Set
238
+
239
+ Get a single record of Availability Set
240
+
241
+ ```ruby
242
+ availability_set = azure_compute_service
243
+ .availability_sets
244
+ .get('<Resource Group name>','<Availability Set name>')
245
+ puts "#{availability_set.name}"
246
+ ```
247
+
248
+ ## Destroy a single Availability Set
249
+
250
+ Get an availability set object from the get method and then destroy that availability set.
251
+
252
+ ```ruby
253
+ availability_set.destroy
254
+ ```
255
+
256
+ ## Check Virtual Machine Extension Existence
257
+
258
+ ```ruby
259
+ azure_compute_service.virtual_machine_extensions.check_vm_extension_exists(<Resource Group name>, <Virtual Machine Name>, <Extension Name>)
260
+ ```
261
+
262
+ ## Create Virtual Machine Extension
263
+
264
+ Installs an extension to the specified virtual machine.
265
+
266
+ ```ruby
267
+ azure_compute_service.virtual_machine_extensions.create(
268
+ name: <Extension Name>,
269
+ resource_group: <Resource Group>,
270
+ location: <Location>,
271
+ vm_name: <Virtual Machine Name>, # Extension will be installed on this VM
272
+ publisher: <Extension publisher>,
273
+ type: <Extension type>,
274
+ type_handler_version: <Extension version>,
275
+ auto_upgrade_minor_version: <true|false>, # Optional
276
+ settings: {JSON object}, # Format: {"key": "value", "key": {"key": "value"}}
277
+ protected_settings: {JSON object}
278
+ )
279
+ ```
280
+
281
+ ## Get Extension from Virtual Machine
282
+
283
+ Retrieves the given extension from the virtual machine
284
+
285
+ ```ruby
286
+ vm_extension = azure_compute_service.virtual_machine_extensions.get(
287
+ '<Resource Group Name>', '<Virtual Machine Name>', '<Extension Name>'
288
+ )
289
+ ```
290
+
291
+ ## Update Extension
292
+
293
+ Update the given extension. The attributes that can be modified are
294
+ - auto_upgrade_minor_version
295
+ - settings
296
+ - protected_settings
297
+
298
+ ```ruby
299
+ vm_extension.update(
300
+ auto_upgrade_minor_version: <true|false>,
301
+ settings: {JSON object},
302
+ protected_settings: {JSON object}
303
+ )
304
+ ```
305
+
306
+ ## Destroy Extension
307
+
308
+ Destroy the given extension from the virtual machine
309
+
310
+ ```ruby
311
+ vm_extension.destroy
312
+ ```
313
+
314
+
315
+ ## Create Managed Disk
316
+
317
+ Create a new Managed Disk
318
+
319
+ ```ruby
320
+ azure_compute_service.managed_disks.create(
321
+ name: 'disk_name',
322
+ location: 'east us',
323
+ resource_group_name: 'resource_group_name',
324
+ account_type: 'Premium_LRS',
325
+ disk_size_gb: 1023,
326
+ creation_data: {
327
+ create_option: 'Empty'
328
+ }
329
+ )
330
+ ```
331
+
332
+ ## List Managed Disks in a Resource Group
333
+
334
+ List managed disks in a resource group
335
+
336
+ ```ruby
337
+ managed_disks = azure_compute_service.managed_disks(resource_group: '<Resource Group name>')
338
+ mnaged_disks.each do |disk|
339
+ puts "#{disk.name}"
340
+ puts "#{disk.location}"
341
+ end
342
+ ```
343
+
344
+ ## List Managed Disks in a Subscription
345
+
346
+ List managed disks in a subscription
347
+
348
+ ```ruby
349
+ azure_compute_service.managed_disks.each do |disk|
350
+ puts "#{disk.name}"
351
+ puts "#{disk.location}"
352
+ end
353
+ ```
354
+
355
+ ## Grant Access to a Managed Disk
356
+
357
+ Grant access to a managed disk
358
+
359
+ ```ruby
360
+ access_sas = azure_compute_service.managed_disks.grant_access('<resource_group_name>', '<disk_name>', 'Read', 1000)
361
+ puts "Access SAS: #{access_sas}"
362
+ ```
363
+
364
+ ## Revoke Access from a Managed Disk
365
+
366
+ Revoke access from a managed disk
367
+
368
+ ```ruby
369
+ response = azure_compute_service.managed_disks.revoke_access('<resource_group_name>', '<disk_name>')
370
+ puts "Revoke Access response status: #{response.status}"
371
+ ```
372
+
373
+ ## Check Managed Disk Existence
374
+
375
+ ```ruby
376
+ azure_compute_service.managed_disks.check_managed_disk_exists(<Resource Group name>, <Disk name>)
377
+ ```
378
+
379
+ ## Retrieve a single Managed Disk
380
+
381
+ Get a single record of managed disks
382
+
383
+ ```ruby
384
+ managed_disk = azure_compute_service
385
+ .managed_disks
386
+ .get('<Resource Group name>','<Disk name>')
387
+ puts "#{managed_disk.name}"
388
+ ```
389
+
390
+ ## Destroy a single Managed Disk
391
+
392
+ Get an managed disk object from the get method and then destroy that managed disk.
393
+
394
+ ```ruby
395
+ managed_disk.destroy
396
+ ```
397
+
398
+
399
+ ## Support and Feedback
400
+ Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.