Emergency fix

Use the command-line interface to administer emergency fixes in the catalog.

Fixes object

The Fixes object is a resource collection of fixes for Cloud Pak System Software. You can work with a collection of fixes on the command line and help is available. To get help for the Fixes object, pass it as an argument to the help() function, as shown in the following example:
>>> help(deployer.fixes)

Fix object

A fix that can be applied to a virtual image.

You can work with a fix on the command line and help is available. To get help for the Fix object, pass it as an argument to the help() function, as shown in the following example:
>>> help(deployer.fix)

Fix attributes

The Fix object has the following attributes:
acl
The access control list for this emergency fix. This attribute is read-only.
archive
A Fix.Archive object that provides mechanisms to query and manipulate the fix archive on Cloud Pak System Software. This attribute is read-only.
description
A detailed description of the fix (optional).
id
The identifier of the Fix object. This attribute is read-only.
name
A unique name you give the fix. This attribute is a string. The maximum length of this attribute is 1024 characters.
prereqoptions
All the virtual images that you currently have access to and are not already associated with this fix. Images from this list can be added to the prereqs list in order to make the fix applicable to them. For example, you might add WebSphere Application Server 7.0 to the prereqs field to indicate that the fix is applicable to WebSphere® Application Server 7.0 virtual machines. This attribute is read-only.
prereqpluginoptions
All the plug-ins that you currently have access to and are not already associated with this fix. Plug-ins from this list can be added to the prereqs list to make the fix applicable to them. This attribute is read-only.
prereqs
A list of the virtual images to which this fix can be applied. This list must be a subset of the list provided in the 'prereqoptions' field. Adding an image name to this list means that the fix is applicable to virtual machines based on that image. For example, you might add WebSphere Application Server 7.0 to the prereqs field to indicate that the fix is applicable to WebSphere Application Server 7.0 virtual machines.
You can add images to this list using the append() method:
>>> myfix = deployer.fixes[0]
>>> image = myfix.prereqoptions[0]  
>>> myfix.prereqs.append(image)
You can associate plug-in with the fix using the append() method:
>>> myfix = deployer.fixes[0]
>>> plugin = myfix.prereqpluginoptions[0]
>>> myfix.prereqs.append(plugin)
To delete a prerequisite from the prereqs list, call the del function:
del myfix.fix.prereqs[index]

For example, del myfix.fix.prereqs[0] removes the first prerequisite in the list.

severity
The severity of this fix. This attribute is a string attribute with a maximum length of 128 characters.
target
Automatically set to "APPLICATION" for a Fix object. This attribute is read-only.
type
Automatically set to ifix for a Fix object. This attribute is read-only.

deployer.fix.Archive object

To get help for the deployer.fix.Archive object, pass it as an argument to the help() function, as shown in the following example:
>>> help(deployer.fix.Archive)
Note: "archive" is an attribute for the fix class, which is bound to a particular fix object in practice.
The deployer.fix.Archive object has the following methods:
get(f)
This method retrieves the archive that is currently associated with the fix. This method has one required parameter that indicates where the fix archive is saved. It can be either of the following values:
  • A string containing the name of a file in which to save the archive. If the file name does not end in .zip, then .zip is automatically appended to the filename
  • A Jython file object. You must ensure that the file object correctly handles binary data. The fix archive is returned in a .zip file format. For example:
    >>> myfix = deployer.fixes[0]
    >>> myfix.archive.get('/path/to/foo.zip')
,
__lshift__(other)
This method is started implicitly when the fix.Archive object is used as the left argument of a left shift operator ('<<'). It calls set() with the right argument of the operator. For example:
 >>> myfix = deployer.fixes[0]
 >>> myfix.Archive << '/path/to/file'
__rshift__(other)
This method is started implicitly when the fix.Archive object is used as the left argument of a right shift operator ('>>'). It calls get() with the right argument of the operator. For example:
>>> myfix = deployer.fixes[0]
>>> myfix.Archive >> '/path/to/file.zip'
set(f)
This method sets the archive associated with the fix. It has one required parameter that indicates the source of the fix archive to be uploaded. It can be either of the following values:
  • A string containing the name of a file from which to get the archive.
  • A Jython file object. You must ensure that the file object correctly handles binary data. For example:
    >>> myfix = deployer.fixes[0]
    >>> myfix.archive.set('/path/to/foo')