def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='installset', \
         usage='installset [OPTIONS] \n\n\tRun to perform operations on ' \
         'install sets.\n\n\tList install sets.\n\texample: installset\n\n' \
         '\tAdd install set.\n\texample: installset add installsetfile.json'\
         ' --name=newinstallsetname\n\n\tDelete install set.\n\texample: ' \
         'installset delete --name=installsetname\n\n\tInvoke install ' \
         'set.\n\texample: installset invoke --name=installsetname\n\n\t' \
         'Remove all install sets.\n\texample: installset --removeall\n' \
         '\n\tExample install set json file:\n\t[\n\t\t{\n\t\t\t"Name": ' \
         '"Wait",\n\t\t\t"UpdatableBy": ["RuntimeAgent"],\n\t\t\t'\
         '"Command": "Wait",\n\t\t\t"WaitTimeSeconds": 60\n\t\t},\n\t\t{' \
         '\n\t\t\t"Name": "uniqueName",\n\t\t\t"UpdatableBy": ' \
         '["RuntimeAgent"],\n\t\t\t"Command": "ApplyUpdate",\n\t\t\t"' \
         'Filename": "filename.exe"\n\t\t},\n\t\t{\n\t\t\t"Name": ' \
         '"Reboot",\n\t\t\t"UpdatableBy": ["RuntimeAgent"],\n\t\t\t' \
         '"Command": "ResetServer"\n\t\t}\n\t]',\
         summary='Manages install sets for iLO.',\
         aliases=['Installset'], \
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='iscsiconfig',\
         usage='iscsiconfig [ISCSI CONFIGURATION] [OPTIONS]\n\n\tRun without' \
                     ' arguments for available NIC sources for iSCSI' \
                     ' configuration.\n\texample: iscsiconfig\n\n\tDisplay' \
                     ' the current iSCSI configuration:\n\texample: ' \
                     'iscsiconfig --list\n\n\tSaving current iSCSI ' \
                     'configuration to a file:\n\texample: iscsiconfig ' \
                     '--list -f output.txt\n\n\tLoading iSCSI ' \
                     'configurations from a file:\n\texample: iscsiconfig ' \
                     '--modify output.txt\n\n\tIn order to add a NIC ' \
                     'source to an iSCSI boot attempt you must run \n\t"' \
                     'iscsiconfig" without any paramters. This will ' \
                     'display a list of NIC\n\tsources which are currently' \
                     ' present in the system.\n\tAdding an iSCSI boot ' \
                     'attempt:\n\texample: iscsiconfig --add [1]\n\n\tIn ' \
                     'order to delete an iSCSI boot attempt you must run' \
                     '\n\t"iscsiconfig --list" to view the currently ' \
                     'configured attempts.\n\tOnce you find the attempt ' \
                     'you want to delete simply pass the attempt\n\tnumber' \
                     ' to the iSCSI delete function.\n\tDeleting an iSCSI ' \
                     'boot attempt:\n\texample: iscsiconfig --delete 1',\
         summary='Displays and configures the current iscsi settings.',\
         aliases=['iscsiconfig'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.getobj = rdmcObj.commands_dict["GetCommand"](rdmcObj)
     self.setobj = rdmcObj.commands_dict["SetCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
     self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='reboot',\
         usage='reboot [OPTIONS]\n\n\tTurning the system on\n\texample: ' \
             'reboot On\n\n\tOPTIONAL PARAMETERS AND DESCRIPTIONS:' \
             '\n\tOn \t\t(Turns the system on.)\n\tForceOff  ' \
             '\t(Performs an immediate non-graceful shutdown.)' \
             '\n\tForceRestart \t(DEFAULT) (Performs' \
             ' an immediate non-graceful shutdown,\n\t\t\t' \
             ' followed by a restart of the system.)\n\tNmi  ' \
             '\t\t(Generates a Non-Maskable Interrupt to cause' \
             ' an\n\t\t\t immediate system halt.)\n\tPushPowerButton ' \
             '(Simulates the pressing of the physical power ' \
             'button\n\t\t\t on this system.)\n\n\tOEM PARAMETERS AND'\
             ' DESCRIPTIONS:\n\tPress\t\t(Simulates the pressing of the'\
             ' physical power button\n\t\t\t on this system.)\n\t'\
             'PressAndHold\t(Simulates pressing and holding of the power'\
             ' button\n\t\t\t on this systems.)\n\tColdBoot\t(Immidiately'\
             ' Removes power from the server,\n\t\t\tfollowed by a restart'\
             ' of the system)',\
         summary='Reboot operations for the current logged in server.',\
         aliases=['reboot'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
示例#4
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='ipprofiles',\
         usage='ipprofile [OPTIONS]\n\n\tDecodes and lists ' \
                 'ipprofiles. This is default option. No argument required'\
                 '\n\texample: ipprofiles'\
                 '\n\n\tAdds a new ipprofile from the provided json file.'\
                 '\n\tNOTE: Path can be absolute or from the '\
                 'same path you launch iLOrest.'\
                 '\n\texample: ipprofiles path'\
                 '\n\n\tDelete an ipprofile or list of profiles.\n\t'
                 'Provide the unique key that corresponds to the ipprofile'\
                 ' data you want to delete.\n\tSeveral keys can be comma-separated'\
                 ' with no space in between to delete more than one profile. '\
                 '\n\texample: ipprofiles -d key1,key2,key3...'\
                 '\n\n\tCopies all the ip profiles into the ip job queue .'\
                 'and start it\n\texample: ipprofiles --start',\
         summary='This is used to manage hpeipprofile data store.',\
         aliases=['ipprofiles'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.setobj = rdmcObj.commands_dict["SetCommand"](rdmcObj)
     self.bootorderobj = rdmcObj.commands_dict["BootOrderCommand"](rdmcObj)
     self.path = '/redfish/v1/systems/1/hpeip/HpeIpProfiles/'
     self.ipjobs = '/redfish/v1/Systems/1/HpeIp/HpeIpJobs/'
     self.syspath = '/redfish/v1/Systems/1/'
示例#5
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='load',\
         usage='load [OPTIONS]\n\n\tRun to load the default configuration' \
         ' file\n\texample: load\n\n\tLoad configuration file from a ' \
         'different file\n\tif any property values have changed, the ' \
         'changes are committed and the user is logged out of the server'\
         '\n\n\texample: load -f output.json\n\n\tLoad configurations to ' \
         'multiple servers\n\texample: load -m mpfilename.txt -f output.' \
         'json\n\n\tNote: multiple server file format (1 server per new ' \
         'line)\n\t--url <iLO url/hostname> -u admin -p password\n\t--url' \
         ' <iLO url/hostname> -u admin -p password\n\t--url <iLO url/' \
         'hostname> -u admin -p password',\
         summary='Loads the server configuration settings from a file.',\
         aliases=[],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self.filenames = None
     self.mpfilename = None
     self.queue = queue.Queue()
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
     self.setobj = rdmcObj.commands_dict["SetCommand"](rdmcObj)
     self.comobj = rdmcObj.commands_dict["CommitCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
示例#6
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='smartarray',\
         usage='smartarray [OPTIONS]\n\n\tRun without arguments for the ' \
             'current list of smart array controllers.\n\texample: ' \
             'smartarray\n\n\tTo get more details on a specific controller '\
             'select it by index.\n\texample: smartarray --controller=2' \
             '\n\n\tTo get more details on a specific controller select ' \
             'it by location.\n\texample: smartarray --controller="Slot0"' \
             '\n\texample: smartarray --controller "Slot 0"' \
             '\n\tNOTE: Selection by location can be done with or without spacing.' \
             '\n\n\tIn order to get a list of all physical drives for ' \
             'each controller.\n\texample: smartarray --physicaldrives' \
             '\n\n\tTo obtain details about physical drives for a ' \
             'specific controller.\n\texample: smartarray --controller=3 ' \
             '--physicaldrives\n\n\tTo obtain details about a specific ' \
             'physical drive for a specific controller.\n\texample: smartarray ' \
             '--controller=3 --pdrive=1\n\n\tIn order to get a list of ' \
             'all logical drives for the each controller.\n\texample: ' \
             'smartarray --logicaldrives\n\n\tTo obtain details about ' \
             'logical drives for a specific controller.\n\texample: ' \
             'smartarray --controller=3 --logicaldrives\n\n\tTo obtain ' \
             'details about a specific logical drive for a specific ' \
             'controller.\n\texample: smartarray --controller=3 --ldrive=1',\
         summary='Discovers all storage controllers installed in the ' \
                 'server and managed by the SmartStorage.',\
         aliases=['smartarray'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.getobj = rdmcObj.commands_dict["GetCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='ilofederation',\
         usage='ilofederation [COMMAND] [OPTIONS]\n\n\t'\
             'Adds an iLO federation group to the current logged in server.'\
             '\n\tilofederation add [FEDERATIONNAME KEY]'\
             '\n\texample: ilofederation add newfedname thisfedkey\n\n\t'\
             'Change the key of an iLO federation group.\n\t'\
             'ilofederation changekey [FEDERATIONNAME NEWKEY]\n\t'\
             'example: ilofederation changekey newfedname newfedkey\n\n\t'\
             'Delete an iLO federation group.\n\t'\
             'ilofederation delete [FEDERATIONNAME]\n\t'\
             'example: ilofederation delete newfedname\n\n\t'\
             'See a list of federations on the system.\n\t'\
             'example: ilofederation\n\n\tDESCRIPTIONS:\n\tFEDERATIONNAME:' \
             ' The name of the federation group. \n\tKEY:  The key ' \
             'required to join the federation.\n\n\tNOTE: please make sure' \
             ' the order of arguments is correct. The\n\tparameters are ' \
             'extracted based on their position in the arguments list.\n\t' \
             'Federation key must be 8 characters or greater.',\
         summary='Adds / deletes an iLO federaion group on the currently ' \
             'logged in server.',\
         aliases=None,\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='smartarray',\
         usage='smartarray [OPTIONS]\n\n\tRun without arguments for the ' \
             'current list of available smart array controllers.' \
             '\n\n\tTo obtain more details on a specific controller select ' \
             'it by index.\n\texample: smartarray --controller=1' \
             '\n\tor by slot position.\n\texample: smartarray --controller "Slot 0"' \
             '\n\n\tNOTE: Multiple controller selections are possible using comma delimitors.' \
             '\n\texample: smartarray --controller=1,2\n\tor by slot position.' \
             '\n\texample: smartarray --controller "Slot 0,Slot 1"' \
             '\n\n\tIn order to get a list of all physical drives for the ' \
             'each controller.\n\texample: smartarray --physicaldrives' \
             '\n\n\tTo obtain details about physical drives for a ' \
             'specific controller.\n\texample: smartarray --controller=3 ' \
             '--physicaldrives\n\n\tTo obtain details about a specific ' \
             'physical drive for a specific controller.\n\texample: smartarray ' \
             '--controller=3 --pdrive=1\n\n\tIn order to get a list of ' \
             'all logical drives for the each controller.\n\texample: ' \
             'smartarray --logicaldrives\n\n\tTo obtain details about ' \
             'logical drives for a specific controller.\n\texample: ' \
             'smartarray --controller=3 --logicaldrives\n\n\tTo obtain ' \
             'details regarding a specific logical drive associated to a specific ' \
             'controller.\n\texample: smartarray --controller=3 --ldrive=1',\
         summary='Discovers all storage controllers installed in the ' \
                 'server and managed by the SmartStorage.',\
         aliases=['smartarray'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.getobj = rdmcObj.commands_dict["GetCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
示例#9
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='createlogicaldrive',\
         usage='createlogicaldrive [OPTIONS]\n\n\tTo create a quick ' \
             'logical drive.\n\texample: createlogicaldrive quickdrive ' \
             '<raid-level> <num-drives> <media-type> <interface-type> ' \
             '<drive-location> --controller=1 --minimumSize=5\n\n\tTo create a custom ' \
             'logical drive.\n\texample: createlogicaldrive customdrive ' \
             '<raid-level> <physicaldriveindex(s)> --controller=1 '\
             '--name=drivename ' \
             '--spare-drives=3,4 --spare-type=Dedicated --capacityGiB=10 ' \
             '--accelerator-type=None\n\n\tOPTIONS:\n\traid-level:\t\t' \
             'Raid0, Raid1, Raid1ADM, Raid10, Raid10ADM, Raid5, Raid50, ' \
             'Raid6, Raid60\n\tphysicaldriveindex(s):\tIndex, Drive-name\n\t' \
             'media-type:\t\tSSD,HDD\n\tinterface-type:' \
             '\t\tSAS, SATA\n\tdrive-location:\t\tInternal, External\n\t' \
             '--spare-type:\t\tDedicated, Roaming\n\t--accelerator-type:\t' \
             'ControllerCache, IOBypass, None\n\t--paritytype:\t\tDefault, Rapid'\
             'NOTE: When you select multiple physicaldrives you can select by both\n\t'\
             'physical drive name and by the index at the same time.\n\t' \
             'You can also select controllers by slot number as well as index.',\
         summary='Creates a new logical drive on the selected controller.',\
         aliases=['createlogicaldrive'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='reboot',\
         usage='reboot [OPTIONS]\n\n\tRemotely control system power state commands such as, ' \
             '\n\t1. Turning the system on.\n\t2. Turning the system off.\n\t3. Power ' \
             'cycling/rebooting.\n\t4. Issuing a Non-Maskable Interrupt (NMI).\n\t5. Any ' \
             'number of pre-defined operations through virtual power-button presses.' \
             '\n\n\tNote: By default a force ' \
             'restart will occur, if the system is in an applicable power state.\n\texample: ' \
             'reboot On\n\n\tOPTIONAL PARAMETERS AND DESCRIPTIONS:' \
             '\n\tOn \t\t(Turns the system on.)\n\tForceOff  ' \
             '\t(Performs an immediate non-graceful shutdown.)' \
             '\n\tForceRestart \t(DEFAULT) (Performs' \
             ' an immediate non-graceful shutdown,\n\t\t\t' \
             ' followed by a restart of the system.)\n\tNmi  ' \
             '\t\t(Generates a Non-Maskable Interrupt to cause' \
             ' an\n\t\t\t immediate system halt.)\n\tPushPowerButton ' \
             '(Simulates the pressing of the physical power ' \
             'button\n\t\t\t on this system.)\n\n\tOEM PARAMETERS AND' \
             ' DESCRIPTIONS:\n\tPress\t\t(Simulates the pressing of the' \
             ' physical power button\n\t\t\t on this system.)\n\t' \
             'PressAndHold\t(Simulates pressing and holding of the power' \
             ' button\n\t\t\t on this systems.)\n\tColdBoot\t(Immidiately' \
             ' Removes power from the server,\n\t\t\tfollowed by a restart' \
             ' of the system)', \
         summary='Reboot operations for the current logged in server.',\
         aliases=['reboot'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
示例#11
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='iloaccounts',\
         usage='iloaccounts [COMMAND] [OPTIONS]\n\n\t'\
         'Add an iLO user account the current logged in server.\n\t' \
         'iloaccounts add [USERNAME LOGINNAME PASSWORD] \n\t'\
         'example: iloaccounts add USERNAME ACCOUNTNAME PASSWORD' \
         '\n\n\tChange the password of an account.\n\t'\
         'iloaccounts changepass [LOGINNAMEorID# PASSWORD]\n\t'\
         'example: iloaccounts changepass 2 newpassword\n\n\t'\
         'Get Id and LoginName info of iLO user accounts.\n\t'\
         'example: iloaccounts\n\n\tDelete an iLO account.\n\t'\
         'iloaccounts delete [LOGINNAMEorID#]\n\t'\
         'example: iloaccounts delete accountLoginName\n\n'
         '\tDESCRIPTIONS:\n\tLOGINNAME:  The account name, not used ' \
         'to login.\n\tUSERNAME: The account username name, used' \
         ' to login. \n\tPASSWORD:  The account password, used to login.'
         '\n\tId: The number associated with an iLO user account.'\
         '\n\n\tNOTE: please make sure the order of arguments is ' \
         'correct. The\n\tparameters are extracted based on their ' \
         'position in the arguments list.\n\tOnly privileges available to' \
         ' the logged in account can be set to the new account.',\
         summary='Adds / deletes an iLO account on the currently logged ' \
                                                             'in server.',\
         aliases=None,\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
示例#12
0
    def __init__(self, rdmcObj):
        RdmcCommandBase.__init__(self,\
            name='set',\
            usage='set [PROPERTY=VALUE] [OPTIONS]\n\n\tSetting a ' \
                'single level property example:\n\tset property=value\n\n\t' \
                'Setting multiple single level properties example:\n\tset ' \
                'property=value property=value property=value\n\n\t' \
                'Setting a multi level property example:\n\tset property/' \
                'subproperty=value',\
            summary='Changes the value of a property within the'\
                    ' currently selected type.',\
            aliases=[],\
            optparser=OptionParser())
        self.definearguments(self.parser)
        self._rdmc = rdmcObj

        self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
        self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
        self.comobj = rdmcObj.commands_dict["CommitCommand"](rdmcObj)
        self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)

        #remove reboot option if there is no reboot command
        try:
            self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)
        except KeyError:
            self.parser.remove_option('--reboot')
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='ipprofiles',\
         usage='ipprofile [OPTIONS]\n\n\tDecodes and lists ' \
                 'ipprofiles. This is default option. No argument required'\
                 '\n\texample: ipprofiles'\
                 '\n\n\tAdds a new ipprofile from the provided json file.'\
                 '\n\tNOTE: Path can be absolute or from the '\
                 'same path you launch iLOrest.'\
                 '\n\texample: ipprofiles <file path>'\
                 '\n\n\tDelete an ipprofile or list of profiles.\n\t'
                 'Provide the unique key that corresponds to the ipprofile'\
                 ' data you want to delete.\n\tSeveral IDs can be comma-separated'\
                 ' with no space in between to delete more than one profile. '\
                 '\n\texample: ipprofiles -d ID1,ID2,ID3...'\
                 '\n\n\tCopies ip profile with the specified ID into the ip job queue.'\
                 'and starts it.\n\texample: ipprofiles --start=<profile ID>',\
         summary='This is used to manage hpeipprofile data store.',\
         aliases=['ipprofiles'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.setobj = rdmcObj.commands_dict["SetCommand"](rdmcObj)
     self.bootorderobj = rdmcObj.commands_dict["BootOrderCommand"](rdmcObj)
     self.path = ''
     self.ipjobs = ''
     self.running_jobs = ''
     self.hvt_output = ''
     self.syspath = '/redfish/v1/Systems/1/'
     self.ipjobtype = ['langsel', 'hvt', 'ssa', 'install', 'rbsu']
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='iloclone',\
         usage='iloclone [OPTIONS]\n\n\tCreate a clone file from the ' \
             'current logged in server.\n\texample: iloclone save -f  ' \
             'clone_file_to_save.json\n\n\tLoad the saved clone file ' \
             'to currently logged in server.\n\texample: iloclone load' \
             ' -f clone_file_to_load.json\n\n\tNOTE: This command is ' \
             'only available in local mode.\n\t      During clone load,'\
             ' login using an ilo account with\n\t      full privileges '\
             '(such as the Administrator account)\n\t      to ensure all '\
             'items are cloned successfully.\n\t      The json file created by the save '\
             'command is tailored \n\t      for the iLO clone command. Manipulating '\
             'the file may cause\n\t      errors when running the load command.\n\n\t'\
             'WARNING: iloclone command is being deprecated and will be removed in a\n\t\t'\
             ' future version. Use the serverclone command instead.',\
         summary='Clone the iLO config of the currently logged in server ' \
             'and copy it to the server in the arguments.',\
         aliases=['iloclone'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
     self.logobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
     self.loginobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='makeinstallset', \
         usage='makeinstallset \n\n\tRun to enter a guided shell for making ' \
         'install sets. If not currently\n\tlogged into a server will perform '\
         'basic guidance on making an installset,\n\tif logged into a server '\
         'will provide guidance based on the current\n\tcomponents on the system. '\
         'If you wish to use this command on a logged in\n\tserver upload the '\
         'components before running for best results.',\
         summary='Creates install sets for iLO.',\
         aliases=['MInstallset'], \
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
     self.defaultprops = {"UpdatableBy":["Bmc"], "Command":\
                 "ApplyUpdate", "WaitTimeSeconds":0, "Filename":""}
     self.helptext = {"Command": "Possible Commands: ApplyUpdate, ResetServer, "\
                    "ResetBmc, Wait", "UpdatableBy": "Possible Update parameter(s)"\
                    ":\nBmc: Updatable by iLO\nUefi: Updatable by Uefi\n"\
                    "RuntimeAgent: Updatable by runtime agent such as SUM/SUT", \
                    "WaitTimeSeconds": "Number of seconds to pause in Wait "\
                    "command.", "Filename": "Unique filename of component on "\
                    "iLO repository"}
     self.loggedin = None
     self.comps = None
示例#16
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='certificate',\
         usage='certificate [OPTIONS]\n\n\tImport auth CA certificate.' \
         '\n\texample: certificate ca certfile.txt\n\n\tImport auth '\
         'CRL certificate.\n\texample: certificate crl <url/hostname>/cert\n\n\t'\
         'Import an iLO TLS certificate.\n\texample: certificate tls'\
         ' certfile.txt\n\n\tGenerate an https certificate signing'\
         ' request.\n\texmaple: certificate csr [ORG_NAME] [ORG_UNIT]'\
         ' [COMMON_NAME] [COUNTRY] [STATE] [CITY]\n\n\tNOTE: please make ' \
         'sure the order of arguments is correct. The\n\tparameters ' \
         'are extracted base on their position in the arguments ' \
         'list.\n\n\tGet certificate signing request.\n\texample: '\
         'certificate getcsr\n\n\tNOTE: Use the singlesignon command '
         'to import single sign on certificates.\n\n\tNOTE: Use quotes to include '\
         'parameters which contain whitespace when generating a CSR.\n\texample: '\
         'certificate csr \"Hewlett Packard Enterprise\" \"iLORest Group\" \"CName\"'\
         '\n\t\t\"United States\" \"Texas\" \"Houston\"',\
         summary="Command for importing both iLO and login authorization "\
             "certificates as well as generating iLO certificate signing requests",\
         aliases=["certificate"],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
    def __init__(self, rdmcObj):
        RdmcCommandBase.__init__(self,\
            name='exit',\
            usage='exit\n\n\tRun to exit from the interactive shell\n\texample: exit',\
            summary='Exits from the interactive shell.',\
            aliases=['quit'])

        self._rdmc = rdmcObj
        self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawget',\
         usage='rawget [PATH] [OPTIONS]\n\n\tRun to to retrieve data from ' \
                 'the passed in path.\n\texample: rawget "/redfish/v1/systems/(system ID)"',\
         summary='Raw form of the GET command.',\
         aliases=['rawget'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='newcommand',\
         usage='newcommand [OPTIONS]\n\n\tRun to show the new command is ' \
             'working\n\texample: newcommand',\
         summary='New command tutorial.',\
         aliases=[],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='logout',\
         usage='logout\n\n\tRun to end the current session and disconnect' \
                 ' from the server\n\texample: logout',\
         summary='Ends the current session and disconnects from the server.',\
         aliases=[],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
示例#21
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='listcomp', \
         usage='listcomp [OPTIONS] \n\n\tRun to list the components of' \
           'the currently logged in system.\n\texample: listcomp',\
         summary='Lists components/binaries from the iLO Repository.', \
         aliases=['Listcomp'], \
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='taskqueue', \
         usage=None, \
         description='Run to add or remove tasks from the task queue. Added tasks are '\
                     'appended to the end of the queue.\nNote: iLO 5 required.',\
         summary='Manages the update task queue for iLO.',\
         aliases=['Taskqueue'])
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
示例#23
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawdelete',\
         usage='rawdelete [PATH] [OPTIONS]\n\n\tRun to to delete data from' \
                 ' the passed in path.\n\texample: rawdelete "/redfish/v1/' \
                 'Sessions/(session ID)"', \
         summary='Raw form of the DELETE command.',\
         aliases=['rawdelete'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='serverstate',\
         usage='serverstate [OPTIONS]\n\n\treturns the current state of the'\
         ' server\n\n\tShow the current server state.\n\texample: serverstate',\
         summary='Returns the current state of the server.',\
         aliases=['serverstate'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
示例#25
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,
                              name="clearpmmpendingconfig",
                              usage="clearpmmpendingconfig [-h|--help]\n\n" \
                                    "\tClear pmm pending config tasks\n" \
                                    "\texample: clearpmmpendingconfig",
                              summary="Clear pending config tasks",
                              aliases=["clearpmmpendingconfig"],
                              argparser=ArgumentParser())
     self._rdmc = rdmcObj
     self._rest_helpers = RestHelpers(rdmcObject=self._rdmc)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='types',\
         usage='types [TYPE] [OPTIONS]\n\n\tRun to display currently ' \
         'available selectable types\n\texample: types',\
         summary='Displays all selectable types within the currently logged in server.',\
         aliases=['types'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
示例#27
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='pending',\
         usage='pending [OPTIONS]\n\n\tRun to show pending committed changes '\
                 'that will be applied after a reboot.\n\texample: pending',\
         summary='Show the pending changes that will be applied on reboot.',\
         aliases=['pending'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='eskm',\
         usage='eskm [OPTIONS]\n\n\tClear the ESKM logs.\n\texample: eskm' \
                 ' clearlog\n\n\tTest the ESKM connections.\n\texample: eskm testconnections',\
         summary="Command for all ESKM available actions.",\
         aliases=None,\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='iloreset',\
         usage='iloreset [OPTIONS]\n\n\tReset iLO on the current logged in'\
                                         ' server.\n\texample: iloreset',\
         summary='Reset iLO on the current logged in server.',\
         aliases=['iloreset'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = self._rdmc.app.typepath
示例#30
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='serverstate',\
         usage='serverstate [OPTIONS]\n\n\treturns the current state of the'\
         ' server\n\n\tShow the current server state.\n\texample: serverstate',\
         summary='Returns the current state of the server.',\
         aliases=['serverstate'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)