summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--cobbler/action_reposync.py3
-rw-r--r--cobbler/action_sync.py6
-rw-r--r--cobbler/cobbler_msg.py9
-rw-r--r--cobbler/item_profile.py4
5 files changed, 14 insertions, 9 deletions
diff --git a/TODO b/TODO
index 458f45d..45beefe 100644
--- a/TODO
+++ b/TODO
@@ -8,6 +8,7 @@ always:
more new thoughts:
1 - support repo add taking http:// urls, which will use repotrack/reposync
3 - possibly look at pungi, though maybe not if above (^) works well.
+1 - make enchant work for remote xen installs
core:
1 - turn on locking in production (or think about it) -- important for rsync especially.
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py
index 96d35f3..2aeffd1 100644
--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -69,11 +69,12 @@ class RepoSync:
if not repo.keep_updated:
print "- %s is set to not be updated"
return True
- print "imagine an rsync happened here, and that it was amazing..."
dest_path = os.path.join(self.settings.webdir, "repo_mirror", repo.name)
spacer = ""
if repo.mirror.find("rsync://") != -1:
spacer = "-e ssh"
+ if not repo.mirror.endswith("/"):
+ repo.mirror = "%s/" % repo.mirror
cmd = "rsync -av %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path)
print "executing: %s" % cmd
rc = sub_process.call(cmd, shell=True)
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 52d9dee..b560ab9 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -295,8 +295,7 @@ class BootSync:
# will replace "TEMPLATE::yum_repo_stanza" in a cobbler kickstart file.
buf = ""
repos = profile.repos
- if type(repos) == str:
- repos = repos.split(" ")
+ repos = repos.split(" ")
for r in repos:
repo = self.repos.find(r)
if repo is None:
@@ -308,8 +307,7 @@ class BootSync:
def generate_config_stanza(self, profile):
# returns the line in post that would configure yum to use repos added with "cobbler repo add"
repos = profile.repos
- if type(repos) == str:
- repos = repos.split(" ")
+ repos = repos.split(" ")
buf = ""
for r in repos:
repo = self.repos.find(r)
diff --git a/cobbler/cobbler_msg.py b/cobbler/cobbler_msg.py
index 10d16a1..e14a3e8 100644
--- a/cobbler/cobbler_msg.py
+++ b/cobbler/cobbler_msg.py
@@ -24,7 +24,7 @@ cobbler check
cobbler distro add --name=<string> --kernel=<path> --initrd=<path>
[--kopts=<string>] [--ksmeta=<string>] [--arch=<x86|x86_64|ia64>]
-cobbler profile add --name=<string --distro=<string>
+cobbler profile add --name=<string> --distro=<string>
[--kick-start=<url>] [--kopts=<string>] [--ksmeta=<string>]
[--virt-name=<string>] [--virt-file-size=<gigabytes>]
[--virt-ram=<megabytes>]
@@ -33,9 +33,14 @@ cobbler system add --name=<ip│mac│hostname|default> --profile=<string>
[--pxe-address=<string>]
[--ksmeta=<string>]
-cobbler import --mirror=rsync://<address> --mirror-name=<string>
+cobbler import --name=<string> --mirror=rsync://<address>
+cobbler import --name=<string> --mirror=user@address:/path
cobbler import --path=<path>
+cobbler repo add --name=<string> --mirror=rsync://<address> [--local-file=name]
+cobbler repo add --name=<string> --mirror=user@address:/path [--local-file=name]
+cobbler reposync
+
cobbler [distro|profile|system] remove --name=<name>
cobbler list
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index 038c84b..a406c2e 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -39,7 +39,7 @@ class Profile(item.Item):
self.virt_file_size = 5 # GB. 5 = Decent _minimum_ default for FC5.
self.virt_ram = 512 # MB. Install with 256 not likely to pass
self.virt_paravirt = True # hvm support is *NOT* in Koan (now)
- self.repos = [] # names of cobbler repo definitions
+ self.repos = "" # names of cobbler repo definitions
def from_datastruct(self,seed_data):
"""
@@ -80,7 +80,7 @@ class Profile(item.Item):
ok = False
break
if ok:
- self.repos = repolist
+ self.repos = repos
else:
raise cexceptions.CobblerException("no_repos")