The drManager command line utility is used to manage the device repository both in a device repository storage and its clients. The utility allows administrators to import the device information to a storage, dynamically update its clients, or check the device repository status.
The drManager command line utility is used to manage the device repository both in a device repository storage and its clients. The utility allows administrators to import the device information to a storage, dynamically update its clients, or check the device repository status.
The device repository storage and its clients can only be modified using the drManager CLI utility.
A version of the device information within the device repository storage can be in one of the following states:
incomplete - this is the state when the version is first created at the start of the import process before it has completed;
inactive - this is the state the version moves to after the import process has been completed if it is not the only version in the repository, or at the start of the remove process before it has completed;
active - this is the state the version moves to after the import process has been completed if it is the first version in the repository, or after the switch process has been completed if it was switching to this version and it was not previously in the 'active' state.
In addition, an 'active' version can be marked as the current version, i.e. the version that should be used by the clients.
The status operation returns, among other things, the status information for all the device information versions within the storage.
The drManager utility supports four operations:
Parameter | Description |
---|---|
import-version | Imports the specified device information version (i.e. an .mdpr file) into the device repository storage, i.e. the device repository directory, or a JDBC database. |
status | Returns the status of the device repository storage and its clients. |
remove-version | Removes the specified device information version from the storage and its clients. |
switch-version | Switches the storage and its clients to the specified version of the device information. |
The drManager utility has the following syntax:
drManager ...common options... <operation> ...operation specific options and arguments...
The following options are common to all four operations. Note that the common options must be specified before the operation name.
Parameter | Short | Description | Usage |
---|---|---|---|
--help | -h | If no operation name is given, then it provides general information about the supported operations, otherwise it provides information about the specific operation. If specified, all the other options will be ignored. | Optional |
--verbose | -v | If specified will cause verbose logging to be output. | Optional |
The import-version operation imports a new version of the device information from an .mdpr file into the device repository storage. If at any time during this process the import fails, then the operation will remove all the changes that it has made, i.e. the repository will be in the exact same state it was before the import was run. If the import process succeeds, the newly imported version will be marked as the last imported version. If the storage is empty, then this operation will set the state of the newly imported version to 'active', and mark it as the current version. The import-version operation supports the following options:
Parameter | Short | Description | Usage |
---|---|---|---|
--mdpr-file | -m | The path to the .mdpr file that contains the device information that is to be imported. | Required |
<storage-reference> | The storage reference. | Required | |
<comment> | A textual description of the newly imported version of the device information. | Required |
drManager import-version
-m <mdpr-file>
<storage-reference>
<comment>
The status operation returns the current state of the device repository both in the storage and as seen by the referenced clients. The operation supports the following options:
Parameter | Short | Description | Usage |
---|---|---|---|
<storage-reference> | The storage reference. | Required | |
<client-reference> | The client reference. | Optional |
drManager status
<storage-reference>
<client-reference>*
The remove-version operation removes a version of the device information from the device repository storage and from all the clients. This operation supports the following options:
Parameter | Short | Description | Usage |
---|---|---|---|
--version | The identifier of the version to remove. If not specified, then it defaults to the last imported version. It is a fatal error if: the version is not provided and the last imported version is not set, the version is specified but does not reference a valid version in the storage, or the version specified is the current version. The status operation returns the identifiers of all the versions from the specified device repository storage. | Optional | |
<storage-reference> | The storage reference. | Required | |
<client-reference> | The client reference. | Optional |
drManager remove-version
[--version <version>]?
<storage-reference>
<client-reference>*
The switch-version operation switches the current version in the device repository storage and clients to the target version. Before the operation starts the switching process, it notifies all the clients to prepare to switch to a new version. If any client reports a problem, then the device manager aborts the operation. Otherwise, it asks all the clients to switch. If any client reports a problem at this point, then that information is logged, but the switching process continuous (note that an error at this point usually requires restarting the nodes whose clients reported a failure).
If client references are not provided, the operation will only update the device repository storage and the device repository clients will need to be restarted in order to use the new device information.
The switch-version operation supports the following options:
Parameter | Short | Description | Usage |
---|---|---|---|
--version | The identifier of the version to switch. If not specified, then it defaults to the last imported version. It is a fatal error if: the version is not provided and the last imported version is not set, the version is specified but does not reference a valid version in the storage, or the version specified is the current version. The status operation returns the identifiers of all the versions from the specified device repository storage. | Optional | |
<storage-reference> | The storage reference. | Required | |
<client-reference> | The client reference. | Optional |
drManager switch-version
[--version <version>]?
<storage-reference>
<client-reference>*
The switch-version operation can be rolled back simply by switching to the previously used version. When the switch-version operation completes successfully, it will output the command necessary to perform that rollback, including all necessary arguments and options.