crowbar-client 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/crowbar/client/app/backup.rb +87 -21
- data/lib/crowbar/client/app/base.rb +20 -0
- data/lib/crowbar/client/app/batch.rb +44 -31
- data/lib/crowbar/client/app/host_ip.rb +2 -0
- data/lib/crowbar/client/app/interface.rb +2 -0
- data/lib/crowbar/client/app/virtual_ip.rb +2 -0
- data/lib/crowbar/client/command/backup.rb +3 -0
- data/lib/crowbar/client/command/backup/delete.rb +2 -0
- data/lib/crowbar/client/command/backup/download.rb +21 -14
- data/lib/crowbar/client/command/backup/list.rb +6 -3
- data/lib/crowbar/client/command/backup/restore.rb +42 -0
- data/lib/crowbar/client/command/backup/upload.rb +13 -0
- data/lib/crowbar/client/command/base.rb +3 -0
- data/lib/crowbar/client/command/batch/build.rb +26 -0
- data/lib/crowbar/client/command/batch/export.rb +43 -0
- data/lib/crowbar/client/command/installer/start.rb +2 -0
- data/lib/crowbar/client/filter/hash.rb +1 -1
- data/lib/crowbar/client/request/backup.rb +3 -0
- data/lib/crowbar/client/request/backup/create.rb +1 -3
- data/lib/crowbar/client/request/backup/delete.rb +1 -1
- data/lib/crowbar/client/request/backup/download.rb +1 -1
- data/lib/crowbar/client/request/backup/restore.rb +38 -0
- data/lib/crowbar/client/request/backup/upload.rb +0 -2
- data/lib/crowbar/client/request/batch/build.rb +17 -2
- data/lib/crowbar/client/request/batch/export.rb +22 -2
- data/lib/crowbar/client/version.rb +1 -1
- data/spec/crowbar/client/command/backup/create_spec.rb +1 -3
- data/spec/crowbar/client/command/backup/delete_spec.rb +1 -2
- data/spec/crowbar/client/command/backup/download_spec.rb +1 -1
- data/spec/crowbar/client/command/backup/restore_spec.rb +40 -0
- data/spec/crowbar/client/command/backup/upload_spec.rb +4 -1
- data/spec/crowbar/client/command/batch/build_spec.rb +5 -1
- data/spec/crowbar/client/request/backup/create_spec.rb +2 -4
- data/spec/crowbar/client/request/backup/delete_spec.rb +2 -2
- data/spec/crowbar/client/request/backup/download_spec.rb +2 -2
- data/spec/crowbar/client/request/backup/list_spec.rb +2 -4
- data/spec/crowbar/client/request/backup/restore_spec.rb +52 -0
- data/spec/crowbar/client/request/batch/build_spec.rb +35 -44
- data/spec/crowbar/client/request/batch/export_spec.rb +33 -44
- data/spec/crowbar/client/request/proposal/create_spec.rb +2 -1
- data/spec/crowbar/client/request/proposal/edit_spec.rb +2 -1
- data/spec/fixtures/batch.yml +0 -0
- metadata +11 -3
@@ -26,15 +26,13 @@ describe "Crowbar::Client::Request::Backup::Create" do
|
|
26
26
|
|
27
27
|
let!(:attrs) do
|
28
28
|
{
|
29
|
-
|
29
|
+
name: "test-backup"
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
33
33
|
let!(:params) do
|
34
34
|
{
|
35
|
-
|
36
|
-
name: "test-backup"
|
37
|
-
}
|
35
|
+
name: "test-backup"
|
38
36
|
}
|
39
37
|
end
|
40
38
|
|
@@ -26,7 +26,7 @@ describe "Crowbar::Client::Request::Backup::Delete" do
|
|
26
26
|
|
27
27
|
let!(:attrs) do
|
28
28
|
{
|
29
|
-
|
29
|
+
name: "foo"
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -40,7 +40,7 @@ describe "Crowbar::Client::Request::Backup::Delete" do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
let!(:url) do
|
43
|
-
"utils/backups/
|
43
|
+
"utils/backups/foo"
|
44
44
|
end
|
45
45
|
|
46
46
|
let!(:headers) do
|
@@ -26,7 +26,7 @@ describe "Crowbar::Client::Request::Backup::Download" do
|
|
26
26
|
|
27
27
|
let!(:attrs) do
|
28
28
|
{
|
29
|
-
|
29
|
+
name: "foo"
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -40,7 +40,7 @@ describe "Crowbar::Client::Request::Backup::Download" do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
let!(:url) do
|
43
|
-
"utils/backups/
|
43
|
+
"utils/backups/foo/download"
|
44
44
|
end
|
45
45
|
|
46
46
|
let!(:headers) do
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015, SUSE Linux GmbH
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require_relative "../../../../spec_helper"
|
18
|
+
|
19
|
+
describe "Crowbar::Client::Request::Backup::Restore" do
|
20
|
+
it_behaves_like "a request class", true do
|
21
|
+
subject do
|
22
|
+
::Crowbar::Client::Request::Backup::Restore.new(
|
23
|
+
attrs
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
let!(:attrs) do
|
28
|
+
{
|
29
|
+
name: "foo"
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
let!(:params) do
|
34
|
+
{}
|
35
|
+
end
|
36
|
+
|
37
|
+
let!(:method) do
|
38
|
+
:post
|
39
|
+
end
|
40
|
+
|
41
|
+
let!(:url) do
|
42
|
+
"utils/backups/foo/restore"
|
43
|
+
end
|
44
|
+
|
45
|
+
let!(:headers) do
|
46
|
+
{
|
47
|
+
"Content-Type" => "application/json",
|
48
|
+
"Accept" => "application/json"
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -17,48 +17,39 @@
|
|
17
17
|
require_relative "../../../../spec_helper"
|
18
18
|
|
19
19
|
describe "Crowbar::Client::Request::Batch::Build" do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# {
|
56
|
-
# "Content-Type" => "application/json",
|
57
|
-
# "Accept" => "application/json"
|
58
|
-
# }
|
59
|
-
# end
|
60
|
-
# end
|
61
|
-
|
62
|
-
pending
|
63
|
-
|
20
|
+
it_behaves_like "a request class", false do
|
21
|
+
subject do
|
22
|
+
::Crowbar::Client::Request::Batch::Build.new(
|
23
|
+
attrs
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
let!(:attrs) do
|
28
|
+
{
|
29
|
+
file: fixture_path(
|
30
|
+
"batch.yml"
|
31
|
+
).open
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
let!(:params) do
|
36
|
+
{}
|
37
|
+
end
|
38
|
+
|
39
|
+
let!(:method) do
|
40
|
+
:post
|
41
|
+
end
|
42
|
+
|
43
|
+
let!(:url) do
|
44
|
+
"utils/batch/build"
|
45
|
+
end
|
46
|
+
|
47
|
+
let!(:headers) do
|
48
|
+
{
|
49
|
+
"Accept" => "application/json",
|
50
|
+
"Content-Length" => "403",
|
51
|
+
"Content-Type" => "multipart/form-data; boundary=-----------RubyMultipartPost"
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
64
55
|
end
|
@@ -17,48 +17,37 @@
|
|
17
17
|
require_relative "../../../../spec_helper"
|
18
18
|
|
19
19
|
describe "Crowbar::Client::Request::Batch::Export" do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
# let!(:headers) do
|
55
|
-
# {
|
56
|
-
# "Content-Type" => "application/json",
|
57
|
-
# "Accept" => "application/json"
|
58
|
-
# }
|
59
|
-
# end
|
60
|
-
# end
|
61
|
-
|
62
|
-
pending
|
63
|
-
|
20
|
+
it_behaves_like "a request class", true do
|
21
|
+
subject do
|
22
|
+
::Crowbar::Client::Request::Batch::Export.new(
|
23
|
+
attrs
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
let!(:attrs) do
|
28
|
+
{}
|
29
|
+
end
|
30
|
+
|
31
|
+
let!(:params) do
|
32
|
+
{
|
33
|
+
includes: nil,
|
34
|
+
excludes: nil
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
let!(:method) do
|
39
|
+
:post
|
40
|
+
end
|
41
|
+
|
42
|
+
let!(:url) do
|
43
|
+
"utils/batch/export"
|
44
|
+
end
|
45
|
+
|
46
|
+
let!(:headers) do
|
47
|
+
{
|
48
|
+
"Content-Type" => "application/octet-stream",
|
49
|
+
"Accept" => "application/octet-stream"
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
64
53
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowbar-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Boerger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- lib/crowbar/client/command/backup/delete.rb
|
230
230
|
- lib/crowbar/client/command/backup/download.rb
|
231
231
|
- lib/crowbar/client/command/backup/list.rb
|
232
|
+
- lib/crowbar/client/command/backup/restore.rb
|
232
233
|
- lib/crowbar/client/command/backup/upload.rb
|
233
234
|
- lib/crowbar/client/command/barclamp.rb
|
234
235
|
- lib/crowbar/client/command/barclamp/list.rb
|
@@ -308,6 +309,7 @@ files:
|
|
308
309
|
- lib/crowbar/client/request/backup/delete.rb
|
309
310
|
- lib/crowbar/client/request/backup/download.rb
|
310
311
|
- lib/crowbar/client/request/backup/list.rb
|
312
|
+
- lib/crowbar/client/request/backup/restore.rb
|
311
313
|
- lib/crowbar/client/request/backup/upload.rb
|
312
314
|
- lib/crowbar/client/request/barclamp.rb
|
313
315
|
- lib/crowbar/client/request/barclamp/list.rb
|
@@ -368,6 +370,7 @@ files:
|
|
368
370
|
- spec/crowbar/client/command/backup/delete_spec.rb
|
369
371
|
- spec/crowbar/client/command/backup/download_spec.rb
|
370
372
|
- spec/crowbar/client/command/backup/list_spec.rb
|
373
|
+
- spec/crowbar/client/command/backup/restore_spec.rb
|
371
374
|
- spec/crowbar/client/command/backup/upload_spec.rb
|
372
375
|
- spec/crowbar/client/command/barclamp/list_spec.rb
|
373
376
|
- spec/crowbar/client/command/batch/build_spec.rb
|
@@ -424,6 +427,7 @@ files:
|
|
424
427
|
- spec/crowbar/client/request/backup/delete_spec.rb
|
425
428
|
- spec/crowbar/client/request/backup/download_spec.rb
|
426
429
|
- spec/crowbar/client/request/backup/list_spec.rb
|
430
|
+
- spec/crowbar/client/request/backup/restore_spec.rb
|
427
431
|
- spec/crowbar/client/request/backup/upload_spec.rb
|
428
432
|
- spec/crowbar/client/request/barclamp/list_spec.rb
|
429
433
|
- spec/crowbar/client/request/batch/build_spec.rb
|
@@ -466,6 +470,7 @@ files:
|
|
466
470
|
- spec/crowbar/client/util/editor_spec.rb
|
467
471
|
- spec/crowbar/client/util/runner_spec.rb
|
468
472
|
- spec/crowbar/client_spec.rb
|
473
|
+
- spec/fixtures/batch.yml
|
469
474
|
- spec/fixtures/upload.tgz
|
470
475
|
- spec/spec_helper.rb
|
471
476
|
- spec/support/command_context.rb
|
@@ -491,12 +496,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
491
496
|
version: '0'
|
492
497
|
requirements: []
|
493
498
|
rubyforge_project:
|
494
|
-
rubygems_version: 2.2.
|
499
|
+
rubygems_version: 2.2.5
|
495
500
|
signing_key:
|
496
501
|
specification_version: 4
|
497
502
|
summary: Crowbar commandline client
|
498
503
|
test_files:
|
499
504
|
- spec/fixtures/upload.tgz
|
505
|
+
- spec/fixtures/batch.yml
|
500
506
|
- spec/support/command_context.rb
|
501
507
|
- spec/support/request_examples.rb
|
502
508
|
- spec/support/helper_methods.rb
|
@@ -528,6 +534,7 @@ test_files:
|
|
528
534
|
- spec/crowbar/client/request/backup/create_spec.rb
|
529
535
|
- spec/crowbar/client/request/backup/download_spec.rb
|
530
536
|
- spec/crowbar/client/request/backup/delete_spec.rb
|
537
|
+
- spec/crowbar/client/request/backup/restore_spec.rb
|
531
538
|
- spec/crowbar/client/request/backup/upload_spec.rb
|
532
539
|
- spec/crowbar/client/request/repository/activate_spec.rb
|
533
540
|
- spec/crowbar/client/request/repository/list_spec.rb
|
@@ -584,6 +591,7 @@ test_files:
|
|
584
591
|
- spec/crowbar/client/command/backup/create_spec.rb
|
585
592
|
- spec/crowbar/client/command/backup/download_spec.rb
|
586
593
|
- spec/crowbar/client/command/backup/delete_spec.rb
|
594
|
+
- spec/crowbar/client/command/backup/restore_spec.rb
|
587
595
|
- spec/crowbar/client/command/backup/upload_spec.rb
|
588
596
|
- spec/crowbar/client/command/repository/activate_spec.rb
|
589
597
|
- spec/crowbar/client/command/repository/list_spec.rb
|