lmc 0.10.0 → 0.10.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 +4 -4
- data/.rubocop.yml +2 -0
- data/coverage/.last_run.json +1 -1
- data/lib/lmc/Account.rb +12 -5
- data/lib/lmc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b372c965270e732a0cae9bac5a6f86d30bd1340
|
4
|
+
data.tar.gz: 34d28f4b1e789a0f31c0cb9a28769d37ca6d8201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ddcdb65d3be6fad01fa189bba0a8a9d377a4dd14c6268306c81bbfd050b06c819b4cad78f649291cb1fa7619ec9a351d60155949fc53ba26fc9a74357862d8
|
7
|
+
data.tar.gz: 70ea891cf778e2e8d70a8f6ff00453452b4c8c0eb24b8bd59dd6546fd710cf8a6dc01dd07615dbdf9a8f853b1fa025ad6053562558aa8d2cc6265f267f8c23d7
|
data/.rubocop.yml
CHANGED
data/coverage/.last_run.json
CHANGED
data/lib/lmc/Account.rb
CHANGED
@@ -56,8 +56,8 @@ module LMC
|
|
56
56
|
delete_action = AuthAction.new @cloud
|
57
57
|
delete_action.type = AuthAction::ACCOUNT_DELETE
|
58
58
|
delete_action.name = Cloud.user
|
59
|
-
delete_action.data = {
|
60
|
-
'accountId' => @id
|
59
|
+
delete_action.data = {'password' => Cloud.password,
|
60
|
+
'accountId' => @id}
|
61
61
|
delete_action.post
|
62
62
|
@id = nil
|
63
63
|
true
|
@@ -83,7 +83,14 @@ module LMC
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def find_member_by_name(name)
|
86
|
-
|
86
|
+
if name.nil?
|
87
|
+
raise 'No member name given'
|
88
|
+
end
|
89
|
+
member = members.find {|m| m.name == name}
|
90
|
+
unless member
|
91
|
+
raise "Member named #{name} not found in account #{self}"
|
92
|
+
end
|
93
|
+
member
|
87
94
|
end
|
88
95
|
|
89
96
|
# def update_member(principal_id, data)
|
@@ -118,7 +125,7 @@ module LMC
|
|
118
125
|
def children
|
119
126
|
@cloud.auth_for_accounts([id, ROOT_ACCOUNT_UUID])
|
120
127
|
response = @cloud.get ['cloud-service-auth', 'accounts', id, 'children']
|
121
|
-
response.map {
|
128
|
+
response.map {|child| Account.new @cloud, child}
|
122
129
|
end
|
123
130
|
|
124
131
|
def logs
|
@@ -133,7 +140,7 @@ module LMC
|
|
133
140
|
return [] if @type == 'PRIVATE_CLOUD'
|
134
141
|
@cloud.auth_for_accounts([id])
|
135
142
|
response = @cloud.get ['cloud-service-devices', 'accounts', id, 'sites'], :select => :id
|
136
|
-
response.body.map {
|
143
|
+
response.body.map {|data|
|
137
144
|
Site.new(UUID.new(data), self)
|
138
145
|
}
|
139
146
|
end
|
data/lib/lmc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- erpel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|