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

Update ironware.rb #667

Merged
merged 1 commit into from
Jan 18, 2017
Merged

Update ironware.rb #667

merged 1 commit into from
Jan 18, 2017

Conversation

devicenull
Copy link
Contributor

Some Brocade devices only have two possible fan speeds. Previously, this only handled three levels of fan speeds. Updated regex will handle both of these cases:

Fan 1 ok, speed (auto): 1<->[[2]]
Fan 1 ok, speed (auto): 1<->[[2]]<->3

Some Brocade devices only have two possible fan speeds.  Previously, this only handled three levels of fan speeds.  Updated regex will handle both of these cases:

    Fan 1 ok, speed (auto): 1<->[[2]]
    Fan 1 ok, speed (auto): 1<->[[2]]<->3
@ytti
Copy link
Owner

ytti commented Jan 18, 2017

perhaps cfg = cfg.tr('[]', '') if cfg.match(/^Fan /)would've been cleaner and more robust

@ytti ytti merged commit 1b73ac3 into ytti:master Jan 18, 2017
@ytti
Copy link
Owner

ytti commented Jan 18, 2017

or cfg = cfg.delete('[]') if cfg.match(/^Fan /)

@ytti
Copy link
Owner

ytti commented Jan 18, 2017

aah both would require you parse the cfg line by line:

cmd 'blaah do |cfg|
  cfg.lines.map do |line|
    ! mangle lines here
  end.join
end

@devicenull devicenull deleted the patch-6 branch January 19, 2017 19:16
mortzu pushed a commit that referenced this pull request Jul 21, 2022
* Changes to allow RBAC for IOS if specified

* Changes to allow RBAC for IOS if specified

Co-authored-by: Derek Ivey <divey@google.com>
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.

None yet

2 participants