Skip to content

Attribute Null #8

@supertech4321

Description

@supertech4321

Getting error when running the below script at the line marked below Possible bug. When running ListAllNodes in postman, return "null" for attributes. Unable to bypass "Null" for attributes.

            "associatedFServiceID": 0,
            "associatedMasterServiceID": 222,
            "attributes": null,
            "cip": "10.151.50.91",
            "cipi": "Bond10G",
            "fibreChannelTargetPortGroup": null,
            "mip": "10.151.10.91",
            "mipi": "Bond1G",
            "name": "SC1SFSN02",
            "nodeID": 14,
            "nodeSlot": "",
            "platformInfo": {
                "chassisType": "R630",
                "cpuModel": "Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz",
                "nodeMemoryGB": 128,
                "nodeType": "SF4805",
                "platformConfigVersion": "10.1.0.83"
            },
            "sip": "10.151.50.91",
            "sipi": "Bond10G",
            "softwareVersion": "10.1.0.83",
            "uuid": "4C4C4544-0052-3410-8048-B6C04F474232",
            "virtualNetworks": []

""""""""""""""" node_list = sf_element_factory.list_all_nodes().to_json()['nodes'] """""""""""""""""""

General Exception: attributes is a required parameter.

Retu

def send_node_stats(sf_element_factory, prefix):
"""
send a subset of ListNodeStats API call results to graphite.
Note: Calls ListAllNodes to get node name to use in metric path.
"""
metrics_list = ['cpu', 'usedMemory', 'networkUtilizationStorage',
'networkUtilizationCluster', 'cBytesOut', 'cBytesIn', 'sBytesOut',
'sBytesIn', 'mBytesOut', 'mBytesIn']
print("failing maybe here")
node_list = sf_element_factory.list_all_nodes().to_json()['nodes']

node_list = sf_element_factory.list_all_nodes()

print("failing here")
print(node_list)
nodeinfo_by_id = list_to_dict(node_list, key="nodeID")
nodestats = sf_element_factory.list_node_stats().to_json()['nodeStats']['nodes']
LOG.warning(nodestats)
for ns_dict in nodestats:
    LOG.warning(ns_dict)
    node_name = nodeinfo_by_id[ns_dict['nodeID']]['name']
    for key in metrics_list:
        if to_graphite:
            graphyte.send(prefix + '.' + node_name + '.' + key, to_num(ns_dict[key]))
        else:
            LOG.warning(node_name + ' ' + key + ' ' + str(ns_dict[key]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions