knife-ucs 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in knife-ucs.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ Knife UCS (alpha)
2
+ ===============
3
+
4
+ This is a Chef Knife plugin for Cisco UCS inspired by knife-openstack (Matt Ray @Opscode). This plugin gives knife the ability to provision, list, and manage Cisco UCS. It leverages UCSlib (http://github.com/murraju/ucslib).
5
+
6
+ # Installation #
7
+
8
+ Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:
9
+
10
+ $ gem install chef
11
+
12
+ This plugin is distributed as a Ruby Gem. To install it, run:
13
+
14
+ $ gem install knife-ucs
15
+
16
+ Depending on your system's configuration, you may need to run this command with root privileges.
17
+
18
+ # Configuration #
19
+
20
+ In order to communicate with Cisco UCS XMO API you will have to tell Knife the username, password and the IP address of the UCS Manager. The easiest way to accomplish this is to create some entries in your `knife.rb` file:
21
+
22
+ knife[:ucsm_username] = "Your UCSM username"
23
+ knife[:ucsm_password] = "Your UCSM password"
24
+ knife[:ucsm_host] = "Your IP address or UCSM hostname"
25
+
26
+ If your knife.rb file will be checked into a SCM system (ie readable by others) you may want to read the values from environment variables:
27
+
28
+ knife[:ucsm_username] = "#{ENV['UCSM_USERNAME']}"
29
+ knife[:ucsm_password] = "#{ENV['UCSM_PASSWORD']}"
30
+ knife[:ucsm_host] = "#{ENV['UCSM_HOST']}"
31
+
32
+
33
+
34
+ # Subcommands #
35
+
36
+ This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a `--help` flag
37
+
38
+ Examples:
39
+
40
+ knife openstack ucs blades list
41
+ -----------------------------
42
+
43
+ List blade information:
44
+
45
+ -> knife ucs blades list
46
+ ID Model Serial CPUs Memory[MB] Adaptors EtnernetIfs FCifs Availability Power
47
+ 1/6 N20-B6620-1 582 1 4096 1 2 0 available off
48
+ 1/2 N20-B6620-1 579 1 4096 1 2 2 available off
49
+ 1/7 N20-B6620-1 583 1 4096 1 2 2 available off
50
+ 1/8 N20-B6730-1 585 1 8192 1 0 0 unavailable off
51
+ 1/1 N20-B6620-1 577 2 8192 1 3 0 unavailable on
52
+ 1/5 N20-B6620-1 581 1 4096 1 2 2 available off
53
+ 1/3 B230-BASE-M2 578 1 16384 1 2 0 available off
54
+ 1/4 N20-B6620-1 580 1 4096 1 2 2 available off
55
+ ->
56
+
57
+
58
+
59
+ # License #
60
+
61
+ Author:: Murali Raju <murali.raju@appliv.com>
62
+
63
+ Copyright:: Copyright (c) 2012 Murali Raju.
64
+
65
+ License:: Apache License, Version 2.0
66
+
67
+ Licensed under the Apache License, Version 2.0 (the "License");
68
+ you may not use this file except in compliance with the License.
69
+ You may obtain a copy of the License at
70
+
71
+ http://www.apache.org/licenses/LICENSE-2.0
72
+
73
+ Unless required by applicable law or agreed to in writing, software
74
+ distributed under the License is distributed on an "AS IS" BASIS,
75
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
+ See the License for the specific language governing permissions and
77
+ limitations under the License.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/knife-ucs.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "knife-ucs/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "knife-ucs"
7
+ s.version = Knife::Ucs::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.has_rdoc = true
10
+ s.extra_rdoc_files = ["README.md", "LICENSE" ]
11
+ s.authors = ["Murali Raju"]
12
+ s.email = ["murraju@appliv.com"]
13
+ s.homepage = "https://github.com/murraju/knife-ucs"
14
+ s.summary = %q{Cisco UCS Support for Chef's Knife Command}
15
+ s.description = s.summary
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency "nokogiri", "~> 1.5.2"
23
+ s.add_dependency "rest-client", "~> 1.6.7"
24
+ s.add_dependency "ucslib", "~> 0.0.6"
25
+ end
@@ -0,0 +1,101 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife'
19
+ require 'ucslib'
20
+
21
+ class Chef
22
+ class Knife
23
+ module UCSBase
24
+
25
+ def self.included(includer)
26
+ includer.class_eval do
27
+
28
+ deps do
29
+ require 'readline'
30
+ require 'chef/json_compat'
31
+ end
32
+
33
+ option :ucsm_username,
34
+ :short => "-U USERNAME",
35
+ :long => "--cisco-ucsm-username USERNAME",
36
+ :description => "Your Cisco UCS Manager Username",
37
+ :proc => Proc.new { |key| Chef::Config[:knife][:ucsm_username] = key }
38
+
39
+ option :ucsm_password,
40
+ :short => "-P PASSWORD",
41
+ :long => "--cisco-ucsm-password PASSWORD",
42
+ :description => "Your Cisco UCS Manager password",
43
+ :proc => Proc.new { |key| Chef::Config[:knife][:ucsm_password] = key }
44
+
45
+ option :ucsm_host,
46
+ :short => "-H HOST",
47
+ :long => "--cisco-ucsm-host HOST",
48
+ :description => "Your Cisco UCS Manager FI name or IP address",
49
+ :proc => Proc.new { |endpoint| Chef::Config[:knife][:ucsm_host] = endpoint }
50
+
51
+
52
+ end
53
+ end
54
+
55
+ def connection
56
+ ucs_session = UCSToken.new
57
+ @connection ||= begin
58
+ connection = ucs_session.get_token({
59
+ :username => Chef::Config[:knife][:ucsm_username],
60
+ :password => Chef::Config[:knife][:ucsm_password],
61
+ :ip => Chef::Config[:knife][:ucsm_host]
62
+ }.to_json)
63
+ end
64
+ end
65
+
66
+ #Intialize Inventory and Provisioner objects
67
+ def inventory
68
+ ucs_inventory = UCSInventory.new
69
+ @inventory ||= begin
70
+ inventory = ucs_inventory.discover(connection)
71
+ end
72
+ end
73
+
74
+ def provisioner
75
+ @provisioner ||= begin
76
+ provisioner = UCSProvision.new(connection)
77
+ end
78
+ end
79
+
80
+ def destroyer
81
+ @destroyer ||= begin
82
+ destroyer = UCSDestroy.new(connection)
83
+ end
84
+ end
85
+
86
+ def locate_config_value(key)
87
+ key = key.to_sym
88
+ Chef::Config[:knife][key] || config[key]
89
+ end
90
+
91
+ def msg_pair(label, value, color=:cyan)
92
+ if value && !value.to_s.empty?
93
+ puts "#{ui.color(label, color)}: #{value}"
94
+ end
95
+ end
96
+
97
+ end
98
+ end
99
+ end
100
+
101
+
@@ -0,0 +1,75 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ require 'chef/knife/ucs_base'
18
+
19
+ class Chef
20
+ class Knife
21
+ class UcsBladesList < Knife
22
+
23
+ include Knife::UCSBase
24
+
25
+ banner "knife ucs blades list"
26
+
27
+ def run
28
+ $stdout.sync = true
29
+
30
+
31
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
32
+
33
+ blades_list = [
34
+ ui.color('ID', :bold),
35
+ ui.color('Model', :bold),
36
+ ui.color('Serial', :bold),
37
+ ui.color('CPUs', :bold),
38
+ ui.color('Memory[MB]', :bold),
39
+ ui.color('Adaptors', :bold),
40
+ ui.color('EtnernetIfs', :bold),
41
+ ui.color('FCifs', :bold),
42
+ ui.color('Availability', :bold),
43
+ ui.color('Power', :bold)
44
+ ]
45
+
46
+ inventory.xpath("configResolveClasses/outConfigs/computeBlade").each do |blade|
47
+ blades_list << "#{blade.attributes["serverId"]}"
48
+ blades_list << "#{blade.attributes["model"]}"
49
+ blades_list << "#{blade.attributes["serial"]}"
50
+ blades_list << "#{blade.attributes["numOfCpus"]}"
51
+ blades_list << "#{blade.attributes["availableMemory"]}"
52
+ blades_list << "#{blade.attributes["numOfAdaptors"]}"
53
+ blades_list << "#{blade.attributes["numOfEthHostIfs"]}"
54
+ blades_list << "#{blade.attributes["numOfFcHostIfs"]}"
55
+ blades_list << "#{blade.attributes["availability"]}"
56
+ blades_list << begin
57
+ power = "#{blade.attributes["operPower"]}"
58
+ case power
59
+ when 'off'
60
+ ui.color(power, :red)
61
+ when 'pending'
62
+ ui.color(power, :yellow)
63
+ else
64
+ ui.color(power, :green)
65
+ end
66
+ end
67
+ end
68
+ puts ui.list(blades_list, :uneven_columns_across, 10)
69
+
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+
@@ -0,0 +1,59 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsCpusList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs cpus list"
27
+
28
+ def run
29
+ $stdout.sync = true
30
+
31
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
32
+
33
+ cpus_list = [
34
+ ui.color('ID', :bold),
35
+ ui.color('Model', :bold),
36
+ ui.color('Architecture', :bold),
37
+ ui.color('Cores', :bold),
38
+ ui.color('EnabledCores', :bold),
39
+ ui.color('Speed', :bold),
40
+ ui.color('Threads', :bold),
41
+ ui.color('Vendor', :bold)
42
+ ]
43
+
44
+ inventory.xpath("configResolveClasses/outConfigs/processorUnit").each do |processorunit|
45
+ cpus_list << "#{processorunit.attributes["id"]}"
46
+ cpus_list << "#{processorunit.attributes["model"]}"
47
+ cpus_list << "#{processorunit.attributes["arch"]}"
48
+ cpus_list << "#{processorunit.attributes["cores"]}"
49
+ cpus_list << "#{processorunit.attributes["coresEnabled"]}"
50
+ cpus_list << "#{processorunit.attributes["speed"]}"
51
+ cpus_list << "#{processorunit.attributes["threads"]}"
52
+ cpus_list << "#{processorunit.attributes["vendor"]}"
53
+ end
54
+ puts ui.list(cpus_list, :uneven_columns_across, 8)
55
+
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,63 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsOrgCreate < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ deps do
27
+ require 'readline'
28
+ require 'chef/json_compat'
29
+ require 'chef/knife/bootstrap'
30
+ Chef::Knife::Bootstrap.load_deps
31
+ end
32
+
33
+ banner "knife ucs org create (options)"
34
+
35
+ attr_accessor :initial_sleep_delay
36
+
37
+ option :org,
38
+ :short => "-O ORG",
39
+ :long => "--org ORG",
40
+ :description => "The sub organization",
41
+ :proc => Proc.new { |f| Chef::Config[:knife][:orgs] = f }
42
+
43
+
44
+ def run
45
+ $stdout.sync = true
46
+
47
+ xml_response = provisioner.create_org({:org => Chef::Config[:knife][:org]}.to_json)
48
+ xml_doc = Nokogiri::XML(xml_response)
49
+
50
+ xml_doc.xpath("configConfMos/outConfigs/pair/orgOrg").each do |org|
51
+ puts ''
52
+ puts "Org: #{ui.color("#{org.attributes['name']}", :magenta)} status: #{ui.color("#{org.attributes['status']}", :green)}"
53
+ end
54
+
55
+ #Ugly...refactor later to parse error with better exception handling. Nokogiri xpath search for elements might be an option
56
+ xml_doc.xpath("configConfMos").each do |org|
57
+ puts "#{org.attributes['errorCode']} #{ui.color("#{org.attributes['errorDescr']}", :red)}"
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,64 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsOrgDelete < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ deps do
27
+ require 'readline'
28
+ require 'chef/json_compat'
29
+ require 'chef/knife/bootstrap'
30
+ Chef::Knife::Bootstrap.load_deps
31
+ end
32
+
33
+ banner "knife ucs org delete (options)"
34
+
35
+ attr_accessor :initial_sleep_delay
36
+
37
+ option :org,
38
+ :short => "-O ORG",
39
+ :long => "--org ORG",
40
+ :description => "The sub organization",
41
+ :proc => Proc.new { |f| Chef::Config[:knife][:org] = f }
42
+
43
+
44
+ def run
45
+ $stdout.sync = true
46
+
47
+ xml_response = destroyer.delete_org({:org => Chef::Config[:knife][:org]}.to_json)
48
+ xml_doc = Nokogiri::XML(xml_response)
49
+
50
+ xml_doc.xpath("configConfMos/outConfigs/pair/orgOrg").each do |org|
51
+ puts ''
52
+ puts "Org: #{ui.color("#{org.attributes['name']}", :magenta)} status: #{ui.color("#{org.attributes['status']}", :red)}"
53
+ end
54
+
55
+ #Ugly...refactor later to parse error with better exception handling. Nokogiri xpath search for elements might be an option
56
+ xml_doc.xpath("configConfMos").each do |org|
57
+ puts "#{org.attributes['errorCode']} #{ui.color("#{org.attributes['errorDescr']}", :red)}"
58
+ end
59
+
60
+
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,49 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsOrgsList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs orgs list"
27
+
28
+ def run
29
+ $stdout.sync = true
30
+
31
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
32
+
33
+ orgs_list = [
34
+ ui.color('Path', :bold),
35
+ ui.color('Level', :bold),
36
+ ui.color('Name', :bold)
37
+ ]
38
+
39
+ inventory.xpath("configResolveClasses/outConfigs/orgOrg").each do |org|
40
+ orgs_list << "#{org.attributes["dn"]}"
41
+ orgs_list << "#{org.attributes["level"]}"
42
+ orgs_list << "#{org.attributes["name"]}"
43
+ end
44
+ puts ui.list(orgs_list, :uneven_columns_across, 3)
45
+
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,49 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsFirmwareList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs firmware list"
27
+
28
+ def run
29
+
30
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
31
+ firmware_list = [
32
+ ui.color('Firmware', :bold),
33
+ ui.color('Type', :bold),
34
+ ui.color('Version', :bold),
35
+ ui.color('PackageVersion', :bold)
36
+ ]
37
+
38
+ inventory.xpath("configResolveClasses/outConfigs/firmwareRunning").each do |firmware|
39
+ firmware_list << "#{firmware.attributes["dn"]}"
40
+ firmware_list << "#{firmware.attributes["type"]}"
41
+ firmware_list << "#{firmware.attributes["version"]}"
42
+ firmware_list << "#{firmware.attributes["packageVersion"]}"
43
+ end
44
+ puts ui.list(firmware_list, :uneven_columns_across, 4)
45
+
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,53 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsServiceProfileCreate < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ deps do
27
+ require 'readline'
28
+ require 'chef/json_compat'
29
+ require 'chef/knife/bootstrap'
30
+ Chef::Knife::Bootstrap.load_deps
31
+ end
32
+
33
+ banner "knife ucs serviceprofile create (options)"
34
+
35
+ attr_accessor :initial_sleep_delay
36
+
37
+ option :name,
38
+ :short => "-n NAME",
39
+ :long => "--spname SERVICEPROFILENAME",
40
+ :description => "The name of the service profile name",
41
+ :proc => Proc.new { |f| Chef::Config[:knife][:flavor] = f }
42
+
43
+
44
+
45
+ def run
46
+ $stdout.sync = true
47
+
48
+
49
+ end
50
+
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,37 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsServiceProfileDelete < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs serviceprofile delete SERVICEPROFILE [SERVICEPROFILE] (options)"
27
+
28
+ def run
29
+
30
+
31
+
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+
@@ -0,0 +1,65 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsServiceprofilesList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs serviceprofiles list"
27
+
28
+ def run
29
+
30
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
31
+
32
+ serviceprofile_list = [
33
+ ui.color('Name', :bold),
34
+ ui.color('Path', :bold),
35
+ ui.color('UUID', :bold),
36
+ ui.color('BootPolicy', :bold),
37
+ ui.color('State', :bold),
38
+ ui.color('Association', :bold)
39
+ ]
40
+
41
+ inventory.xpath("configResolveClasses/outConfigs/lsServer").each do |serviceprofile|
42
+ serviceprofile_list << "#{serviceprofile.attributes["name"]}"
43
+ serviceprofile_list << "#{serviceprofile.attributes["dn"]}"
44
+ serviceprofile_list << "#{serviceprofile.attributes["uuid"]}"
45
+ serviceprofile_list << "#{serviceprofile.attributes["operBootPolicyName"]}"
46
+ serviceprofile_list << "#{serviceprofile.attributes["operState"]}"
47
+ serviceprofile_list << begin
48
+ state = "#{serviceprofile.attributes["assocState"]}"
49
+ case state
50
+ when 'associated'
51
+ ui.color(state, :green)
52
+ when 'associating'
53
+ ui.color(state, :yellow)
54
+ else
55
+ ui.color(state, :red)
56
+ end
57
+ end
58
+ end
59
+ puts ui.list(serviceprofile_list, :uneven_columns_across, 6)
60
+
61
+
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,68 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsVlanCreate < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ deps do
27
+ require 'readline'
28
+ require 'chef/json_compat'
29
+ require 'chef/knife/bootstrap'
30
+ Chef::Knife::Bootstrap.load_deps
31
+ end
32
+
33
+ banner "knife ucs vlan create (options)"
34
+
35
+ attr_accessor :initial_sleep_delay
36
+
37
+ option :vlanid,
38
+ :long => "--vlanid VLANID",
39
+ :description => "The VLAN ID",
40
+ :proc => Proc.new { |f| Chef::Config[:knife][:vlanid] = f }
41
+
42
+ option :vlanname,
43
+ :long => "--vlanname VLANNAME",
44
+ :description => "The VLAN NAME",
45
+ :proc => Proc.new { |f| Chef::Config[:knife][:vlanname] = f }
46
+
47
+ def run
48
+ $stdout.sync = true
49
+
50
+ json = {:vlan_id => Chef::Config[:knife][:vlanid], :vlan_name => Chef::Config[:knife][:vlanname] }.to_json
51
+
52
+ xml_response = provisioner.create_vlan(json)
53
+ xml_doc = Nokogiri::XML(xml_response)
54
+ xml_doc.xpath("configConfMos/outConfigs/pair/fabricVlan").each do |org|
55
+ puts ''
56
+ puts "VLAN ID: #{ui.color("#{org.attributes['id']}", :magenta)} NAME: #{ui.color("#{org.attributes['name']}", :magenta)}" +
57
+ " status: #{ui.color("#{org.attributes['status']}", :green)}"
58
+ end
59
+
60
+ #Ugly...refactor later to parse error with better exception handling. Nokogiri xpath search for elements might be an option
61
+ xml_doc.xpath("configConfMos").each do |org|
62
+ puts "#{org.attributes['errorCode']} #{ui.color("#{org.attributes['errorDescr']}", :red)}"
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,69 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsVlanDelete < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ deps do
27
+ require 'readline'
28
+ require 'chef/json_compat'
29
+ require 'chef/knife/bootstrap'
30
+ Chef::Knife::Bootstrap.load_deps
31
+ end
32
+
33
+ banner "knife ucs vlan delete (options)"
34
+
35
+ attr_accessor :initial_sleep_delay
36
+
37
+ option :vlanid,
38
+ :long => "--vlanid VLANID",
39
+ :description => "The VLAN ID",
40
+ :proc => Proc.new { |f| Chef::Config[:knife][:vlanid] = f }
41
+
42
+ option :vlanname,
43
+ :long => "--vlanname VLANNAME",
44
+ :description => "The VLAN NAME",
45
+ :proc => Proc.new { |f| Chef::Config[:knife][:vlanname] = f }
46
+
47
+ def run
48
+ $stdout.sync = true
49
+
50
+ json = {:vlan_id => Chef::Config[:knife][:vlanid], :vlan_name => Chef::Config[:knife][:vlanname] }.to_json
51
+
52
+ xml_response = destroyer.delete_vlan(json)
53
+ xml_doc = Nokogiri::XML(xml_response)
54
+
55
+ xml_doc.xpath("configConfMos/outConfigs/pair/fabricVlan").each do |org|
56
+ puts ''
57
+ puts "VLAN ID: #{ui.color("#{org.attributes['id']}", :magenta)} NAME: #{ui.color("#{org.attributes['name']}", :magenta)}" +
58
+ " status: #{ui.color("#{org.attributes['status']}", :red)}"
59
+ end
60
+
61
+ #Ugly...refactor later to parse error with better exception handling. Nokogiri xpath search for elements might be an option
62
+ xml_doc.xpath("configConfMos").each do |org|
63
+ puts "#{org.attributes['errorCode']} #{ui.color("#{org.attributes['errorDescr']}", :red)}"
64
+ end
65
+
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,47 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsVlansList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs vlans list"
27
+
28
+ def run
29
+ $stdout.sync = true
30
+
31
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
32
+
33
+ vlans_list = [
34
+ ui.color('ID', :bold),
35
+ ui.color('Name', :bold)
36
+ ]
37
+
38
+ inventory.xpath("configResolveClasses/outConfigs/fabricVlan").each do |fabricvlan|
39
+ vlans_list << "#{fabricvlan.attributes["id"]}"
40
+ vlans_list << "#{fabricvlan.attributes["name"]}"
41
+ end
42
+ puts ui.list(vlans_list, :columns_across, 2)
43
+
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,47 @@
1
+ # Author:: Murali Raju (<murali.raju@appliv.com>)
2
+ # Copyright:: Copyright (c) 2012 Murali Raju.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'chef/knife/ucs_base'
19
+
20
+ class Chef
21
+ class Knife
22
+ class UcsVsansList < Knife
23
+
24
+ include Knife::UCSBase
25
+
26
+ banner "knife ucs vsans list"
27
+
28
+ def run
29
+ $stdout.sync = true
30
+
31
+ #Using Chef's UI (much better looking:)) instead of list methods provided by ucslib.
32
+
33
+ vsans_list = [
34
+ ui.color('ID', :bold),
35
+ ui.color('Name', :bold)
36
+ ]
37
+
38
+ inventory.xpath("configResolveClasses/outConfigs/fabricVsan").each do |fabricvsan|
39
+ vsans_list << "#{fabricvsan.attributes["id"]}"
40
+ vsans_list << "#{fabricvsan.attributes["name"]}"
41
+ end
42
+ puts ui.list(vsans_list, :columns_across, 2)
43
+
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,6 @@
1
+ module Knife
2
+ module Ucs
3
+ VERSION = "0.0.1"
4
+ MAJOR, MINOR, TINY = VERSION.split('.')
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: knife-ucs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Murali Raju
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: &70353196021020 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.5.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70353196021020
25
+ - !ruby/object:Gem::Dependency
26
+ name: rest-client
27
+ requirement: &70353196018380 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 1.6.7
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70353196018380
36
+ - !ruby/object:Gem::Dependency
37
+ name: ucslib
38
+ requirement: &70353196016100 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.6
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70353196016100
47
+ description: Cisco UCS Support for Chef's Knife Command
48
+ email:
49
+ - murraju@appliv.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files:
53
+ - README.md
54
+ - LICENSE
55
+ files:
56
+ - .gitignore
57
+ - Gemfile
58
+ - LICENSE
59
+ - README.md
60
+ - Rakefile
61
+ - knife-ucs.gemspec
62
+ - lib/chef/knife/ucs_base.rb
63
+ - lib/chef/knife/ucs_blades_list.rb
64
+ - lib/chef/knife/ucs_cpus_list.rb
65
+ - lib/chef/knife/ucs_org_create.rb
66
+ - lib/chef/knife/ucs_org_delete.rb
67
+ - lib/chef/knife/ucs_orgs_list.rb
68
+ - lib/chef/knife/ucs_runningfirmware_list.rb
69
+ - lib/chef/knife/ucs_serviceprofile_create.rb
70
+ - lib/chef/knife/ucs_serviceprofile_delete.rb
71
+ - lib/chef/knife/ucs_serviceprofiles_list.rb
72
+ - lib/chef/knife/ucs_vlan_create.rb
73
+ - lib/chef/knife/ucs_vlan_delete.rb
74
+ - lib/chef/knife/ucs_vlans_list.rb
75
+ - lib/chef/knife/ucs_vsans_list.rb
76
+ - lib/knife-ucs/version.rb
77
+ homepage: https://github.com/murraju/knife-ucs
78
+ licenses: []
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 1.8.10
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: Cisco UCS Support for Chef's Knife Command
101
+ test_files: []