Merge ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:fix-ports-rsync-module-name into ubuntu-mirror-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Paul Collins
Approved revision: 18aba70efb95d695b3b9372371c4b29cc1012a39
Merged at revision: 5e3f5fc98f801ba724a02c938654476e41d6c574
Proposed branch: ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:fix-ports-rsync-module-name
Merge into: ubuntu-mirror-charm:master
Diff against target: 106 lines (+30/-2)
3 files modified
config.yaml (+28/-0)
hooks/Config.py (+1/-1)
templates/rsync-mirrors-cfg.tmpl (+1/-1)
Reviewer Review Type Date Requested Status
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+389316@code.launchpad.net

Commit message

add config settings for the rsync module name, in particular setting the ports one correctly

To post a comment you must log in.
Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 5e3f5fc98f801ba724a02c938654476e41d6c574

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index b63c050..8a5039e 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -75,6 +75,10 @@ options:
6 default: '{}'
7 type: string
8 description: "Optional rsync authentication details for mirror_ubuntu_source_url"
9+ mirror_ubuntu_rsync_module:
10+ default: "ubuntu"
11+ type: string
12+ description: "The name of the rsync module for this mirror role"
13 mirror_ubuntu_sync_time:
14 default: "ondemand"
15 type: string
16@@ -123,6 +127,10 @@ options:
17 default: '{}'
18 type: string
19 description: "Optional rsync authentication details for mirror_releases_source_url"
20+ mirror_releases_rsync_module:
21+ default: "releases"
22+ type: string
23+ description: "The name of the rsync module for this mirror role"
24 mirror_releases_sync_time:
25 default: "ondemand"
26 type: string
27@@ -171,6 +179,10 @@ options:
28 default: '{}'
29 type: string
30 description: "Optional rsync authentication details for mirror_cloud-images_source_url"
31+ mirror_cloud-images_rsync_module:
32+ default: "cloud-images"
33+ type: string
34+ description: "The name of the rsync module for this mirror role"
35 mirror_cloud-images_sync_time:
36 default: "ondemand"
37 type: string
38@@ -219,6 +231,10 @@ options:
39 default: '{}'
40 type: string
41 description: "Optional rsync authentication details for mirror_simple-streams_source_url"
42+ mirror_simple-streams_rsync_module:
43+ default: "simple-streams"
44+ type: string
45+ description: "The name of the rsync module for this mirror role"
46 mirror_simple-streams_sync_time:
47 default: "ondemand"
48 type: string
49@@ -267,6 +283,10 @@ options:
50 default: '{}'
51 type: string
52 description: "Optional rsync authentication details for mirror_cdimage_source_url"
53+ mirror_cdimage_rsync_module:
54+ default: "cdimage"
55+ type: string
56+ description: "The name of the rsync module for this mirror role"
57 mirror_cdimage_sync_time:
58 default: "ondemand"
59 type: string
60@@ -315,6 +335,10 @@ options:
61 default: '{}'
62 type: string
63 description: "Optional rsync authentication details for mirror_ports_source_url"
64+ mirror_ports_rsync_module:
65+ default: "ubuntu-ports"
66+ type: string
67+ description: "The name of the rsync module for this mirror role"
68 mirror_ports_sync_time:
69 default: "ondemand"
70 type: string
71@@ -363,6 +387,10 @@ options:
72 default: '{}'
73 type: string
74 description: "Optional rsync authentication details for mirror_old-releases_source_url"
75+ mirror_old-releases_rsync_module:
76+ default: "old-releases"
77+ type: string
78+ description: "The name of the rsync module for this mirror role"
79 mirror_old-releases_sync_time:
80 default: "ondemand"
81 type: string
82diff --git a/hooks/Config.py b/hooks/Config.py
83index 0d7918d..eb77b87 100755
84--- a/hooks/Config.py
85+++ b/hooks/Config.py
86@@ -125,7 +125,7 @@ class Config:
87 'tmpl_file': str("apache-{}.tmpl".format(base_role)),
88 }
89 for key in ["name", "aliases", "path", "description", "rsync_log",
90- "command", "source_url", "rsync_auth",
91+ "command", "source_url", "rsync_auth", "rsync_module",
92 "sync_time", "trigger", "apache_late_extra",
93 "apache_early_extra"]:
94 config_key = "mirror_%s_%s" % (base_role, key)
95diff --git a/templates/rsync-mirrors-cfg.tmpl b/templates/rsync-mirrors-cfg.tmpl
96index c829b99..8820e2e 100644
97--- a/templates/rsync-mirrors-cfg.tmpl
98+++ b/templates/rsync-mirrors-cfg.tmpl
99@@ -1,6 +1,6 @@
100
101 #for $target in $targets
102-[$target]
103+[$targets[$target]["rsync_module"]]
104 path = $targets[$target]["path"]
105 comment = $targets[$target]["description"]
106 list = true

Subscribers

People subscribed via source and target branches