{"action":"created","comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/34567079","id":34567079,"diff_hunk":"@@ -108,11 +114,45 @@ def parseArgs(self, control_host, deployment_config, application_config):\n                     error=str(e)\n                 )\n             )\n+\n+        for credential, default_path in {\n+            \"cacert\": b\"cluster.crt\",\n+            \"cert\": b\"user.crt\",\n+            \"key\": b\"user.key\",\n+        }.items():\n+            if self[credential] is None:\n+                self[credential] = FilePath(default_path)\n+            else:\n+                if self[\"certificates-directory\"] is not None:\n+                    raise UsageError(\n+                        \"Cannot use --certificates-directory and \"\n+                        \"--{credential} options together. Please specify \"\n+                        \"either certificates directory or full paths to each \"\n+                        \"file via the --cacert, --cert and --key \"\n+                        \"options.\".format(credential=credential)\n+                    )\n+                self[credential] = FilePath(self[credential])\n+\n         if self[\"certificates-directory\"] is None:\n             self[\"certificates-directory\"] = FilePath(os.getcwd())\n         else:\n+            # Use the directory set by certificates-directory and the\n+            # default credential file names, which have already been set\n+            # against the relevant option keys.\n             self[\"certificates-directory\"] = FilePath(\n                 self[\"certificates-directory\"])\n+            self[\"cacert\"] = self[\"certificates-directory\"].child(\n+                self[\"cacert\"].basename())\n+            self[\"cert\"] = self[\"certificates-directory\"].child(\n+                self[\"cert\"].basename())\n+            self[\"key\"] = self[\"certificates-directory\"].child(\n+                self[\"key\"].basename())\n+\n+        for credential in [\"cacert\", \"cert\", \"key\"]:\n+            if not self[credential].isfile():\n+                raise UsageError(\n+                    \"File \" + self[credential].path + \" does not exist.\"","path":"flocker/cli/script.py","position":54,"original_position":54,"commit_id":"6375fe6892b896e833039ae7619e92b3359a95ec","original_commit_id":"6375fe6892b896e833039ae7619e92b3359a95ec","user":{"login":"jongiddy","id":3735327,"avatar_url":"https://avatars.githubusercontent.com/u/3735327?v=3","gravatar_id":"","url":"https://api.github.com/users/jongiddy","html_url":"https://github.com/jongiddy","followers_url":"https://api.github.com/users/jongiddy/followers","following_url":"https://api.github.com/users/jongiddy/following{/other_user}","gists_url":"https://api.github.com/users/jongiddy/gists{/gist_id}","starred_url":"https://api.github.com/users/jongiddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jongiddy/subscriptions","organizations_url":"https://api.github.com/users/jongiddy/orgs","repos_url":"https://api.github.com/users/jongiddy/repos","events_url":"https://api.github.com/users/jongiddy/events{/privacy}","received_events_url":"https://api.github.com/users/jongiddy/received_events","type":"User","site_admin":false},"body":":question: Add an additional sentence: \r\n```\r\n\"Use the flocker-ca command to create the credential, or use the --\" + credential + \" flag to specify the credential location.\"\r\n```","created_at":"2015-07-14T13:27:00Z","updated_at":"2015-07-14T13:27:00Z","html_url":"https://github.com/ClusterHQ/flocker/pull/1674#discussion_r34567079","pull_request_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674","_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/34567079"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1674#discussion_r34567079"},"pull_request":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674","id":37989741,"html_url":"https://github.com/ClusterHQ/flocker/pull/1674","diff_url":"https://github.com/ClusterHQ/flocker/pull/1674.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/1674.patch","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1674","number":1674,"state":"open","locked":false,"title":"[FLOC-2398] Flocker deploy certs","user":{"login":"dwgebler","id":646585,"avatar_url":"https://avatars.githubusercontent.com/u/646585?v=3","gravatar_id":"","url":"https://api.github.com/users/dwgebler","html_url":"https://github.com/dwgebler","followers_url":"https://api.github.com/users/dwgebler/followers","following_url":"https://api.github.com/users/dwgebler/following{/other_user}","gists_url":"https://api.github.com/users/dwgebler/gists{/gist_id}","starred_url":"https://api.github.com/users/dwgebler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwgebler/subscriptions","organizations_url":"https://api.github.com/users/dwgebler/orgs","repos_url":"https://api.github.com/users/dwgebler/repos","events_url":"https://api.github.com/users/dwgebler/events{/privacy}","received_events_url":"https://api.github.com/users/dwgebler/received_events","type":"User","site_admin":false},"body":"Fixes FLOC-2398. Also fixes FLOC-2349 and FLOC-2397.","created_at":"2015-06-18T10:00:02Z","updated_at":"2015-07-14T13:27:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1b4fc2ada3681feffadf8a6f107456b46b8b346","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674/commits","review_comments_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674/comments","review_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1674/comments","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/6375fe6892b896e833039ae7619e92b3359a95ec","head":{"label":"ClusterHQ:flocker-deploy-certs-FLOC-2398","ref":"flocker-deploy-certs-FLOC-2398","sha":"6375fe6892b896e833039ae7619e92b3359a95ec","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2015-07-14T11:18:35Z","pushed_at":"2015-07-14T10:36:35Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":60680,"stargazers_count":1704,"watchers_count":1704,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"open_issues_count":29,"forks":108,"open_issues":29,"watchers":1704,"default_branch":"master"}},"base":{"label":"ClusterHQ:master","ref":"master","sha":"c686b4ac496d477f178464152a7eaaebc3ba2e8a","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2015-07-14T11:18:35Z","pushed_at":"2015-07-14T10:36:35Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":60680,"stargazers_count":1704,"watchers_count":1704,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"open_issues_count":29,"forks":108,"open_issues":29,"watchers":1704,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1674"},"issue":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1674"},"comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1674/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1674/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterHQ/flocker/statuses/6375fe6892b896e833039ae7619e92b3359a95ec"}}}}