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

Some bugs in RestApi/Python/Modules/ #96

Closed agawande closed 4 years ago

agawande commented 4 years ago

Hi,

Ran into some problems when using the modules:

Thanks Ashlesh

therkong commented 4 years ago

Hi, which file and which function are you referring to? Can you paste the code snip here?

agawande commented 4 years ago

They are also linked on my first comment with exact line numbers: https://github.com/OpenIxia/IxNetwork/issues/96#issue-609226021

Here are the code functions:

therkong commented 4 years ago

Thank you for reporting these issues. I’ve updated the code and did a git pull request. It should get into the main branch in a day or two.

Regards, Theresa

From: Ashlesh Gawande notifications@github.com Sent: Monday, May 4, 2020 5:53 PM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Assign assign@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Some bugs in RestApi/Python/Modules/ (#96)

[EXTERNAL]

They are also linked on my first comment with exact line numbers: #96 (comment)https://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/96*issue-609226021__;Iw!!I5pVk4LIGAfnvw!2yah80H8UqKQJ72BkWpQ1DCbC2FW2oqE-8-BY0pJzLvk6nLJHyeSEnnzTdvc8Wkbc93i$

Here are the code functions:

· response = self.ixnObj.waitForComplete(response, url + '/' + response.json()['id'], silentMode=False, timeout=900, ignoreException=True)

· if self.serverOs == 'windows':

· self.logInfo('Connecting to API server: windows')

· self.httpScheme = 'http'

·

· if self.apiServerPort is None:

· self.apiServerPort == 11009

· else:

· self.apiServerPort == serverIpPort

· from pprint import pprint

· pprint(response.json())

· return

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/96*issuecomment-623784382__;Iw!!I5pVk4LIGAfnvw!2yah80H8UqKQJ72BkWpQ1DCbC2FW2oqE-8-BY0pJzLvk6nLJHyeSEnnzTdvc8QFmJC-Q$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUIST67OSLEW5S5PELLRP5PPZANCNFSM4MT5IGPQ__;!!I5pVk4LIGAfnvw!2yah80H8UqKQJ72BkWpQ1DCbC2FW2oqE-8-BY0pJzLvk6nLJHyeSEnnzTdvc8bTs7-Fy$.

agawande commented 4 years ago

Thanks! On commit #98 I think the removal of pprint and return is missed: https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1115 https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1116 https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1117

therkong commented 4 years ago

I just checked. pprint and return call is removed in function getAllOpenSessionIds.

Regards, Theresa

From: Ashlesh Gawande notifications@github.com Sent: Monday, May 11, 2020 8:44 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Assign assign@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Some bugs in RestApi/Python/Modules/ (#96)

[EXTERNAL]

Thanks! On commit #98https://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/pull/98__;!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4Jj3MNw97b$ I think the removal of pprint and return is missed: https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1115https://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py*L1115__;Iw!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4JjwfVDySQ$ https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1116https://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py*L1116__;Iw!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4Jj_GbAes5$ https://github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py#L1117https://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/blob/aa9aa4ccfa23c7935615864bf219a08b5825d6ea/RestApi/Python/Modules/IxNetRestApi.py*L1117__;Iw!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4Jj1keeb-L$

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/96*issuecomment-626784255__;Iw!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4Jj5py7Okt$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUJEXNV7IFFBO5PUHUTRRAMLJANCNFSM4MT5IGPQ__;!!I5pVk4LIGAfnvw!1_iCrD2AtEE-AKVKFaDa9ZzjixPo59js33VneHFw44kDDJQokIoE7fwU3c4Jj56VPKQr$.

agawande commented 4 years ago

Thanks!