bmc-sdk 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bmc-sdk.rb +5 -1
- data/lib/dtos.rb +23 -3
- 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: 251ac34e817ddfd91d0992f51bd57b41fe2832a55296f74d008f27c5dd642a82
|
4
|
+
data.tar.gz: b0bce1330a63e4157d3a54d72777bc73d40e4a15d80590a0b32d305f809846ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 265ac02de4b322ed6c9c6acde1f1e4e802a9b6eaa39c0fff3a8a7444d24f9b763331d899ac316054bbfb92317e1c6b4964ed7c237be2317b711b85c66f1f24c7
|
7
|
+
data.tar.gz: 6270009600313eeefbb08b5c4d9b62a3d1a389d9371065bd23bf440ac346002428303577c8e21a19d5f18545d1a708ee49d4e8df8e2bb98d64f3eb92cbf353f2
|
data/lib/bmc-sdk.rb
CHANGED
@@ -30,7 +30,11 @@ module Bmc::Sdk
|
|
30
30
|
|
31
31
|
##
|
32
32
|
# The computed configuration file location based on the current system
|
33
|
-
|
33
|
+
begin
|
34
|
+
ConfigPath = OS.windows? ? Dir.home + WindowsPath : Dir.home + POSIXPath
|
35
|
+
rescue ArgumentError, NoMethodError
|
36
|
+
ConfigPath = nil
|
37
|
+
end
|
34
38
|
|
35
39
|
require 'commands.rb'
|
36
40
|
require 'dtos.rb'
|
data/lib/dtos.rb
CHANGED
@@ -48,8 +48,8 @@ module Bmc::Sdk
|
|
48
48
|
# @see https://developers.phoenixnap.com/docs/bmc/1/types/ServerCreate
|
49
49
|
|
50
50
|
class ProvisionedServer
|
51
|
-
attr_accessor :id, :status, :hostname, :description, :os, :type, :location, :sshKeys, :sshKeyIds
|
52
|
-
def initialize(id, status, hostname, description, os, type, location, sshKeys, sshKeyIds)
|
51
|
+
attr_accessor :id, :status, :hostname, :description, :os, :type, :location, :sshKeys, :sshKeyIds, :installDefaultSshKeys, :reservationId, :pricingModel, :networkType
|
52
|
+
def initialize(id, status, hostname, description, os, type, location, sshKeys, sshKeyIds, installDefaultSshKeys, reservationId, pricingModel, networkType)
|
53
53
|
@id = id
|
54
54
|
@status = status
|
55
55
|
@hostname = hostname
|
@@ -59,9 +59,14 @@ module Bmc::Sdk
|
|
59
59
|
@location = location
|
60
60
|
@sshKeys = sshKeys
|
61
61
|
@sshKeyIds = sshKeyIds
|
62
|
+
@installDefaultSshKeys = installDefaultSshKeys,
|
63
|
+
@reservationId = reservationId,
|
64
|
+
@pricingModel = pricingModel
|
65
|
+
@networkType = networkType
|
66
|
+
@osConfiguration = osConfiguration
|
62
67
|
end
|
63
68
|
def to_json(*a)
|
64
|
-
{id: @id, status: @status, hostname: @hostname, description: @description, os: @os, type: @type, location: @location, sshKeys: @sshKeys, sshKeyIds: @sshKeyIds}.to_json(*a)
|
69
|
+
{id: @id, status: @status, hostname: @hostname, description: @description, os: @os, type: @type, location: @location, sshKeys: @sshKeys, sshKeyIds: @sshKeyIds, installDefaultSshKeys: @installDefaultSshKeys, reservationId: @reservationId, pricingModel: @pricingModel, networkType: @networkType, osConfiguration: @osConfiguration}.to_json(*a)
|
65
70
|
end
|
66
71
|
end
|
67
72
|
|
@@ -103,4 +108,19 @@ module Bmc::Sdk
|
|
103
108
|
{id: @id, default: @default, name: @name, key: @key, fingerprint: @fingerprint, createdOn: @createdOn, lastUpdatedOn: @lastUpdatedOn}.to_json(*a)
|
104
109
|
end
|
105
110
|
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# OsConfiguration is used for OS specific configuration properties
|
114
|
+
#
|
115
|
+
# @see https://developers.phoenixnap.com/docs/bmc/1/types/OsConfiguration
|
116
|
+
class OsConfiguration
|
117
|
+
attr_accessor :windows, :rdpAllowedIps
|
118
|
+
def initialize(windows, rdpAllowedIps)
|
119
|
+
@windows = windows
|
120
|
+
@rdpAllowedIps = rdpAllowedIps
|
121
|
+
end
|
122
|
+
def to_json(*a)
|
123
|
+
{windows: @windows, rdpAllowedIps: @rdpAllowedIps}
|
124
|
+
end
|
125
|
+
end
|
106
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmc-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PhoenixNAP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
|
-
rubygems_version: 3.
|
83
|
+
rubygems_version: 3.2.3
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: An SDK for interacting with the BMC API.
|