rbvppc 1.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +302 -0
- data/Rakefile +8 -0
- data/documentation/hmc.odt +0 -0
- data/documentation/lpar.odt +0 -0
- data/documentation/lun.odt +0 -0
- data/documentation/network.odt +0 -0
- data/documentation/nim.odt +0 -0
- data/documentation/vio.odt +0 -0
- data/documentation/vnic.odt +0 -0
- data/documentation/vscsi.odt +0 -0
- data/examples/add_disk_any_size_to_lpar.rb +46 -0
- data/examples/add_disk_specifing_size_to_lpar.rb +47 -0
- data/examples/remove_disks_and_delete_lpar.rb +35 -0
- data/examples/remove_disks_from_lpar.rb +33 -0
- data/examples/test_lpar_build.rb +83 -0
- data/lib/rbvppc/command_failure.rb +18 -0
- data/lib/rbvppc/connectable_server.rb +95 -0
- data/lib/rbvppc/hmc.rb +892 -0
- data/lib/rbvppc/lpar.rb +1140 -0
- data/lib/rbvppc/lun.rb +23 -0
- data/lib/rbvppc/network.rb +54 -0
- data/lib/rbvppc/nim.rb +442 -0
- data/lib/rbvppc/version.rb +10 -0
- data/lib/rbvppc/vio.rb +720 -0
- data/lib/rbvppc/vnic.rb +34 -0
- data/lib/rbvppc/vscsi.rb +36 -0
- data/lib/rbvppc.rb +28 -0
- data/rbvppc.gemspec +26 -0
- metadata +117 -0
data/lib/rbvppc/vnic.rb
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Authors: Christopher M Wood (<woodc@us.ibm.com>)
|
|
3
|
+
# John F Hutchinson (<jfhutchi@us.ibm.com)
|
|
4
|
+
# © Copyright IBM Corporation 2015.
|
|
5
|
+
#
|
|
6
|
+
# LICENSE: MIT (http://opensource.org/licenses/MIT)
|
|
7
|
+
#
|
|
8
|
+
class Vnic
|
|
9
|
+
|
|
10
|
+
attr_accessor :virtual_slot_num, :is_ieee, :vlan_id,
|
|
11
|
+
:additional_vlan_ids, :is_trunk, :is_required
|
|
12
|
+
|
|
13
|
+
def initialize(virtual_slot_num, is_ieee, vlan_id,
|
|
14
|
+
additional_vlan_ids, is_trunk, is_required)
|
|
15
|
+
#Test for the explicitly required parameters
|
|
16
|
+
raise StandardError.new("A vNIC cannot be defined without a virtual_slot_num") if virtual_slot_num.nil?
|
|
17
|
+
raise StandardError.new("A vNIC cannot be defined without a vlan_id") if vlan_id.nil?
|
|
18
|
+
raise StandardError.new("A vNIC cannot be defined without specifying is_trunk") if is_trunk.nil?
|
|
19
|
+
raise StandardError.new("A vNIC cannot be defined without specifying is_required") if is_required.nil?
|
|
20
|
+
|
|
21
|
+
is_ieee ||= 1
|
|
22
|
+
is_trunk ||= 0
|
|
23
|
+
is_required ||= 1
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@virtual_slot_num = virtual_slot_num.to_i
|
|
27
|
+
@is_ieee = is_ieee.to_i
|
|
28
|
+
@vlan_id = vlan_id.to_i
|
|
29
|
+
@additional_vlan_ids = additional_vlan_ids
|
|
30
|
+
@is_trunk = is_trunk.to_i
|
|
31
|
+
@is_required = is_required.to_i
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
data/lib/rbvppc/vscsi.rb
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Authors: Christopher M Wood (<woodc@us.ibm.com>)
|
|
3
|
+
# John F Hutchinson (<jfhutchi@us.ibm.com)
|
|
4
|
+
# © Copyright IBM Corporation 2015.
|
|
5
|
+
#
|
|
6
|
+
# LICENSE: MIT (http://opensource.org/licenses/MIT)
|
|
7
|
+
#
|
|
8
|
+
class Vscsi
|
|
9
|
+
|
|
10
|
+
attr_accessor :virtual_slot_num,
|
|
11
|
+
:client_or_server,
|
|
12
|
+
:remote_lpar_id,
|
|
13
|
+
:remote_lpar_name,
|
|
14
|
+
:remote_slot_num,
|
|
15
|
+
:is_required
|
|
16
|
+
|
|
17
|
+
def initialize(virtual_slot_num, client_or_server, remote_lpar_id,
|
|
18
|
+
remote_lpar_name, remote_slot_num, is_required)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
#Test for the explicitly required parameters
|
|
22
|
+
raise StandardError.new("A vSCSI cannot be defined without a virtual_slot_num") if virtual_slot_num.nil?
|
|
23
|
+
raise StandardError.new("A vSCSI cannot be defined without a client_or_server") if client_or_server.nil?
|
|
24
|
+
raise StandardError.new("A vSCSI cannot be defined without a remote_lpar_id") if remote_lpar_id.nil?
|
|
25
|
+
raise StandardError.new("A vSCSI cannot be defined without a remote_lpar_name") if remote_lpar_name.nil?
|
|
26
|
+
raise StandardError.new("A vSCSI cannot be defined without specifying is_required") if is_required.nil?
|
|
27
|
+
|
|
28
|
+
@virtual_slot_num = virtual_slot_num
|
|
29
|
+
@client_or_server = client_or_server
|
|
30
|
+
@remote_lpar_id = remote_lpar_id
|
|
31
|
+
@remote_lpar_name = remote_lpar_name
|
|
32
|
+
@remote_slot_num = remote_slot_num
|
|
33
|
+
@is_required = is_required
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
data/lib/rbvppc.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Authors: Christopher M Wood (<woodc@us.ibm.com>)
|
|
3
|
+
# John F Hutchinson (<jfhutchi@us.ibm.com)
|
|
4
|
+
# © Copyright IBM Corporation 2015.
|
|
5
|
+
#
|
|
6
|
+
# LICENSE: MIT (http://opensource.org/licenses/MIT)
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
require "rbvppc/version"
|
|
10
|
+
require "rbvppc/command_failure"
|
|
11
|
+
require "rbvppc/connectable_server"
|
|
12
|
+
require "rbvppc/hmc"
|
|
13
|
+
require "rbvppc/lun"
|
|
14
|
+
require "rbvppc/lpar"
|
|
15
|
+
require "rbvppc/nim"
|
|
16
|
+
require "rbvppc/vio"
|
|
17
|
+
require "rbvppc/vscsi"
|
|
18
|
+
require "rbvppc/vnic"
|
|
19
|
+
require "rbvppc/network"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
module Rbvppc
|
|
23
|
+
|
|
24
|
+
#TO-DO: Implement this function
|
|
25
|
+
def self.help
|
|
26
|
+
puts "Help function not implemented yet"
|
|
27
|
+
end
|
|
28
|
+
end
|
data/rbvppc.gemspec
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'rbvppc/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "rbvppc"
|
|
8
|
+
spec.version = Rbvppc::VERSION
|
|
9
|
+
spec.authors = ["John F. Hutchinson, Chris Wood"]
|
|
10
|
+
spec.email = ["jfhutchi@us.ibm.com, woodc@us.ibm.com"]
|
|
11
|
+
spec.summary = %q{Remote access library for IBM P-Series}
|
|
12
|
+
spec.description = %q{This gem provides remote access to IBM P-Series}
|
|
13
|
+
spec.homepage = "https://github.com/pseries/rbvppc"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_dependency('net-ssh', "~> 2.8")
|
|
22
|
+
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
|
24
|
+
spec.add_development_dependency "rake", "~> 0"
|
|
25
|
+
spec.required_ruby_version = '>= 2.1.0'
|
|
26
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rbvppc
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- John F. Hutchinson, Chris Wood
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: net-ssh
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '2.8'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '2.8'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.5'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.5'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
description: This gem provides remote access to IBM P-Series
|
|
56
|
+
email:
|
|
57
|
+
- jfhutchi@us.ibm.com, woodc@us.ibm.com
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- Gemfile
|
|
64
|
+
- LICENSE.txt
|
|
65
|
+
- README.md
|
|
66
|
+
- Rakefile
|
|
67
|
+
- documentation/hmc.odt
|
|
68
|
+
- documentation/lpar.odt
|
|
69
|
+
- documentation/lun.odt
|
|
70
|
+
- documentation/network.odt
|
|
71
|
+
- documentation/nim.odt
|
|
72
|
+
- documentation/vio.odt
|
|
73
|
+
- documentation/vnic.odt
|
|
74
|
+
- documentation/vscsi.odt
|
|
75
|
+
- examples/add_disk_any_size_to_lpar.rb
|
|
76
|
+
- examples/add_disk_specifing_size_to_lpar.rb
|
|
77
|
+
- examples/remove_disks_and_delete_lpar.rb
|
|
78
|
+
- examples/remove_disks_from_lpar.rb
|
|
79
|
+
- examples/test_lpar_build.rb
|
|
80
|
+
- lib/rbvppc.rb
|
|
81
|
+
- lib/rbvppc/command_failure.rb
|
|
82
|
+
- lib/rbvppc/connectable_server.rb
|
|
83
|
+
- lib/rbvppc/hmc.rb
|
|
84
|
+
- lib/rbvppc/lpar.rb
|
|
85
|
+
- lib/rbvppc/lun.rb
|
|
86
|
+
- lib/rbvppc/network.rb
|
|
87
|
+
- lib/rbvppc/nim.rb
|
|
88
|
+
- lib/rbvppc/version.rb
|
|
89
|
+
- lib/rbvppc/vio.rb
|
|
90
|
+
- lib/rbvppc/vnic.rb
|
|
91
|
+
- lib/rbvppc/vscsi.rb
|
|
92
|
+
- rbvppc.gemspec
|
|
93
|
+
homepage: https://github.com/pseries/rbvppc
|
|
94
|
+
licenses:
|
|
95
|
+
- MIT
|
|
96
|
+
metadata: {}
|
|
97
|
+
post_install_message:
|
|
98
|
+
rdoc_options: []
|
|
99
|
+
require_paths:
|
|
100
|
+
- lib
|
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
|
+
requirements:
|
|
103
|
+
- - ">="
|
|
104
|
+
- !ruby/object:Gem::Version
|
|
105
|
+
version: 2.1.0
|
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
requirements: []
|
|
112
|
+
rubyforge_project:
|
|
113
|
+
rubygems_version: 2.2.2
|
|
114
|
+
signing_key:
|
|
115
|
+
specification_version: 4
|
|
116
|
+
summary: Remote access library for IBM P-Series
|
|
117
|
+
test_files: []
|