{"action":"created","comment":{"url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments/36246427","id":36246427,"diff_hunk":"@@ -0,0 +1,87 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.jclouds.etcd;\n+\n+import java.net.URI;\n+import java.util.Properties;\n+\n+import org.jclouds.apis.ApiMetadata;\n+import org.jclouds.etcd.config.EtcdHttpApiModule;\n+import org.jclouds.rest.internal.BaseHttpApiMetadata;\n+\n+import com.google.auto.service.AutoService;\n+import com.google.common.collect.ImmutableSet;\n+import com.google.inject.Module;\n+\n+@AutoService(ApiMetadata.class)\n+public class EtcdApiMetadata extends BaseHttpApiMetadata<EtcdApi> {\n+\n+   public static final String API_VERSION = \"v2\";\n+   public static final String BUILD_VERSION = \"2.1.1\";\n+\n+   @Override\n+   public Builder toBuilder() {\n+      return new Builder().fromApiMetadata(this);\n+   }\n+\n+   public EtcdApiMetadata() {\n+      this(new Builder());\n+   }\n+\n+   protected EtcdApiMetadata(Builder builder) {\n+      super(builder);\n+   }\n+\n+   public static Properties defaultProperties() {\n+      Properties properties = BaseHttpApiMetadata.defaultProperties();\n+      return properties;\n+   }\n+\n+   public static class Builder extends BaseHttpApiMetadata.Builder<EtcdApi, Builder> {\n+\n+      protected Builder() {\n+         super(EtcdApi.class);\n+         id(\"etcd\").\n+         name(\"Etcd API\").\n+         identityName(\"username:password\").\n+         defaultIdentity(\"Optional Username\").\n+         defaultCredential(\"Optional Password\").","path":"etcd/src/main/java/org/jclouds/etcd/EtcdApiMetadata.java","position":null,"original_position":63,"commit_id":"42d9f3b0cd455c1781824bc074c9fe281a7ec0e8","original_commit_id":"0706b6adc14b557d24194370e47cb50f346dd9bd","user":{"login":"nacx","id":446705,"avatar_url":"https://avatars.githubusercontent.com/u/446705?v=3","gravatar_id":"","url":"https://api.github.com/users/nacx","html_url":"https://github.com/nacx","followers_url":"https://api.github.com/users/nacx/followers","following_url":"https://api.github.com/users/nacx/following{/other_user}","gists_url":"https://api.github.com/users/nacx/gists{/gist_id}","starred_url":"https://api.github.com/users/nacx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nacx/subscriptions","organizations_url":"https://api.github.com/users/nacx/orgs","repos_url":"https://api.github.com/users/nacx/repos","events_url":"https://api.github.com/users/nacx/events{/privacy}","received_events_url":"https://api.github.com/users/nacx/received_events","type":"User","site_admin":false},"body":"I'm not saying you have to use ones or the others. All four methods should be present:\r\n\r\n* `identityName` and `credentialName` are mandatory for all ApiMetadata classes. They are just labels that define the format of the identity and credential so users know what to put there when creating the context. They're just labels to give a hint and allow, for example, tooling to prompt for the right thing.\r\n* `defaultIdentity` and `defaultCredential` are default values to set for the identity and credential fields, if that makes sense, in case the user does not supply one of them. These are optional as in most apis/providers users are required both the identity and the credential.\r\n\r\nIn this case, as the credentials are not used, you have to set all four methods in your api metadata, in order to configure a default dummy credentials so the user does not have to provide them (which would be useless and confusing) when creating the context.","created_at":"2015-08-04T21:48:50Z","updated_at":"2015-08-04T21:48:50Z","html_url":"https://github.com/jclouds/jclouds-labs/pull/195#discussion_r36246427","pull_request_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments/36246427"},"html":{"href":"https://github.com/jclouds/jclouds-labs/pull/195#discussion_r36246427"},"pull_request":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195","id":41051613,"html_url":"https://github.com/jclouds/jclouds-labs/pull/195","diff_url":"https://github.com/jclouds/jclouds-labs/pull/195.diff","patch_url":"https://github.com/jclouds/jclouds-labs/pull/195.patch","issue_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/195","number":195,"state":"open","locked":false,"title":"JCLOUDS-971: add statistics and miscellaneous API","user":{"login":"cdancy","id":7871459,"avatar_url":"https://avatars.githubusercontent.com/u/7871459?v=3","gravatar_id":"","url":"https://api.github.com/users/cdancy","html_url":"https://github.com/cdancy","followers_url":"https://api.github.com/users/cdancy/followers","following_url":"https://api.github.com/users/cdancy/following{/other_user}","gists_url":"https://api.github.com/users/cdancy/gists{/gist_id}","starred_url":"https://api.github.com/users/cdancy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdancy/subscriptions","organizations_url":"https://api.github.com/users/cdancy/orgs","repos_url":"https://api.github.com/users/cdancy/repos","events_url":"https://api.github.com/users/cdancy/events{/privacy}","received_events_url":"https://api.github.com/users/cdancy/received_events","type":"User","site_admin":false},"body":"continuing from https://github.com/jclouds/jclouds-labs/pull/194#event-367539973\r\n\r\nstatistics and miscellaneous API have both been fleshed out. Both are very small which is why they are being included in this PR. Mock and integration tests have been written and pass against latest etcd version: 2.1.1.","created_at":"2015-07-28T19:40:44Z","updated_at":"2015-08-04T21:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8055544500746d7a56a96f5f6d92d8c96bd7c4ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195/commits","review_comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195/comments","review_comment_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/195/comments","statuses_url":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/42d9f3b0cd455c1781824bc074c9fe281a7ec0e8","head":{"label":"cdancy:master","ref":"master","sha":"42d9f3b0cd455c1781824bc074c9fe281a7ec0e8","user":{"login":"cdancy","id":7871459,"avatar_url":"https://avatars.githubusercontent.com/u/7871459?v=3","gravatar_id":"","url":"https://api.github.com/users/cdancy","html_url":"https://github.com/cdancy","followers_url":"https://api.github.com/users/cdancy/followers","following_url":"https://api.github.com/users/cdancy/following{/other_user}","gists_url":"https://api.github.com/users/cdancy/gists{/gist_id}","starred_url":"https://api.github.com/users/cdancy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdancy/subscriptions","organizations_url":"https://api.github.com/users/cdancy/orgs","repos_url":"https://api.github.com/users/cdancy/repos","events_url":"https://api.github.com/users/cdancy/events{/privacy}","received_events_url":"https://api.github.com/users/cdancy/received_events","type":"User","site_admin":false},"repo":{"id":39777331,"name":"jclouds-labs","full_name":"cdancy/jclouds-labs","owner":{"login":"cdancy","id":7871459,"avatar_url":"https://avatars.githubusercontent.com/u/7871459?v=3","gravatar_id":"","url":"https://api.github.com/users/cdancy","html_url":"https://github.com/cdancy","followers_url":"https://api.github.com/users/cdancy/followers","following_url":"https://api.github.com/users/cdancy/following{/other_user}","gists_url":"https://api.github.com/users/cdancy/gists{/gist_id}","starred_url":"https://api.github.com/users/cdancy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdancy/subscriptions","organizations_url":"https://api.github.com/users/cdancy/orgs","repos_url":"https://api.github.com/users/cdancy/repos","events_url":"https://api.github.com/users/cdancy/events{/privacy}","received_events_url":"https://api.github.com/users/cdancy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cdancy/jclouds-labs","description":"Read-only mirror of ASF Git Repo for jclouds labs","fork":true,"url":"https://api.github.com/repos/cdancy/jclouds-labs","forks_url":"https://api.github.com/repos/cdancy/jclouds-labs/forks","keys_url":"https://api.github.com/repos/cdancy/jclouds-labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdancy/jclouds-labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdancy/jclouds-labs/teams","hooks_url":"https://api.github.com/repos/cdancy/jclouds-labs/hooks","issue_events_url":"https://api.github.com/repos/cdancy/jclouds-labs/issues/events{/number}","events_url":"https://api.github.com/repos/cdancy/jclouds-labs/events","assignees_url":"https://api.github.com/repos/cdancy/jclouds-labs/assignees{/user}","branches_url":"https://api.github.com/repos/cdancy/jclouds-labs/branches{/branch}","tags_url":"https://api.github.com/repos/cdancy/jclouds-labs/tags","blobs_url":"https://api.github.com/repos/cdancy/jclouds-labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdancy/jclouds-labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdancy/jclouds-labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdancy/jclouds-labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdancy/jclouds-labs/statuses/{sha}","languages_url":"https://api.github.com/repos/cdancy/jclouds-labs/languages","stargazers_url":"https://api.github.com/repos/cdancy/jclouds-labs/stargazers","contributors_url":"https://api.github.com/repos/cdancy/jclouds-labs/contributors","subscribers_url":"https://api.github.com/repos/cdancy/jclouds-labs/subscribers","subscription_url":"https://api.github.com/repos/cdancy/jclouds-labs/subscription","commits_url":"https://api.github.com/repos/cdancy/jclouds-labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdancy/jclouds-labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdancy/jclouds-labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdancy/jclouds-labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdancy/jclouds-labs/contents/{+path}","compare_url":"https://api.github.com/repos/cdancy/jclouds-labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdancy/jclouds-labs/merges","archive_url":"https://api.github.com/repos/cdancy/jclouds-labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdancy/jclouds-labs/downloads","issues_url":"https://api.github.com/repos/cdancy/jclouds-labs/issues{/number}","pulls_url":"https://api.github.com/repos/cdancy/jclouds-labs/pulls{/number}","milestones_url":"https://api.github.com/repos/cdancy/jclouds-labs/milestones{/number}","notifications_url":"https://api.github.com/repos/cdancy/jclouds-labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdancy/jclouds-labs/labels{/name}","releases_url":"https://api.github.com/repos/cdancy/jclouds-labs/releases{/id}","created_at":"2015-07-27T13:58:14Z","updated_at":"2015-07-27T13:58:18Z","pushed_at":"2015-08-04T13:49:36Z","git_url":"git://github.com/cdancy/jclouds-labs.git","ssh_url":"git@github.com:cdancy/jclouds-labs.git","clone_url":"https://github.com/cdancy/jclouds-labs.git","svn_url":"https://github.com/cdancy/jclouds-labs","homepage":null,"size":20278,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jclouds:master","ref":"master","sha":"9c19ee0c826db2599b9b6d3a9c29215591abaa7a","user":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"repo":{"id":10040970,"name":"jclouds-labs","full_name":"jclouds/jclouds-labs","owner":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jclouds/jclouds-labs","description":"Read-only mirror of ASF Git Repo for jclouds labs","fork":false,"url":"https://api.github.com/repos/jclouds/jclouds-labs","forks_url":"https://api.github.com/repos/jclouds/jclouds-labs/forks","keys_url":"https://api.github.com/repos/jclouds/jclouds-labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jclouds/jclouds-labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jclouds/jclouds-labs/teams","hooks_url":"https://api.github.com/repos/jclouds/jclouds-labs/hooks","issue_events_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/events{/number}","events_url":"https://api.github.com/repos/jclouds/jclouds-labs/events","assignees_url":"https://api.github.com/repos/jclouds/jclouds-labs/assignees{/user}","branches_url":"https://api.github.com/repos/jclouds/jclouds-labs/branches{/branch}","tags_url":"https://api.github.com/repos/jclouds/jclouds-labs/tags","blobs_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/{sha}","languages_url":"https://api.github.com/repos/jclouds/jclouds-labs/languages","stargazers_url":"https://api.github.com/repos/jclouds/jclouds-labs/stargazers","contributors_url":"https://api.github.com/repos/jclouds/jclouds-labs/contributors","subscribers_url":"https://api.github.com/repos/jclouds/jclouds-labs/subscribers","subscription_url":"https://api.github.com/repos/jclouds/jclouds-labs/subscription","commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jclouds/jclouds-labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jclouds/jclouds-labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jclouds/jclouds-labs/contents/{+path}","compare_url":"https://api.github.com/repos/jclouds/jclouds-labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jclouds/jclouds-labs/merges","archive_url":"https://api.github.com/repos/jclouds/jclouds-labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jclouds/jclouds-labs/downloads","issues_url":"https://api.github.com/repos/jclouds/jclouds-labs/issues{/number}","pulls_url":"https://api.github.com/repos/jclouds/jclouds-labs/pulls{/number}","milestones_url":"https://api.github.com/repos/jclouds/jclouds-labs/milestones{/number}","notifications_url":"https://api.github.com/repos/jclouds/jclouds-labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jclouds/jclouds-labs/labels{/name}","releases_url":"https://api.github.com/repos/jclouds/jclouds-labs/releases{/id}","created_at":"2013-05-13T20:47:47Z","updated_at":"2015-07-24T20:33:45Z","pushed_at":"2015-08-04T13:49:37Z","git_url":"git://github.com/jclouds/jclouds-labs.git","ssh_url":"git@github.com:jclouds/jclouds-labs.git","clone_url":"https://github.com/jclouds/jclouds-labs.git","svn_url":"https://github.com/jclouds/jclouds-labs","homepage":null,"size":30296,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":9,"forks":75,"open_issues":9,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195"},"html":{"href":"https://github.com/jclouds/jclouds-labs/pull/195"},"issue":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/issues/195"},"comments":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/jclouds/jclouds-labs/statuses/42d9f3b0cd455c1781824bc074c9fe281a7ec0e8"}}}}