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

Issue with aoscx_facts module (requirement of specifying ansible_aoscx_rest_version value) #88

Open
muralihcl opened this issue Dec 7, 2023 · 7 comments

Comments

@muralihcl
Copy link

Hi Team,

When we attempt to use aoscx_facts module to fetch the information from Aruba CX switch, certain families expect us to specify the value for ansible_aoscx_rest_version variable. Under the https://switch_ip/rest URI, the latest version available does not match what we need to specify. In order to make our ansible playbooks more futuristic, we were trying to figure out a logic which can help us to detect needed rest version for individual switches. Can someone point me in the right direction?

With regards,

Muralidhara Kakkunje

@alagoutte
Copy link
Contributor

What stuff need to specify the rest_version ?

@muralihcl
Copy link
Author

Hi @alagoutte ,

There is an issue with platforms 6200, 6300, 6400, 8100, 8360 and 9300 when physical_interfaces are gathered; those platforms need REST v10.09 in order to get proper information. If default version for REST is used, a warning message is displayed indicating that the platform is not supported. In the case of 8360, the information is shown from Halon version 10.09, previous versions are not supported.

Parameter ansible_aoscx_rest_version in inventory file or variable in the playbook. Example: ansible_aoscx_rest_version: 10.09

With the default version of 10.04, it gives an error saying retrieval of physical interfaces details is no longer supported and need to specify the version to 10.09 for it to work properly.

With regards,

Muralidhara Kakkunje

@tchiapuziowong
Copy link
Member

@muralihcl we're investigating a method to allow for dynamic interpretation of latest supported API in the pyaoscx SDK, in the meantime are you able to define v10.09 as the version and your playbooks function successfully?

@muralihcl
Copy link
Author

Hi @tchiapuziowong ,

Yes, if I specify the version, then it works. My concern is with the inventory which has different models of switches some supporting 10.04 and some supporting 10.09. This makes it hard to know which version works on a specific switch beforehand.

If there are any hint on retrieving the version that works on a switch using REST API, I can try giving it a shape within the playbook itself. As I stated above, if the /rest endpoints helps us to identify the version the switch supports, it could have been easy. But, that is not the case. We only can think of trial and error method looking for warnings key within the response. I have applied this workaround, but I am not quite happy about that.

With regards,

Muralidhara Kakkunje

@alagoutte
Copy link
Contributor

Hi @tchiapuziowong ,

Yes, if I specify the version, then it works. My concern is with the inventory which has different models of switches some supporting 10.04 and some supporting 10.09. This makes it hard to know which version works on a specific switch beforehand.

If there are any hint on retrieving the version that works on a switch using REST API, I can try giving it a shape within the playbook itself. As I stated above, if the /rest endpoints helps us to identify the version the switch supports, it could have been easy. But, that is not the case. We only can think of trial and error method looking for warnings key within the response. I have applied this workaround, but I am not quite happy about that.

With regards,

Muralidhara Kakkunje

What firmware do you using ? because if you are using 10.10, all switch will be support 10.09

@muralihcl
Copy link
Author

muralihcl commented Dec 11, 2023

Hi @alagoutte ,

Within our lab among 6 devices, I got below versions.

"GL.10.11.1010"
"GL.10.11.1005"
"XL.10.12.1000"
"LL.10.11.1005"

But, this code we are preparing right now is expected to work in a customer environment. There, we are not sure on the versions they will be having in their environment..

With regards,

Muralidhara Kakkunje

@alagoutte
Copy link
Contributor

Hi @alagoutte ,

Within our lab among 6 devices, I got below versions.

"GL.10.11.1010" "GL.10.11.1005" "XL.10.12.1000" "LL.10.11.1005"

But, this code we are preparing right now is expected to work in a customer environment. There, we are not sure on the versions they will be having in their environment..

With regards,

Muralidhara Kakkunje

Yes, like @tchiapuziowong say, need to wait an update with support of last API release automatically

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

3 participants