Skip to content

Commit

Permalink
Merge pull request saltstack#10370 from techhat/azure
Browse files Browse the repository at this point in the history
management_host should be optional
  • Loading branch information
s0undt3ch committed Feb 11, 2014
2 parents c6812e6 + 94f70e0 commit 7a071bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion doc/topics/cloud/azure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ Set up the provider config at ``/etc/salt/cloud.providers.d/azure.conf``:
minion:
master: saltmaster.example.com
provider: gce
provider: azure
# Optional
management_host: management.core.windows.net
The certificate used must be generated by the user. OpenSSL can be used to
create the management certificates. Two certificates are needed: a .cer file,
Expand All @@ -58,6 +61,9 @@ To create the .cer file, execute the following command:
After you creating these files, the .cer file will need to be uploaded to
Azure via the "Upload" action of the "Settings" tab of the management portal.

Optionally, a ``management_host`` may be configured, if necessary for your
region.


Cloud Profiles
==============
Expand Down
7 changes: 5 additions & 2 deletions salt/cloud/clouds/msazure.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_configured_provider():
return config.is_provider_configured(
__opts__,
__active_provider_name__ or __virtualname__,
('subscription_id', 'certificate_path', 'management_host')
('subscription_id', 'certificate_path')
)


Expand All @@ -95,7 +95,10 @@ def get_conn():
)
management_host = config.get_cloud_config_value(
'management_host',
get_configured_provider(), __opts__, search_global=False
get_configured_provider(),
__opts__,
search_global=False,
default='management.core.windows.net'
)
return azure.servicemanagement.ServiceManagementService(
subscription_id, certificate_path, management_host
Expand Down

0 comments on commit 7a071bd

Please sign in to comment.