HewlettPackard / python-redfish-utility

Python-based utility for interacting with devices supporting a Redfish Service
Other
86 stars 41 forks source link

virtualmedia command parameters not correctly described #2

Closed ansiblejunky closed 7 years ago

ansiblejunky commented 7 years ago

The parameters for the 'virtualmedia' command in the ilorest REST CLI are not described correctly. See below... it says to use

 virtualmedia 2 http://xx.xx.xx.xx/vm.iso --bootnextreset

But you should use...

 virtualmedia 2 --url=http://xx.xx.xx.xx/vm.iso --bootnextreset

See below... Additionally, it returns "[200] The operation completed successfully." but it eventually still fails! Not good.

iLOrest > help virtualmedia
Usage: virtualmedia [ID] [URI] [OPTIONS]

        Run without arguments to view the available virtual media sources.
        example: virtualmedia

        Insert virtual media and set to boot on next restart.
        example: virtualmedia 2 http://xx.xx.xx.xx/vm.iso --bootnextreset

        Remove current inserted media.
        example: virtualmedia 2 --remove

Options:
  -h, --help            show this help message and exit
  --url=URL             Use the provided iLO URL to login.
  -u USER, --user=USER  If you are not logged in yet, including this flag
                        along with the password and URL flags can be used to
                        log into a server in the same command.
  -p PASSWORD, --password=PASSWORD
                        Use the provided iLO password to log in.
  --reboot=REBOOT       Use this flag to perform a reboot command function
                        after completion of operations.  For help with
                        parameters and descriptions regarding the reboot flag,
                        run help reboot.
  --remove              Use this flag to remove the media from the selection.
  --bootnextreset       Use this flag if you wish to boot from the image on
                        next server reboot. NOTE: The image will be ejected
                        automatically on the second server reboot so that the
                        server does not boot to this image twice.
iLOrest > virtualmedia 2 file:///C:/ISO/test.iso --bootnextreset
[200] The operation completed successfully.
iLO response with code [400]: The value type is correct, but the format is not supported or the size/length is exceeded.
Traceback (most recent call last):
  File "<string>", line 856, in <module>
  File "<string>", line 265, in run
  File "<string>", line 325, in cmdloop
  File "<string>", line 488, in handle_exceptions
AttributeError: 'module' object has no attribute 'SecurityStateError'
rdmc returned -1
Yergidy commented 7 years ago

@munichman2008 "--url" is for logging into a server, not attaching virtualmedia. The help for this command is correct. Also the argument must be a URL, not a file path, which is why you are getting the [400] error. We will be adding extra checks to make sure this is clear. We are investigating the SecurityStateError.

ansiblejunky commented 7 years ago

Ok thanks. So how can I mount the local ISO file to the virtual media on the HP iLO? I should not need an HTTP server to do this.

Yergidy commented 7 years ago

@munichman2008 Unfortunately, local ISO mounting is only possible using the remote console app in the iLO client. The python-redfish-utility uses the iLO RESTful API, which can only mount using a URI.

ansiblejunky commented 7 years ago

Ok thanks