This plugin is used to run devices action via the UFM APIs.
To install all prerequisites, please run :
pip install -r requirements.txt
python3 reboot_action.py --object_ids=guid1,guid2.. --description=optional_action_description --object_type=object_type --identifier=identifier --ufm_host=ufm_host --ufm_protocol=ufm_protocol --ufm_username=ufm_username --ufm_password=ufm_password
python3 sw_upgrade_action.py --object_ids=guid1,guid2.. --username=username --password=password --path=path --image=image --protocol=scp/ftp --server=server_ip --description=optional_action_description --object_type=object_type --identifier=identifier --ufm_host=ufm_host --ufm_protocol=ufm_protocol --ufm_username=ufm_username --ufm_password=ufm_password
-
copy config file sample ufm-devices.sample.cfg to ufm-devices.cfg
cp ufm-devices.sample.cfg ufm-devices.cfg
-
Edit config file with relevant parameters
vi ufm-devices.cfg
-
Run
python3 reboot_action.py or python3 sw_upgrade_action.py
-
Argument | Corresponding Config Value | Required | Description |
---|---|---|---|
--ufm_host <ufm_host> | ufm-remote-server-config.host | True | Hostname or IP for The UFM Enterprise |
--ufm_protocol <ufm_protocol> | ufm-server-config.ws_protocol | True | Web services protocol used by UFM Enterprise (HTTP, HTTPS) |
--ufm_access_token <ufm_access_token> | ufm-server-config.access_token | True | Access Token of UFM |
--ufm_username <ufm_username> | ufm-server-config.username | True | Username of UFM user |
--ufm_password <ufm_password> | ufm-server-config.password | True | Password of UFM user |
--logs_file_name <logs_file_name> | logs-config.logs_file_name | False | Log file name [Default = 'console.log'] |
--logs_level <logs_level> | logs-config.logs_level | False | Default is 'info' |
Argument | Corresponding Config Value | Required | Description |
---|---|---|---|
--object_ids <object_ids> | ufm-devices-reboot.object_ids | False | comma separated GUIDs if this arg was not provided the action will be run on all devices in UFM fabric |
--description | ufm-devices-reboot.description | False | Option to set a description for run action |
--object_type <object_type> | ufm-devices-reboot.object_type | False | Option to set object type by default the value will be System |
--identifier | ufm-devices-reboot.identifier | False | Option to set identifier by default the value will be id |
*If command line argument is provided, the corresponding config value will be ignored