brightbox-cli 4.2.1 → 4.3.0

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.
@@ -0,0 +1,167 @@
1
+ module VolumeHelpers
2
+ def volumes_response
3
+ JSON.dump(
4
+ [
5
+ {
6
+ id: "vol-12345",
7
+ name: "Second volume",
8
+ description: nil,
9
+ boot: false,
10
+ delete_with_server: false,
11
+ encrypted: false,
12
+ filesystem_label: nil,
13
+ filesystem_type: "ext4",
14
+ locked: false,
15
+ serial: "vol-12345",
16
+ size: 10_240,
17
+ source: nil,
18
+ source_type: "raw",
19
+ status: "attached",
20
+ storage_type: "network",
21
+ created_at: "2022-11-09T13:02:10Z",
22
+ updated_at: "2023-01-05T10:38:42Z",
23
+ deleted_at: nil,
24
+ account: {
25
+ id: "acc-12345",
26
+ name: "Test account",
27
+ status: "active"
28
+ },
29
+ image: {
30
+ id: "img-45mb8",
31
+ name: "Blank Disk Image",
32
+ username: nil,
33
+ status: "available",
34
+ locked: false,
35
+ description: "",
36
+ source: "blank-image",
37
+ source_trigger: "manual",
38
+ arch: "x86_64",
39
+ created_at: "2013-05-02T16:40:17.000Z",
40
+ official: true,
41
+ public: true,
42
+ owner: "acc-12345"
43
+ },
44
+ server: {
45
+ id: "srv-12345",
46
+ name: "Multi volume test",
47
+ status: "active",
48
+ locked: false,
49
+ hostname: "srv-12345",
50
+ fqdn: "srv-12345.brightbox.localhost",
51
+ created_at: "2022-11-09T13:04:07.000Z",
52
+ started_at: "2022-11-09T13:04:50.000Z",
53
+ deleted_at: nil
54
+ },
55
+ zone: {
56
+ id: "zon-12345",
57
+ handle: "gb1-a"
58
+ }
59
+ },
60
+ {
61
+ id: "vol-abcde",
62
+ name: nil,
63
+ description: nil,
64
+ boot: true,
65
+ delete_with_server: true,
66
+ encrypted: false,
67
+ filesystem_label: nil,
68
+ filesystem_type: nil,
69
+ locked: false,
70
+ serial: "vol-abcde",
71
+ size: 10_240,
72
+ source: "img-f68lm",
73
+ source_type: "image",
74
+ status: "attached",
75
+ storage_type: "network",
76
+ created_at: "2022-11-09T13:04:07Z",
77
+ updated_at: "2023-01-05T10:38:42Z",
78
+ deleted_at: nil,
79
+ account: {
80
+ id: "acc-12345",
81
+ name: "Test account",
82
+ status: "active"
83
+ },
84
+ image: {
85
+ id: "img-f68lm",
86
+ name: "ubuntu-jammy-22.04-amd64-server",
87
+ username: "ubuntu",
88
+ status: "deprecated",
89
+ locked: false,
90
+ description: "ID: com.ubuntu.cloud:released:download/com.ubuntu.cloud:server:22.04:amd64/20221101.1/disk1.img, Release: release",
91
+ source: "tmp41_g645e",
92
+ source_trigger: "manual",
93
+ arch: "x86_64",
94
+ created_at: "2022-11-03T07:01:15.000Z",
95
+ official: true,
96
+ public: true,
97
+ owner: "acc-kg71m"
98
+ },
99
+ server: {
100
+ id: "srv-12345",
101
+ name: "Multi volume test",
102
+ status: "active",
103
+ locked: false,
104
+ hostname: "srv-12345",
105
+ fqdn: "srv-12345.brightbox.localhost",
106
+ created_at: "2022-11-09T13:04:07.000Z",
107
+ started_at: "2022-11-09T13:04:50.000Z",
108
+ deleted_at: nil
109
+ },
110
+ zone: {
111
+ id: "zon-12345",
112
+ handle: "gb1-a"
113
+ }
114
+ }
115
+ ]
116
+ )
117
+ end
118
+
119
+ def volume_response(options)
120
+ default = {
121
+ id: "vol-12345",
122
+ name: SecureRandom.base64,
123
+ description: SecureRandom.base64,
124
+ boot: false,
125
+ delete_with_server: false,
126
+ encrypted: false,
127
+ filesystem_label: nil,
128
+ filesystem_type: "ext4",
129
+ locked: false,
130
+ serial: "vol-12345",
131
+ size: 10_240,
132
+ source: nil,
133
+ source_type: "raw",
134
+ status: "detached",
135
+ storage_type: "network",
136
+ created_at: "2023-01-01T01:01:00Z",
137
+ updated_at: "2023-01-01T01:01:05Z",
138
+ deleted_at: nil,
139
+ account: {
140
+ id: "acc-12345",
141
+ name: "Test account",
142
+ status: "active"
143
+ },
144
+ image: {
145
+ id: "img-12345",
146
+ name: "Blank Disk Image",
147
+ username: nil,
148
+ status: "available",
149
+ locked: false,
150
+ description: "",
151
+ source: "blank-image",
152
+ source_trigger: "manual",
153
+ arch: "x86_64",
154
+ created_at: "2013-05-02T16:40:17.000Z",
155
+ official: true,
156
+ public: true,
157
+ owner: "acc-12345"
158
+ },
159
+ server: nil,
160
+ zone: {
161
+ id: "zon-12345",
162
+ handle: "gb1-a"
163
+ }
164
+ }
165
+ JSON.dump(default.merge!(options))
166
+ end
167
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightbox-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Leach
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 1.8.0
20
+ version: 1.9.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 1.8.0
27
+ version: 1.9.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: fog-core
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -386,6 +386,16 @@ files:
386
386
  - lib/brightbox-cli/commands/users/list.rb
387
387
  - lib/brightbox-cli/commands/users/show.rb
388
388
  - lib/brightbox-cli/commands/users/update.rb
389
+ - lib/brightbox-cli/commands/volumes/attach.rb
390
+ - lib/brightbox-cli/commands/volumes/copy.rb
391
+ - lib/brightbox-cli/commands/volumes/create.rb
392
+ - lib/brightbox-cli/commands/volumes/destroy.rb
393
+ - lib/brightbox-cli/commands/volumes/detach.rb
394
+ - lib/brightbox-cli/commands/volumes/list.rb
395
+ - lib/brightbox-cli/commands/volumes/locking.rb
396
+ - lib/brightbox-cli/commands/volumes/resize.rb
397
+ - lib/brightbox-cli/commands/volumes/show.rb
398
+ - lib/brightbox-cli/commands/volumes/update.rb
389
399
  - lib/brightbox-cli/commands/zones.rb
390
400
  - lib/brightbox-cli/config.rb
391
401
  - lib/brightbox-cli/config/accounts.rb
@@ -437,6 +447,7 @@ files:
437
447
  - lib/brightbox-cli/vendor/brightbox-ini/test/data/param.ini
438
448
  - lib/brightbox-cli/vendor/brightbox-ini/test/test_inifile.rb
439
449
  - lib/brightbox-cli/version.rb
450
+ - lib/brightbox-cli/volume.rb
440
451
  - lib/brightbox-cli/zones.rb
441
452
  - lib/brightbox/cli/config.rb
442
453
  - lib/brightbox_cli.rb
@@ -648,6 +659,15 @@ files:
648
659
  - spec/commands/users/list_spec.rb
649
660
  - spec/commands/users/show_spec.rb
650
661
  - spec/commands/users/update_spec.rb
662
+ - spec/commands/volumes/attach_spec.rb
663
+ - spec/commands/volumes/copy_spec.rb
664
+ - spec/commands/volumes/create_spec.rb
665
+ - spec/commands/volumes/destroy_spec.rb
666
+ - spec/commands/volumes/detach_spec.rb
667
+ - spec/commands/volumes/list_spec.rb
668
+ - spec/commands/volumes/resize_spec.rb
669
+ - spec/commands/volumes/show_spec.rb
670
+ - spec/commands/volumes/update_spec.rb
651
671
  - spec/commands/zones/list_spec.rb
652
672
  - spec/configs/api_client.ini
653
673
  - spec/configs/user_app.ini
@@ -664,6 +684,7 @@ files:
664
684
  - spec/support/tmp_config.rb
665
685
  - spec/support/token_helpers.rb
666
686
  - spec/support/vcr.rb
687
+ - spec/support/volume_helpers.rb
667
688
  - spec/unit/brightbox/account/all_spec.rb
668
689
  - spec/unit/brightbox/account/get_spec.rb
669
690
  - spec/unit/brightbox/account_spec.rb
@@ -788,7 +809,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
788
809
  - !ruby/object:Gem::Version
789
810
  version: '0'
790
811
  requirements: []
791
- rubygems_version: 3.2.26
812
+ rubygems_version: 3.3.20
792
813
  signing_key:
793
814
  specification_version: 4
794
815
  summary: The Brightbox cloud management system
@@ -1000,6 +1021,15 @@ test_files:
1000
1021
  - spec/commands/users/list_spec.rb
1001
1022
  - spec/commands/users/show_spec.rb
1002
1023
  - spec/commands/users/update_spec.rb
1024
+ - spec/commands/volumes/attach_spec.rb
1025
+ - spec/commands/volumes/copy_spec.rb
1026
+ - spec/commands/volumes/create_spec.rb
1027
+ - spec/commands/volumes/destroy_spec.rb
1028
+ - spec/commands/volumes/detach_spec.rb
1029
+ - spec/commands/volumes/list_spec.rb
1030
+ - spec/commands/volumes/resize_spec.rb
1031
+ - spec/commands/volumes/show_spec.rb
1032
+ - spec/commands/volumes/update_spec.rb
1003
1033
  - spec/commands/zones/list_spec.rb
1004
1034
  - spec/configs/api_client.ini
1005
1035
  - spec/configs/user_app.ini
@@ -1016,6 +1046,7 @@ test_files:
1016
1046
  - spec/support/tmp_config.rb
1017
1047
  - spec/support/token_helpers.rb
1018
1048
  - spec/support/vcr.rb
1049
+ - spec/support/volume_helpers.rb
1019
1050
  - spec/unit/brightbox/account/all_spec.rb
1020
1051
  - spec/unit/brightbox/account/get_spec.rb
1021
1052
  - spec/unit/brightbox/account_spec.rb