blackstack-nodes 1.2.1 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blackstack-nodes.rb +9 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b715095e772fb75530a3e4340f703a8581b6784f3596cfa412a7528fbd2a865
|
4
|
+
data.tar.gz: ce11f94afead91279cd7e5e1a793c8030c42bfc17f35dee3a5806d4e56460b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 277fd5c174de605aca61735767fcdfbd3643b48663cef5132a4d08c94d5a654374fac6c86c003f98632e55f2eefeab19a23c801e7b7cf3df9b67f0b7b17701da
|
7
|
+
data.tar.gz: 9f068a0b5852259d7e5c79a1f1e1c3647b53bcbdea66d8f1b0c05361629cbe88872cdace540bf14dec94685c268823bccea6f2561895fe04ee5c6060ea82222c
|
data/lib/blackstack-nodes.rb
CHANGED
@@ -6,6 +6,9 @@ module BlackStack
|
|
6
6
|
module Infrastructure
|
7
7
|
# this module has attributes an methods used by both classes Node and Node.
|
8
8
|
module NodeModule
|
9
|
+
# :name is this is just a descriptive name for the node. It is not the host name, nor the domain, nor any ip.
|
10
|
+
attr_accessor :name, :net_remote_ip, :ssh_username, :ssh_password, :ssh_port, :ssh_private_key_file
|
11
|
+
# non-database attributes, used for ssh connection and logging
|
9
12
|
attr_accessor :ssh, :logger
|
10
13
|
|
11
14
|
def self.descriptor_errors(h)
|
@@ -14,6 +17,12 @@ module BlackStack
|
|
14
17
|
# validate: the parameter h is a hash
|
15
18
|
errors << "The parameter h is not a hash" unless h.is_a?(Hash)
|
16
19
|
|
20
|
+
# validate: the parameter h has a key :name
|
21
|
+
errors << "The parameter h does not have a key :name" unless h.has_key?(:name)
|
22
|
+
|
23
|
+
# validate: the parameter h[:name] is a string
|
24
|
+
errors << "The parameter h[:name] is not a string" unless h[:name].is_a?(String)
|
25
|
+
|
17
26
|
# validate: the paramerer h has a key :net_remote_ip
|
18
27
|
errors << "The parameter h does not have a key :net_remote_ip" unless h.has_key?(:net_remote_ip)
|
19
28
|
|
@@ -149,8 +158,6 @@ module BlackStack
|
|
149
158
|
# This class represents a node, without using connection to the database.
|
150
159
|
# Use this class at the client side.
|
151
160
|
class Node
|
152
|
-
# :name is this is just a descriptive name for the node. It is not the host name, nor the domain, nor any ip.
|
153
|
-
attr_accessor :name, :net_remote_ip, :ssh_username, :ssh_password, :ssh_port, :ssh_private_key_file
|
154
161
|
include NodeModule
|
155
162
|
end # class Node
|
156
163
|
=begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackstack-nodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -62,7 +62,7 @@ extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
64
|
- lib/blackstack-nodes.rb
|
65
|
-
homepage: https://
|
65
|
+
homepage: https://github.com/leandrosardi/blackstack-nodes
|
66
66
|
licenses:
|
67
67
|
- MIT
|
68
68
|
metadata: {}
|