Giter VIP home page Giter VIP logo

hpe3par_python_sdk's Issues

Storage System Info returns a dictionary instead of an object

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'}

This does not do what it is supposed to do, or it is misused in the ansible module.

hosts = self.client.queryHost(iqns, wwns)['members']

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)

Fix GrowthParams and PrivateSpace objects for not None in models

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.

Please fix Requirements for primera

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.

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.