Ejemplo n.º 1
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawpost',\
         usage='rawpost [FILENAME] [OPTIONS]\n\n\tRun to send a post from ' \
                 'the data in the input file.\n\texample: rawpost rawpost.' \
                 'txt\n\n\tExample input file:\n\t{\n\t    "path": "/' \
                 'redfish/v1/systems/(system ID)/Actions/ComputerSystem.'
                 'Reset",\n\t    "body": {\n\t        "ResetType": '\
                 '"ForceRestart"\n\t    }\n\t}',\
         summary='Raw form of the POST command.',\
         aliases=['rawpost'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
Ejemplo n.º 2
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='fwintegritycheck',\
         usage='fwintegritycheck [OPTIONS]\n\n\tPerform a firmware ' \
                 'integrity check on the current logged in server.\n\t' \
                 'example: fwintegritycheck',\
         summary='Perform a firmware integrity check on the current logged' \
                 ' in server.',\
         aliases=['fwintegritycheck'],\
         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='drivesanitize',\
         usage='drivesanitize [OPTIONS]\n\n\tTo sanitize a physical drive ' \
             'by index.\n\texample: drivesanitize 1 --controller=1\n\n\tTo' \
             ' sanitize multiple drives by index.\n\texample: ' \
             'drivesanitize 1,2 --controller=1',\
         summary='Erase/Sanitizes physical drives',\
         aliases=['drivesanitize'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
     self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawput',\
         usage='rawput [FILENAME] [OPTIONS]\n\n\tRun to send a post from ' \
             'the data in the input file.\n\texample: rawput rawput.' \
             'txt\n\n\tExample input file:\n\t{\n\t    "path": "/redfish/' \
             'v1/systems/(system ID)/bios/Settings/",\n\t    "body":{\n\t'
             '\t"Attributes": {\n\t\t' \
             '  "BaseConfig": "default"\n\t\t}\n\t    }\n\t}',\
         summary='Raw form of the PUT command.',\
         aliases=['rawput'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawpatch',\
         usage='rawpatch [FILENAME]\n\n\tRun to send a patch from the data' \
                 ' in the input file.\n\tMultiple PATCHes can be performed in sequence by '\
                 '\n\tadding more path/body key/value pairs.\n'
                 '\n\texample: rawpatch rawpatch.txt' \
                 '\n\n\tExample input file:\n\t{\n\t    "/redfish/' \
                 'v1/systems/(system ID)":\n\t    {\n\t        ' \
                 '"AssetTag": "NewAssetTag"\n\t    }\n\t}',\
         summary='Raw form of the PATCH command.',\
         aliases=['rawpatch'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='sigrecompute',\
         usage='sigrecompute [OPTIONS]\n\n\tRecalculate the signature on ' \
                 'the computers configuration.\n\texample: sigrecompute\n\n'\
                 '\tNote: sigrecompute command is not available on Redfish'\
                 ' systems.',\
         summary="Command to recalculate the signature of the computer's " \
         "configuration.",\
         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="showpmmpendingconfig",
                              usage="showpmm [-h | --help] [-j | --json]\n\n" \
                                    "\tShows the pending tasks for configuring PMM\n" \
                                    "\texample: showpmmpendingconfig --json",
                              summary="Shows the pending configuration for PMM.",
                              aliases=["showpmmpendingconfig"],
                              argparser=ArgumentParser())
     self.define_arguments(self.parser)
     self._rdmc = rdmcObj
     self._rest_helpers = RestHelpers(rdmcObject=self._rdmc)
     self._display_helpers = DisplayHelpers()
     self._mapper = Mapper()
     self._pmem_helpers = PmemHelpers()
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='sendtest',\
         usage='sendtest [COMMAND][OPTIONS]\n\n\tSend syslog test to the' \
             ' current logged in server.\n\texample: sendtest syslog\n\n' \
             '\tSend alert mail test to the current logged in server.\n\t' \
             'example: sendtest alertmail\n\n\tSend SNMP test alert ' \
             'to the current logged in server.\n\texample: sendtest snmpalert',\
         summary="Command for sending various tests to iLO.",\
         aliases=None,\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
Ejemplo n.º 9
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='firmwareupdate',\
         usage='firmwareupdate [URI] [OPTIONS]\n\n\tApply a firmware ' \
                 'update to the current logged in server.\n\texample: ' \
                 'firmwareupdate <url/hostname>/images/image.bin',\
         summary='Perform a firmware update on the currently logged in ' \
                                                                 'server.',\
         aliases=['firmwareupdate'],\
         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)
Ejemplo n.º 10
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='clearrestapistate',\
         usage='clearrestapistate [OPTIONS]\n\n\t'\
             'Clears the persistent rest api state.\n\texample: ' \
             'clearrestapistate\n\n\tNote: Some types such as Bios, '\
             'Iscsi, and SmartStorageConfig will be unavailable until '\
             'a system reboot occurs after running this command.',\
         summary='Clears the persistent state of the REST API. Some '\
         'portions of the API may not be available until after the server reboots.',\
         aliases=None,\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
Ejemplo n.º 11
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='factoryresetcontroller',\
         usage='factoryresetcontroller [OPTIONS]\n\n\tTo factory reset a controller ' \
             'by index.\n\texample: factoryresetcontroller --controller=2' \
             '\n\tor by slot position.' \
             '\n\texample: factoryresetcontroller --controller "Slot1" ' \
             '\n\n\tTo factory reset all available smart array controllers' \
             '\n\texample: factoryresetcontroller --all', \
         summary='Factory resets a controller by index or location.',\
         aliases=['factoryresetcontroller'],\
         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='rawput',\
         usage='rawput [FILENAME] [OPTIONS]\n\n\tRun to send a post from ' \
             'the data in the input file.\n\tMultiple PUTs can be performed in sequence by '\
             '\n\tadding more path/body key/value pairs.\n'
             '\n\texample: rawput rawput.' \
             'txt\n\n\tExample input file:\n\t{\n\t    "/redfish/' \
             'v1/systems/(system ID)/bios/Settings/":\n\t    {\n\t'
             '\t"Attributes": {\n\t\t' \
             '  "BaseConfig": "default"\n\t\t}\n\t    }\n\t}',\
         summary='Raw form of the PUT command.',\
         aliases=['rawput'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
Ejemplo n.º 13
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='clearcontrollerconfig',\
         usage='clearcontrollerconfig [OPTIONS]\n\n\tTo clear a specific controller'\
         ' config.\n\texample: clearcontrollerconfig --controller=1'
         '\n\tor by slot position.' \
         '\n\texample: clearcontrollerconfig --controller "Slot 0"' \
         '\n\n\tTo clear all configurations across all available controllers' \
         '\n\texample: clearcontrollerconfig --all', \
         summary='Clears smart array controller configuration.',\
         aliases=['clearcontrollerconfig'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
Ejemplo n.º 14
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,
                              name="showpmm",
                              usage="showpmm [-h|--help] "
                                    "[-I|--dimm=(DimmIDs)] [-D|--device] [-C|--config] "
                                    "[-M|--summary] [-j|--json]\n\n\tDisplay information about "
                                    "Persistent Memory modules \n\texample: showpmm --device",
                              summary="Display information about Persistent Memory modules.",
                              aliases=["showpmm"],
                              argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self._rest_helpers = RestHelpers(rdmcObject=self._rdmc)
     self._display_helpers = DisplayHelpers()
     self._mapper = Mapper()
     self._pmem_helpers = PmemHelpers()
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='deletecomp', \
         usage='deletecomp [COMPONENT URI/ID] [OPTIONS] \n\n\tRun to ' \
           'delete component(s) of the currently logged in system.\n\n\t'\
           'Delete a single component by name.\n\texample: deletecomp ' \
           'CP327.zip\n\n\tDelete multiple components by ' \
           'id.\n\texample: deletecomp 377fg6c4 327cf4c7\n\n\tDelete '
           'multiple components by filename.\n\texample: deletecomp '
           'CP327.exe CP99.exe',\
         summary='Deletes components/binaries from the iLO Repository.', \
         aliases=['Deletecomp'], \
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
Ejemplo n.º 16
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='rawpost',\
         usage='rawpost [FILENAME] [OPTIONS]\n\n\tRun to send a post from ' \
                 'the data in the input file.\n\tMultiple POSTs can be performed in sequence by'\
                 ' \n\tadding more path/body key/value pairs.\n'
                 '\n\texample: rawpost rawpost.' \
                 'txt\n\n\tExample input file:\n\t{\n\t    "/' \
                 'redfish/v1/systems/(system ID)/Actions/ComputerSystem.'
                 'Reset":\n\t    {\n\t        "ResetType": '\
                 '"ForceRestart"\n\t    }\n\t}',\
         summary='Raw form of the POST command.',\
         aliases=['rawpost'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
Ejemplo n.º 17
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='showscalablepmemconfig', \
         usage='showscalablepmemconfig [OPTIONS]\n\n'\
             '\tDisplay the Scalable Persistent Memory configuration.\n'\
             '\tIf system is configured, reports the estimated time to complete a backup boot.\n\n'\
             '\texample: showscalablepmemconfig', \
         summary='Display the Scalable Persistent Memory configuration.', \
         aliases=['spmem-showcfg', 'spmemsc'], \
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self._helpers = Helpers()
     self._chif_lib = self._helpers.gethprestchifhandle()
     self._restHelpers = RestHelpers(rdmcObject=self._rdmc)
     self._options = None
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='deletecomp', \
         usage='deletecomp [COMPONENT URI/ID] [OPTIONS] \n\n\tRun to ' \
           'delete component(s) of the currently logged in system.\n\n\t'\
           'Delete a single component by uri.\n\texample: deletecomp /' \
           '/redfish/v1<componentpath>\n\n\tDelete multiple components by ' \
           'id.\n\texample: deletecomp 377fg6c4,327cf4c7',\
         summary='Deletes components/binaries from the iLO Repository.', \
         aliases=['Deletecomp'], \
         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='singlesignon',\
         usage='singlesignon [OPTIONS]\n\n\tDelete all SSO records.\n\t' \
             'example: singlesignon deleterecord all\n\n\tDelete a ' \
             'specific SSO record.\n\texample: singlesignon ' \
             'deleterecord 1\n\n\tImport a DNS name.\n\texample: ' \
             'singlesignon importdns dnsname\n\n\tImport certificate' \
             ' from URI or file.\n\texample: singlesignon importcert cert',\
         summary="Command for all single sign on available actions. ",\
         aliases=['sso'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
Ejemplo n.º 20
0
    def load_command(self, cmd):
        """ Fully Loads command and returns the class instance

        :param cmd: command identifier
        :type opts: class
        :returns: defined class instance

        """
        try:
            cmd.cmdbase = RdmcCommandBase(cmd.ident['name'], cmd.ident['usage'], \
                                          cmd.ident['summary'], cmd.ident['aliases'])
            cmd.parser = ArgumentParser(prog=cmd.ident['name'], usage=cmd.ident['usage'], \
                                        description=cmd.ident['summary'])
            cmd.rdmc = self
            cmd.definearguments(cmd.parser)
            for auxcmd in cmd.ident['auxcommands']:
                auxcmd = self.search_commands(auxcmd)
                if auxcmd not in self.loaded_commands:
                    self.loaded_commands.append(auxcmd)
                    cmd.auxcommands[auxcmd.ident['name']] = self.load_command(
                        auxcmd)
                else:
                    cmd.auxcommands[auxcmd.ident['name']] = self.commands_dict[self.comm_map\
                                                                        [auxcmd.ident['name']]]
            return cmd
        except Exception as excp:
            raise RdmcError("Unable to load command {}: {}".format(
                cmd.ident['name'], excp))
Ejemplo n.º 21
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='save',\
         usage='save [OPTIONS]\n\n\tRun to save a selected type to a file' \
         '\n\texample: save --selector HpBios.\n\n\tChange the default ' \
         'output filename\n\texample: save --selector HpBios. -f ' \
         'output.json\n\n\tTo save multiple types in one file\n\texample: '\
         'save --multisave Bios.,ComputerSystem.',\
         summary="Saves the selected type's settings to a file.",\
         aliases=[],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self.filename = None
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
Ejemplo n.º 22
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='save',\
         usage='save [OPTIONS]\n\n\tRun to save a selected type to a file' \
         '\n\texample: save --selector ComputerSystem.\n\n\tChange the ' \
         'default output filename\n\texample: save --selector ' \
         'ComputerSystem. -f output.json',\
         summary=u"Saves the selected type's settings to a file.",\
         aliases=[],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self.filename = None
     self._rdmc = rdmcObj
     self.lobobj = rdmcObj.commandsDict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commandsDict["SelectCommand"](rdmcObj)
     self.logoutobj = rdmcObj.commandsDict["LogoutCommand"](rdmcObj)
Ejemplo n.º 23
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self, \
         name='setbackupdevices', \
         usage='setbackupdevices (--device=ID... | --remove-all)\n\n'\
             '\tSelect the devices to use for Scalable Persistent Memory '\
             'backup storage.\n\n\texample: setbackupdevices --device=1@1 '\
             '--device=1@2', \
         summary='Set backup storage devices.', \
         aliases=['spmem-setdrives', 'spmsetd', 'setbackupdrives'], \
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self._helpers = Helpers()
     self._restHelpers = RestHelpers(self._rdmc)
     self._validator = LogicalNvdimmValidator()
     self._chif_lib = self._helpers.gethprestchifhandle()
Ejemplo n.º 24
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='serverinfo',\
         usage='serverinfo [OPTIONS]\n\n\t'\
             'Show enabled fan, processor, and thermal information.\n\texample: ' \
             'serverinfo --fans --processors --thermals\n\n\tShow all memory '\
             'and fan information, including absent locations in json format.\n\t'\
             'example: serverinfo --memory --fans --showabsent -j',\
         summary='Shows aggregate health status and details of the currently logged in server.',\
         aliases=['health', 'serverstatus', 'systeminfo'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.selobj = rdmcObj.commands_dict["SelectCommand"](rdmcObj)
Ejemplo n.º 25
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='backuprestore',\
         usage='backuprestore [OPTIONS]\n\n\t'\
             'Create a .bak file. \n\texample: backuprestore backup\n\n\t' \
             'Restore a server using a .bak file. \n\texample: backuprestore '\
             'restore\n\n\tNOTE: This command is designed to only restore\n\tthe '\
             'machine from which the backup file was created against.\n\tIf you would like to '\
             'take one configuration and apply it\n\tto multiple systems see the '\
             'serverclone command.\n\tThis command is only available in remote mode.',\
         summary='Backup and restore iLO to a server using a .bak file.',\
         aliases=['br'],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
Ejemplo n.º 26
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='get',\
         usage='get [PROPERTY] [OPTIONS]\n\n\tTo retrieve all' \
                 ' the properties run without arguments. \n\t*Note*: '\
                 'a type will need to be selected or this will return an '\
                 'error.\n\texample: get\n\n\tTo retrieve multiple ' \
                 'properties use the following example\n\texample: '\
                 'get Temperatures/ReadingCelsius Fans/Name --selector=Thermal.' \
                 '\n\n\tTo change output style format provide'\
                 ' the json flag\n\texample: get --json',\
         summary='Displays the current value(s) of a' \
                 ' property(ies) within a selected type.',\
         aliases=[],\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='certificate',\
         usage=None, \
         description='Generate a certificate signing request (CSR) or import an X509 formatted' \
                 ' TLS or CA certificate.\nTo view help on specific sub-commands run: ' \
                 'singlesignon <sub-command> -h\n\nExample: singlesignon importcert -h\n\n' \
                 'NOTE: Use the singlesignon command to import single sign on certificates.\n\n'\
                 'NOTE: Use quotes to include parameters which contain whitespace when '\
                 'generating a CSR.\nexample: certificate csr \"Hewlett Packard Enterprise\"'\
                 '\"iLORest Group\" \"CName\"\n\"United States\" \"Texas\" \"Houston\"',
         summary="Command for importing both iLO and login authorization "\
                 "certificates as well as generating iLO certificate signing requests (CSR)",\
         aliases=["certificate"])
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='iloaccounts',\
         usage='iloaccounts [COMMAND] [ARGUMENTS] [OPTIONS]\n\n\t'\
         'Add an iLO user account the current logged in server with the following privileges:'\
         '\n\tLogin, iLO Config, Host BIOS Config.\n\t' \
         'iloaccounts add [USERNAME LOGINNAME PASSWORD] --addprivs <list of numbered '\
         'privileges>\n\texample: iloaccounts add USERNAME ACCOUNTNAME PASSWORD' \
         ' --addprivs 1,4,7\n\n\tChange the password of an account.\n\t'\
         'iloaccounts changepass [USERNAMEorID# PASSWORD]\n\t'\
         'example: iloaccounts changepass 2 newpassword\n\n\t'\
         'Get Id, Username, LoginName, and Privileges info of iLO user accounts.\n\t'\
         'example: iloaccounts\n\n\tModify an iLO account\'s privileges:\n\texample: '\
         'iloaccounts modify USERNAMEorID# --addprivs 3,5 --removeprivs 10\n\n\t'\
         'Delete an iLO account.\n\t'\
         'iloaccounts delete [USERNAMEorID#]\n\t'\
         'example: iloaccounts delete accountUserName\n\n\t'\
         'Add a certificate to a user account.\n\t'\
         'iloaccounts addcert [USERNAMEorID#] <path to an x.509 certification string>\n\t'\
         'example: iloaccounts addcert accountUserName C:\Users\user\cert.txt\n\n\t'\
         'Delete a certificate from an iLO account.\n\t'\
         'example: iloaccounts deletecert [USERNAMEorID#]\n\n'\
         '\tDESCRIPTIONS:\n\tNOTE: UserName and LoginName are reversed '\
         'in the GUI for Redfish compatibility.'\
         '\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\tPRIVILEGES:\n\t1: Login\n\t2: Remote Console\n\t3: User Config\n\t4: iLO Config'\
         '\n\t5: Virtual Media\n\t6: Virtual Power and Reset\n\n\tiLO 5 added privileges:\n\t7:'\
         ' Host NIC Config\n\t8: Host Bios Config\n\t9: Host Storage Config\n\t10: '\
         'System Recovery Config\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\tBy default only login privilege is added to '\
         'the newly created account with role "ReadOnly"\n\tin iLO 5 and no privileges in'\
         ' iLO 4.\n\tTo modify these privileges you can remove properties that would be set by '\
         'using --removeprivs\n\tor you can directly set which privileges are given using'\
         ' --addprivs.\n\n\tNote: account credentials are case-sensitive.',\
         summary='Adds / deletes an iLO account on the currently logged in server.',\
         aliases=['iloaccount'],\
         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)
Ejemplo n.º 29
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='biosdefaults',\
         usage='biosdefaults [OPTIONS]\n\n\tRun to set the currently' \
             ' logged in server to default BIOS settings\n\texample: ' \
             'biosdefaults\n\n\tRun to set the currently logged in server'\
             ' to user defaults\n\texample: biosdefaults --userdefaults',\
         summary='Set the currently logged in server to default BIOS' \
                                                     ' settings.',\
         aliases=['biosdefaults'],\
         optparser=OptionParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.lobobj = rdmcObj.commands_dict["LoginCommand"](rdmcObj)
     self.setobj = rdmcObj.commands_dict["SetCommand"](rdmcObj)
     self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)
Ejemplo n.º 30
0
 def __init__(self, rdmcObj):
     RdmcCommandBase.__init__(self,\
         name='onebuttonerase',\
         usage='onebuttonerase [OPTIONS]\n\n\t'\
             'Erase all iLO settings, Bios settings, User Data, and iLO Repository data.'\
             '\n\texample: onebuttonerase\n\n\tSkip the confirmation before'\
             ' erasing system data.\n\texample: onebuttonerase --confirm\n\nWARNING: This '\
             'command will erase user data! Use with extreme caution! Complete erase can take'\
             ' up to 24 hours to complete.',\
         summary='Performs One Button Erase on a system.',\
         aliases=None,\
         argparser=ArgumentParser())
     self.definearguments(self.parser)
     self._rdmc = rdmcObj
     self.typepath = rdmcObj.app.typepath
     self.logoutobj = rdmcObj.commands_dict["LogoutCommand"](rdmcObj)
     self.rebootobj = rdmcObj.commands_dict["RebootCommand"](rdmcObj)