OpenIxia / IxNetwork

A central location for IxNetwork sample scripts and utilities. Please also visit http://openixia.com
MIT License
50 stars 59 forks source link

getMultivalueValues fails, while startAllProtocols(verifyDeviceGroupStatus) #4

Closed chen-charles closed 6 years ago

chen-charles commented 6 years ago
Traceback (most recent call last):
  File "addPacketHeaderRawTraffic.py", line 169, in <module>
    protocolObj.startAllProtocols()
  File "../Modules/IxNetRestApiProtocol.py", line 1222, in startAllProtocols
    self.verifyDeviceGroupStatus()
  File "../Modules/IxNetRestApiProtocol.py", line 1178, in verifyDeviceGroupStatus
    enabled = self.ixnObj.getMultivalueValues(enabledMultivalue, silentMode=True)
  File "../Modules/IxNetRestApi.py", line 998, in getMultivalueValues
    response = self.post(self.sessionUrl+'/multivalue/operations/getValues', data=data, silentMode=silentMode)
  File "../Modules/IxNetRestApi.py", line 291, in post
    raise IxNetRestApiException('POST error: {0}\n'.format(response.json()['errors'][0]['detail']))
IxNetRestApi.IxNetRestApiException: POST error: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

while attempting to fetch

    'enabled': '/api/v1/sessions/1/ixnetwork/multivalue/23',    # count = 1 returned by query

Currently bypassed by,

    def getMultivalueValues(self, multivalueObj, silentMode=False):
        return self.get(self.httpHeader+multivalueObj+'?includes=values', silentMode=silentMode).json()["values"]

IxNetwork Version: 8.10.1046.6 EA Could not find "getValues" exec in the API Browser (nor docs). (only "/multivalue/operations/getValue")

hubertgee commented 6 years ago

Hi Charles,

You are running an IxNetwork version that doesn’t support the getValue feature. I suggest that you upgrade to 8.40.

Hubert Gee

From: chen-charles [mailto:notifications@github.com] Sent: Monday, May 14, 2018 11:10 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [OpenIxia/IxNetwork] getMultivalueValues fails, while startAllProtocols(verifyDeviceGroupStatus) (#4)

Traceback (most recent call last):

File "addPacketHeaderRawTraffic.py", line 169, in

protocolObj.startAllProtocols()

File "../Modules/IxNetRestApiProtocol.py", line 1222, in startAllProtocols

self.verifyDeviceGroupStatus()

File "../Modules/IxNetRestApiProtocol.py", line 1178, in verifyDeviceGroupStatus

enabled = self.ixnObj.getMultivalueValues(enabledMultivalue, silentMode=True)

File "../Modules/IxNetRestApi.py", line 998, in getMultivalueValues

response = self.post(self.sessionUrl+'/multivalue/operations/getValues', data=data, silentMode=silentMode)

File "../Modules/IxNetRestApi.py", line 291, in post

raise IxNetRestApiException('POST error: {0}\n'.format(response.json()['errors'][0]['detail']))

IxNetRestApi.IxNetRestApiException: POST error: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

while attempting to fetch

'enabled': '/api/v1/sessions/1/ixnetwork/multivalue/23',    # count = 1 returned by query

Currently bypassed by,

def getMultivalueValues(self, multivalueObj, silentMode=False):

    return self.get(self.httpHeader+multivalueObj+'?includes=values', silentMode=silentMode).json()["values"]

IxNetwork Version: 8.10.1046.6 EA Could not find "getValues" exec in the API Browser (nor docs). (only "/multivalue/operations/getValue")

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOpenIxia%2FIxNetwork%2Fissues%2F4&data=02%7C01%7C%7Cc7c714d076f14026e86908d5b9c5f58c%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636619182242422432&sdata=RW12CFjIAq%2B%2BXM9d8eSwkHIVIp4DcAW8sJT13T4hA4Y%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAhtYX1BDX-_U0AGETSTWcDVvAilLqbcOks5tyciMgaJpZM4T-Qu1&data=02%7C01%7C%7Cc7c714d076f14026e86908d5b9c5f58c%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636619182242422432&sdata=hlMDrq0m83rwaK37EeObItfD7D%2F5pXB5ynnybzNaPoc%3D&reserved=0.

hubertgee commented 6 years ago

Hi Charles, the multivalue/operations/getValue feature isn't supported in IxNetwork 8.10. I suggest upgrading to IxNetwork 8.40.