Skip to content

Aoscx: Update regex to include 'N/A' in FAN speed parsing#3727

Open
solrac200 wants to merge 1 commit intoytti:masterfrom
solrac200:aoscx-fix
Open

Aoscx: Update regex to include 'N/A' in FAN speed parsing#3727
solrac200 wants to merge 1 commit intoytti:masterfrom
solrac200:aoscx-fix

Conversation

@solrac200
Copy link

Description

Aoscx: Update regex to include 'N/A' in FAN speed parsing

@robertcheramy
Copy link
Collaborator

The PR conflicts with the model 8100, which has a different output than 8325 or 6000.

Can you provide a YAML simulation file or at least your output of show environment and the model type you are using?

@solrac200
Copy link
Author

aoscx#CX6200_10.16.1020_environment#simulation.yaml
aoscx#CX6300_10.16.1020_environment#simulation.yaml
aoscx#CX8100_10.16.1020_environment#simulation.yaml
aoscx#CX8360_10.16.1020_environment#simulation.yaml
aoscx#CX9300_10.14.1061_environment#simulation.yaml
aoscx#CX10000_10.16.1020_environment#simulation.yaml
I have attached a few simulation files, of the "show environment" part for all the Aruba CX Switches i have, mostly running 10.16 and the 9300 running 10.14.

Also i have another problem:
With 10.16 a new part was added: "show environment power-supply input-voltage"
I have solved this by adding the following in my custom model (worked for all models i'am using):

with_section(cfg, 'power-supply input-voltage') do |content|
      content.gsub!(/^\d((?:\S+\s+){4})(?:\S+\s+){2}((?:\S+(?:\s+)?){4})$/, '\\1 <power hidden> <avg power hidden> \\2')
end

Also i had to edit the "show power-consumption", to work correctly for 6200, to the following:

with_section(cfg, 'power-consumption') do |content|
     content.gsub!(/^(.*?) (?:(?:N\/A|\d+\.\d+) +)+(?:N\/A|\d+\.\d+)$/, '\\1 <power hidden>')
end

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

Successfully merging this pull request may close these issues.

2 participants