System

pyCSM.services.system_service.system_service.approve_dual_control_request(url, tk, id)

Approve a dual control request

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • id (int) – ID of the request caller wants to approve.

  • getDualControlEvents. (ID from the 'requestid' field return from) –

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.backup_server(url, tk)

Creates a zip backup of the CSM server data that can be used for restoring the server at a later date

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.backup_server_and_download(url, tk, file_name)

Create and downloads a server backup.

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • file_name – The file to write the server backup to

Returns

A file downloaded into the client with the specified filename

pyCSM.services.system_service.system_service.change_dual_control_state(url, tk, enable)

Use this method to enable or disable dual control on the CSM server.

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • enable (bool) – Set to ‘true’ if you want to enable dual control or

  • disable. ('false' if you want to) –

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.change_properties(property_dictionary)

Takes a dictionary of properties and the values that user wants to change and changes them in the file.

Parameters
  • property_dictionary (dict) – Dictionary of the keys and values that need

  • file. (to be changed in the) –

  • {"language" (ex.) – “en-UK”, “verify”:True}

Returns

Returns the new properties dictionary.

pyCSM.services.system_service.system_service.create_and_download_log_pkg(url, tk, file_name)

This method will package all log files on the server into a .jar file that can be used for support - this call is a synchronous call and will not return to caller until package is complete. Call make take a while

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • file_name – Name of the file to write the log package to

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.create_log_pkg(url, tk)

This method will package all log files on the server into a .jar file

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_active_standby_status(url, tk)

Get the current state of the active standby server connection

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_dual_control_requests(url, tk)

Returns a list of dual control events waiting for approval or rejection

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_dual_control_state(url, tk)

Use this method to determine if dual control is currently enabled of disabled on the server.

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_log_events(url, tk, count, session=None)

get a list of the most recent log events

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • count (int) – The number of messages to return

  • session (string) – (optional) filter messages on session

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_log_pkgs(url, tk)

Gets a list of log packages and their location on the server

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_properties()

Returns a dictionary of the current properties and their values set for the file.

pyCSM.services.system_service.system_service.get_server_backups(url, tk)

Retrieves a list of all server backups.

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_server_version(url, tk)

Get the version of the server being called

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_session_types(url, tk)

Get supported session types

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.get_volume_counts(url, tk)

Get a summary of the volume usage on the server

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.reconnect_active_standby_server(url, tk)

Reconnect the active standby connection

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.reject_dual_control_request(url, tk, id, comment)

Reject a dual control request

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • id (int) – ID of the request caller wants to approve.

  • getDualControlEvents. (ID from the 'requestid' field return from) –

  • comment (str) – Comment to the creator of the event on why the request was rejected.

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.remove_active_or_standby_server(url, tk, haServer)

Remove the alternate server

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • haServer (str) – hostname of the server to remove

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.set_property(url, tk, file, property_name, value)

This call will set the property provided to the value provide in the selected file

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • file (str) – One of the following files can be specified. “server”, “bootstrap”, “essniclient” or “zosclient”

  • property_name (str) – name of the property to set ex. csm.server.extra_driver_debug

  • value (str) – value to set the property to

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.set_server_as_standby(url, tk, active_server)

Issue this command to the server that you want to be the standby server. Sets the server passed in to be the active server. All data on the called server will be replaced with the data from the active server.

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • active_server (str) – IP or hostname of the active server.

  • port. (This method will use the default) –

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.set_standby_server(url, tk, standby_server, standby_username, standby_password)

Sets the server passed in to be the standby server. All data on the passed in server will be replaced with the data from the called server

Parameters
  • url (str) – Base url of CSM server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • standby_server (str) – IP or hostname of the standby server

  • standby_username (str) – Username to create a connection to the standby server

  • standby_password (str) – Password for the user to create a connection to the standby server

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.system_service.system_service.takeover_standby_server(url, tk)

Issues a takeover on the standby server making the standby server an active server

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.