GitHub PullRequestReviewCommentEvent at 2014-09-26 10:12:13
Repository: flocker
Actor: adamtheturtle
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/18082138","id":18082138,"diff_hunk":"@@ -24,67 +24,54 @@ class AlreadyExists(Exception):\n     \"\"\"A unit with the given name already exists.\"\"\"\n \n \n-@attributes([\"id\", \"variables\"])\n-class GearEnvironment(object):\n+@attributes([\"variables\"])\n+class Environment(object):\n     \"\"\"\n-    A collection of Geard unit environment variables associated with an\n-    environment ID.\n+    A collection of environment variables.\n \n     :ivar frozenset variables: A ``frozenset`` of tuples containing\n         key and value pairs representing the environment variables.\n     \"\"\"\n-\n     def to_dict(self):\n         \"\"\"\n         Convert to a dictionary suitable for serialising to JSON and then on to\n-        the Gear REST API.\n+        the Docker API.\n+\n+        :return: ``dict`` mappings keys to values.\n         \"\"\"\n-        variables = []\n-        for k, v in self.variables:\n-            variables.append(dict(name=k, value=v))\n-        return dict(id=self.id, variables=variables)\n+        return dict(self.variables)\n \n \n-@attributes([\"name\", \"activation_state\", \"sub_state\", \"container_image\",\n-             \"ports\", \"links\", \"environment\"],\n-            defaults=dict(sub_state=None, container_image=None,\n-                          ports=(), links=(), environment=None))\n+@attributes([\"name\", \"activation_state\", \"container_image\",\n+             \"ports\", \"environment\"],\n+            defaults=dict(container_image=None,\n+                          ports=(), environment=None))\n class Unit(object):\n     \"\"\"\n-    Information about a unit managed by geard/systemd.\n-\n-    XXX: The container_image attribute defaults to `None` until we have a way\n-    to interrogate geard for the docker images associated with its\n-    containers. See https://github.com/ClusterHQ/flocker/issues/207\n+    Information about a unit managed by Docker.\n \n-    :ivar unicode name: The name of the unit.\n+    XXX: The container_image attribute defaults to `None` until we have\n+    code to call docker for images associated with its containers. See\n+    https://github.com/ClusterHQ/flocker/issues/207\n \n-    :ivar unicode activation_state: The state of the unit in terms of\n-        systemd activation. Values indicate whether the unit is installed\n-        but not running (``u\"inactive\"``), starting (``u\"activating\"``),\n-        running (``u\"active\"``), failed (``u\"failed\"``) stopping\n-        (``u\"deactivating\"``) or stopped (either ``u\"failed\"`` or\n-        ``u\"inactive\"`` apparently). See\n-        https://github.com/ClusterHQ/flocker/issues/187 about using constants\n-        instead of strings.\n+    :ivar unicode name: The name of the unit, which may not be the same as\n+        the container name.\n \n-    :ivar unicode sub_state: The systemd substate of the unit. Certain Unit\n-        types may have a number of additional substates, which are mapped to\n-        the five generalized activation states above. See\n-        http://www.freedesktop.org/software/systemd/man/systemd.html#Concepts\n+    :ivar unicode activation_state: The state of the\n+        container. ``u\"active\"`` indicates it is running, ``u\"inactive\"``\n+        indicates it is not running. See\n+        https://github.com/ClusterHQ/flocker/issues/187 about using\n+        constants instead of strings and other improvements.\n \n     :ivar unicode container_image: The docker image name associated with this\n-        gear unit\n+        container.\n \n     :ivar list ports: The ``PortMap`` instances which define how connections to\n         ports on the host are routed to ports exposed in the container.\n \n-    :ivar list links: The ``PortMap`` instances which define how connections to\n-        ports inside the container are routed to ports on the host.\n-\n-    :ivar GearEnvironment environment: A ``GearEnvironment`` whose variables\n-        will be supplied to the gear unit or ``None`` if there are no\n-        environment variables for this unit.\n+    :ivar Environment environment: A ``Environment`` whose variables","path":"flocker/node/_docker.py","position":88,"original_position":88,"commit_id":"050b6f91de1ffe3a1f8ad2b9bd1cf77defe54da4","original_commit_id":"050b6f91de1ffe3a1f8ad2b9bd1cf77defe54da4","user":{"login":"adamtheturtle","id":797801,"avatar_url":"https://avatars.githubusercontent.com/u/797801?v=2","gravatar_id":"","url":"https://api.github.com/users/adamtheturtle","html_url":"https://github.com/adamtheturtle","followers_url":"https://api.github.com/users/adamtheturtle/followers","following_url":"https://api.github.com/users/adamtheturtle/following{/other_user}","gists_url":"https://api.github.com/users/adamtheturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/adamtheturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamtheturtle/subscriptions","organizations_url":"https://api.github.com/users/adamtheturtle/orgs","repos_url":"https://api.github.com/users/adamtheturtle/repos","events_url":"https://api.github.com/users/adamtheturtle/events{/privacy}","received_events_url":"https://api.github.com/users/adamtheturtle/received_events","type":"User","site_admin":false},"body":"A Environment > An Environment","created_at":"2014-09-26T10:12:13Z","updated_at":"2014-09-26T10:12:13Z","html_url":"https://github.com/ClusterHQ/flocker/pull/811#discussion_r18082138","pull_request_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811","_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/18082138"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/811#discussion_r18082138"},"pull_request":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811","id":21791376,"html_url":"https://github.com/ClusterHQ/flocker/pull/811","diff_url":"https://github.com/ClusterHQ/flocker/pull/811.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/811.patch","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/811","number":811,"state":"open","locked":false,"title":"Final geard purge - fixes 608 (buildbot failure is probably noise)","user":{"login":"itamarst","id":3266662,"avatar_url":"https://avatars.githubusercontent.com/u/3266662?v=2","gravatar_id":"","url":"https://api.github.com/users/itamarst","html_url":"https://github.com/itamarst","followers_url":"https://api.github.com/users/itamarst/followers","following_url":"https://api.github.com/users/itamarst/following{/other_user}","gists_url":"https://api.github.com/users/itamarst/gists{/gist_id}","starred_url":"https://api.github.com/users/itamarst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itamarst/subscriptions","organizations_url":"https://api.github.com/users/itamarst/orgs","repos_url":"https://api.github.com/users/itamarst/repos","events_url":"https://api.github.com/users/itamarst/events{/privacy}","received_events_url":"https://api.github.com/users/itamarst/received_events","type":"User","site_admin":false},"body":"Fixes #608.\r\n\r\nAll remaining gear references and influences that I could find that aren't covered by other PRs already.","created_at":"2014-09-25T15:37:20Z","updated_at":"2014-09-26T10:12:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfb417cf8ea3b53f177d15c3d452dc120d503b8f","assignee":{"login":"adamtheturtle","id":797801,"avatar_url":"https://avatars.githubusercontent.com/u/797801?v=2","gravatar_id":"","url":"https://api.github.com/users/adamtheturtle","html_url":"https://github.com/adamtheturtle","followers_url":"https://api.github.com/users/adamtheturtle/followers","following_url":"https://api.github.com/users/adamtheturtle/following{/other_user}","gists_url":"https://api.github.com/users/adamtheturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/adamtheturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamtheturtle/subscriptions","organizations_url":"https://api.github.com/users/adamtheturtle/orgs","repos_url":"https://api.github.com/users/adamtheturtle/repos","events_url":"https://api.github.com/users/adamtheturtle/events{/privacy}","received_events_url":"https://api.github.com/users/adamtheturtle/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811/commits","review_comments_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811/comments","review_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/811/comments","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/050b6f91de1ffe3a1f8ad2b9bd1cf77defe54da4","head":{"label":"ClusterHQ:final-geard-purge-608","ref":"final-geard-purge-608","sha":"050b6f91de1ffe3a1f8ad2b9bd1cf77defe54da4","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=2","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=2","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":"2014-09-26T08:30:34Z","pushed_at":"2014-09-26T10:12:02Z","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":35781,"stargazers_count":559,"watchers_count":559,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":248,"forks":16,"open_issues":248,"watchers":559,"default_branch":"master"}},"base":{"label":"ClusterHQ:master","ref":"master","sha":"f047852d07788ba8ebeade8071690cc73bde5b90","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=2","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=2","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":"2014-09-26T08:30:34Z","pushed_at":"2014-09-26T10:12:02Z","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":35781,"stargazers_count":559,"watchers_count":559,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":248,"forks":16,"open_issues":248,"watchers":559,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/811"},"issue":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/811"},"comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/811/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/811/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterHQ/flocker/statuses/050b6f91de1ffe3a1f8ad2b9bd1cf77defe54da4"}}}}