Skip to content

Commit

Permalink
Pushing Changes for PyLXCA v.3.2.0 to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhosa committed Mar 26, 2021
1 parent 2be1cd4 commit e1768b9
Show file tree
Hide file tree
Showing 24 changed files with 1,873 additions and 2,025 deletions.
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include pylxca/pylxca_api/lxca_logger.conf
include pylxca/pylxca_cmd/lxca_filters.xml
include pylxca/pylxca_cmd/lxca_cmd_data.json
include README.md
include README
include LICENSE
include pylxca/test/pylxca_unittest
62 changes: 40 additions & 22 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,22 @@ top-of-rack switches (endpoints)
* Configuring servers through the use of Configuration Patterns
* Applying firmware updates to endpoints

Whats New in 2.6.0
Whats New in 3.2.0
------------------
* Add metrics support for nodes
* License Compliance
* Manage/Unmanage Support for Edge Servers
* Support for firmware update for AMD-1S
* Bug Fixes and Minor improvements

Whats New in 2.4.0
------------------
* Argument Parsing library replaced from optparse to argparse.
* Support for subcmd under various commands.
* New commands supported under shell
osimages
managementserver
resourcegroups
* Better Error handling.

Installation
------------
Expand All @@ -37,44 +50,49 @@ more information about Python, see the [Link]www.python.org website.

Complete the following steps to install the PYLXCA CLI.

1. Run the following command to install the module:
pip install pylxca

2. Start a Python shell session in Command mode.
$lxca_shell
--------------------------------------------------
Welcome to PyLXCA Shell v2.5.0
Type "help" at any time for a list of commands.
Type "pyshell" at any time to get interactive python shell
--------------------------------------------------
PyLXCA >>
1. Download the toolkit by clicking Help ( )> Resources from the
Lenovo XClarity Administrator title bar, and then clicking Download
PYLXCA CLI from the dialog.
2. Unzip the package into a local directory.
3. Run the following command to install the module:
easy_install unzip_directory\pylxca-1.0-py2.7.egg
4. Start a Python shell session.

$lxca_shell
--------------------------------------------------
Welcome to PyLXCA Shell v1.0
Type "help" at any time for a list of commands.
Type "pyshell" at any time to get interactive python shell
--------------------------------------------------
PyLXCA >>

3. Start a Python LXCA Shell in Interactive mode.


$lxca_shell --api
Interactive Python Shell for Lenovo XClarity Administrator v2.5.0
Interactive Python Shell for Lenovo XClarity Administrator v2.4.0
Type "dir()" or "help(lxca command object)" for more information.
>>>

4. Validate that the module was installed correctly by running the following command:

In Python Shell Try to import pylxca module as follows
In Python Shell Try to import pylxca module as follows

>>> import pylxca
>>> import pylxca

If python able to import pylxca without any error then it is installed correctly.
If python able to import pylxca without any error then it is installed correctly.


API Reference
-------------

PyLXCA command reference is available at
https://sysmgt.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.lxca_restapis.doc%2Fpycli_overview.html&cp=1_23_1
http://ralfss30.labs.lenovo.com:8120/help/topic/com.lenovo.lxca.doc/pycli_overview.html

PyLXCA API Help can be seen from Interactive Python Shell as follows.

$lxca_shell --api
Interactive Python Shell for Lenovo XClarity Administrator v2.5.0
Interactive Python Shell for Lenovo XClarity Administrator v2.4.0
Type "dir()" or "help(lxca command object)" for more information.
>>>
>>> help(connect)
Expand All @@ -83,13 +101,13 @@ Example
------------

python lxca_shell
connect -l <ipaddress> -u <user> --noverify
connect -l <ipaddress> -u <user>
connect -l https://10.241.106.216 -u USERID --noverify
connect -l https://10.241.106.216 -u USERID

Example to call lxca_cmd python module from python script or Ansible module

import pylxca
con1 = connect("<ipaddress>","<user>","<password>","True")
con1 = connect("https://10.241.106.216","USERID","Passw0rd","True")

Several sample scripts are also available to help you to quickly begin using the PYLXCA command-line interface (CLI) to manage endpoints.
The sample scripts are location in the following directory:
Expand Down
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

if len(sys.argv) < 2 :
print ("Building Repository")
ret = subprocess.call(sys.executable + " setup.py sdist bdist_egg --exclude-source-file bdist_wheel",shell = True)
ret = subprocess.call(sys.executable + " setup.py sdist bdist_wheel",shell = True)
print ("Done ", ret)
print ("Build drop location is: ", os.getcwd() + "/dist")
elif sys.argv[1] == "clean":
ret = subprocess.call(sys.executable + " setup.py clean --all",shell = True)
print ("Done ", ret)
sys.exit(ret)
sys.exit(ret)
1 change: 0 additions & 1 deletion lxca_shell
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!python
'''
@since: 15 Sep 2015
@author: Prashant Bhosale <[email protected]>, Girish Kumar <[email protected]>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
67 changes: 0 additions & 67 deletions pyToolkit/SPECS/pyToolkit.spec

This file was deleted.

112 changes: 0 additions & 112 deletions pyToolkit/build.xml

This file was deleted.

Loading

0 comments on commit e1768b9

Please sign in to comment.