arista-eos 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. data/.gitignore +41 -0
  2. data/.rubocop.yml +21 -0
  3. data/Gemfile +57 -0
  4. data/Guardfile +21 -0
  5. data/LICENSE +28 -0
  6. data/README.md +178 -0
  7. data/Rakefile +46 -0
  8. data/eos.gemspec +36 -0
  9. data/guide/.gitignore +2 -0
  10. data/guide/Makefile +177 -0
  11. data/guide/_static/arista_logo_jpg-11.jpg +0 -0
  12. data/guide/_static/favicon.ico +0 -0
  13. data/guide/conf.py +282 -0
  14. data/guide/cookbook.rst +135 -0
  15. data/guide/developing.rst +55 -0
  16. data/guide/faq.rst +30 -0
  17. data/guide/index.rst +25 -0
  18. data/guide/installation.rst +174 -0
  19. data/guide/license.rst +5 -0
  20. data/guide/overview.rst +35 -0
  21. data/guide/quickstart.rst +184 -0
  22. data/guide/release-notes-1.0.rst +37 -0
  23. data/guide/release-notes-1.1.rst +25 -0
  24. data/guide/release-notes.rst +10 -0
  25. data/guide/testing.rst +8 -0
  26. data/guide/troubleshooting.rst +26 -0
  27. data/guide/typedoc.rst +928 -0
  28. data/guide/types.rst +44 -0
  29. data/lib/eos.rb +8 -0
  30. data/lib/eos/version.rb +5 -0
  31. data/lib/puppet/provider/eos_acl_entry/default.rb +122 -0
  32. data/lib/puppet/provider/eos_command/default.rb +61 -0
  33. data/lib/puppet/provider/eos_ethernet/default.rb +96 -0
  34. data/lib/puppet/provider/eos_interface/default.rb +89 -0
  35. data/lib/puppet/provider/eos_ipinterface/default.rb +89 -0
  36. data/lib/puppet/provider/eos_mlag/default.rb +86 -0
  37. data/lib/puppet/provider/eos_mlag_interface/default.rb +90 -0
  38. data/lib/puppet/provider/eos_ntp_config/default.rb +68 -0
  39. data/lib/puppet/provider/eos_ntp_server/default.rb +69 -0
  40. data/lib/puppet/provider/eos_portchannel/default.rb +117 -0
  41. data/lib/puppet/provider/eos_snmp/default.rb +77 -0
  42. data/lib/puppet/provider/eos_stp_interface/default.rb +73 -0
  43. data/lib/puppet/provider/eos_switchport/default.rb +100 -0
  44. data/lib/puppet/provider/eos_system/default.rb +63 -0
  45. data/lib/puppet/provider/eos_vlan/default.rb +93 -0
  46. data/lib/puppet/provider/eos_vxlan/default.rb +104 -0
  47. data/lib/puppet/provider/eos_vxlan_vlan/default.rb +89 -0
  48. data/lib/puppet/provider/eos_vxlan_vtep/default.rb +70 -0
  49. data/lib/puppet/type/eos_acl_entry.rb +126 -0
  50. data/lib/puppet/type/eos_command.rb +75 -0
  51. data/lib/puppet/type/eos_ethernet.rb +101 -0
  52. data/lib/puppet/type/eos_interface.rb +79 -0
  53. data/lib/puppet/type/eos_ipinterface.rb +116 -0
  54. data/lib/puppet/type/eos_mlag.rb +133 -0
  55. data/lib/puppet/type/eos_mlag_interface.rb +85 -0
  56. data/lib/puppet/type/eos_ntp_config.rb +70 -0
  57. data/lib/puppet/type/eos_ntp_server.rb +52 -0
  58. data/lib/puppet/type/eos_portchannel.rb +189 -0
  59. data/lib/puppet/type/eos_snmp.rb +127 -0
  60. data/lib/puppet/type/eos_stp_interface.rb +94 -0
  61. data/lib/puppet/type/eos_switchport.rb +150 -0
  62. data/lib/puppet/type/eos_system.rb +69 -0
  63. data/lib/puppet/type/eos_vlan.rb +130 -0
  64. data/lib/puppet/type/eos_vxlan.rb +150 -0
  65. data/lib/puppet/type/eos_vxlan_vlan.rb +78 -0
  66. data/lib/puppet/type/eos_vxlan_vtep.rb +62 -0
  67. data/lib/puppet_x/eos/provider.rb +86 -0
  68. data/lib/puppet_x/eos/utils/helpers.rb +34 -0
  69. data/metadata.json +20 -0
  70. data/spec/fixtures/README +61 -0
  71. data/spec/fixtures/ethernet.json +9 -0
  72. data/spec/fixtures/fixture_stp.yaml +11 -0
  73. data/spec/fixtures/fixture_vxlan_get.yaml +11 -0
  74. data/spec/fixtures/ospf.json +13 -0
  75. data/spec/fixtures/snmp.json +6 -0
  76. data/spec/fixtures/varp.json +11 -0
  77. data/spec/spec_helper.rb +27 -0
  78. data/spec/support/fixtures.rb +74 -0
  79. data/spec/support/shared_examples_for_providers.rb +7 -0
  80. data/spec/support/shared_examples_for_types.rb +451 -0
  81. data/spec/unit/puppet/provider/eos_acl_entry/default_spec.rb +226 -0
  82. data/spec/unit/puppet/provider/eos_acl_entry/fixture_acl_entry.yaml +20 -0
  83. data/spec/unit/puppet/provider/eos_ethernet/default_spec.rb +226 -0
  84. data/spec/unit/puppet/provider/eos_ethernet/fixture_ethernet.yaml +8 -0
  85. data/spec/unit/puppet/provider/eos_interface/default_spec.rb +176 -0
  86. data/spec/unit/puppet/provider/eos_interface/fixture_interfaces.yaml +5 -0
  87. data/spec/unit/puppet/provider/eos_ipinterface/default_spec.rb +223 -0
  88. data/spec/unit/puppet/provider/eos_ipinterface/fixture_ipinterfaces.yaml +5 -0
  89. data/spec/unit/puppet/provider/eos_mlag/default_spec.rb +203 -0
  90. data/spec/unit/puppet/provider/eos_mlag/fixture_mlag.yaml +11 -0
  91. data/spec/unit/puppet/provider/eos_mlag_interface/default_spec.rb +177 -0
  92. data/spec/unit/puppet/provider/eos_mlag_interface/fixture_mlag.yaml +11 -0
  93. data/spec/unit/puppet/provider/eos_ntp_config/default_spec.rb +150 -0
  94. data/spec/unit/puppet/provider/eos_ntp_config/fixture_ntp.yaml +3 -0
  95. data/spec/unit/puppet/provider/eos_ntp_server/default_spec.rb +152 -0
  96. data/spec/unit/puppet/provider/eos_ntp_server/fixture_ntp.yaml +3 -0
  97. data/spec/unit/puppet/provider/eos_portchannel/default_spec.rb +271 -0
  98. data/spec/unit/puppet/provider/eos_portchannel/fixture_portchannels.yaml +10 -0
  99. data/spec/unit/puppet/provider/eos_snmp/default_spec.rb +193 -0
  100. data/spec/unit/puppet/provider/eos_snmp/fixture_snmp.yaml +6 -0
  101. data/spec/unit/puppet/provider/eos_stp_interface/default_spec.rb +138 -0
  102. data/spec/unit/puppet/provider/eos_switchport/default_spec.rb +250 -0
  103. data/spec/unit/puppet/provider/eos_switchport/fixture_switchports.yaml +7 -0
  104. data/spec/unit/puppet/provider/eos_system/default_spec.rb +129 -0
  105. data/spec/unit/puppet/provider/eos_system/fixture_system.yaml +2 -0
  106. data/spec/unit/puppet/provider/eos_vlan/default_spec.rb +228 -0
  107. data/spec/unit/puppet/provider/eos_vlan/fixture_vlans.yaml +6 -0
  108. data/spec/unit/puppet/provider/eos_vxlan/default_spec.rb +229 -0
  109. data/spec/unit/puppet/provider/eos_vxlan/fixture_vxlan.yaml +9 -0
  110. data/spec/unit/puppet/provider/eos_vxlan_vlan/default_spec.rb +148 -0
  111. data/spec/unit/puppet/provider/eos_vxlan_vtep/default_spec.rb +140 -0
  112. data/spec/unit/puppet/type/eos_acl_entry_spec.rb +103 -0
  113. data/spec/unit/puppet/type/eos_command_spec.rb +67 -0
  114. data/spec/unit/puppet/type/eos_ethernet_spec.rb +87 -0
  115. data/spec/unit/puppet/type/eos_interface_spec.rb +67 -0
  116. data/spec/unit/puppet/type/eos_ipinterface_spec.rb +84 -0
  117. data/spec/unit/puppet/type/eos_mlag_interface_spec.rb +62 -0
  118. data/spec/unit/puppet/type/eos_mlag_spec.rb +98 -0
  119. data/spec/unit/puppet/type/eos_ntp_config_spec.rb +58 -0
  120. data/spec/unit/puppet/type/eos_ntp_server_spec.rb +51 -0
  121. data/spec/unit/puppet/type/eos_portchannel_spec.rb +99 -0
  122. data/spec/unit/puppet/type/eos_snmp_spec.rb +87 -0
  123. data/spec/unit/puppet/type/eos_stp_interface_spec.rb +77 -0
  124. data/spec/unit/puppet/type/eos_switchport_spec.rb +88 -0
  125. data/spec/unit/puppet/type/eos_system_spec.rb +57 -0
  126. data/spec/unit/puppet/type/eos_vlan_spec.rb +86 -0
  127. data/spec/unit/puppet/type/eos_vxlan_spec.rb +100 -0
  128. data/spec/unit/puppet/type/eos_vxlan_vlan_spec.rb +73 -0
  129. data/spec/unit/puppet/type/eos_vxlan_vtep_spec.rb +52 -0
  130. data/tests/init.pp +12 -0
  131. metadata +437 -0
@@ -0,0 +1,86 @@
1
+ #
2
+ # Copyright (c) 2014, Arista Networks, Inc.
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are
7
+ # met:
8
+ #
9
+ # Redistributions of source code must retain the above copyright notice,
10
+ # this list of conditions and the following disclaimer.
11
+ #
12
+ # Redistributions in binary form must reproduce the above copyright
13
+ # notice, this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ #
16
+ # Neither the name of Arista Networks nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS
24
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30
+ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ #
32
+ # encoding: utf-8
33
+
34
+ require 'spec_helper'
35
+
36
+ describe Puppet::Type.type(:eos_vlan) do
37
+ let(:catalog) { Puppet::Resource::Catalog.new }
38
+ let(:type) { described_class.new(name: '450', catalog: catalog) }
39
+
40
+ it_behaves_like 'an ensurable type', name: '450'
41
+
42
+ describe 'vlanid' do
43
+ let(:attribute) { :vlanid }
44
+ subject { described_class.attrclass(attribute) }
45
+
46
+ include_examples 'parameter'
47
+ include_examples '#doc Documentation'
48
+ include_examples 'rejects values', [{ two: :three }, 'abc']
49
+
50
+ [100, '100'].each do |val|
51
+ it "validates #{val.inspect} as isomorphic to '100'" do
52
+ type[attribute] = val
53
+ expect(type[attribute]).to eq(val.to_s)
54
+ end
55
+ end
56
+ end
57
+
58
+ describe 'vlan_name' do
59
+ let(:attribute) { :vlan_name }
60
+ subject { described_class.attrclass(attribute) }
61
+
62
+ include_examples 'property'
63
+ include_examples '#doc Documentation'
64
+ include_examples 'accepts values without munging', %w(Engineering)
65
+ include_examples 'rejects values', [[1], { two: :three }]
66
+ end
67
+
68
+ describe 'enable' do
69
+ let(:attribute) { :enable }
70
+ subject { described_class.attrclass(attribute) }
71
+
72
+ include_examples 'property'
73
+ include_examples '#doc Documentation'
74
+ include_examples 'boolean value'
75
+ include_examples 'rejected parameter values'
76
+ end
77
+
78
+ describe 'trunk_groups' do
79
+ let(:attribute) { :trunk_groups }
80
+ subject { described_class.attrclass(attribute) }
81
+
82
+ include_examples 'property'
83
+ include_examples '#doc Documentation'
84
+ include_examples 'accepts values without munging', [%w(tg1 tg2)]
85
+ end
86
+ end
@@ -0,0 +1,100 @@
1
+ #
2
+ # Copyright (c) 2014, Arista Networks, Inc.
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are
7
+ # met:
8
+ #
9
+ # Redistributions of source code must retain the above copyright notice,
10
+ # this list of conditions and the following disclaimer.
11
+ #
12
+ # Redistributions in binary form must reproduce the above copyright
13
+ # notice, this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ #
16
+ # Neither the name of Arista Networks nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS
24
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30
+ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ #
32
+ # encoding: utf-8
33
+
34
+ require 'spec_helper'
35
+
36
+ describe Puppet::Type.type(:eos_vxlan) do
37
+ let(:catalog) { Puppet::Resource::Catalog.new }
38
+ let(:type) { described_class.new(name: 'Vxlan5000', catalog: catalog) }
39
+
40
+ it_behaves_like 'an ensurable type', name: 'Vxlan5000'
41
+
42
+ describe 'name' do
43
+ let(:attribute) { :name }
44
+ subject { described_class.attrclass(attribute) }
45
+
46
+ include_examples 'parameter'
47
+ include_examples '#doc Documentation'
48
+ end
49
+
50
+ describe 'description' do
51
+ let(:attribute) { :description }
52
+ subject { described_class.attrclass(attribute) }
53
+
54
+ include_examples 'property'
55
+ include_examples '#doc Documentation'
56
+ include_examples 'accepts values without munging', %w(B41.5)
57
+ include_examples 'rejects values', [[1], { two: :three }]
58
+ end
59
+
60
+ describe 'enable' do
61
+ let(:attribute) { :enable }
62
+ subject { described_class.attrclass(attribute) }
63
+
64
+ include_examples 'property'
65
+ include_examples '#doc Documentation'
66
+ include_examples 'boolean value'
67
+ include_examples 'rejected parameter values'
68
+ end
69
+
70
+ describe 'source_interface' do
71
+ let(:attribute) { :source_interface }
72
+ subject { described_class.attrclass(attribute) }
73
+
74
+ include_examples 'property'
75
+ include_examples '#doc Documentation'
76
+ include_examples 'accepts values without munging', %w(Ethernet42/1)
77
+ include_examples 'rejects values', [[1], { two: :three }]
78
+ end
79
+
80
+ describe 'multicast_group' do
81
+ let(:attribute) { :multicast_group }
82
+ subject { described_class.attrclass(attribute) }
83
+
84
+ include_examples 'property'
85
+ include_examples '#doc Documentation'
86
+ include_examples 'accepts values without munging',
87
+ %w(224.0.0.0 239.255.255.255)
88
+ include_examples 'rejects values', [[1], { two: :three }]
89
+ end
90
+
91
+ describe 'udp_port' do
92
+ let(:attribute) { :udp_port }
93
+ subject { described_class.attrclass(attribute) }
94
+
95
+ include_examples 'property'
96
+ include_examples '#doc Documentation'
97
+ include_examples 'accepts values without munging', [1024, 65_535]
98
+ include_examples 'rejects values', [[1], { foo: :bar }, 1023, 65_536, 'foo']
99
+ end
100
+ end
@@ -0,0 +1,73 @@
1
+ #
2
+ # Copyright (c) 2014, Arista Networks, Inc.
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are
7
+ # met:
8
+ #
9
+ # Redistributions of source code must retain the above copyright notice,
10
+ # this list of conditions and the following disclaimer.
11
+ #
12
+ # Redistributions in binary form must reproduce the above copyright
13
+ # notice, this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ #
16
+ # Neither the name of Arista Networks nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS
24
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30
+ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ #
32
+ # encoding: utf-8
33
+
34
+ require 'spec_helper'
35
+
36
+ describe Puppet::Type.type(:eos_vxlan_vlan) do
37
+ let(:catalog) { Puppet::Resource::Catalog.new }
38
+ let(:type) { described_class.new(name: '10', catalog: catalog) }
39
+
40
+ it_behaves_like 'an ensurable type', name: '10'
41
+
42
+ describe 'name' do
43
+ let(:attribute) { :name }
44
+ subject { described_class.attrclass(attribute) }
45
+
46
+ include_examples 'parameter'
47
+ include_examples '#doc Documentation'
48
+ include_examples 'rejects values', [{ two: :three }, 'abc']
49
+
50
+ [100, '100'].each do |val|
51
+ it "validates #{val.inspect} as isomorphic to '100'" do
52
+ type[attribute] = val
53
+ expect(type[attribute]).to eq(val.to_s)
54
+ end
55
+ end
56
+ end
57
+
58
+ describe 'vni' do
59
+ let(:attribute) { :vni }
60
+ subject { described_class.attrclass(attribute) }
61
+
62
+ include_examples 'property'
63
+ include_examples '#doc Documentation'
64
+ include_examples 'rejects values', [{ two: :three }, 'abc']
65
+
66
+ [100, '100'].each do |val|
67
+ it "validates #{val.inspect} as isomorphic to '100'" do
68
+ type[attribute] = val
69
+ expect(type[attribute]).to eq(val.to_s)
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,52 @@
1
+ #
2
+ # Copyright (c) 2015, Arista Networks, Inc.
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are
7
+ # met:
8
+ #
9
+ # Redistributions of source code must retain the above copyright notice,
10
+ # this list of conditions and the following disclaimer.
11
+ #
12
+ # Redistributions in binary form must reproduce the above copyright
13
+ # notice, this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ #
16
+ # Neither the name of Arista Networks nor the names of its
17
+ # contributors may be used to endorse or promote products derived from
18
+ # this software without specific prior written permission.
19
+ #
20
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS
24
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30
+ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ #
32
+ # encoding: utf-8
33
+
34
+ require 'spec_helper'
35
+
36
+ describe Puppet::Type.type(:eos_vxlan_vtep) do
37
+ let(:catalog) { Puppet::Resource::Catalog.new }
38
+ let(:type) { described_class.new(name: '1.1.1.1', catalog: catalog) }
39
+
40
+ it_behaves_like 'an ensurable type', name: '1.1.1.1'
41
+
42
+ describe 'name' do
43
+ let(:attribute) { :name }
44
+ subject { described_class.attrclass(attribute) }
45
+
46
+ include_examples 'parameter'
47
+ include_examples '#doc Documentation'
48
+ include_examples 'accepts values without munging',
49
+ %w(0.0.0.0 255.255.255.255)
50
+ include_examples 'rejects values', [[1], { two: :three }]
51
+ end
52
+ end
@@ -0,0 +1,12 @@
1
+ # The baseline for module testing used by Puppet Labs is that each manifest
2
+ # should have a corresponding test manifest that declares that class or defined
3
+ # type.
4
+ #
5
+ # Tests are then run by using puppet apply --noop (to check for compilation
6
+ # errors and view a log of events) or by fully applying the test in a virtual
7
+ # environment (to compare the resulting system state to the desired state).
8
+ #
9
+ # Learn more about module testing here:
10
+ # http://docs.puppetlabs.com/guides/tests_smoke.html
11
+ #
12
+ include eos
metadata ADDED
@@ -0,0 +1,437 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arista-eos
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Peter Sprygada
9
+ - John Corbin
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2015-07-09 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '1.3'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '1.3'
31
+ - !ruby/object:Gem::Dependency
32
+ name: rake
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: guard
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: guard-rspec
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ - !ruby/object:Gem::Dependency
80
+ name: guard-rubocop
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: pry-doc
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ - !ruby/object:Gem::Dependency
128
+ name: rspec-puppet
129
+ requirement: !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: rspec
145
+ requirement: !ruby/object:Gem::Requirement
146
+ none: false
147
+ requirements:
148
+ - - ~>
149
+ - !ruby/object:Gem::Version
150
+ version: 3.0.0
151
+ type: :development
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ~>
157
+ - !ruby/object:Gem::Version
158
+ version: 3.0.0
159
+ - !ruby/object:Gem::Dependency
160
+ name: puppetlabs_spec_helper
161
+ requirement: !ruby/object:Gem::Requirement
162
+ none: false
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ - !ruby/object:Gem::Dependency
176
+ name: simplecov
177
+ requirement: !ruby/object:Gem::Requirement
178
+ none: false
179
+ requirements:
180
+ - - ! '>='
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ - !ruby/object:Gem::Dependency
192
+ name: puppet
193
+ requirement: !ruby/object:Gem::Requirement
194
+ none: false
195
+ requirements:
196
+ - - ! '>='
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
199
+ type: :runtime
200
+ prerelease: false
201
+ version_requirements: !ruby/object:Gem::Requirement
202
+ none: false
203
+ requirements:
204
+ - - ! '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ description: Arista EOS Puppet modules to configure EOS devices
208
+ email:
209
+ - sprygada@arista.com
210
+ - jcorbin@arista.com
211
+ executables: []
212
+ extensions: []
213
+ extra_rdoc_files: []
214
+ files:
215
+ - .gitignore
216
+ - .rubocop.yml
217
+ - Gemfile
218
+ - Guardfile
219
+ - LICENSE
220
+ - README.md
221
+ - Rakefile
222
+ - eos.gemspec
223
+ - guide/.gitignore
224
+ - guide/Makefile
225
+ - guide/_static/arista_logo_jpg-11.jpg
226
+ - guide/_static/favicon.ico
227
+ - guide/conf.py
228
+ - guide/cookbook.rst
229
+ - guide/developing.rst
230
+ - guide/faq.rst
231
+ - guide/index.rst
232
+ - guide/installation.rst
233
+ - guide/license.rst
234
+ - guide/overview.rst
235
+ - guide/quickstart.rst
236
+ - guide/release-notes-1.0.rst
237
+ - guide/release-notes-1.1.rst
238
+ - guide/release-notes.rst
239
+ - guide/testing.rst
240
+ - guide/troubleshooting.rst
241
+ - guide/typedoc.rst
242
+ - guide/types.rst
243
+ - lib/eos.rb
244
+ - lib/eos/version.rb
245
+ - lib/puppet/provider/eos_acl_entry/default.rb
246
+ - lib/puppet/provider/eos_command/default.rb
247
+ - lib/puppet/provider/eos_ethernet/default.rb
248
+ - lib/puppet/provider/eos_interface/default.rb
249
+ - lib/puppet/provider/eos_ipinterface/default.rb
250
+ - lib/puppet/provider/eos_mlag/default.rb
251
+ - lib/puppet/provider/eos_mlag_interface/default.rb
252
+ - lib/puppet/provider/eos_ntp_config/default.rb
253
+ - lib/puppet/provider/eos_ntp_server/default.rb
254
+ - lib/puppet/provider/eos_portchannel/default.rb
255
+ - lib/puppet/provider/eos_snmp/default.rb
256
+ - lib/puppet/provider/eos_stp_interface/default.rb
257
+ - lib/puppet/provider/eos_switchport/default.rb
258
+ - lib/puppet/provider/eos_system/default.rb
259
+ - lib/puppet/provider/eos_vlan/default.rb
260
+ - lib/puppet/provider/eos_vxlan/default.rb
261
+ - lib/puppet/provider/eos_vxlan_vlan/default.rb
262
+ - lib/puppet/provider/eos_vxlan_vtep/default.rb
263
+ - lib/puppet/type/eos_acl_entry.rb
264
+ - lib/puppet/type/eos_command.rb
265
+ - lib/puppet/type/eos_ethernet.rb
266
+ - lib/puppet/type/eos_interface.rb
267
+ - lib/puppet/type/eos_ipinterface.rb
268
+ - lib/puppet/type/eos_mlag.rb
269
+ - lib/puppet/type/eos_mlag_interface.rb
270
+ - lib/puppet/type/eos_ntp_config.rb
271
+ - lib/puppet/type/eos_ntp_server.rb
272
+ - lib/puppet/type/eos_portchannel.rb
273
+ - lib/puppet/type/eos_snmp.rb
274
+ - lib/puppet/type/eos_stp_interface.rb
275
+ - lib/puppet/type/eos_switchport.rb
276
+ - lib/puppet/type/eos_system.rb
277
+ - lib/puppet/type/eos_vlan.rb
278
+ - lib/puppet/type/eos_vxlan.rb
279
+ - lib/puppet/type/eos_vxlan_vlan.rb
280
+ - lib/puppet/type/eos_vxlan_vtep.rb
281
+ - lib/puppet_x/eos/provider.rb
282
+ - lib/puppet_x/eos/utils/helpers.rb
283
+ - metadata.json
284
+ - spec/fixtures/README
285
+ - spec/fixtures/ethernet.json
286
+ - spec/fixtures/fixture_stp.yaml
287
+ - spec/fixtures/fixture_vxlan_get.yaml
288
+ - spec/fixtures/ospf.json
289
+ - spec/fixtures/snmp.json
290
+ - spec/fixtures/varp.json
291
+ - spec/spec_helper.rb
292
+ - spec/support/fixtures.rb
293
+ - spec/support/shared_examples_for_providers.rb
294
+ - spec/support/shared_examples_for_types.rb
295
+ - spec/unit/puppet/provider/eos_acl_entry/default_spec.rb
296
+ - spec/unit/puppet/provider/eos_acl_entry/fixture_acl_entry.yaml
297
+ - spec/unit/puppet/provider/eos_ethernet/default_spec.rb
298
+ - spec/unit/puppet/provider/eos_ethernet/fixture_ethernet.yaml
299
+ - spec/unit/puppet/provider/eos_interface/default_spec.rb
300
+ - spec/unit/puppet/provider/eos_interface/fixture_interfaces.yaml
301
+ - spec/unit/puppet/provider/eos_ipinterface/default_spec.rb
302
+ - spec/unit/puppet/provider/eos_ipinterface/fixture_ipinterfaces.yaml
303
+ - spec/unit/puppet/provider/eos_mlag/default_spec.rb
304
+ - spec/unit/puppet/provider/eos_mlag/fixture_mlag.yaml
305
+ - spec/unit/puppet/provider/eos_mlag_interface/default_spec.rb
306
+ - spec/unit/puppet/provider/eos_mlag_interface/fixture_mlag.yaml
307
+ - spec/unit/puppet/provider/eos_ntp_config/default_spec.rb
308
+ - spec/unit/puppet/provider/eos_ntp_config/fixture_ntp.yaml
309
+ - spec/unit/puppet/provider/eos_ntp_server/default_spec.rb
310
+ - spec/unit/puppet/provider/eos_ntp_server/fixture_ntp.yaml
311
+ - spec/unit/puppet/provider/eos_portchannel/default_spec.rb
312
+ - spec/unit/puppet/provider/eos_portchannel/fixture_portchannels.yaml
313
+ - spec/unit/puppet/provider/eos_snmp/default_spec.rb
314
+ - spec/unit/puppet/provider/eos_snmp/fixture_snmp.yaml
315
+ - spec/unit/puppet/provider/eos_stp_interface/default_spec.rb
316
+ - spec/unit/puppet/provider/eos_switchport/default_spec.rb
317
+ - spec/unit/puppet/provider/eos_switchport/fixture_switchports.yaml
318
+ - spec/unit/puppet/provider/eos_system/default_spec.rb
319
+ - spec/unit/puppet/provider/eos_system/fixture_system.yaml
320
+ - spec/unit/puppet/provider/eos_vlan/default_spec.rb
321
+ - spec/unit/puppet/provider/eos_vlan/fixture_vlans.yaml
322
+ - spec/unit/puppet/provider/eos_vxlan/default_spec.rb
323
+ - spec/unit/puppet/provider/eos_vxlan/fixture_vxlan.yaml
324
+ - spec/unit/puppet/provider/eos_vxlan_vlan/default_spec.rb
325
+ - spec/unit/puppet/provider/eos_vxlan_vtep/default_spec.rb
326
+ - spec/unit/puppet/type/eos_acl_entry_spec.rb
327
+ - spec/unit/puppet/type/eos_command_spec.rb
328
+ - spec/unit/puppet/type/eos_ethernet_spec.rb
329
+ - spec/unit/puppet/type/eos_interface_spec.rb
330
+ - spec/unit/puppet/type/eos_ipinterface_spec.rb
331
+ - spec/unit/puppet/type/eos_mlag_interface_spec.rb
332
+ - spec/unit/puppet/type/eos_mlag_spec.rb
333
+ - spec/unit/puppet/type/eos_ntp_config_spec.rb
334
+ - spec/unit/puppet/type/eos_ntp_server_spec.rb
335
+ - spec/unit/puppet/type/eos_portchannel_spec.rb
336
+ - spec/unit/puppet/type/eos_snmp_spec.rb
337
+ - spec/unit/puppet/type/eos_stp_interface_spec.rb
338
+ - spec/unit/puppet/type/eos_switchport_spec.rb
339
+ - spec/unit/puppet/type/eos_system_spec.rb
340
+ - spec/unit/puppet/type/eos_vlan_spec.rb
341
+ - spec/unit/puppet/type/eos_vxlan_spec.rb
342
+ - spec/unit/puppet/type/eos_vxlan_vlan_spec.rb
343
+ - spec/unit/puppet/type/eos_vxlan_vtep_spec.rb
344
+ - tests/init.pp
345
+ homepage: https://github.com/arista-eosplus/puppet-eos
346
+ licenses:
347
+ - BSD-3
348
+ post_install_message:
349
+ rdoc_options: []
350
+ require_paths:
351
+ - lib
352
+ required_ruby_version: !ruby/object:Gem::Requirement
353
+ none: false
354
+ requirements:
355
+ - - ! '>='
356
+ - !ruby/object:Gem::Version
357
+ version: '0'
358
+ segments:
359
+ - 0
360
+ hash: 2642287894463196807
361
+ required_rubygems_version: !ruby/object:Gem::Requirement
362
+ none: false
363
+ requirements:
364
+ - - ! '>='
365
+ - !ruby/object:Gem::Version
366
+ version: '0'
367
+ segments:
368
+ - 0
369
+ hash: 2642287894463196807
370
+ requirements: []
371
+ rubyforge_project:
372
+ rubygems_version: 1.8.23
373
+ signing_key:
374
+ specification_version: 3
375
+ summary: Type and provider implementation for Arista EOS devices
376
+ test_files:
377
+ - spec/fixtures/README
378
+ - spec/fixtures/ethernet.json
379
+ - spec/fixtures/fixture_stp.yaml
380
+ - spec/fixtures/fixture_vxlan_get.yaml
381
+ - spec/fixtures/ospf.json
382
+ - spec/fixtures/snmp.json
383
+ - spec/fixtures/varp.json
384
+ - spec/spec_helper.rb
385
+ - spec/support/fixtures.rb
386
+ - spec/support/shared_examples_for_providers.rb
387
+ - spec/support/shared_examples_for_types.rb
388
+ - spec/unit/puppet/provider/eos_acl_entry/default_spec.rb
389
+ - spec/unit/puppet/provider/eos_acl_entry/fixture_acl_entry.yaml
390
+ - spec/unit/puppet/provider/eos_ethernet/default_spec.rb
391
+ - spec/unit/puppet/provider/eos_ethernet/fixture_ethernet.yaml
392
+ - spec/unit/puppet/provider/eos_interface/default_spec.rb
393
+ - spec/unit/puppet/provider/eos_interface/fixture_interfaces.yaml
394
+ - spec/unit/puppet/provider/eos_ipinterface/default_spec.rb
395
+ - spec/unit/puppet/provider/eos_ipinterface/fixture_ipinterfaces.yaml
396
+ - spec/unit/puppet/provider/eos_mlag/default_spec.rb
397
+ - spec/unit/puppet/provider/eos_mlag/fixture_mlag.yaml
398
+ - spec/unit/puppet/provider/eos_mlag_interface/default_spec.rb
399
+ - spec/unit/puppet/provider/eos_mlag_interface/fixture_mlag.yaml
400
+ - spec/unit/puppet/provider/eos_ntp_config/default_spec.rb
401
+ - spec/unit/puppet/provider/eos_ntp_config/fixture_ntp.yaml
402
+ - spec/unit/puppet/provider/eos_ntp_server/default_spec.rb
403
+ - spec/unit/puppet/provider/eos_ntp_server/fixture_ntp.yaml
404
+ - spec/unit/puppet/provider/eos_portchannel/default_spec.rb
405
+ - spec/unit/puppet/provider/eos_portchannel/fixture_portchannels.yaml
406
+ - spec/unit/puppet/provider/eos_snmp/default_spec.rb
407
+ - spec/unit/puppet/provider/eos_snmp/fixture_snmp.yaml
408
+ - spec/unit/puppet/provider/eos_stp_interface/default_spec.rb
409
+ - spec/unit/puppet/provider/eos_switchport/default_spec.rb
410
+ - spec/unit/puppet/provider/eos_switchport/fixture_switchports.yaml
411
+ - spec/unit/puppet/provider/eos_system/default_spec.rb
412
+ - spec/unit/puppet/provider/eos_system/fixture_system.yaml
413
+ - spec/unit/puppet/provider/eos_vlan/default_spec.rb
414
+ - spec/unit/puppet/provider/eos_vlan/fixture_vlans.yaml
415
+ - spec/unit/puppet/provider/eos_vxlan/default_spec.rb
416
+ - spec/unit/puppet/provider/eos_vxlan/fixture_vxlan.yaml
417
+ - spec/unit/puppet/provider/eos_vxlan_vlan/default_spec.rb
418
+ - spec/unit/puppet/provider/eos_vxlan_vtep/default_spec.rb
419
+ - spec/unit/puppet/type/eos_acl_entry_spec.rb
420
+ - spec/unit/puppet/type/eos_command_spec.rb
421
+ - spec/unit/puppet/type/eos_ethernet_spec.rb
422
+ - spec/unit/puppet/type/eos_interface_spec.rb
423
+ - spec/unit/puppet/type/eos_ipinterface_spec.rb
424
+ - spec/unit/puppet/type/eos_mlag_interface_spec.rb
425
+ - spec/unit/puppet/type/eos_mlag_spec.rb
426
+ - spec/unit/puppet/type/eos_ntp_config_spec.rb
427
+ - spec/unit/puppet/type/eos_ntp_server_spec.rb
428
+ - spec/unit/puppet/type/eos_portchannel_spec.rb
429
+ - spec/unit/puppet/type/eos_snmp_spec.rb
430
+ - spec/unit/puppet/type/eos_stp_interface_spec.rb
431
+ - spec/unit/puppet/type/eos_switchport_spec.rb
432
+ - spec/unit/puppet/type/eos_system_spec.rb
433
+ - spec/unit/puppet/type/eos_vlan_spec.rb
434
+ - spec/unit/puppet/type/eos_vxlan_spec.rb
435
+ - spec/unit/puppet/type/eos_vxlan_vlan_spec.rb
436
+ - spec/unit/puppet/type/eos_vxlan_vtep_spec.rb
437
+ has_rdoc: