From ae2b50ea1a93bccf14eee645411867ca388bb5fd Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Fri, 16 Aug 2019 16:05:01 -0400 Subject: [PATCH] 1.0.1 Versioning --- CHANGELOG.md | 4 ++ README.md | 61 ++++++++++--------- scripts/{rf_accounts => rf_accounts.py} | 0 .../{rf_boot_override => rf_boot_override.py} | 0 scripts/{rf_power_reset => rf_power_reset.py} | 0 scripts/{rf_sensor_list => rf_sensor_list.py} | 0 .../{rf_sys_inventory => rf_sys_inventory.py} | 0 scripts/{rf_update => rf_update.py} | 0 setup.py | 14 ++--- 9 files changed, 42 insertions(+), 37 deletions(-) rename scripts/{rf_accounts => rf_accounts.py} (100%) rename scripts/{rf_boot_override => rf_boot_override.py} (100%) rename scripts/{rf_power_reset => rf_power_reset.py} (100%) rename scripts/{rf_sensor_list => rf_sensor_list.py} (100%) rename scripts/{rf_sys_inventory => rf_sys_inventory.py} (100%) rename scripts/{rf_update => rf_update.py} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2524b..4408de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [1.0.1] - 2019-08-16 +- Removed 'Account Lock' capability from rf_accounts +- Renamed all scripts to end in '.py' for Windows compatibility + ## [1.0.0] - 2019-07-12 - Added rf_accounts utility to manage user accounts - Made fix to handling of Storage Controllers in the inventory tool diff --git a/README.md b/README.md index 5e458c2..5f448b0 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ You may install the external modules by running: ### Sensor List ``` -usage: rf_sensor_list [-h] --user USER --password PASSWORD --rhost RHOST +usage: rf_sensor_list.py [-h] --user USER --password PASSWORD --rhost RHOST A tool to walk a Redfish service and list sensor info @@ -52,7 +52,7 @@ optional arguments: -h, --help show this help message and exit ``` -Example: `rf_sensor_list -u root -p root -r https://192.168.1.100` +Example: `rf_sensor_list.py -u root -p root -r https://192.168.1.100` The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. It then traverses the Chassis Collection for the Service, and reads their respective Power and Thermal Resources. @@ -62,8 +62,8 @@ Using the information from those resources, it will build a sensor table and pri ### System Inventory ``` -usage: rf_sys_inventory [-h] --user USER --password PASSWORD --rhost RHOST - [--details] [--noabsent] +usage: rf_sys_inventory.py [-h] --user USER --password PASSWORD --rhost RHOST + [--details] [--noabsent] A tool to walk a Redfish service and list component information @@ -82,7 +82,7 @@ optional arguments: Indicates if absent devices should be skipped ``` -Example: `rf_sys_inventory -u root -p root -r https://192.168.1.100 -details` +Example: `rf_sys_inventory.py -u root -p root -r https://192.168.1.100 -details` The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. It then traverses the Chassis Collection for the Service, and collects component information for Processors, Memory, Drives, PCIeDevices, NetworkAdapters, and StorageControllers. @@ -92,8 +92,8 @@ Using the information collected, it will build an inventory table and print the ### Power/Reset ``` -usage: rf_power_reset [-h] --user USER --password PASSWORD --rhost RHOST - [--system SYSTEM] [--type TYPE] +usage: rf_power_reset.py [-h] --user USER --password PASSWORD --rhost RHOST + [--system SYSTEM] [--type TYPE] A tool to perform a power/reset operation of a system @@ -111,7 +111,7 @@ optional arguments: --type TYPE, -t TYPE The type of power/reset operation to perform ``` -Example: `rf_power_reset -u root -p root -r https://192.168.1.100 -t GracefulRestart` +Example: `rf_power_reset.py -u root -p root -r https://192.168.1.100 -t GracefulRestart` The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. It then traverses the System Collection for the Service to find the matching system specified by the *system* argument. @@ -123,9 +123,9 @@ It will perform the Reset action with the specified reset type from the *type* a ### Boot Override ``` -usage: rf_boot_override [-h] --user USER --password PASSWORD --rhost RHOST - [--system SYSTEM] [--target TARGET] [--uefi UEFI] - [--reset] +usage: rf_boot_override.py [-h] --user USER --password PASSWORD --rhost RHOST + [--system SYSTEM] [--target TARGET] [--uefi UEFI] + [--reset] A tool to perform a one time boot override of a system @@ -151,7 +151,7 @@ optional arguments: override is set ``` -Example: `rf_boot_override -u root -p root -r https://192.168.1.100 -t Pxe -reset` +Example: `rf_boot_override.py -u root -p root -r https://192.168.1.100 -t Pxe -reset` The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. It then traverses the System Collection for the Service to find the matching system specified by the *system* argument. @@ -166,12 +166,12 @@ The tool will then perform an operation on the Boot object within the matching s ### Accounts ``` -usage: rf_accounts [-h] --user USER --password PASSWORD --rhost RHOST - [--add name password role] [--delete DELETE] - [--setname old_name new_name] - [--setpassword name new_password] [--setrole name new_role] - [--enable ENABLE] [--disable DISABLE] [--lock LOCK] - [--unlock UNLOCK] +usage: rf_accounts.py [-h] --user USER --password PASSWORD --rhost RHOST + [--add name password role] [--delete DELETE] + [--setname old_name new_name] + [--setpassword name new_password] + [--setrole name new_role] [--enable ENABLE] + [--disable DISABLE] [--unlock UNLOCK] A tool to manage user accounts on a Redfish service @@ -205,30 +205,30 @@ optional arguments: The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. Based on the parameters, it will display, add, delete, or modify user accounts. * The *add* argument is used to create a new user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -add new_name new_password new_role` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -add new_name new_password new_role` * The *delete* argument is used to delete a user account based on the given user name - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -delete user_to_delete` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -delete user_to_delete` * The *setname* argument is used to change the name of a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -setname user_to_change new_name` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -setname user_to_change new_name` * The *setpassword* argument is used to change the password of a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -setpassword user_to_change new_password` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -setpassword user_to_change new_password` * The *setrole* argument is used to change the role of a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -setrole user_to_change new_role` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -setrole user_to_change new_role` * The *enable* argument is used to enable a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -enable user_to_change` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -enable user_to_change` * The *disable* argument is used to disable a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -disable user_to_change` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -disable user_to_change` * The *unlock* argument is used to unlock a user account - * Example: `rf_accounts -u root -p root -r https://192.168.1.100 -unlock user_to_change` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100 -unlock user_to_change` * If none of the above arguments are given, a table of the user accounts is provided - * Example: `rf_accounts -u root -p root -r https://192.168.1.100` + * Example: `rf_accounts.py -u root -p root -r https://192.168.1.100` ### Update ``` -usage: rf_update [-h] --user USER --password PASSWORD --rhost RHOST --image - IMAGE [--target TARGET] +usage: rf_update.py [-h] --user USER --password PASSWORD --rhost RHOST --image + IMAGE [--target TARGET] A tool to perform an update with a Redfish service @@ -245,9 +245,10 @@ optional arguments: -h, --help show this help message and exit --target TARGET, -t TARGET The target resource to apply the image - ``` +Example: `rf_update.py -u root -p root -r https://192.168.1.100 -i image.bin` + The tool will log into the service specified by the *rhost* argument using the credentials provided by the *user* and *password* arguments. It then builds a request payload to perform a Simple Update action against the Update Service using the image specified by the *image* argument. The optional *target* argument is used in the request if attempting to update a particular system, device, manager, or other resource. diff --git a/scripts/rf_accounts b/scripts/rf_accounts.py similarity index 100% rename from scripts/rf_accounts rename to scripts/rf_accounts.py diff --git a/scripts/rf_boot_override b/scripts/rf_boot_override.py similarity index 100% rename from scripts/rf_boot_override rename to scripts/rf_boot_override.py diff --git a/scripts/rf_power_reset b/scripts/rf_power_reset.py similarity index 100% rename from scripts/rf_power_reset rename to scripts/rf_power_reset.py diff --git a/scripts/rf_sensor_list b/scripts/rf_sensor_list.py similarity index 100% rename from scripts/rf_sensor_list rename to scripts/rf_sensor_list.py diff --git a/scripts/rf_sys_inventory b/scripts/rf_sys_inventory.py similarity index 100% rename from scripts/rf_sys_inventory rename to scripts/rf_sys_inventory.py diff --git a/scripts/rf_update b/scripts/rf_update.py similarity index 100% rename from scripts/rf_update rename to scripts/rf_update.py diff --git a/setup.py b/setup.py index 244c587..bfae9c9 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name = "redfish_utilities", - version = "1.0.0", + version = "1.0.1", description = "Redfish Utilities", long_description = long_description, long_description_content_type = "text/markdown", @@ -27,12 +27,12 @@ url = "https://github.com/DMTF/Redfish-Tacklebox", packages = [ "redfish_utilities" ], scripts = [ - "scripts/rf_accounts", - "scripts/rf_boot_override", - "scripts/rf_power_reset", - "scripts/rf_sensor_list", - "scripts/rf_sys_inventory", - "scripts/rf_update" + "scripts/rf_accounts.py", + "scripts/rf_boot_override.py", + "scripts/rf_power_reset.py", + "scripts/rf_sensor_list.py", + "scripts/rf_sys_inventory.py", + "scripts/rf_update.py" ], install_requires = [ "redfish" ] )