foreman_azure_rm 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9db2c6a180afc8c47af707c9857d8c45c4505b6326b07fc35b7dacd4effb4158
4
- data.tar.gz: 54e4039412ad74a2f8b7113b827a5b86c8ecc2940da9b891d2578ee92e63614b
3
+ metadata.gz: 24ded44e5ec295b20033b5c0903fecaa55637c19f4fdeaf95a37a03397073fd0
4
+ data.tar.gz: cb9f2190045dd7d32909e107c55663887561f9545b3327f3aca0930ae8b069e1
5
5
  SHA512:
6
- metadata.gz: 5009a521e15fc1b6d0d618e3b267f93671d92f2f457693f5b4ee7732e87037e3f47c434f941531d611b08d3678d581a2445a4cc5aa3b86e2613d8c2361ce061c
7
- data.tar.gz: 38f4fa38b70c23e68ec60aec1f9fdf45bb3067bb2e6eb90d3aeb6fb0015911b10c8fcc66538bd95357de13b6657b8e6b0eae5eb53a5b801a5203ef87aae1fa2f
6
+ metadata.gz: 982ed4a40ec28d77728dd7d0f201c8783d53b29854c39f46a9295a6883df3ed0e728e8cae8a2239597f8439d67ee7d316f8f61d81675752361fd3051f8b9f7fb
7
+ data.tar.gz: 9076e42d4cadbcc931f1ff2ccf61c8df068ad80534d6e9dfbe6f70de655b656de5fd68abd25f5e7c3c6cbbdb937fa93d5c930a23e45a6ab82a52a5784403006a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Foreman AzureRM Plugin
1
+ # Foreman AzureRm Plugin
2
2
 
3
3
  ## Description
4
4
  ```foreman_azure_rm``` adds [Microsoft Azure Resource Manager](http://azure.com/) as a compute resource for The Foreman
@@ -23,9 +23,9 @@
23
23
  ## Configuration
24
24
  Go to **Infrastructure > Compute Resources** and click on "New Compute Resource".
25
25
 
26
- Choose the **AzureRM provider**, and fill in all the fields. You need a Subscription ID, Tenant ID, Client ID and a Client Secret which you can generate from your [Microsoft Azure subscription](https://docs.bmc.com/docs/cloudlifecyclemanagement/46/setting-up-a-tenant-id-client-id-and-client-secret-for-azure-resource-manager-provisioning-669202145.html#SettingupaTenantID,ClientID,andClientSecretforAzureResourceManagerprovisioning-SetupTenantIDPrereqPrerequisites)
26
+ Choose the **Azure Resource Manager provider**, and fill in all the fields. You need a Subscription ID, Tenant ID, Client ID and a Client Secret which you can generate from your [Microsoft Azure subscription](https://docs.bmc.com/docs/cloudlifecyclemanagement/46/setting-up-a-tenant-id-client-id-and-client-secret-for-azure-resource-manager-provisioning-669202145.html#SettingupaTenantID,ClientID,andClientSecretforAzureResourceManagerprovisioning-SetupTenantIDPrereqPrerequisites)
27
27
 
28
- That's it. You're now ready to create and manage Azure resources in your new AzureRM compute resource. You should see something like this in the Compute Resource page:
28
+ That's it. You're now ready to create and manage Azure resources in your new Azure Resource Manager compute resource. You should see something like this in the Compute Resource page:
29
29
 
30
30
 
31
31
  ![](https://i.imgur.com/9J7tPJa.png)
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'ForemanAzureRM'
17
+ rdoc.title = 'ForemanAzureRm'
18
18
  rdoc.options << '--line-numbers'
19
19
  rdoc.rdoc_files.include('README.rdoc')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,4 +1,4 @@
1
- module ForemanAzureRM
1
+ module ForemanAzureRm
2
2
  module Concerns
3
3
  module ComputeResourcesControllerExtensions
4
4
  include Api::Version2
@@ -7,9 +7,9 @@ module ForemanAzureRM
7
7
  update_api(:create, :update) do
8
8
  param :compute_resource, Hash do
9
9
  # Not adding :tenant as already specified in core.
10
- param :app_ident, String, :desc => N_("Client ID for AzureRM")
11
- param :secret_key, String, :desc => N_("Client Secret for AzureRM")
12
- param :sub_id, String, :desc => N_("Subscription ID for AzureRM")
10
+ param :app_ident, String, :desc => N_("Client ID for AzureRm")
11
+ param :secret_key, String, :desc => N_("Client Secret for AzureRm")
12
+ param :sub_id, String, :desc => N_("Subscription ID for AzureRm")
13
13
  end
14
14
  end
15
15
 
@@ -1,4 +1,4 @@
1
- module ForemanAzureRM
1
+ module ForemanAzureRm
2
2
  module Concerns
3
3
  module HostsControllerExtensions
4
4
  extend ActiveSupport::Concern
@@ -1,5 +1,5 @@
1
1
  # This concern has the methods to be called inside azure_rm.rb
2
- module ForemanAzureRM
2
+ module ForemanAzureRm
3
3
  module VMExtensions
4
4
  module ManagedVM
5
5
  extend ActiveSupport::Concern
@@ -3,8 +3,8 @@
3
3
 
4
4
  require 'base64'
5
5
 
6
- module ForemanAzureRM
7
- class AzureRM < ComputeResource
6
+ module ForemanAzureRm
7
+ class AzureRm < ComputeResource
8
8
 
9
9
  include VMExtensions::ManagedVM
10
10
  alias_attribute :sub_id, :user
@@ -40,7 +40,7 @@ module ForemanAzureRM
40
40
  end
41
41
 
42
42
  def sdk
43
- @sdk ||= ForemanAzureRM::AzureSDKAdapter.new(tenant, app_ident, secret_key, sub_id)
43
+ @sdk ||= ForemanAzureRm::AzureSdkAdapter.new(tenant, app_ident, secret_key, sub_id)
44
44
  end
45
45
 
46
46
  def to_label
@@ -88,7 +88,7 @@ module ForemanAzureRM
88
88
  end
89
89
 
90
90
  def new_vm(args = {})
91
- return AzureRMCompute.new(sdk: sdk) if args.empty? || args[:image_id].nil?
91
+ return AzureRmCompute.new(sdk: sdk) if args.empty? || args[:image_id].nil?
92
92
  opts = vm_instance_defaults.merge(args.to_h).deep_symbolize_keys
93
93
  # convert rails nested_attributes into a plain hash
94
94
  nested_args = opts.delete(:interfaces_attributes)
@@ -113,7 +113,7 @@ module ForemanAzureRM
113
113
  ifaces << new_interface(iface_attrs)
114
114
  end
115
115
  end
116
- AzureRMCompute.new(azure_vm: raw_vm ,sdk: sdk, resource_group: opts[:resource_group], nics: ifaces)
116
+ AzureRmCompute.new(azure_vm: raw_vm ,sdk: sdk, resource_group: opts[:resource_group], nics: ifaces)
117
117
  end
118
118
 
119
119
  def provided_attributes
@@ -180,7 +180,7 @@ module ForemanAzureRM
180
180
  container = VMContainer.new
181
181
  # Load all vms of the region
182
182
  sdk.list_vms(region).each do |vm|
183
- container.virtualmachines << AzureRMCompute.new(azure_vm: vm, sdk:sdk, nics: vm_nics(vm))
183
+ container.virtualmachines << AzureRmCompute.new(azure_vm: vm, sdk:sdk, nics: vm_nics(vm))
184
184
  end
185
185
  container
186
186
  end
@@ -243,9 +243,9 @@ module ForemanAzureRM
243
243
  logger.debug "Virtual Machine #{args[:vm_name]} Created Successfully."
244
244
  create_vm_extension(region, args)
245
245
  # return the vm object using azure_vm
246
- AzureRMCompute.new(azure_vm: vm, sdk: sdk, resource_group: args[:resource_group], nics: vm_nics(vm))
246
+ AzureRmCompute.new(azure_vm: vm, sdk: sdk, resource_group: args[:resource_group], nics: vm_nics(vm))
247
247
  rescue RuntimeError => e
248
- Foreman::Logging.exception('Unhandled Azure RM error', e)
248
+ Foreman::Logging.exception('Unhandled AzureRm error', e)
249
249
  destroy_vm vm.id if vm
250
250
  raise e
251
251
  end
@@ -1,5 +1,5 @@
1
- module ForemanAzureRM
2
- class AzureRMCompute
1
+ module ForemanAzureRm
2
+ class AzureRmCompute
3
3
  attr_accessor :sdk
4
4
  attr_accessor :azure_vm
5
5
  attr_accessor :resource_group
@@ -123,7 +123,7 @@ module ForemanAzureRM
123
123
  _("%{vm_size} VM Size") % {:vm_size => vm_size}
124
124
  end
125
125
 
126
- # Following properties are for AzureRM
126
+ # Following properties are for AzureRm
127
127
  # These are not part of Foreman's interface
128
128
 
129
129
  def vm_size
@@ -4,7 +4,7 @@ require 'azure_mgmt_network'
4
4
  require 'azure_mgmt_storage'
5
5
  require 'azure_mgmt_compute'
6
6
 
7
- module ForemanAzureRM
7
+ module ForemanAzureRm
8
8
  Storage = Azure::Storage::Profiles::Latest::Mgmt
9
9
  Network = Azure::Network::Profiles::Latest::Mgmt
10
10
  Compute = Azure::Compute::Profiles::Latest::Mgmt
@@ -1,5 +1,5 @@
1
- module ForemanAzureRM
2
- class AzureSDKAdapter
1
+ module ForemanAzureRm
2
+ class AzureSdkAdapter
3
3
  def initialize(tenant, app_ident, secret_key, sub_id)
4
4
  @tenant = tenant
5
5
  @app_ident = app_ident
@@ -1,4 +1,4 @@
1
- module ForemanAzureRM
1
+ module ForemanAzureRm
2
2
  class Engine < ::Rails::Engine
3
3
  engine_name 'foreman_azure_rm'
4
4
 
@@ -9,14 +9,14 @@ module ForemanAzureRM
9
9
  initializer 'foreman_azure_rm.register_plugin', :before => :finisher_hook do
10
10
  Foreman::Plugin.register :foreman_azure_rm do
11
11
  requires_foreman '>= 1.17'
12
- compute_resource ForemanAzureRM::AzureRM
12
+ compute_resource ForemanAzureRm::AzureRm
13
13
  parameter_filter ComputeResource, :azure_vm, :tenant, :app_ident, :secret_key, :sub_id, :region
14
14
  end
15
15
  end
16
16
 
17
17
  initializer "foreman_azure_rm.add_rabl_view_path" do
18
18
  Rabl.configure do |config|
19
- config.view_paths << ForemanAzureRM::Engine.root.join('app', 'views')
19
+ config.view_paths << ForemanAzureRm::Engine.root.join('app', 'views')
20
20
  end
21
21
  end
22
22
 
@@ -35,9 +35,9 @@ module ForemanAzureRM
35
35
  # Use excon as default so that HTTP Proxy settings of foreman works
36
36
  Faraday::default_adapter=:excon
37
37
 
38
- ::HostsController.send(:include, ForemanAzureRM::Concerns::HostsControllerExtensions)
38
+ ::HostsController.send(:include, ForemanAzureRm::Concerns::HostsControllerExtensions)
39
39
 
40
- Api::V2::ComputeResourcesController.send(:include, ForemanAzureRM::Concerns::ComputeResourcesControllerExtensions)
40
+ Api::V2::ComputeResourcesController.send(:include, ForemanAzureRm::Concerns::ComputeResourcesControllerExtensions)
41
41
  end
42
42
 
43
43
  rake_tasks do
@@ -1,3 +1,3 @@
1
- module ForemanAzureRM
2
- VERSION = '2.0.3'.freeze
1
+ module ForemanAzureRm
2
+ VERSION = '2.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_azure_rm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditi Puntambekar
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-12-10 00:00:00.000000000 Z
13
+ date: 2019-12-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: deface