{"action":"created","comment":{"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments/63533673","id":63533673,"diff_hunk":"@@ -0,0 +1,63 @@\n+import logging\n+import requests\n+\n+import ma.utility\n+import ma.exceptions\n+import ma.api.base_class\n+import ma.config.magento\n+\n+_LOGGER = logging.getLogger(__name__)\n+\n+\n+class MaintenanceApi(ma.api.base_class.Api):\n+    def __init__(self):\n+        self.__uh = ma.config.magento.UTILITY_HASH\n+        self.__mmu = ma.config.magento.MAGENTO_MAINTENANCE_URL\n+\n+        self.__mct =  ma.config.magento.MAGENTO_CACHE_TYPES\n+        self.__mit = ma.config.magento.MAGENTO_INDEX_TYPES\n+\n+    def __get_matching_entries(self, d, l):\n+        # Returns all the dictionary entries as a tuple\n+        # based on the matching keys from the passed list\n+\n+        # defaults to all entries when nothing to match.\n+        # Used as flag to process the entire set.\n+        if l is None:\n+            return d.items()\n+\n+        return  ma.utility.match_dict_keys_from_list(d, l)","path":"ma/api/custom/maintenance.py","position":32,"original_position":29,"commit_id":"a2d2179183a66f6ca6d91055cf1e4ab484ce26be","original_commit_id":"13e52d77a91a81728accfd069105c16df56f6010","user":{"login":"terzano","id":343932,"avatar_url":"https://avatars.githubusercontent.com/u/343932?v=3","gravatar_id":"","url":"https://api.github.com/users/terzano","html_url":"https://github.com/terzano","followers_url":"https://api.github.com/users/terzano/followers","following_url":"https://api.github.com/users/terzano/following{/other_user}","gists_url":"https://api.github.com/users/terzano/gists{/gist_id}","starred_url":"https://api.github.com/users/terzano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terzano/subscriptions","organizations_url":"https://api.github.com/users/terzano/orgs","repos_url":"https://api.github.com/users/terzano/repos","events_url":"https://api.github.com/users/terzano/events{/privacy}","received_events_url":"https://api.github.com/users/terzano/received_events","type":"User","site_admin":false},"body":"Just wanted to make it clear. It does appear excessive but no harm.  ","created_at":"2016-05-17T14:37:01Z","updated_at":"2016-05-17T14:37:01Z","html_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3#discussion_r63533673","pull_request_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments/63533673"},"html":{"href":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3#discussion_r63533673"},"pull_request":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3","id":70207670,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3","diff_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3.diff","patch_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3.patch","issue_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/3","number":3,"state":"open","locked":false,"title":"Ability to invoke Cache refresh and re-indexing ","user":{"login":"terzano","id":343932,"avatar_url":"https://avatars.githubusercontent.com/u/343932?v=3","gravatar_id":"","url":"https://api.github.com/users/terzano","html_url":"https://github.com/terzano","followers_url":"https://api.github.com/users/terzano/followers","following_url":"https://api.github.com/users/terzano/following{/other_user}","gists_url":"https://api.github.com/users/terzano/gists{/gist_id}","starred_url":"https://api.github.com/users/terzano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terzano/subscriptions","organizations_url":"https://api.github.com/users/terzano/orgs","repos_url":"https://api.github.com/users/terzano/repos","events_url":"https://api.github.com/users/terzano/events{/privacy}","received_events_url":"https://api.github.com/users/terzano/received_events","type":"User","site_admin":false},"body":"This new functionality calls a custom Magento controller in order to refresh the various cache contexts and re-index. This will provide finer control over how the integration cascades updates into the production environment.  \r\nFYI. Ignore the media.py file, only formatting changes were made (extra spaces, tabs->spaces)","created_at":"2016-05-16T14:51:06Z","updated_at":"2016-05-17T14:37:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e284579f172a608c6bbb2011f6249f64400f43a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3/commits","review_comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3/comments","review_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/3/comments","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/a2d2179183a66f6ca6d91055cf1e4ab484ce26be","head":{"label":"CoffeeForThinkers:cache_index","ref":"cache_index","sha":"a2d2179183a66f6ca6d91055cf1e4ab484ce26be","user":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"repo":{"id":51386538,"name":"MagentoAPI","full_name":"CoffeeForThinkers/MagentoAPI","owner":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI","description":"A set of Magento API adapters.","fork":false,"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI","forks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/forks","keys_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/teams","hooks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/hooks","issue_events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/events{/number}","events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/events","assignees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/assignees{/user}","branches_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/branches{/branch}","tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/tags","blobs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/languages","stargazers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/stargazers","contributors_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contributors","subscribers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscribers","subscription_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscription","commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contents/{+path}","compare_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/merges","archive_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/downloads","issues_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues{/number}","pulls_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/labels{/name}","releases_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/releases{/id}","deployments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/deployments","created_at":"2016-02-09T17:57:33Z","updated_at":"2016-04-26T05:31:17Z","pushed_at":"2016-05-17T14:34:38Z","git_url":"git://github.com/CoffeeForThinkers/MagentoAPI.git","ssh_url":"git@github.com:CoffeeForThinkers/MagentoAPI.git","clone_url":"https://github.com/CoffeeForThinkers/MagentoAPI.git","svn_url":"https://github.com/CoffeeForThinkers/MagentoAPI","homepage":null,"size":63,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"CoffeeForThinkers:master","ref":"master","sha":"972aa19e99411fcdaac833dfd46cbf305356a3c3","user":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"repo":{"id":51386538,"name":"MagentoAPI","full_name":"CoffeeForThinkers/MagentoAPI","owner":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI","description":"A set of Magento API adapters.","fork":false,"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI","forks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/forks","keys_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/teams","hooks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/hooks","issue_events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/events{/number}","events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/events","assignees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/assignees{/user}","branches_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/branches{/branch}","tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/tags","blobs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/languages","stargazers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/stargazers","contributors_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contributors","subscribers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscribers","subscription_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscription","commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contents/{+path}","compare_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/merges","archive_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/downloads","issues_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues{/number}","pulls_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/labels{/name}","releases_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/releases{/id}","deployments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/deployments","created_at":"2016-02-09T17:57:33Z","updated_at":"2016-04-26T05:31:17Z","pushed_at":"2016-05-17T14:34:38Z","git_url":"git://github.com/CoffeeForThinkers/MagentoAPI.git","ssh_url":"git@github.com:CoffeeForThinkers/MagentoAPI.git","clone_url":"https://github.com/CoffeeForThinkers/MagentoAPI.git","svn_url":"https://github.com/CoffeeForThinkers/MagentoAPI","homepage":null,"size":63,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3"},"html":{"href":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/3"},"issue":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/3"},"comments":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/a2d2179183a66f6ca6d91055cf1e4ab484ce26be"}}}}