Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/dump-repos
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def make_client(args):
log.warning("No password provided for %s", args.username)
auth = (args.username, args.password)

return Client(args.url, auth=auth)
return Client(args.url, auth=auth, verify=not args.insecure)


def main():
Expand All @@ -71,6 +71,7 @@ def main():
parser.add_argument(
"--password", help="Pulp password (or set PULP_PASSWORD in env)"
)
parser.add_argument("--insecure", default=False, action="store_true")
parser.add_argument("--debug", action="store_true")
parser.add_argument(
"search", nargs="*", help="Dump repos matching certain criteria only"
Expand Down
5 changes: 3 additions & 2 deletions examples/garbage-collect
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,20 @@ def make_client(args):
log.warning("No password provided for %s", args.username)
auth = (args.username, args.password)

return Client(args.url, auth=auth)
return Client(args.url, auth=auth, verify=not args.insecure)


def main():
log.setLevel(logging.INFO)
logging.basicConfig(format="%(message)s")

parser = ArgumentParser(help="Garbage collect old repositories")
parser = ArgumentParser(description="Garbage collect old repositories")
parser.add_argument("--url", help="Pulp server URL")
parser.add_argument("--username", help="Pulp username")
parser.add_argument(
"--password", help="Pulp password (or set PULP_PASSWORD in env)"
)
parser.add_argument("--insecure", default=False, action="store_true")

p = parser.parse_args()
if not p.url:
Expand Down
3 changes: 2 additions & 1 deletion examples/publish
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def make_client(args):
log.warning("No password provided for %s", args.username)
auth = (args.username, args.password)

return Client(args.url, auth=auth)
return Client(args.url, auth=auth, verify=not args.insecure)


def main():
Expand All @@ -50,6 +50,7 @@ def main():
parser.add_argument(
"--password", help="Pulp password (or set PULP_PASSWORD in env)"
)
parser.add_argument("--insecure", default=False, action="store_true")
parser.add_argument("--debug", action="store_true")
parser.add_argument("repo_id", nargs="+")

Expand Down
4 changes: 2 additions & 2 deletions examples/set-maintenance
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def set_maintenance(client, regex):

crit = Criteria.with_field("id", Matcher.regex(regex))
# search repo
repos = self.search_repository(crit).result()
repos = client.search_repository(crit).result()

repo_ids = [repo.id for repo in repos]
report = report.add(repo_ids)
# get the repo ids and feed to report

tasks = client.set_maintainenance(report).result()
tasks = client.set_maintenance(report).result()

report = client.get_maintenance_report().result()
log.info("maintenance mode set: %s", report.entries)
Expand Down