Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop azure bundles #17

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions actions/create_linked_resource_url.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from azure.mgmt.resource.resources import (
ResourceManagementClient,
ResourceManagementClientConfiguration)
from azure.mgmt.resource.resources import ResourceManagementClient
from azure.mgmt.resource.resources.models import Deployment
from azure.mgmt.resource.resources.models import DeploymentProperties
from azure.mgmt.resource.resources.models import DeploymentMode
Expand All @@ -15,9 +13,8 @@ def run(self, subscription_id, deployment_name, group_name,
template_uri, parameters_uri):
credentials = self.credentials
resource_client = ResourceManagementClient(
ResourceManagementClientConfiguration(
credentials,
subscription_id))
credentials, subscription_id
)
template = TemplateLink(
uri=template_uri,
)
Expand Down
9 changes: 3 additions & 6 deletions actions/create_resource.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from azure.mgmt.resource.resources import (
ResourceManagementClient,
ResourceManagementClientConfiguration)
from azure.mgmt.resource.resources import ResourceManagementClient
from azure.mgmt.resource.resources.models import GenericResource

from lib.base import AzureBaseResourceManagerAction
Expand All @@ -13,9 +11,8 @@ def run(self, subscription_id, group_name, resource_name,
credentials = self.credentials

resource_client = ResourceManagementClient(
ResourceManagementClientConfiguration(
credentials,
subscription_id))
credentials, subscription_id
)

result = resource_client.resources.create_or_update(
group_name,
Expand Down
9 changes: 3 additions & 6 deletions actions/list_resource_groups.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from azure.mgmt.resource.resources import (
ResourceManagementClient,
ResourceManagementClientConfiguration)
from azure.mgmt.resource.resources import ResourceManagementClient
from lib.base import AzureBaseResourceManagerAction


Expand All @@ -9,9 +7,8 @@ def run(self, subscription_id):
credentials = self.credentials

resource_client = ResourceManagementClient(
ResourceManagementClientConfiguration(
credentials,
subscription_id))
credentials, subscription_id
)

resource_groups = resource_client.resource_groups.list()
return [group.name for group in resource_groups]
11 changes: 8 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
azurerm==0.8.27
azure-mgmt==0.30.0a1
msrestazure
azure<5.0
apache-libcloud<3.0.0

# azure and azure-mgmt bundles deprecated
# so we list just the packages we need
azure-mgmt-resource
azure-graphrbac

# pip cannot proces earlier libcloud
apache-libcloud>=1.0.0,<3.0.0