[Spacewalk-list] kickstart.py: spacecmd -- kickstart_clone -n profile_name -c profile_clone
Aron Parsons
aron at redhat.com
Mon Apr 18 19:05:07 UTC 2011
kickstart_clone was added in spacecmd-1.5.1-1.
/aron
--------------
Date: Wed, 13 Apr 2011 10:57:02 -0400
From: "Aaron Prayther" <aprayther at LCE.com>
To: <spacewalk-list at redhat.com>
Subject: [Spacewalk-list] kickstart.py: spacecmd -- kickstart_clone -n
profile_name -c profile_clone
Message-ID: <0077FC548936B3418B2814159696352A0BA85AD8 at lceex01.LCE.com>
Content-Type: text/plain; charset="us-ascii"
kickstart.py
below adds the "clone" option.
####################
def help_kickstart_clone(self):
print 'kickstart_clone: Clone a Kickstart profile'
print '''usage: kickstart_clone [options]
options:
-n NAME
-c CLONE_NAME'''
def do_kickstart_clone(self, args):
options = [ Option('-n', '--name', action='store'),
Option('-c', '--clonename', action='store') ]
(args, options) = parse_arguments(args, options)
if is_interactive(options):
options.name = prompt_user('Name:', noblank = True)
options.clonename = prompt_user('Clone Name:', noblank = True)
else:
if not options.name:
logging.error('The Kickstart name is required')
return
if not options.clonename:
logging.error('The Kickstart clone name is required')
return
# leave this blank to use the default server
host = ''
self.client.kickstart.cloneProfile(self.session,
options.name,
options.clonename)
####################
Aaron Prayther
More information about the Spacewalk-list
mailing list