-
Notifications
You must be signed in to change notification settings - Fork 7
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
(ARISTA-33) Add radius_server provider #11
Merged
jeffmccune
merged 6 commits into
arista-eosplus:master
from
jeffmccune:ar33_radius_server
Nov 18, 2014
Merged
(ARISTA-33) Add radius_server provider #11
jeffmccune
merged 6 commits into
arista-eosplus:master
from
jeffmccune:ar33_radius_server
Nov 18, 2014
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make the following command work to run the specs only: bundle exec guard start --group specs --clear
Without this patch there is no provider for the radius_global type. This patch implements the initial collection of a single resource from the target device which looks like: radius_global { 'settings': enable => 'true', key => '070E234F1F5B4A', key_format => '7', retransmit_count => '5', timeout => '50', }
Without this patch the radius_global provider does not change the system to reflect the desired state of the global radius configuration resource. This patch addresses the problem by implementing the provider setter methods which accumulate changes in the @property_flush instance variable. The patch also implements the flush instance method which uses the PuppetX::Eos::Radius class to manage the radius key, timeout, and retransmit count properties.
Without this patch there is no provider for the radius_server type. This patch addresses the problem by implementing the radius_server provider with the instances class method to collect existing resources on the device. The provider is incomplete in that the provider does not yet flush updated properties to the target device. The resources look like: radius_server { '10.11.12.13/1024/2048': acct_port => '2048', auth_port => '1024', hostname => '10.11.12.13', key => '011204070A5955', key_format => '7', retransmit_count => '5', timeout => '30', } radius_server { '10.11.12.13/1811/1813': acct_port => '1813', auth_port => '1811', hostname => '10.11.12.13', } radius_server { '10.11.12.13/1811/1814': acct_port => '1814', auth_port => '1811', hostname => '10.11.12.13', } radius_server { '10.11.12.13/1812/1813': acct_port => '1813', auth_port => '1812', hostname => '10.11.12.13', key => '1513090F557878', key_format => '7', } radius_server { '10.11.12.13/1812/1814': acct_port => '1814', auth_port => '1812', hostname => '10.11.12.13', } radius_server { '10.11.12.14/1812/1813': acct_port => '1813', auth_port => '1812', hostname => '10.11.12.14', } Given the following switch configuration: radius-server host 10.11.12.13 key 7 1513090F557878 radius-server host 10.11.12.13 auth-port 1811 radius-server host 10.11.12.13 auth-port 1811 acct-port 1814 radius-server host 10.11.12.13 acct-port 1814 radius-server host 10.11.12.13 auth-port 1024 acct-port 2048 timeout 30 retransmit 5 key 7 011204070A5955 radius-server host 10.11.12.14
Without this patch the radius_server provider does not have the ability to create or destroy resources on the target device. The following error results from the attempt: $ puppet resource radius_server 10.11.12.15/1812/1813 ensure=present Error: Could not set 'present' on ensure: undefined method `create' for Radius_server[10.11.12.15/1812/1813]:Puppet::Type::Radius_server Error: Could not set 'present' on ensure: undefined method `create' for Radius_server[10.11.12.15/1812/1813]:Puppet::Type::Radius_server Wrapped exception: undefined method `create' for Radius_server[10.11.12.15/1812/1813]:Puppet::Type::Radius_server Error: /Radius_server[10.11.12.15/1812/1813]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined method `create' for Radius_server[10.11.12.15/1812/1813]:Puppet::Type::Radius_server radius_server { '10.11.12.15/1812/1813': ensure => 'absent', } This patch addresses the problem by implementing the property setter methods and deferring to the flush method to create the resource on the target device. This patch also implements the provider create and destroy methods.
jeffmccune
pushed a commit
that referenced
this pull request
Nov 18, 2014
(ARISTA-33) Add radius_server provider
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull requests implements the radius_server provider. The pull request
depends upon https://github.com/puppetlabs/puppet_x_eos_eapi/pull/4 being
merged.