{"action":"created","comment":{"url":"https://api.github.com/repos/dmwm/WMCore/pulls/comments/53324329","id":53324329,"diff_hunk":"@@ -78,6 +80,90 @@ def get(self, name):\n         result = get_request_template_from_type(name)\n         return [result]\n     \n+class WorkloadConfig(RESTEntity):\n+    \n+    def __init__(self, app, api, config, mount):\n+        # main CouchDB database where requests/workloads are stored\n+        RESTEntity.__init__(self, app, api, config, mount)\n+        self.reqdb_url = \"%s/%s\" % (config.couch_host, config.couch_reqmgr_db)\n+    \n+    def validate(self, apiobj, method, api, param, safe):\n+        \"\"\"\n+        Validate request input data.\n+        Has to be implemented, otherwise the service fails to start.\n+        If it's not implemented correctly (e.g. just pass), the arguments\n+        are not passed in the method at all.\n+        \n+        \"\"\"\n+        validate_str(\"name\", param, safe, rx.RX_REQUEST_NAME, optional=False)\n+\n+\n+    @restcall(formats = [('application/json', JSONFormat())])\n+    @tools.expires(secs=-1)\n+    def get(self, name):\n+        \"\"\"\n+        Hello world API call.\n+        \n+        :arg str name: name to appear in the result message.\n+        :returns: row with response, here 1 item list with message.\n+        \n+        \"\"\"\n+        \n+        helper = WMWorkloadHelper()\n+        try:\n+            helper.loadSpecFromCouch(self.reqdb_url, name)\n+        except Exception:\n+            raise cherrypy.HTTPError(404, \"Cannot find workload: % \"+ name)\n+        \n+        return str(helper.data)\n+\n+class WorkloadSplitting(RESTEntity):\n+    \n+    def __init__(self, app, api, config, mount):\n+        # main CouchDB database where requests/workloads are stored\n+        RESTEntity.__init__(self, app, api, config, mount)\n+        self.reqdb_url = \"%s/%s\" % (config.couch_host, config.couch_reqmgr_db)\n+    \n+    def validate(self, apiobj, method, api, param, safe):\n+        \"\"\"\n+        Validate request input data.\n+        Has to be implemented, otherwise the service fails to start.\n+        If it's not implemented correctly (e.g. just pass), the arguments\n+        are not passed in the method at all.\n+        \n+        \"\"\"\n+        validate_str(\"name\", param, safe, rx.RX_REQUEST_NAME, optional=False)\n+\n+\n+    @restcall(formats = [('application/json', JSONFormat())])\n+    @tools.expires(secs=-1)\n+    def get(self, name):\n+        \"\"\"\n+        Hello world API call.","path":"src/python/WMCore/ReqMgr/Service/Auxiliary.py","position":81,"original_position":81,"commit_id":"18a416feb6f0a1900daad61cebece1e7d7464379","original_commit_id":"18a416feb6f0a1900daad61cebece1e7d7464379","user":{"login":"ericvaandering","id":1672366,"avatar_url":"https://avatars.githubusercontent.com/u/1672366?v=3","gravatar_id":"","url":"https://api.github.com/users/ericvaandering","html_url":"https://github.com/ericvaandering","followers_url":"https://api.github.com/users/ericvaandering/followers","following_url":"https://api.github.com/users/ericvaandering/following{/other_user}","gists_url":"https://api.github.com/users/ericvaandering/gists{/gist_id}","starred_url":"https://api.github.com/users/ericvaandering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericvaandering/subscriptions","organizations_url":"https://api.github.com/users/ericvaandering/orgs","repos_url":"https://api.github.com/users/ericvaandering/repos","events_url":"https://api.github.com/users/ericvaandering/events{/privacy}","received_events_url":"https://api.github.com/users/ericvaandering/received_events","type":"User","site_admin":false},"body":"Seems to be the wrong doctoring","created_at":"2016-02-18T14:59:32Z","updated_at":"2016-02-18T14:59:32Z","html_url":"https://github.com/dmwm/WMCore/pull/6596#discussion_r53324329","pull_request_url":"https://api.github.com/repos/dmwm/WMCore/pulls/6596","_links":{"self":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/comments/53324329"},"html":{"href":"https://github.com/dmwm/WMCore/pull/6596#discussion_r53324329"},"pull_request":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/6596"}}},"pull_request":{"url":"https://api.github.com/repos/dmwm/WMCore/pulls/6596","id":59757211,"html_url":"https://github.com/dmwm/WMCore/pull/6596","diff_url":"https://github.com/dmwm/WMCore/pull/6596.diff","patch_url":"https://github.com/dmwm/WMCore/pull/6596.patch","issue_url":"https://api.github.com/repos/dmwm/WMCore/issues/6596","number":6596,"state":"open","locked":false,"title":"add workload config api (Do not merge)","user":{"login":"ticoann","id":1247993,"avatar_url":"https://avatars.githubusercontent.com/u/1247993?v=3","gravatar_id":"","url":"https://api.github.com/users/ticoann","html_url":"https://github.com/ticoann","followers_url":"https://api.github.com/users/ticoann/followers","following_url":"https://api.github.com/users/ticoann/following{/other_user}","gists_url":"https://api.github.com/users/ticoann/gists{/gist_id}","starred_url":"https://api.github.com/users/ticoann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticoann/subscriptions","organizations_url":"https://api.github.com/users/ticoann/orgs","repos_url":"https://api.github.com/users/ticoann/repos","events_url":"https://api.github.com/users/ticoann/events{/privacy}","received_events_url":"https://api.github.com/users/ticoann/received_events","type":"User","site_admin":false},"body":"fixes #6595 \r\nStill need to add put request but making the pull request for the format agreement.","created_at":"2016-02-18T06:41:05Z","updated_at":"2016-02-18T14:59:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa7257d64dcd9d426def9bf8b3154e87a9501256","assignee":{"login":"ticoann","id":1247993,"avatar_url":"https://avatars.githubusercontent.com/u/1247993?v=3","gravatar_id":"","url":"https://api.github.com/users/ticoann","html_url":"https://github.com/ticoann","followers_url":"https://api.github.com/users/ticoann/followers","following_url":"https://api.github.com/users/ticoann/following{/other_user}","gists_url":"https://api.github.com/users/ticoann/gists{/gist_id}","starred_url":"https://api.github.com/users/ticoann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticoann/subscriptions","organizations_url":"https://api.github.com/users/ticoann/orgs","repos_url":"https://api.github.com/users/ticoann/repos","events_url":"https://api.github.com/users/ticoann/events{/privacy}","received_events_url":"https://api.github.com/users/ticoann/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dmwm/WMCore/milestones/121","html_url":"https://github.com/dmwm/WMCore/milestones/WMAgent1602","labels_url":"https://api.github.com/repos/dmwm/WMCore/milestones/121/labels","id":1335173,"number":121,"title":"WMAgent1602","description":"","creator":{"login":"ticoann","id":1247993,"avatar_url":"https://avatars.githubusercontent.com/u/1247993?v=3","gravatar_id":"","url":"https://api.github.com/users/ticoann","html_url":"https://github.com/ticoann","followers_url":"https://api.github.com/users/ticoann/followers","following_url":"https://api.github.com/users/ticoann/following{/other_user}","gists_url":"https://api.github.com/users/ticoann/gists{/gist_id}","starred_url":"https://api.github.com/users/ticoann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticoann/subscriptions","organizations_url":"https://api.github.com/users/ticoann/orgs","repos_url":"https://api.github.com/users/ticoann/repos","events_url":"https://api.github.com/users/ticoann/events{/privacy}","received_events_url":"https://api.github.com/users/ticoann/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":9,"state":"open","created_at":"2015-10-02T16:27:19Z","updated_at":"2016-02-18T06:41:05Z","due_on":"2016-02-29T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/dmwm/WMCore/pulls/6596/commits","review_comments_url":"https://api.github.com/repos/dmwm/WMCore/pulls/6596/comments","review_comment_url":"https://api.github.com/repos/dmwm/WMCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmwm/WMCore/issues/6596/comments","statuses_url":"https://api.github.com/repos/dmwm/WMCore/statuses/18a416feb6f0a1900daad61cebece1e7d7464379","head":{"label":"ticoann:add_spec","ref":"add_spec","sha":"18a416feb6f0a1900daad61cebece1e7d7464379","user":{"login":"ticoann","id":1247993,"avatar_url":"https://avatars.githubusercontent.com/u/1247993?v=3","gravatar_id":"","url":"https://api.github.com/users/ticoann","html_url":"https://github.com/ticoann","followers_url":"https://api.github.com/users/ticoann/followers","following_url":"https://api.github.com/users/ticoann/following{/other_user}","gists_url":"https://api.github.com/users/ticoann/gists{/gist_id}","starred_url":"https://api.github.com/users/ticoann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticoann/subscriptions","organizations_url":"https://api.github.com/users/ticoann/orgs","repos_url":"https://api.github.com/users/ticoann/repos","events_url":"https://api.github.com/users/ticoann/events{/privacy}","received_events_url":"https://api.github.com/users/ticoann/received_events","type":"User","site_admin":false},"repo":{"id":2935076,"name":"WMCore","full_name":"ticoann/WMCore","owner":{"login":"ticoann","id":1247993,"avatar_url":"https://avatars.githubusercontent.com/u/1247993?v=3","gravatar_id":"","url":"https://api.github.com/users/ticoann","html_url":"https://github.com/ticoann","followers_url":"https://api.github.com/users/ticoann/followers","following_url":"https://api.github.com/users/ticoann/following{/other_user}","gists_url":"https://api.github.com/users/ticoann/gists{/gist_id}","starred_url":"https://api.github.com/users/ticoann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticoann/subscriptions","organizations_url":"https://api.github.com/users/ticoann/orgs","repos_url":"https://api.github.com/users/ticoann/repos","events_url":"https://api.github.com/users/ticoann/events{/privacy}","received_events_url":"https://api.github.com/users/ticoann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ticoann/WMCore","description":"WMCore","fork":true,"url":"https://api.github.com/repos/ticoann/WMCore","forks_url":"https://api.github.com/repos/ticoann/WMCore/forks","keys_url":"https://api.github.com/repos/ticoann/WMCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ticoann/WMCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ticoann/WMCore/teams","hooks_url":"https://api.github.com/repos/ticoann/WMCore/hooks","issue_events_url":"https://api.github.com/repos/ticoann/WMCore/issues/events{/number}","events_url":"https://api.github.com/repos/ticoann/WMCore/events","assignees_url":"https://api.github.com/repos/ticoann/WMCore/assignees{/user}","branches_url":"https://api.github.com/repos/ticoann/WMCore/branches{/branch}","tags_url":"https://api.github.com/repos/ticoann/WMCore/tags","blobs_url":"https://api.github.com/repos/ticoann/WMCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ticoann/WMCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ticoann/WMCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/ticoann/WMCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ticoann/WMCore/statuses/{sha}","languages_url":"https://api.github.com/repos/ticoann/WMCore/languages","stargazers_url":"https://api.github.com/repos/ticoann/WMCore/stargazers","contributors_url":"https://api.github.com/repos/ticoann/WMCore/contributors","subscribers_url":"https://api.github.com/repos/ticoann/WMCore/subscribers","subscription_url":"https://api.github.com/repos/ticoann/WMCore/subscription","commits_url":"https://api.github.com/repos/ticoann/WMCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/ticoann/WMCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/ticoann/WMCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/ticoann/WMCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/ticoann/WMCore/contents/{+path}","compare_url":"https://api.github.com/repos/ticoann/WMCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ticoann/WMCore/merges","archive_url":"https://api.github.com/repos/ticoann/WMCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ticoann/WMCore/downloads","issues_url":"https://api.github.com/repos/ticoann/WMCore/issues{/number}","pulls_url":"https://api.github.com/repos/ticoann/WMCore/pulls{/number}","milestones_url":"https://api.github.com/repos/ticoann/WMCore/milestones{/number}","notifications_url":"https://api.github.com/repos/ticoann/WMCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ticoann/WMCore/labels{/name}","releases_url":"https://api.github.com/repos/ticoann/WMCore/releases{/id}","deployments_url":"https://api.github.com/repos/ticoann/WMCore/deployments","created_at":"2011-12-07T19:34:12Z","updated_at":"2014-06-21T11:18:43Z","pushed_at":"2016-02-18T06:38:58Z","git_url":"git://github.com/ticoann/WMCore.git","ssh_url":"git@github.com:ticoann/WMCore.git","clone_url":"https://github.com/ticoann/WMCore.git","svn_url":"https://github.com/ticoann/WMCore","homepage":"https://svnweb.cern.ch/trac/CMSDMWM/","size":25409,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"dmwm:master","ref":"master","sha":"d25da4a8b75e33310e94a1146d73b90e7ca920a3","user":{"login":"dmwm","id":988897,"avatar_url":"https://avatars.githubusercontent.com/u/988897?v=3","gravatar_id":"","url":"https://api.github.com/users/dmwm","html_url":"https://github.com/dmwm","followers_url":"https://api.github.com/users/dmwm/followers","following_url":"https://api.github.com/users/dmwm/following{/other_user}","gists_url":"https://api.github.com/users/dmwm/gists{/gist_id}","starred_url":"https://api.github.com/users/dmwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmwm/subscriptions","organizations_url":"https://api.github.com/users/dmwm/orgs","repos_url":"https://api.github.com/users/dmwm/repos","events_url":"https://api.github.com/users/dmwm/events{/privacy}","received_events_url":"https://api.github.com/users/dmwm/received_events","type":"Organization","site_admin":false},"repo":{"id":2370458,"name":"WMCore","full_name":"dmwm/WMCore","owner":{"login":"dmwm","id":988897,"avatar_url":"https://avatars.githubusercontent.com/u/988897?v=3","gravatar_id":"","url":"https://api.github.com/users/dmwm","html_url":"https://github.com/dmwm","followers_url":"https://api.github.com/users/dmwm/followers","following_url":"https://api.github.com/users/dmwm/following{/other_user}","gists_url":"https://api.github.com/users/dmwm/gists{/gist_id}","starred_url":"https://api.github.com/users/dmwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmwm/subscriptions","organizations_url":"https://api.github.com/users/dmwm/orgs","repos_url":"https://api.github.com/users/dmwm/repos","events_url":"https://api.github.com/users/dmwm/events{/privacy}","received_events_url":"https://api.github.com/users/dmwm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dmwm/WMCore","description":"WMCore","fork":false,"url":"https://api.github.com/repos/dmwm/WMCore","forks_url":"https://api.github.com/repos/dmwm/WMCore/forks","keys_url":"https://api.github.com/repos/dmwm/WMCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmwm/WMCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmwm/WMCore/teams","hooks_url":"https://api.github.com/repos/dmwm/WMCore/hooks","issue_events_url":"https://api.github.com/repos/dmwm/WMCore/issues/events{/number}","events_url":"https://api.github.com/repos/dmwm/WMCore/events","assignees_url":"https://api.github.com/repos/dmwm/WMCore/assignees{/user}","branches_url":"https://api.github.com/repos/dmwm/WMCore/branches{/branch}","tags_url":"https://api.github.com/repos/dmwm/WMCore/tags","blobs_url":"https://api.github.com/repos/dmwm/WMCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmwm/WMCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmwm/WMCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmwm/WMCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmwm/WMCore/statuses/{sha}","languages_url":"https://api.github.com/repos/dmwm/WMCore/languages","stargazers_url":"https://api.github.com/repos/dmwm/WMCore/stargazers","contributors_url":"https://api.github.com/repos/dmwm/WMCore/contributors","subscribers_url":"https://api.github.com/repos/dmwm/WMCore/subscribers","subscription_url":"https://api.github.com/repos/dmwm/WMCore/subscription","commits_url":"https://api.github.com/repos/dmwm/WMCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmwm/WMCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmwm/WMCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmwm/WMCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmwm/WMCore/contents/{+path}","compare_url":"https://api.github.com/repos/dmwm/WMCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmwm/WMCore/merges","archive_url":"https://api.github.com/repos/dmwm/WMCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmwm/WMCore/downloads","issues_url":"https://api.github.com/repos/dmwm/WMCore/issues{/number}","pulls_url":"https://api.github.com/repos/dmwm/WMCore/pulls{/number}","milestones_url":"https://api.github.com/repos/dmwm/WMCore/milestones{/number}","notifications_url":"https://api.github.com/repos/dmwm/WMCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmwm/WMCore/labels{/name}","releases_url":"https://api.github.com/repos/dmwm/WMCore/releases{/id}","deployments_url":"https://api.github.com/repos/dmwm/WMCore/deployments","created_at":"2011-09-12T10:37:21Z","updated_at":"2015-11-19T16:18:45Z","pushed_at":"2016-02-18T14:33:19Z","git_url":"git://github.com/dmwm/WMCore.git","ssh_url":"git@github.com:dmwm/WMCore.git","clone_url":"https://github.com/dmwm/WMCore.git","svn_url":"https://github.com/dmwm/WMCore","homepage":"https://svnweb.cern.ch/trac/CMSDMWM/","size":28046,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":363,"forks":51,"open_issues":363,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/6596"},"html":{"href":"https://github.com/dmwm/WMCore/pull/6596"},"issue":{"href":"https://api.github.com/repos/dmwm/WMCore/issues/6596"},"comments":{"href":"https://api.github.com/repos/dmwm/WMCore/issues/6596/comments"},"review_comments":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/6596/comments"},"review_comment":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmwm/WMCore/pulls/6596/commits"},"statuses":{"href":"https://api.github.com/repos/dmwm/WMCore/statuses/18a416feb6f0a1900daad61cebece1e7d7464379"}}}}