{"action":"created","comment":{"url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/comments/39817530","id":39817530,"diff_hunk":"@@ -793,6 +813,117 @@ NLV_WORKER_EXECUTE(Domain, ToXml)\n   free(result);\n }\n \n+NAN_METHOD(Domain::GetMetadata)\n+{\n+  NanScope();\n+  int type;\n+  std::string namespace_uri;\n+  unsigned int flags;\n+  NanCallback *callback;\n+#ifndef _HAVE_DOMAIN_METADATA_API\n+  NanThrowTypeError(\"metadata api not supported in this libvirt version\");\n+  NanReturnUndefined();\n+#endif\n+  if (args.Length() == 4\n+\t  && args[0]->IsNumber()\n+\t  && (args[1]->IsString() || args[1]->IsNull())\n+\t  && args[2]->IsNumber()\n+\t  && args[3]->IsFunction())\n+  {\n+    type = args[0]->IntegerValue();\n+    if (!args[1]->IsNull()) {\n+\tnamespace_uri = *NanUtf8String(args[1]->ToString());\n+    }\n+    flags = args[2]->IntegerValue();\n+    callback = new NanCallback(args[3].As<Function>());\n+  } else {\n+    NanThrowTypeError(\"signature is type, namespace_uri, flags, callback\");\n+    NanReturnUndefined();\n+  }\n+  Domain *domain = ObjectWrap::Unwrap<Domain>(args.This());\n+  NanAsyncQueueWorker(new GetMetadataWorker(callback, domain->handle_, type, namespace_uri, flags));\n+  NanReturnUndefined();\n+}\n+\n+NLV_WORKER_EXECUTE(Domain, GetMetadata)\n+{\n+  NLV_WORKER_ASSERT_DOMAIN();\n+#ifdef _HAVE_DOMAIN_METADATA_API","path":"src/domain.cc","position":87,"original_position":87,"commit_id":"6355f415f1fb02e9d99f520c95311a832e34135b","original_commit_id":"6355f415f1fb02e9d99f520c95311a832e34135b","user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"body":"seems to me that the whole worker should be ifdeffed out right? You just bail above if there's no support","created_at":"2015-09-18T01:29:39Z","updated_at":"2015-09-18T01:29:39Z","html_url":"https://github.com/hooklift/node-libvirt/pull/60#discussion_r39817530","pull_request_url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/comments/39817530"},"html":{"href":"https://github.com/hooklift/node-libvirt/pull/60#discussion_r39817530"},"pull_request":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60","id":45314826,"html_url":"https://github.com/hooklift/node-libvirt/pull/60","diff_url":"https://github.com/hooklift/node-libvirt/pull/60.diff","patch_url":"https://github.com/hooklift/node-libvirt/pull/60.patch","issue_url":"https://api.github.com/repos/hooklift/node-libvirt/issues/60","number":60,"state":"open","locked":false,"title":"Implement domain metadata accessors and tests","user":{"login":"dmansfield","id":662307,"avatar_url":"https://avatars.githubusercontent.com/u/662307?v=3","gravatar_id":"","url":"https://api.github.com/users/dmansfield","html_url":"https://github.com/dmansfield","followers_url":"https://api.github.com/users/dmansfield/followers","following_url":"https://api.github.com/users/dmansfield/following{/other_user}","gists_url":"https://api.github.com/users/dmansfield/gists{/gist_id}","starred_url":"https://api.github.com/users/dmansfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmansfield/subscriptions","organizations_url":"https://api.github.com/users/dmansfield/orgs","repos_url":"https://api.github.com/users/dmansfield/repos","events_url":"https://api.github.com/users/dmansfield/events{/privacy}","received_events_url":"https://api.github.com/users/dmansfield/received_events","type":"User","site_admin":false},"body":"This version uses the LIBVIR_CHECK_VERSION to ensure the library version supports the API. If it is too old, the module will return an error indicating that the support is not available at runtime if the methods are called.\r\n","created_at":"2015-09-17T16:57:25Z","updated_at":"2015-09-18T01:29:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89377d40ee9ece9dc0e974031c4e190c1ae81a32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60/commits","review_comments_url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60/comments","review_comment_url":"https://api.github.com/repos/hooklift/node-libvirt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hooklift/node-libvirt/issues/60/comments","statuses_url":"https://api.github.com/repos/hooklift/node-libvirt/statuses/6355f415f1fb02e9d99f520c95311a832e34135b","head":{"label":"dmansfield:implement-metadata-access","ref":"implement-metadata-access","sha":"6355f415f1fb02e9d99f520c95311a832e34135b","user":{"login":"dmansfield","id":662307,"avatar_url":"https://avatars.githubusercontent.com/u/662307?v=3","gravatar_id":"","url":"https://api.github.com/users/dmansfield","html_url":"https://github.com/dmansfield","followers_url":"https://api.github.com/users/dmansfield/followers","following_url":"https://api.github.com/users/dmansfield/following{/other_user}","gists_url":"https://api.github.com/users/dmansfield/gists{/gist_id}","starred_url":"https://api.github.com/users/dmansfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmansfield/subscriptions","organizations_url":"https://api.github.com/users/dmansfield/orgs","repos_url":"https://api.github.com/users/dmansfield/repos","events_url":"https://api.github.com/users/dmansfield/events{/privacy}","received_events_url":"https://api.github.com/users/dmansfield/received_events","type":"User","site_admin":false},"repo":{"id":42467817,"name":"node-libvirt","full_name":"dmansfield/node-libvirt","owner":{"login":"dmansfield","id":662307,"avatar_url":"https://avatars.githubusercontent.com/u/662307?v=3","gravatar_id":"","url":"https://api.github.com/users/dmansfield","html_url":"https://github.com/dmansfield","followers_url":"https://api.github.com/users/dmansfield/followers","following_url":"https://api.github.com/users/dmansfield/following{/other_user}","gists_url":"https://api.github.com/users/dmansfield/gists{/gist_id}","starred_url":"https://api.github.com/users/dmansfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmansfield/subscriptions","organizations_url":"https://api.github.com/users/dmansfield/orgs","repos_url":"https://api.github.com/users/dmansfield/repos","events_url":"https://api.github.com/users/dmansfield/events{/privacy}","received_events_url":"https://api.github.com/users/dmansfield/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmansfield/node-libvirt","description":"libvirt bindings for google v8 javascript engine (nodejs addon)","fork":true,"url":"https://api.github.com/repos/dmansfield/node-libvirt","forks_url":"https://api.github.com/repos/dmansfield/node-libvirt/forks","keys_url":"https://api.github.com/repos/dmansfield/node-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmansfield/node-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmansfield/node-libvirt/teams","hooks_url":"https://api.github.com/repos/dmansfield/node-libvirt/hooks","issue_events_url":"https://api.github.com/repos/dmansfield/node-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/dmansfield/node-libvirt/events","assignees_url":"https://api.github.com/repos/dmansfield/node-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/dmansfield/node-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/dmansfield/node-libvirt/tags","blobs_url":"https://api.github.com/repos/dmansfield/node-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmansfield/node-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmansfield/node-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmansfield/node-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmansfield/node-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/dmansfield/node-libvirt/languages","stargazers_url":"https://api.github.com/repos/dmansfield/node-libvirt/stargazers","contributors_url":"https://api.github.com/repos/dmansfield/node-libvirt/contributors","subscribers_url":"https://api.github.com/repos/dmansfield/node-libvirt/subscribers","subscription_url":"https://api.github.com/repos/dmansfield/node-libvirt/subscription","commits_url":"https://api.github.com/repos/dmansfield/node-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmansfield/node-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmansfield/node-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmansfield/node-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmansfield/node-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/dmansfield/node-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmansfield/node-libvirt/merges","archive_url":"https://api.github.com/repos/dmansfield/node-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmansfield/node-libvirt/downloads","issues_url":"https://api.github.com/repos/dmansfield/node-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/dmansfield/node-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/dmansfield/node-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/dmansfield/node-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmansfield/node-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/dmansfield/node-libvirt/releases{/id}","created_at":"2015-09-14T18:14:13Z","updated_at":"2015-09-14T18:14:13Z","pushed_at":"2015-09-17T17:02:58Z","git_url":"git://github.com/dmansfield/node-libvirt.git","ssh_url":"git@github.com:dmansfield/node-libvirt.git","clone_url":"https://github.com/dmansfield/node-libvirt.git","svn_url":"https://github.com/dmansfield/node-libvirt","homepage":"http://c4milo.github.io/node-libvirt/","size":839,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hooklift:master","ref":"master","sha":"6aa3ef41af67996ce5096294e97fe4cf7e6ac880","user":{"login":"hooklift","id":7952096,"avatar_url":"https://avatars.githubusercontent.com/u/7952096?v=3","gravatar_id":"","url":"https://api.github.com/users/hooklift","html_url":"https://github.com/hooklift","followers_url":"https://api.github.com/users/hooklift/followers","following_url":"https://api.github.com/users/hooklift/following{/other_user}","gists_url":"https://api.github.com/users/hooklift/gists{/gist_id}","starred_url":"https://api.github.com/users/hooklift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hooklift/subscriptions","organizations_url":"https://api.github.com/users/hooklift/orgs","repos_url":"https://api.github.com/users/hooklift/repos","events_url":"https://api.github.com/users/hooklift/events{/privacy}","received_events_url":"https://api.github.com/users/hooklift/received_events","type":"Organization","site_admin":false},"repo":{"id":514363,"name":"node-libvirt","full_name":"hooklift/node-libvirt","owner":{"login":"hooklift","id":7952096,"avatar_url":"https://avatars.githubusercontent.com/u/7952096?v=3","gravatar_id":"","url":"https://api.github.com/users/hooklift","html_url":"https://github.com/hooklift","followers_url":"https://api.github.com/users/hooklift/followers","following_url":"https://api.github.com/users/hooklift/following{/other_user}","gists_url":"https://api.github.com/users/hooklift/gists{/gist_id}","starred_url":"https://api.github.com/users/hooklift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hooklift/subscriptions","organizations_url":"https://api.github.com/users/hooklift/orgs","repos_url":"https://api.github.com/users/hooklift/repos","events_url":"https://api.github.com/users/hooklift/events{/privacy}","received_events_url":"https://api.github.com/users/hooklift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hooklift/node-libvirt","description":"libvirt bindings for google v8 javascript engine (nodejs addon)","fork":false,"url":"https://api.github.com/repos/hooklift/node-libvirt","forks_url":"https://api.github.com/repos/hooklift/node-libvirt/forks","keys_url":"https://api.github.com/repos/hooklift/node-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hooklift/node-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hooklift/node-libvirt/teams","hooks_url":"https://api.github.com/repos/hooklift/node-libvirt/hooks","issue_events_url":"https://api.github.com/repos/hooklift/node-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/hooklift/node-libvirt/events","assignees_url":"https://api.github.com/repos/hooklift/node-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/hooklift/node-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/hooklift/node-libvirt/tags","blobs_url":"https://api.github.com/repos/hooklift/node-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hooklift/node-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hooklift/node-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/hooklift/node-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hooklift/node-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/hooklift/node-libvirt/languages","stargazers_url":"https://api.github.com/repos/hooklift/node-libvirt/stargazers","contributors_url":"https://api.github.com/repos/hooklift/node-libvirt/contributors","subscribers_url":"https://api.github.com/repos/hooklift/node-libvirt/subscribers","subscription_url":"https://api.github.com/repos/hooklift/node-libvirt/subscription","commits_url":"https://api.github.com/repos/hooklift/node-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/hooklift/node-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/hooklift/node-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/hooklift/node-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/hooklift/node-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/hooklift/node-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hooklift/node-libvirt/merges","archive_url":"https://api.github.com/repos/hooklift/node-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hooklift/node-libvirt/downloads","issues_url":"https://api.github.com/repos/hooklift/node-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/hooklift/node-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/hooklift/node-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/hooklift/node-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hooklift/node-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/hooklift/node-libvirt/releases{/id}","created_at":"2010-02-12T03:56:29Z","updated_at":"2015-08-30T18:01:27Z","pushed_at":"2015-09-17T17:02:58Z","git_url":"git://github.com/hooklift/node-libvirt.git","ssh_url":"git@github.com:hooklift/node-libvirt.git","clone_url":"https://github.com/hooklift/node-libvirt.git","svn_url":"https://github.com/hooklift/node-libvirt","homepage":"http://c4milo.github.io/node-libvirt/","size":1181,"stargazers_count":77,"watchers_count":77,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":4,"forks":29,"open_issues":4,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60"},"html":{"href":"https://github.com/hooklift/node-libvirt/pull/60"},"issue":{"href":"https://api.github.com/repos/hooklift/node-libvirt/issues/60"},"comments":{"href":"https://api.github.com/repos/hooklift/node-libvirt/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hooklift/node-libvirt/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/hooklift/node-libvirt/statuses/6355f415f1fb02e9d99f520c95311a832e34135b"}}}}