hewlettpackard / hpe3par_python_sdk Goto Github PK
View Code? Open in Web Editor NEWHPE Alletra 9000 and HPE Primera and HPE 3PAR Software Development Kit for Python
HPE Alletra 9000 and HPE Primera and HPE 3PAR Software Development Kit for Python
the method getStorageSystemInfo
returns a dictionary rather than the expected object
{u'clusterNodes': [0, 1, 2, 3], u'onlineNodes': [0, 1, 2, 3], u'name': u'CB2515_2000K_252', u'licenseInfo': {u'WWNBASE': 103353, u'issueTimeSec': 1530167972, u'diskCount': 34, u'licenseState': {u'onlineImport': True, u'storageFederation': True, u'systemReporter': True, u'dynamicOptimization': True, u'qos': True, u'smartSAN': True, u'thinProvisioing': True, u'rmcApplicationSuite': True, u'peerVirtualization': True, u'thinPersistence': True, u'thinProvisioning': True, u'remoteCopy': True, u'adaptiveOptimization': True, u'darEncryption': True, u'virtualLock': True, u'domains': True, u'thinConversion': True, u'fileServices': True, u'virtualCopy': True}, u'issueTime8601': u'2018-06-28T12:09:32+05:30', u'licenses': [{u'name': u'3PAR OS Suite'}, {u'name': u'Adaptive Flash Cache'}, {u'name': u'Adaptive Optimization'}, {u'name': u'Autonomic Rebalance'}, {u'name': u'Cluster Extension'}, {u'name': u'Cluster Extension (102400G)'}, {u'name': u'Compression'}, {u'name': u'Data Encryption'}, {u'name': u'Dynamic Optimization'}, {u'name': u'File Persona (102400G)'}, {u'name': u'File Persona Basic'}, {u'name': u'Management Plug-In for VMware vCenter'}, {u'name': u'Online Import'}, {u'name': u'Peer Motion'}, {u'name': u'Priority Optimization'}, {u'name': u'Recovery Manager Central'}, {u'name': u'Recovery Manager for Exchange'}, {u'name': u'Recovery Manager for Microsoft Hyper-V'}, {u'name': u'Recovery Manager for Oracle'}, {u'name': u'Recovery Manager for SQL'}, {u'name': u'Recovery Manager for VMware vSphere'}, {u'name': u'Remote Copy'}, {u'name': u'Remote Copy (102400G)'}, {u'name': u'RMC Application Suite'}, {u'name': u'Smart SAN'}, {u'name': u'Storage Federation'}, {u'name': u'System Reporter'}, {u'name': u'Thin Conversion'}, {u'name': u'Thin Copy Reclamation'}, {u'name': u'Thin Deduplication'}, {u'name': u'Thin Persistence'}, {u'name': u'Thin Provisioning (102400G)'}, {u'name': u'Virtual Copy'}, {u'name': u'Virtual Copy (102400G)'}, {u'name': u'Virtual Domains'}, {u'name': u'Virtual Lock'}, {u'name': u'VSS Provider for Microsoft Windows'}]}, u'freeCapacityMiB': 21050368.0, u'chunkletSizeMiB': 1024, u'totalCapacityMiB': 38260736.0, u'serialNumber': u'SGH549W49T', u'IPv4Addr': u'15.212.192.252', u'id': 103353, u'parameters': {u'rawSpaceAlertFC': 0, u'hostDIFTemplate': 2, u'thermalShutdown': True, u'remoteCopyHostThrottling': False, u'remoteSyslogSecurityHost': u'0.0.0.0', u'allowR0': True, u'overProvRatioLimit': 0.0, u'allowR5OnNLDrives': False, u'failoverMatchedSet': True, u'upgradeNote': u'', u'disableDedup': False, u'portFailoverEnabled': True, u'allowWrtbackUpgrade': False, u'eventLogNum': 1, u'autoExportAfterReboot': True, u'sessionTimeout': 3600, u'sparingAlgorithm': u'Default', u'eventLogsize': 4194304, u'rawSpaceAlertSSD': 0, u'remoteSyslog': False, u'disableChunkletInitUNMAP': False, u'hostDIF': True, u'allowWrtbackSingleNode': False, u'disableCompr': False, u'complianceOfficerApproval': False, u'allowR5OnFCDrives': True, u'VVRetentionTimeMax': 1209600, u'personaProfile': 1, u'remoteSyslogHost': u'0.0.0.0', u'rawSpaceAlertNL': 0, u'overProvRatioWarning': 0.0}, u'systemVersion': u'3.3.1.457', u'allocatedCapacityMiB': 14423040.0, u'failedCapacityMiB': 0.0, u'readOnlyParameters': {u'maxCompressedVolumeSizeMiB': 16777216, u'maxDedupVolumeSizeMiB': 16777216, u'maxVolumeSizeMiB': 67108864}, u'timeZone': u'Asia/Kolkata', u'IPv6Addr': u'2620:0:a17:e033::12', u'totalNodes': 4, u'masterNode': 1, u'model': u'HPE_3PAR 20800'}
hpe3par_python_sdk/hpe3par_sdk/client.py
Line 1585 in 874bc32
This will return wwn's that exist on the storage, regardless of if they are already used in another host or not. Which means when you are trying to add WWNs to an existing host, ansible will complain that "they are already part of another host" when they are not. Add something like this:
hosts = self.client.queryHost(iqns, wwns)['members']
for host in [x for x in hosts if x.get('name',None)]:
host_list.append(Host(host))
return host_list
Or fix the ansible module:
https://github.com/HewlettPackard/hpe3par_ansible_module/blob/master/Modules/hpe3par_host.py#L622-L627
This should become:
host_list = client_obj.queryHost(wwns=wwn_list)
for host_obj in host_list:
host_name_3par = host_obj.name
if host_name_3par:
if host_name == host_name_3par:
wwn_same_host.append(wwn)
else:
wwn_other_host.append(wwn)
Currently, class GrowthParams and PrivateSpace objects do not get initialized when they are not None. This needs to be corrected in models.py like below.
class GrowthParams(object):
def __init__(self, object_hash):
if object_hash is None:
return
Please check the same in other places.
hi,
in your requierments you have:
Primera OS
4.0.0
Primera is currently on 4.2.2. After asking HPE support I got the answer:
I inform you that the 4.0.0 version was never a release customer version. The document refers to all 4.x.x version and you can use it with 4.2.2 version.
So please update to avoid any questions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.