{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/71975167","id":71975167,"diff_hunk":"@@ -0,0 +1,443 @@\n+from gettext import gettext as _\n+import logging\n+import os\n+import time\n+import uuid\n+import shutil\n+\n+import kobo.shortcuts\n+\n+import mongoengine\n+from pulp.common import dateutils\n+from pulp.plugins.util.publish_step import PublishStep\n+from pulp.server.config import config as pulp_config\n+from pulp.server.exceptions import PulpCodedException\n+from pulp.server.db.model.repository import RepoPublishResult\n+from pulp.server.db.model import Distributor\n+\n+\n+ASSOCIATED_UNIT_DATE_KEYWORD = \"created\"\n+START_DATE_KEYWORD = 'start_date'\n+END_DATE_KEYWORD = 'end_date'\n+\n+_logger = logging.getLogger(__name__)\n+\n+\n+class RSyncPublishStep(PublishStep):\n+    _CMD = \"rsync\"\n+    # recursive, symlinks, timestamps, keep dir links, omit dir times, compress, itemize\n+    _AZQ = \"-rtKOzi\"\n+\n+    def __init__(self, step_type, file_list, src_directory, dest_directory, config=None,\n+                 fast_forward=None, exclude=[], delete=False, links=False):\n+        \"\"\"\n+        Copies files using rsync to a remote server and filesystem location defined in the\n+        distributor config.\n+\n+        :param step_type: Name of step\n+        :type step_type: str\n+        :param file_list: list of paths relative to src_directory\n+        :type file_list: list\n+        :param src_directory: absolute path to directory which contains all items in file_list\n+        :type src_directory: str\n+        :param dest_directory: path to directory relative to remote root where files should be\n+               rsynced\n+        :type dest_directory: str\n+        :param config: distributor configuration\n+        :param fast_forward:\n+        :type fast_forward: bool\n+        :param exclude: list of files/directories to skip\n+        :type exclude: list\n+        :param delete: determines if --delete is passed to rsync\n+        :type delete: boolean\n+        :param links: if true, --links is passed to rsync\n+        :type links: bool\n+        \"\"\"\n+        self.description = _('Rsync files to remote destination')\n+        super(PublishStep, self).__init__(step_type, config=config)\n+        self.file_list = file_list\n+        self.fast_forward = fast_forward\n+        self.exclude = exclude\n+        self.delete = delete\n+        self.src_directory = src_directory\n+        self.dest_directory = dest_directory\n+        self.links = links\n+\n+    def remote_mkdir(self, path):\n+        \"\"\"\n+        Creates path on remote server. The path is rooted in distributor's remote_root directory.\n+\n+        :param path: path to create on remote server\n+        :type path: str\n+        :return: (return code from rsync, stdout + stderr)","path":"server/pulp/plugins/rsync/publish.py","position":72,"original_position":72,"commit_id":"480b75b8d60785bfb80548374749de7ce8a08398","original_commit_id":"480b75b8d60785bfb80548374749de7ce8a08398","user":{"login":"bmbouter","id":180319,"avatar_url":"https://avatars.githubusercontent.com/u/180319?v=3","gravatar_id":"","url":"https://api.github.com/users/bmbouter","html_url":"https://github.com/bmbouter","followers_url":"https://api.github.com/users/bmbouter/followers","following_url":"https://api.github.com/users/bmbouter/following{/other_user}","gists_url":"https://api.github.com/users/bmbouter/gists{/gist_id}","starred_url":"https://api.github.com/users/bmbouter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmbouter/subscriptions","organizations_url":"https://api.github.com/users/bmbouter/orgs","repos_url":"https://api.github.com/users/bmbouter/repos","events_url":"https://api.github.com/users/bmbouter/events{/privacy}","received_events_url":"https://api.github.com/users/bmbouter/received_events","type":"User","site_admin":false},"body":"What does `stdout + stderr` mean? Is that a string output?","created_at":"2016-07-23T17:12:46Z","updated_at":"2016-07-23T17:12:46Z","html_url":"https://github.com/pulp/pulp/pull/2624#discussion_r71975167","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2624","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/71975167"},"html":{"href":"https://github.com/pulp/pulp/pull/2624#discussion_r71975167"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2624"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2624","id":76483233,"html_url":"https://github.com/pulp/pulp/pull/2624","diff_url":"https://github.com/pulp/pulp/pull/2624.diff","patch_url":"https://github.com/pulp/pulp/pull/2624.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2624","number":2624,"state":"open","locked":false,"title":"Adds rsync distributor publish steps to platform","user":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"body":"This adds shared rsync distributor code. The classes provided need to be extended in each plugin that implements the rsync distributor.","created_at":"2016-07-06T18:56:38Z","updated_at":"2016-07-23T17:12:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3f4be5f8885af4e23a3d55e759158aef1d382d4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2624/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2624/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2624/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/480b75b8d60785bfb80548374749de7ce8a08398","head":{"label":"dkliban:rsync-distributor","ref":"rsync-distributor","sha":"480b75b8d60785bfb80548374749de7ce8a08398","user":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"repo":{"id":25177116,"name":"pulp","full_name":"dkliban/pulp","owner":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkliban/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/dkliban/pulp","forks_url":"https://api.github.com/repos/dkliban/pulp/forks","keys_url":"https://api.github.com/repos/dkliban/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkliban/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkliban/pulp/teams","hooks_url":"https://api.github.com/repos/dkliban/pulp/hooks","issue_events_url":"https://api.github.com/repos/dkliban/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/dkliban/pulp/events","assignees_url":"https://api.github.com/repos/dkliban/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/dkliban/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/dkliban/pulp/tags","blobs_url":"https://api.github.com/repos/dkliban/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkliban/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkliban/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkliban/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkliban/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/dkliban/pulp/languages","stargazers_url":"https://api.github.com/repos/dkliban/pulp/stargazers","contributors_url":"https://api.github.com/repos/dkliban/pulp/contributors","subscribers_url":"https://api.github.com/repos/dkliban/pulp/subscribers","subscription_url":"https://api.github.com/repos/dkliban/pulp/subscription","commits_url":"https://api.github.com/repos/dkliban/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkliban/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkliban/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkliban/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkliban/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/dkliban/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkliban/pulp/merges","archive_url":"https://api.github.com/repos/dkliban/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkliban/pulp/downloads","issues_url":"https://api.github.com/repos/dkliban/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/dkliban/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/dkliban/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/dkliban/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkliban/pulp/labels{/name}","releases_url":"https://api.github.com/repos/dkliban/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/dkliban/pulp/deployments","created_at":"2014-10-13T20:47:13Z","updated_at":"2015-04-03T14:29:06Z","pushed_at":"2016-07-22T19:21:55Z","git_url":"git://github.com/dkliban/pulp.git","ssh_url":"git@github.com:dkliban/pulp.git","clone_url":"https://github.com/dkliban/pulp.git","svn_url":"https://github.com/dkliban/pulp","homepage":"","size":91836,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"pulp:master","ref":"master","sha":"37b3ff4e733a711f3364a0fb88dc8b3d022a36a6","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/pulp/pulp/deployments","created_at":"2012-08-06T13:49:20Z","updated_at":"2016-07-20T06:37:07Z","pushed_at":"2016-07-22T21:58:06Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":103847,"stargazers_count":274,"watchers_count":274,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":18,"forks":112,"open_issues":18,"watchers":274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2624"},"html":{"href":"https://github.com/pulp/pulp/pull/2624"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2624"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2624/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2624/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2624/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/480b75b8d60785bfb80548374749de7ce8a08398"}}}}
{"actor":{"display_login":"bmbouter"}}