ibm-cloud-sdk 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/ibm-cloud-sdk.gemspec +3 -1
- data/lib/ibm/cloud/sdk.rb +2 -0
- data/lib/ibm/cloud/sdk/power_iaas.rb +70 -1
- data/lib/ibm/cloud/sdk/resource_controller.rb +2 -8
- data/lib/ibm/cloud/sdk/version.rb +1 -1
- data/lib/ibm/cloud/sdk/vpc.rb +132 -0
- data/lib/ibm/cloud/sdk/vpc/base_collection.rb +108 -0
- data/lib/ibm/cloud/sdk/vpc/base_instance.rb +23 -0
- data/lib/ibm/cloud/sdk/vpc/base_vpc.rb +61 -0
- data/lib/ibm/cloud/sdk/vpc/cloud_sdk.rb +33 -0
- data/lib/ibm/cloud/sdk/vpc/floatingips.rb +20 -0
- data/lib/ibm/cloud/sdk/vpc/flowlogcollectors.rb +20 -0
- data/lib/ibm/cloud/sdk/vpc/helpers/connection.rb +66 -0
- data/lib/ibm/cloud/sdk/vpc/helpers/response.rb +92 -0
- data/lib/ibm/cloud/sdk/vpc/ike_policies.rb +24 -0
- data/lib/ibm/cloud/sdk/vpc/images.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/instance/actions.rb +19 -0
- data/lib/ibm/cloud/sdk/vpc/instance/floating_ips.rb +23 -0
- data/lib/ibm/cloud/sdk/vpc/instance/network_interfaces.rb +28 -0
- data/lib/ibm/cloud/sdk/vpc/instance/volume_attachments.rb +23 -0
- data/lib/ibm/cloud/sdk/vpc/instance_profiles.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/instances.rb +64 -0
- data/lib/ibm/cloud/sdk/vpc/ipsec_policies.rb +24 -0
- data/lib/ibm/cloud/sdk/vpc/keys.rb +43 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer.rb +23 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer/listeners.rb +30 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer/members.rb +23 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer/policies.rb +30 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer/pools.rb +28 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancer/rules.rb +25 -0
- data/lib/ibm/cloud/sdk/vpc/load_balancers.rb +19 -0
- data/lib/ibm/cloud/sdk/vpc/network_acls.rb +39 -0
- data/lib/ibm/cloud/sdk/vpc/operating_systems.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/public_gateways.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/regions.rb +35 -0
- data/lib/ibm/cloud/sdk/vpc/security_groups.rb +48 -0
- data/lib/ibm/cloud/sdk/vpc/subnets.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/volume_profiles.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/volumes.rb +21 -0
- data/lib/ibm/cloud/sdk/vpc/vpcs.rb +60 -0
- data/lib/ibm/cloud/sdk/vpc/vpn_gateway/connections.rb +35 -0
- data/lib/ibm/cloud/sdk/vpc/vpn_gateway/local_cidrs.rb +32 -0
- data/lib/ibm/cloud/sdk/vpc/vpn_gateway/peer_cidrs.rb +32 -0
- data/lib/ibm/cloud/sdk/vpc/vpn_gateways.rb +25 -0
- metadata +57 -2
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# Work with VPC reqions
|
9
|
+
class Regions < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'regions', child_class: Region)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Work with a single region
|
16
|
+
class Region < BaseInstance
|
17
|
+
def zones
|
18
|
+
Zones.new(self)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Zones are included within a region.
|
23
|
+
class Zones < BaseCollection
|
24
|
+
def initialize(parent)
|
25
|
+
super(parent, 'zones', child_class: Zone)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# A single zone.
|
30
|
+
class Zone < BaseInstance
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# Work with VPC reqions
|
9
|
+
class SecurityGroups < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'security_groups', child_class: SecurityGroup)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Work with VPC reqions
|
16
|
+
class SecurityGroup < BaseCollection
|
17
|
+
def network_interfaces
|
18
|
+
SECURITYGROUP::NetworkInterfaces.new(self)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module SECURITYGROUP
|
23
|
+
# Work with interfaces associated with parent group.
|
24
|
+
class NetworkInterfaces < BaseCollection
|
25
|
+
def initialize(parent)
|
26
|
+
super(parent, 'network_interfaces', child_class: NetworkInterface)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Work with a single rule.
|
31
|
+
class NetworkInterface < BaseInstance
|
32
|
+
end
|
33
|
+
|
34
|
+
# Work with rules associated with parent group.
|
35
|
+
class Rules < BaseCollection
|
36
|
+
def initialize(parent)
|
37
|
+
super(parent, 'rules', child_class: Rule)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Work with a single rule.
|
42
|
+
class Rule < BaseInstance
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# A list of submetes
|
9
|
+
class Subnets < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'subnets', child_class: Subnet)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# A single subnet
|
16
|
+
class Subnet < BaseInstance
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# Work with Volume Profiles.
|
9
|
+
class VolumeProfiles < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'volume/profiles', child_class: VolumeProfile, array_key: 'profiles')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Work with a single volume profile.
|
16
|
+
class VolumeProfile < BaseInstance
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# Work with a collection of volumes.
|
9
|
+
class Volumes < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'volumes', child_class: Volume)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# Work with a single volume.
|
16
|
+
class Volume < BaseInstance
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# A list of Vpc
|
9
|
+
class Vpcs < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'vpcs', child_class: VpcInstance)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# A single Vpc
|
16
|
+
class VpcInstance < BaseInstance
|
17
|
+
def default_network_acl
|
18
|
+
get('default_network_acl')
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_security_group
|
22
|
+
get('default_security_group')
|
23
|
+
end
|
24
|
+
|
25
|
+
def address_prefixes
|
26
|
+
VPCS::AddressPrefixes.new(self)
|
27
|
+
end
|
28
|
+
|
29
|
+
def routes
|
30
|
+
VPCS::Routes.new(self)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
module VPCS
|
35
|
+
# A list of Vpc
|
36
|
+
class AddressPrefixes < BaseCollection
|
37
|
+
def initialize(parent)
|
38
|
+
super(parent, 'address_prefixes', child_class: AddressPrefix)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# A single Vpc
|
43
|
+
class AddressPrefix < BaseInstance
|
44
|
+
end
|
45
|
+
|
46
|
+
# A list of Vpc
|
47
|
+
class Routes < BaseCollection
|
48
|
+
def initialize(parent)
|
49
|
+
super(parent, 'routes', child_class: Route)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# A single Vpc
|
54
|
+
class Route < BaseInstance
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative('local_cidrs')
|
5
|
+
require_relative('peer_cidrs')
|
6
|
+
|
7
|
+
module IBM
|
8
|
+
module Cloud
|
9
|
+
module SDK
|
10
|
+
module VPC
|
11
|
+
module VPNGATEWAY
|
12
|
+
# A list of Connection
|
13
|
+
class Connections < BaseCollection
|
14
|
+
def initialize(parent)
|
15
|
+
@array_key = 'connections'
|
16
|
+
@instance = Connection
|
17
|
+
super(parent, @array_key)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# A single Connection
|
22
|
+
class Connection < BaseInstance
|
23
|
+
def local_cidrs
|
24
|
+
LocalCIDRs.new(self)
|
25
|
+
end
|
26
|
+
|
27
|
+
def peer_cidrs
|
28
|
+
PeerCIDRs.new(self)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
module VPNGATEWAY
|
9
|
+
# A list of Connection
|
10
|
+
class LocalCIDRs < BaseCollection
|
11
|
+
def initialize(parent)
|
12
|
+
@array_key = 'local_cidrs'
|
13
|
+
@instance = Connection
|
14
|
+
super(parent, @array_key)
|
15
|
+
end
|
16
|
+
|
17
|
+
def instance(cidr_prefix, prefix_length)
|
18
|
+
super(self, "#{cidr_prefix}/#{prefix_length}")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# A single Connection
|
23
|
+
class LocalCIDR < BaseInstance
|
24
|
+
def update(payload)
|
25
|
+
put(payload)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
module VPNGATEWAY
|
9
|
+
# A list of Connection
|
10
|
+
class PeerCIDRs < BaseCollection
|
11
|
+
def initialize(parent)
|
12
|
+
@array_key = 'peer_cidrs'
|
13
|
+
@instance = Connection
|
14
|
+
super(parent, @array_key)
|
15
|
+
end
|
16
|
+
|
17
|
+
def instance(cidr_prefix, prefix_length)
|
18
|
+
super(self, "#{cidr_prefix}/#{prefix_length}")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# A single Connection
|
23
|
+
class PeerCIDR < BaseInstance
|
24
|
+
def update(payload)
|
25
|
+
put(payload)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module IBM
|
5
|
+
module Cloud
|
6
|
+
module SDK
|
7
|
+
module VPC
|
8
|
+
# A list of VPNGateway
|
9
|
+
class VPNGateways < BaseCollection
|
10
|
+
def initialize(parent)
|
11
|
+
super(parent, 'vpn_gateways', child_class: VPNGateway)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# A single VPNGateway
|
16
|
+
class VPNGateway < BaseInstance
|
17
|
+
# Get a lisst of connections asssociated with this gateway.
|
18
|
+
def connections
|
19
|
+
VPNGATEWAY::Connections.new(self)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm-cloud-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IBM Cloud Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: http
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: A Ruby gem for interacting with the various IBM Cloud services.
|
28
42
|
email:
|
29
43
|
executables: []
|
@@ -33,6 +47,7 @@ files:
|
|
33
47
|
- ".gitignore"
|
34
48
|
- ".rspec"
|
35
49
|
- ".travis.yml"
|
50
|
+
- CHANGELOG.md
|
36
51
|
- Gemfile
|
37
52
|
- LICENSE.txt
|
38
53
|
- README.md
|
@@ -49,11 +64,51 @@ files:
|
|
49
64
|
- lib/ibm/cloud/sdk/resource_controller.rb
|
50
65
|
- lib/ibm/cloud/sdk/resource_controller/resource.rb
|
51
66
|
- lib/ibm/cloud/sdk/version.rb
|
67
|
+
- lib/ibm/cloud/sdk/vpc.rb
|
68
|
+
- lib/ibm/cloud/sdk/vpc/base_collection.rb
|
69
|
+
- lib/ibm/cloud/sdk/vpc/base_instance.rb
|
70
|
+
- lib/ibm/cloud/sdk/vpc/base_vpc.rb
|
71
|
+
- lib/ibm/cloud/sdk/vpc/cloud_sdk.rb
|
72
|
+
- lib/ibm/cloud/sdk/vpc/floatingips.rb
|
73
|
+
- lib/ibm/cloud/sdk/vpc/flowlogcollectors.rb
|
74
|
+
- lib/ibm/cloud/sdk/vpc/helpers/connection.rb
|
75
|
+
- lib/ibm/cloud/sdk/vpc/helpers/response.rb
|
76
|
+
- lib/ibm/cloud/sdk/vpc/ike_policies.rb
|
77
|
+
- lib/ibm/cloud/sdk/vpc/images.rb
|
78
|
+
- lib/ibm/cloud/sdk/vpc/instance/actions.rb
|
79
|
+
- lib/ibm/cloud/sdk/vpc/instance/floating_ips.rb
|
80
|
+
- lib/ibm/cloud/sdk/vpc/instance/network_interfaces.rb
|
81
|
+
- lib/ibm/cloud/sdk/vpc/instance/volume_attachments.rb
|
82
|
+
- lib/ibm/cloud/sdk/vpc/instance_profiles.rb
|
83
|
+
- lib/ibm/cloud/sdk/vpc/instances.rb
|
84
|
+
- lib/ibm/cloud/sdk/vpc/ipsec_policies.rb
|
85
|
+
- lib/ibm/cloud/sdk/vpc/keys.rb
|
86
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer.rb
|
87
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer/listeners.rb
|
88
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer/members.rb
|
89
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer/policies.rb
|
90
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer/pools.rb
|
91
|
+
- lib/ibm/cloud/sdk/vpc/load_balancer/rules.rb
|
92
|
+
- lib/ibm/cloud/sdk/vpc/load_balancers.rb
|
93
|
+
- lib/ibm/cloud/sdk/vpc/network_acls.rb
|
94
|
+
- lib/ibm/cloud/sdk/vpc/operating_systems.rb
|
95
|
+
- lib/ibm/cloud/sdk/vpc/public_gateways.rb
|
96
|
+
- lib/ibm/cloud/sdk/vpc/regions.rb
|
97
|
+
- lib/ibm/cloud/sdk/vpc/security_groups.rb
|
98
|
+
- lib/ibm/cloud/sdk/vpc/subnets.rb
|
99
|
+
- lib/ibm/cloud/sdk/vpc/volume_profiles.rb
|
100
|
+
- lib/ibm/cloud/sdk/vpc/volumes.rb
|
101
|
+
- lib/ibm/cloud/sdk/vpc/vpcs.rb
|
102
|
+
- lib/ibm/cloud/sdk/vpc/vpn_gateway/connections.rb
|
103
|
+
- lib/ibm/cloud/sdk/vpc/vpn_gateway/local_cidrs.rb
|
104
|
+
- lib/ibm/cloud/sdk/vpc/vpn_gateway/peer_cidrs.rb
|
105
|
+
- lib/ibm/cloud/sdk/vpc/vpn_gateways.rb
|
52
106
|
homepage: https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby
|
53
107
|
licenses:
|
54
108
|
- '"Apache-2.0"'
|
55
109
|
metadata:
|
56
110
|
homepage_uri: https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby
|
111
|
+
changelog_uri: https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby/blob/v0.1.6/CHANGELOG.md
|
57
112
|
post_install_message:
|
58
113
|
rdoc_options: []
|
59
114
|
require_paths:
|