bmc-sdk 0.1.0 → 0.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bmc-sdk.rb +5 -1
  3. data/lib/dtos.rb +23 -3
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1e5d542a5466d08fe7c79b45c4d1a318153873c44d67e8b813e0d00fe371647
4
- data.tar.gz: c0fbeef4be689e9c1290d3d2e2c8cef956db9b92bd4296ff0ec56087527937c6
3
+ metadata.gz: 251ac34e817ddfd91d0992f51bd57b41fe2832a55296f74d008f27c5dd642a82
4
+ data.tar.gz: b0bce1330a63e4157d3a54d72777bc73d40e4a15d80590a0b32d305f809846ec
5
5
  SHA512:
6
- metadata.gz: 5ea5ce3b12fc00a83eaea18790a20f0b04aa176507a9c83b88b112230ed4fc0c50c28a54fd6b71ebfdb6d7907509884605417a6f779df06219e12f127db279f1
7
- data.tar.gz: 4661731d08c7d774af649c8c4d448ef1577886864753698d1d42a62ae94a3c3a7baf6c8490d95e3e993a9da1db606ba6a1daedfbf989a4a4954d8fcd1a97042e
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
- ConfigPath = OS.windows? ? Dir.home + WindowsPath : Dir.home + POSIXPath
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.0
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-10 00:00:00.000000000 Z
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.0.8
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.