Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute Null #8

Open
supertech4321 opened this issue Jan 16, 2018 · 1 comment
Open

Attribute Null #8

supertech4321 opened this issue Jan 16, 2018 · 1 comment

Comments

@supertech4321
Copy link

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]))
@scaleoutsean
Copy link
Contributor

Did you mean to submit this to some other repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants