Table Of Contents
Folder Management Functions
add_paks_to_folder
create_folder
delete_folder
list_all_folders
remove_paks_from_folder
rename_folder
Folder Management Functions
This chapter provides information about the following folder management functions:
•
add_paks_to_folder
•
create_folder
•
delete_folder
•
list_all_folders
•
remove_paks_from_folder
•
rename_folder
add_paks_to_folder
Synopsis
add_paks_to_folder ($token, [@pak_ids], $folder)
Description
This function adds product authorization keys (PAKs) to the specified folder. You can add PAKs to more than one folder. If you want to keep a PAK in a single folder, you should remove the PAK from any other folder by calling the remove_paks_from_folder function.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
pak_ids
|
Array of string, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
An array of PAK IDs to be added to the folder.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns a Cisco::CLM::Common::IDStatus object. The error code will be SUCCESS if the operation is successful. IDStatus contains an array of IDStatusItem. Each IDStatusItem contains the PAK ID, error code, and error message.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
The IDStatus contains overall operation status. If an error occurs, IDStatus error code returns none SUCCESS, as well as an error message. For each individual ID, IDStatus contains IDStatusItem. Each IDStatusItem contains an ID, error code, and error message that shows the individual status.
create_folder
Synopsis
create_folder($token, $folder)
Description
This function creates a new folder with the given name.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns a Cisco::CLM::Common::Status object. If the operation is successful, the error code will be SUCCESS.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, the Status object contains none SUCCESS error code and error message.
delete_folder
Synopsis
delete_folder ($token, $folder)
Description
This function deletes a folder from the system. PAKs under this folder are not deleted, but they cease to belong to any folder.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns a Cisco::CLM::Common::Status object. If the operation is successful, the error code will be SUCCESS.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, Status object contains none SUCCESS error code and error message.
list_all_folders
Synopsis
Description
This function returns a list of all folders in the system.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
Return
This function returns an array of string representing the names of the folders.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, this function returns null.
remove_paks_from_folder
Synopsis
remove_paks_from_folder ($token, [@pak_ids], $folder)
Description
This function removes PAKs from the specified folder. The PAKs become ungrouped but remain in the inventory. To delete the PAKs from inventory, use the delete_paks function.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
pak_ids
|
Array of String, mandatory
|
ID is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
An array of PAK IDs to be removed from the folder.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
Return
This function returns a Cisco::CLM::Common::IDStatus object. The error code will be SUCCESS if the operation is successful. IDStatus contains an array of IDStatusItem. Each IDStatusItem contains a PAK ID, error code, and error message.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
The IDStatus contains information about the overall operation status. If an error occurs, the IDStatus error code returns none SUCCESS and also an error message.
rename_folder
Synopsis
rename_folder ($token, $folder, $new_name)
Description
This function renames a given device group folder. All devices contained in the group will remain unchanged.
Input Parameters
Parameter
|
Type
|
Value
|
Description
|
token
|
UserToken, mandatory
|
—
|
A token that represents your authorization pass, which is obtained after you invoke the login function and are authenticated by the back-end server.
|
folder
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The name of the folder.
|
new_name
|
String, mandatory
|
Name is a string containing up to 64 ASCII characters in the range from x21 to x7A
|
The new name for the device group folder.
|
Return
This function returns a Cisco::CLM::Common::Status object. The error code will be SUCCESS if the operation is successful.
Error and Exception
If a system error prevents the operation from completing, a RemoteException is thrown.
When an error occurs, Status object contains none SUCCESS error code and error message.