Giter VIP home page Giter VIP logo

hmcrestclient's People

Contributors

laurentoliva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hmcrestclient's Issues

when running this HmcRestClient

I'm getting this:

File "./HmcRestClient", line 11, in
load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2843, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2434, in load
return self.resolve()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/init.py", line 2440, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/Main.py", line 18, in
from src.main.HmcRestClient import *
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/HmcRestClient.py", line 21, in
from src.generated_src import UOM
File "/Library/Python/2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/generated_src/UOM.py", line 24, in
raise pyxb.PyXBVersionError(PyXBVersion)
pyxb.exceptions.PyXBVersionError: 1.2.4

tool not working with new HMC xsd schema

Hello,

this client is really great to learn how the api is working. Thanks for it. :)

I have a problem with hmc 8.5.0 when fetching PCM informations:

        Performance and Capacity Monitoring        
=============================================================
1. ManagedSystemPcmPreference
2. LongTermMonitor
3. ShortTermMonitor
4. ProcessorMetrics
5. Return to MainMenu
6. Help
7. Exit

Enter your Choice: 2
sh: cls: command not found

Available ManagedSystems : 
Traceback (most recent call last):
  File "/usr/local/var/pyenv/versions/py3/bin/HmcRestClient", line 9, in <module>
    load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/main/Main.py", line 134, in main
    menu()
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/main/Main.py", line 110, in menu
    performance_capacity_monitoring(choice, client.ip, client.x_api_session)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/main/PerformanceCapacityMonitor.py", line 43, in performance_capacity_monitoring
    get_managedsystem_uuid(ip, x_api_session)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/common/SelectManagedSystem.py", line 29, in get_managedsystem_uuid
    object_list = managedsystem_object.list_ManagedSystem(ip, x_api_session)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/managed_system/ListManagedSystem.py", line 50, in list_ManagedSystem
    self.content_type, "ManagedSystem", session_id)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/common/ListModule.py", line 65, in listing
    xml_object = UOM.CreateFromDocument(xmlstring)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/generated_src/UOM.py", line 65, in CreateFromDocument
    saxer.parse(io.BytesIO(xmld))
  File "/usr/local/var/pyenv/versions/3.4.5/lib/python3.4/xml/sax/expatreader.py", line 110, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/var/pyenv/versions/3.4.5/lib/python3.4/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/local/var/pyenv/versions/3.4.5/lib/python3.4/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/private/var/folders/6t/jzq4fbq154nbkbhzdd2f6njc0000gn/T/python-build.20161117090425.38397/Python-3.4.5/Modules/pyexpat.c", line 405, in StartElement
  File "/usr/local/var/pyenv/versions/3.4.5/lib/python3.4/xml/sax/expatreader.py", line 354, in start_element_ns
    AttributesNSImpl(newattrs, qnames))
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/saxer.py", line 370, in startElementNS
    binding_object = this_state.startBindingElement(type_class, new_object_factory, element_decl, attrs)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/saxer.py", line 207, in startBindingElement
    self.__constructElement(new_object_factory, attrs)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/saxer.py", line 135, in __constructElement
    self.__bindingInstance._setAttribute(attr_en, attrs.getValue(attr_name))
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 2240, in _setAttribute
    au.set(self, value_lex, from_xml=True)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/content.py", line 278, in set
    new_value = self.__dataType.Factory(new_value, _from_xml=from_xml)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 305, in Factory
    rv = cls._DynamicCreate(*args, **kw)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 677, in _DynamicCreate
    return ctor(*args, **kw)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 929, in __init__
    self.xsdConstraintsOK(location)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 1055, in xsdConstraintsOK
    return self.XsdConstraintsOK(self, location)
  File "/usr/local/var/pyenv/versions/py3/lib/python3.4/site-packages/pyxb/binding/basis.py", line 1050, in XsdConstraintsOK
    raise pyxb.SimpleFacetValueError(cls, value, f, location)
pyxb.exceptions_.SimpleFacetValueError: Type {http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/}SchemaVersion.Enum enumeration constraint violated by value V1_4_0

``````

After Installtion Problem

After installation become this error message:

#> HmcRestClient
Traceback (most recent call last):
  File "/bin/HmcRestClient", line 9, in <module>
    load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/Main.py", line 18, in <module>
    from src.main.HmcRestClient import *
  File "/usr/lib/python2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/main/HmcRestClient.py", line 21, in <module>
    from src.generated_src import UOM
  File "/usr/lib/python2.7/site-packages/HmcRestClient-1.0-py2.7.egg/src/generated_src/UOM.py", line 24, in <module>
    raise pyxb.PyXBVersionError(_PyXBVersion)
pyxb.exceptions_.PyXBVersionError: 1.2.4

Can you help me?

ImportError: No module named msvcrt on my Linux box

./HmcRestClient
Traceback (most recent call last):
File "./HmcRestClient", line 9, in
load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/home/ivan/HmcRestClient-master/src/main/Main.py", line 18, in
from src.main.HmcRestClient import *
File "/home/ivan/HmcRestClient-master/src/main/HmcRestClient.py", line 27, in
import msvcrt
ImportError: No module named msvcrt

I am running on Linux. It seems that I don't have the msvcrt.
May I ask for your help? Thank you.

List of Available ManagedSystem crashed with error

Available ManagedSystems :
Traceback (most recent call last):
File "C:\Users\jhron\AppData\Local\Programs\Python\Python37-32\Scripts\HmcRest
Client-script.py", line 11, in
load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()

File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\main\Main.py", line 134, in main
menu()
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\main\Main.py", line 110, in menu
performance_capacity_monitoring(choice, client.ip, client.x_api_session)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\main\PerformanceCapacityMonitor.py", line 43,
in performance_capacity_monitoring
get_managedsystem_uuid(ip, x_api_session)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\common\SelectManagedSystem.py", line 29, in g
et_managedsystem_uuid
object_list = managedsystem_object.list_ManagedSystem(ip, x_api_session)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\managed_system\ListManagedSystem.py", line 50
, in list_ManagedSystem
self.content_type, "ManagedSystem", session_id)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\common\ListModule.py", line 65, in listing
xml_object = UOM.CreateFromDocument(xmlstring)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\hmcrestclient-1.0-py3.7.egg\src\generated_src\UOM.py", line 65, in CreateFrom
Document
saxer.parse(io.BytesIO(xmld))
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\xml\sax\exp
atreader.py", line 111, in parse
xmlreader.IncrementalParser.parse(self, source)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\xml\sax\xml
reader.py", line 125, in parse
self.feed(buffer)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\xml\sax\exp
atreader.py", line 217, in feed
self._parser.Parse(data, isFinal)
File "c:_work\5\s\modules\pyexpat.c", line 412, in StartElement
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\xml\sax\exp
atreader.py", line 370, in start_element_ns
AttributesNSImpl(newattrs, qnames))
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\saxer.py", line 370, in startElementNS
binding_object = this_state.startBindingElement(type_class, new_object_facto
ry, element_decl, attrs)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\saxer.py", line 207, in startBindingElement
self.__constructElement(new_object_factory, attrs)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\saxer.py", line 135, in __constructElement
self.__bindingInstance._setAttribute(attr_en, attrs.getValue(attr_name))
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 2240, in _setAttribute
au.set(self, value_lex, from_xml=True)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\content.py", line 278, in set
new_value = self.__dataType.Factory(new_value, _from_xml=from_xml)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 305, in Factory
rv = cls._DynamicCreate(*args, **kw)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 677, in DynamicCreate
return ctor(*args, **kw)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 929, in init
self.xsdConstraintsOK(location)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 1055, in xsdConstraintsOK
return self.XsdConstraintsOK(self, location)
File "c:\Users\jhron\AppData\Local\Programs\Python\Python37-32\lib\site-packag
es\pyxb\binding\basis.py", line 1050, in XsdConstraintsOK
raise pyxb.SimpleFacetValueError(cls, value, f, location)
pyxb.exceptions
.SimpleFacetValueError: Type {http://www.ibm.com/xmlns/systems/p
ower/firmware/uom/mc/2012_10/}SchemaVersion.Enum enumeration constraint violated
by value V1_5_3

ImportError: No module named 'msvcrt'

Hi,

I tried to experiment with the proejct ... but I have the following issue running on Linux - Centos 7:

Python 3.4.5

Modules:
certifi (2018.1.18)
chardet (3.0.4)
feedparser (5.2.1)
HmcRestClient (1.0)
idna (2.6)
pip (9.0.1)
PyXB (1.2.4)
requests (2.18.4)
setuptools (19.2)
urllib3 (1.22)

[root@centosdeploy HmcRestClient]# HmcRestClient
Traceback (most recent call last):
File "/usr/bin/HmcRestClient", line 9, in
load_entry_point('HmcRestClient==1.0', 'console_scripts', 'HmcRestClient')()
File "/usr/lib/python3.4/site-packages/pkg_resources/init.py", line 568, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.4/site-packages/pkg_resources/init.py", line 2720, in load_entry_point
return ep.load()
File "/usr/lib/python3.4/site-packages/pkg_resources/init.py", line 2380, in load
return self.resolve()
File "/usr/lib/python3.4/site-packages/pkg_resources/init.py", line 2386, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/main/Main.py", line 18, in
from src.main.HmcRestClient import *
File "/usr/lib/python3.4/site-packages/HmcRestClient-1.0-py3.4.egg/src/main/HmcRestClient.py", line 27, in
import msvcrt
ImportError: No module named 'msvcrt'

There were not any statement that the tool is Windows only ... but assuming the msvcrt dependency it seems it is ...

Any plans to make it Linux compatible ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.