{"action":"created","comment":{"url":"https://api.github.com/repos/Parsl/parsl/pulls/comments/301145911","pull_request_review_id":258968037,"id":301145911,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMTE0NTkxMQ==","diff_hunk":"@@ -0,0 +1,489 @@\n+import json\n+import logging\n+import os\n+import time\n+from string import Template\n+import base64\n+\n+from parsl.dataflow.error import ConfigurationError\n+from parsl.providers.azure.template import template_string\n+from parsl.providers.provider_base import ExecutionProvider\n+from parsl.providers.error import OptionalModuleMissing\n+from parsl.utils import RepresentationMixin\n+from parsl.launchers import SingleNodeLauncher\n+\n+logger = logging.getLogger(__name__)\n+\n+try:\n+    from azure.common.credentials import ServicePrincipalCredentials\n+    from azure.mgmt.resource import ResourceManagementClient\n+    from azure.mgmt.network import NetworkManagementClient\n+    from azure.mgmt.compute import ComputeManagementClient\n+    from azure.mgmt.compute.models import DiskCreateOption\n+\n+    _api_enabled = True\n+\n+except ImportError:\n+    _api_enabled = False\n+else:\n+    _api_enabled = True\n+\n+translate_table = {\n+    'VM pending': 'PENDING',\n+    'VM running': 'RUNNING',\n+    'VM deallocated': 'COMPLETED',\n+    'VM stopping': 'COMPLETED',  # We shouldn't really see this state\n+    'VM stopped': 'COMPLETED',  # We shouldn't really see this state\n+}\n+\n+\n+class AzureProvider(ExecutionProvider, RepresentationMixin):\n+    \"\"\"\n+    A Provider for using Microsoft Azure Resources\n+\n+    One of 2 methods are required to authenticate: keyfile, or environment\n+    variables. If  keyfile is not set, the following environment\n+    variables must be set: `AZURE_CLIENT_ID` (the access key for\n+    your azure account),\n+    `AZURE_CLIENT_SECRET` (the secret key for your azure account), the\n+    `AZURE_TENANT_ID` (the session key for your azure account), and\n+    AZURE_SUBSCRIPTION_ID.\n+\n+    Parameters\n+    ----------\n+    vm_reference : dict\n+        Dictionary describing the parameters of the Azure VM.\n+\n+        Required structure:\n+        {\n+          'publisher': VM OS publisher\n+          'offer': VM OS offer\n+          'sku': VM OS SKU\n+          'version': VM OS version\n+          'vm_size': VM Size, analogous to instance type for AWS\n+          'disk_size_gb': (int) size of VM disk in gb\n+          \"admin_username\": (str) admin username of VM instances,\n+          \"password\": (str) admin password for VM instances\n+        }\n+    worker_init : str\n+        String to append to the Userdata script executed in the cloudinit phase of\n+        instance initialization.\n+    walltime : str","path":"parsl/providers/azure/azure.py","position":71,"original_position":71,"commit_id":"a2983191dfbeebd0421a3575d28d50b8fe3b99cb","original_commit_id":"a2983191dfbeebd0421a3575d28d50b8fe3b99cb","user":{"login":"benclifford","id":280107,"node_id":"MDQ6VXNlcjI4MDEwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/280107?v=4","gravatar_id":"","url":"https://api.github.com/users/benclifford","html_url":"https://github.com/benclifford","followers_url":"https://api.github.com/users/benclifford/followers","following_url":"https://api.github.com/users/benclifford/following{/other_user}","gists_url":"https://api.github.com/users/benclifford/gists{/gist_id}","starred_url":"https://api.github.com/users/benclifford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benclifford/subscriptions","organizations_url":"https://api.github.com/users/benclifford/orgs","repos_url":"https://api.github.com/users/benclifford/repos","events_url":"https://api.github.com/users/benclifford/events{/privacy}","received_events_url":"https://api.github.com/users/benclifford/received_events","type":"User","site_admin":false},"body":"this line is really only about the docstring","created_at":"2019-07-08T15:06:42Z","updated_at":"2019-07-08T15:06:42Z","html_url":"https://github.com/Parsl/parsl/pull/1121#discussion_r301145911","pull_request_url":"https://api.github.com/repos/Parsl/parsl/pulls/1121","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/comments/301145911"},"html":{"href":"https://github.com/Parsl/parsl/pull/1121#discussion_r301145911"},"pull_request":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/1121"}},"in_reply_to_id":300996612},"pull_request":{"url":"https://api.github.com/repos/Parsl/parsl/pulls/1121","id":295134420,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1MTM0NDIw","html_url":"https://github.com/Parsl/parsl/pull/1121","diff_url":"https://github.com/Parsl/parsl/pull/1121.diff","patch_url":"https://github.com/Parsl/parsl/pull/1121.patch","issue_url":"https://api.github.com/repos/Parsl/parsl/issues/1121","number":1121,"state":"open","locked":false,"title":"Resurrecting Azure Execution provider","user":{"login":"benhg","id":11875825,"node_id":"MDQ6VXNlcjExODc1ODI1","avatar_url":"https://avatars2.githubusercontent.com/u/11875825?v=4","gravatar_id":"","url":"https://api.github.com/users/benhg","html_url":"https://github.com/benhg","followers_url":"https://api.github.com/users/benhg/followers","following_url":"https://api.github.com/users/benhg/following{/other_user}","gists_url":"https://api.github.com/users/benhg/gists{/gist_id}","starred_url":"https://api.github.com/users/benhg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhg/subscriptions","organizations_url":"https://api.github.com/users/benhg/orgs","repos_url":"https://api.github.com/users/benhg/repos","events_url":"https://api.github.com/users/benhg/events{/privacy}","received_events_url":"https://api.github.com/users/benhg/received_events","type":"User","site_admin":false},"body":"This pull request re-adds the Azure execution provider. ","created_at":"2019-07-07T22:14:16Z","updated_at":"2019-07-08T15:06:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3cbfb809a9854ace9f633f447e50824a38f4800","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Parsl/parsl/pulls/1121/commits","review_comments_url":"https://api.github.com/repos/Parsl/parsl/pulls/1121/comments","review_comment_url":"https://api.github.com/repos/Parsl/parsl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Parsl/parsl/issues/1121/comments","statuses_url":"https://api.github.com/repos/Parsl/parsl/statuses/a2983191dfbeebd0421a3575d28d50b8fe3b99cb","head":{"label":"benhg:benhg-azure-provider","ref":"benhg-azure-provider","sha":"a2983191dfbeebd0421a3575d28d50b8fe3b99cb","user":{"login":"benhg","id":11875825,"node_id":"MDQ6VXNlcjExODc1ODI1","avatar_url":"https://avatars2.githubusercontent.com/u/11875825?v=4","gravatar_id":"","url":"https://api.github.com/users/benhg","html_url":"https://github.com/benhg","followers_url":"https://api.github.com/users/benhg/followers","following_url":"https://api.github.com/users/benhg/following{/other_user}","gists_url":"https://api.github.com/users/benhg/gists{/gist_id}","starred_url":"https://api.github.com/users/benhg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhg/subscriptions","organizations_url":"https://api.github.com/users/benhg/orgs","repos_url":"https://api.github.com/users/benhg/repos","events_url":"https://api.github.com/users/benhg/events{/privacy}","received_events_url":"https://api.github.com/users/benhg/received_events","type":"User","site_admin":false},"repo":{"id":195591507,"node_id":"MDEwOlJlcG9zaXRvcnkxOTU1OTE1MDc=","name":"parsl","full_name":"benhg/parsl","private":false,"owner":{"login":"benhg","id":11875825,"node_id":"MDQ6VXNlcjExODc1ODI1","avatar_url":"https://avatars2.githubusercontent.com/u/11875825?v=4","gravatar_id":"","url":"https://api.github.com/users/benhg","html_url":"https://github.com/benhg","followers_url":"https://api.github.com/users/benhg/followers","following_url":"https://api.github.com/users/benhg/following{/other_user}","gists_url":"https://api.github.com/users/benhg/gists{/gist_id}","starred_url":"https://api.github.com/users/benhg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhg/subscriptions","organizations_url":"https://api.github.com/users/benhg/orgs","repos_url":"https://api.github.com/users/benhg/repos","events_url":"https://api.github.com/users/benhg/events{/privacy}","received_events_url":"https://api.github.com/users/benhg/received_events","type":"User","site_admin":false},"html_url":"https://github.com/benhg/parsl","description":"Parsl - Parallel Scripting Library","fork":true,"url":"https://api.github.com/repos/benhg/parsl","forks_url":"https://api.github.com/repos/benhg/parsl/forks","keys_url":"https://api.github.com/repos/benhg/parsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benhg/parsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benhg/parsl/teams","hooks_url":"https://api.github.com/repos/benhg/parsl/hooks","issue_events_url":"https://api.github.com/repos/benhg/parsl/issues/events{/number}","events_url":"https://api.github.com/repos/benhg/parsl/events","assignees_url":"https://api.github.com/repos/benhg/parsl/assignees{/user}","branches_url":"https://api.github.com/repos/benhg/parsl/branches{/branch}","tags_url":"https://api.github.com/repos/benhg/parsl/tags","blobs_url":"https://api.github.com/repos/benhg/parsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benhg/parsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benhg/parsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/benhg/parsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benhg/parsl/statuses/{sha}","languages_url":"https://api.github.com/repos/benhg/parsl/languages","stargazers_url":"https://api.github.com/repos/benhg/parsl/stargazers","contributors_url":"https://api.github.com/repos/benhg/parsl/contributors","subscribers_url":"https://api.github.com/repos/benhg/parsl/subscribers","subscription_url":"https://api.github.com/repos/benhg/parsl/subscription","commits_url":"https://api.github.com/repos/benhg/parsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/benhg/parsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/benhg/parsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/benhg/parsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/benhg/parsl/contents/{+path}","compare_url":"https://api.github.com/repos/benhg/parsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benhg/parsl/merges","archive_url":"https://api.github.com/repos/benhg/parsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benhg/parsl/downloads","issues_url":"https://api.github.com/repos/benhg/parsl/issues{/number}","pulls_url":"https://api.github.com/repos/benhg/parsl/pulls{/number}","milestones_url":"https://api.github.com/repos/benhg/parsl/milestones{/number}","notifications_url":"https://api.github.com/repos/benhg/parsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benhg/parsl/labels{/name}","releases_url":"https://api.github.com/repos/benhg/parsl/releases{/id}","deployments_url":"https://api.github.com/repos/benhg/parsl/deployments","created_at":"2019-07-06T23:31:45Z","updated_at":"2019-07-06T23:31:48Z","pushed_at":"2019-07-07T21:55:29Z","git_url":"git://github.com/benhg/parsl.git","ssh_url":"git@github.com:benhg/parsl.git","clone_url":"https://github.com/benhg/parsl.git","svn_url":"https://github.com/benhg/parsl","homepage":"http://parsl-project.org","size":16492,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Parsl:master","ref":"master","sha":"240437dbe3de33000fc57e364de9e6e5ac27149c","user":{"login":"Parsl","id":26490185,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NDkwMTg1","avatar_url":"https://avatars0.githubusercontent.com/u/26490185?v=4","gravatar_id":"","url":"https://api.github.com/users/Parsl","html_url":"https://github.com/Parsl","followers_url":"https://api.github.com/users/Parsl/followers","following_url":"https://api.github.com/users/Parsl/following{/other_user}","gists_url":"https://api.github.com/users/Parsl/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsl/subscriptions","organizations_url":"https://api.github.com/users/Parsl/orgs","repos_url":"https://api.github.com/users/Parsl/repos","events_url":"https://api.github.com/users/Parsl/events{/privacy}","received_events_url":"https://api.github.com/users/Parsl/received_events","type":"Organization","site_admin":false},"repo":{"id":71482397,"node_id":"MDEwOlJlcG9zaXRvcnk3MTQ4MjM5Nw==","name":"parsl","full_name":"Parsl/parsl","private":false,"owner":{"login":"Parsl","id":26490185,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NDkwMTg1","avatar_url":"https://avatars0.githubusercontent.com/u/26490185?v=4","gravatar_id":"","url":"https://api.github.com/users/Parsl","html_url":"https://github.com/Parsl","followers_url":"https://api.github.com/users/Parsl/followers","following_url":"https://api.github.com/users/Parsl/following{/other_user}","gists_url":"https://api.github.com/users/Parsl/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsl/subscriptions","organizations_url":"https://api.github.com/users/Parsl/orgs","repos_url":"https://api.github.com/users/Parsl/repos","events_url":"https://api.github.com/users/Parsl/events{/privacy}","received_events_url":"https://api.github.com/users/Parsl/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Parsl/parsl","description":"Parsl - Parallel Scripting Library","fork":false,"url":"https://api.github.com/repos/Parsl/parsl","forks_url":"https://api.github.com/repos/Parsl/parsl/forks","keys_url":"https://api.github.com/repos/Parsl/parsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parsl/parsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parsl/parsl/teams","hooks_url":"https://api.github.com/repos/Parsl/parsl/hooks","issue_events_url":"https://api.github.com/repos/Parsl/parsl/issues/events{/number}","events_url":"https://api.github.com/repos/Parsl/parsl/events","assignees_url":"https://api.github.com/repos/Parsl/parsl/assignees{/user}","branches_url":"https://api.github.com/repos/Parsl/parsl/branches{/branch}","tags_url":"https://api.github.com/repos/Parsl/parsl/tags","blobs_url":"https://api.github.com/repos/Parsl/parsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parsl/parsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parsl/parsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parsl/parsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parsl/parsl/statuses/{sha}","languages_url":"https://api.github.com/repos/Parsl/parsl/languages","stargazers_url":"https://api.github.com/repos/Parsl/parsl/stargazers","contributors_url":"https://api.github.com/repos/Parsl/parsl/contributors","subscribers_url":"https://api.github.com/repos/Parsl/parsl/subscribers","subscription_url":"https://api.github.com/repos/Parsl/parsl/subscription","commits_url":"https://api.github.com/repos/Parsl/parsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parsl/parsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parsl/parsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parsl/parsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Parsl/parsl/contents/{+path}","compare_url":"https://api.github.com/repos/Parsl/parsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parsl/parsl/merges","archive_url":"https://api.github.com/repos/Parsl/parsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parsl/parsl/downloads","issues_url":"https://api.github.com/repos/Parsl/parsl/issues{/number}","pulls_url":"https://api.github.com/repos/Parsl/parsl/pulls{/number}","milestones_url":"https://api.github.com/repos/Parsl/parsl/milestones{/number}","notifications_url":"https://api.github.com/repos/Parsl/parsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parsl/parsl/labels{/name}","releases_url":"https://api.github.com/repos/Parsl/parsl/releases{/id}","deployments_url":"https://api.github.com/repos/Parsl/parsl/deployments","created_at":"2016-10-20T16:27:51Z","updated_at":"2019-07-08T14:57:39Z","pushed_at":"2019-07-08T14:57:36Z","git_url":"git://github.com/Parsl/parsl.git","ssh_url":"git@github.com:Parsl/parsl.git","clone_url":"https://github.com/Parsl/parsl.git","svn_url":"https://github.com/Parsl/parsl","homepage":"http://parsl-project.org","size":16485,"stargazers_count":156,"watchers_count":156,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":242,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":38,"open_issues":242,"watchers":156,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/1121"},"html":{"href":"https://github.com/Parsl/parsl/pull/1121"},"issue":{"href":"https://api.github.com/repos/Parsl/parsl/issues/1121"},"comments":{"href":"https://api.github.com/repos/Parsl/parsl/issues/1121/comments"},"review_comments":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/1121/comments"},"review_comment":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Parsl/parsl/pulls/1121/commits"},"statuses":{"href":"https://api.github.com/repos/Parsl/parsl/statuses/a2983191dfbeebd0421a3575d28d50b8fe3b99cb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"benclifford"}}