DepotSoftware - updateSourceLocation_2
DepotSoftware - updateSourceLocation
Description :
This command updates the source location and associated information for a depot software installable.
Use the urlTypeName argument to indicate the name of the deployable URL type. urlTypeName can be one of the following:
- FILE_SERVER: Upload source to file server.
- AGENT_COPY_AT_STAGING: Copy to agent at staging.
- AGENT_MOUNT: Agent mounts source for direct use at deployment (no local copy).
For sourceLocation, you can use fully qualified NFS, SMB or NSH paths. Here are examples of acceptable formats:
- //myserver/<PATH>
- rscd://myserver/<PATH>
- nfs://nfsserver/<export>/<path>
- smb://[[password:]user@]smbserver/<share>/<path>
For the SMB option, password and user are optional.
Note that the urlTypeName determines what formats you can use for sourceLocation:
- If the urlTypeName is FILE_SERVER, then only the NSH path format beginning with // or / (for local host) is permitted.
- If the urlTypeName is AGENT_COPY_AT_STAGING, then all the sourceLocation formats listed above are permitted.
- If the urlTypeName is AGENT_MOUNT, then only the NFS and SMB formats are permitted.
For altNSHPath, use an NSH path starting with //.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
objectKey | DBKey | Handle to the software installable whose source location you want to update. |
sourceLocation | String | URL for fully qualified NFS, SMB or NSH path to software. |
skipCopySource | Boolean | True to not copy source to undo directory. False to copy source to undo directory. |
urlTypeName | String | The deployable URL type name. |
altNSHPath | String | Alternate NSH path for file containing system info. |
Example
The following example gets a handle to a software installable, then uses this handle to update the installable's source location and associated information.
Script
#Get a handle to a software installable called test.rpm.
INSTALLABLE_KEY=`blcli DepotObject getDBKeyByTypeStringGroupAndName RPM_INSTALLABLE "/MySoftwareGroup" test.rpm`
#Assign a new source location to this installable.
NEW_INSTALLABLE_KEY=`blcli DepotSoftware updateSourceLocation "$INSTALLABLE_KEY" //myserver/path/to/test.rpm true AGENT_COPY_AT_STAGING //server2/another/path/to/test.rpm`