summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-10-29 11:45:16 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-10-29 11:45:16 -0400
commit0d64de62b3a0b011a51d390c8ee1b91820479950 (patch)
tree6247af65ec37c59e1e3271aca97745e4f538e6cd
parent66c992465c21d617f7de5f3d1e9e1ae59a7c87cf (diff)
downloadthird_party-cobbler-0d64de62b3a0b011a51d390c8ee1b91820479950.tar.gz
third_party-cobbler-0d64de62b3a0b011a51d390c8ee1b91820479950.tar.xz
third_party-cobbler-0d64de62b3a0b011a51d390c8ee1b91820479950.zip
Add --arch back to docs, plus WebUI changes to add the field.
-rw-r--r--cobbler/item_repo.py1
-rw-r--r--cobbler/webui/CobblerWeb.py6
-rw-r--r--docs/cobbler.pod6
-rw-r--r--webui_templates/repo_edit.tmpl16
4 files changed, 27 insertions, 2 deletions
diff --git a/cobbler/item_repo.py b/cobbler/item_repo.py
index 84fcf1f..106759d 100644
--- a/cobbler/item_repo.py
+++ b/cobbler/item_repo.py
@@ -185,6 +185,7 @@ class Repo(item.Item):
def remote_methods(self):
return {
'name' : self.set_name,
+ 'arch' : self.set_arch,
'mirror-name' : self.set_name,
'mirror' : self.set_mirror,
'keep-updated' : self.set_keep_updated,
diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py
index 93b47da..eb82564 100644
--- a/cobbler/webui/CobblerWeb.py
+++ b/cobbler/webui/CobblerWeb.py
@@ -679,7 +679,7 @@ class CobblerWeb(object):
def repo_save(self,name=None,oldname=None,new_or_edit=None,editmode="edit",
mirror=None,keep_updated=None,local_filename=None,
- rpm_list=None,createrepo_flags=None,delete1=None,delete2=None,**args):
+ rpm_list=None,createrepo_flags=None,arch=None,delete1=None,delete2=None,**args):
if not self.__xmlrpc_setup():
return self.login(message=INVALID_CREDS)
@@ -725,7 +725,11 @@ class CobblerWeb(object):
self.remote.modify_repo(repo, 'rpm-list', rpm_list, self.token)
if createrepo_flags:
self.remote.modify_distro(repo, 'createrepo-flags', createrepo_flags, self.token)
+ if arch:
+ self.remote.modify_distro(repo, 'arch', arch, self.token)
+
self.remote.save_repo(repo, self.token)
+
except Exception, e:
log_exc()
return self.error_page("Error while saving repo: %s" % str(e))
diff --git a/docs/cobbler.pod b/docs/cobbler.pod
index e1b76f7..e46415a 100644
--- a/docs/cobbler.pod
+++ b/docs/cobbler.pod
@@ -270,7 +270,7 @@ on your network will result in faster, more up-to-date installations and faster
are only provisioning a home setup, this will probably be overkill, though it can be very useful
for larger setups (labs, datacenters, etc).
-B<cobbler repo add --mirror=url --name=string [--local-filename=string] [--rpmlist=list] [--creatrepo-flags=string] [--keep-updated=Y/N]>
+B<cobbler repo add --mirror=url --name=string [--local-filename=string] [--rpmlist=list] [--creatrepo-flags=string] [--keep-updated=Y/N] [--arch=string]>
=over
@@ -335,6 +335,10 @@ Specifies optional flags to feed into the createrepo tool, which is called when
Specifies that the named repository should not be updated during a normal "cobbler reposync". The repo may still be updated by name. See "cobbler reposync" below.
+=item arch
+
+Specifies what architecture the repository should use. By default the current system arch (of the server) is used, which may not be desirable. Using this to override the default arch allows mirroring of source repositories (using --arch=src).
+
=back
=head2 DISPLAYING CONFIGURATION ENTRIES
diff --git a/webui_templates/repo_edit.tmpl b/webui_templates/repo_edit.tmpl
index 100997d..d7ea016 100644
--- a/webui_templates/repo_edit.tmpl
+++ b/webui_templates/repo_edit.tmpl
@@ -135,6 +135,22 @@ function disablename(value)
</td>
</tr>
+ <tr>
+ <td>
+ <label for="arch">arch</label>
+ </td>
+ <td>
+ <input type="text" size="255" style="width: 150px;" name="arch" id="arch"
+ #if $repo
+ value="$repo.arch"
+ #end if
+ />
+ <p class="context-tip">Overrides the local system arch when mirroring with yum.</p>
+ </td>
+ </tr>
+
+
+
#if $repo
<tr>
<td>