diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | cobbler.pod | 4 | ||||
-rw-r--r-- | cobbler/action_reposync.py | 7 | ||||
-rw-r--r-- | cobbler/action_sync.py | 4 | ||||
-rwxr-xr-x | cobbler/cobbler.py | 4 | ||||
-rw-r--r-- | cobbler/item_repo.py | 7 |
6 files changed, 13 insertions, 17 deletions
@@ -6,11 +6,11 @@ Cobbler CHANGELOG - Made default rsync.exclude more strict (OO langpacks and KDE translation) - Now runs createrepo during "cobbler import" to build more correct repodata - Added additional repo mirroring commands: "cobbler repo add", etc -- Documentation on repo mirroring features TBA. -- cobbler import gets primative support for http://, though rsync:// is still the way to go. +- Documentation on repo mirroring features. - fix bug in rsync:// import code that saved distributions in the wrong path - The --dryrun option on "cobbler sync" is now unsupported. - Fixed bug in virt specific profile information not being used with koan +- import now takes --name in addition to --mirror-name to be more consistant * Mon Dec 05 2006 - 0.3.4-1 - Don't rsync PPC content or ISO's on cobbler import diff --git a/cobbler.pod b/cobbler.pod index 1f65344..956bdb9 100644 --- a/cobbler.pod +++ b/cobbler.pod @@ -306,9 +306,9 @@ B<cobbler check> # set up your cobbler distros here. -B<cobbler repo add --mirror=rsync://repos.example.com/foo/i386/ --mirror=name=magicfooi386> +B<cobbler repo add --mirror=rsync://repos.example.com/foo/i386/ --name=magicfooi386> -B<cobbler repo add --mirror=rsync://repos.example.com/bar/i386/ --mirror=name=magicbari386> +B<cobbler repo add --mirror=rsync://repos.example.com/bar/i386/ --name=magicbari386> B<cobbler reposync> diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 97b6ee5..96d35f3 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -61,10 +61,7 @@ class RepoSync: except OSError, oe: if not oe.errno == 17: # already exists, constant for this? raise cexceptions.CobblerException("no_create", repo_path) - if mirror.startswith("rsync://") or mirror.startswith("ssh://"): - self.do_rsync_repo(repo) - else: - raise cexceptions.CobblerException("no_mirror") + self.do_rsync_repo(repo) return True @@ -75,7 +72,7 @@ class RepoSync: 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("ssh://") != -1: + if repo.mirror.find("rsync://") != -1: spacer = "-e ssh" cmd = "rsync -av %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path) print "executing: %s" % cmd diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 88fa967..10fc215 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -300,7 +300,7 @@ class BootSync: for r in repos: repo = self.repos.find(r) if repo is None: - raise cexceptions.CobblerException("no_repo",r) + continue http_url = "http://%s/cobbler/repo_mirror/%s" % (self.settings.server, repo.name) buf = buf + "repo --name=%s --baseurl=%s\n" % (repo.name, http_url) return buf @@ -314,7 +314,7 @@ class BootSync: for r in repos: repo = self.repos.find(r) if repo is None: - raise cexceptions.CobblerException("no_repo",r) + continue if not (repo.local_filename is None and repo.local_filename != ""): buf = buf + "wget http://%s/cobbler/repo_mirror/%s/config.repo -O /etc/yum.repos.d/%s.repo" % (self.settings.server, repo.name, repo.local_filename) return buf diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index f11d8fb..51a9257 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -211,7 +211,8 @@ class BootCLI: commands = { '--path' : lambda(a): set_path(a), '--mirror' : lambda(a): set_mirror(a), - '--mirror-name' : lambda(a): set_mirror_name(a) + '--mirror-name' : lambda(a): set_mirror_name(a), + '--name' : lambda(a): set_mirror_name(a) } on_ok = lambda: go_import() return self.apply_args(args,commands,on_ok) @@ -264,6 +265,7 @@ class BootCLI: repo = self.api.new_repo() commands = { '--name' : lambda(a): repo.set_name(a), + '--mirror-name' : lambda(a): repo.set_name(a), '--mirror' : lambda(a): repo.set_mirror(a), '--keep-updated' : lambda(a): repo.set_keep_updated(a), '--local-filename' : lambda(a): repo.set_local_filename(a) diff --git a/cobbler/item_repo.py b/cobbler/item_repo.py index 6e61d01..822038f 100644 --- a/cobbler/item_repo.py +++ b/cobbler/item_repo.py @@ -51,11 +51,8 @@ class Repo(item.Item): A repo is (initially, as in right now) is something that can be rsynced. reposync/repotrack integration over HTTP might come later. """ - if mirror.startswith("rsync://") or mirror.startswith("ssh://"): - self.mirror = mirror - return True - else: - raise cexceptions.CobblerException("no_mirror") + self.mirror = mirror + return True def set_keep_updated(self,keep_updated): """ |