strongdm 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/SDM/AKS.html +2 -2
- data/doc/SDM/AKSBasicAuth.html +2 -2
- data/doc/SDM/AKSServiceAccount.html +2 -2
- data/doc/SDM/AmazonEKS.html +2 -2
- data/doc/SDM/AmazonES.html +2 -2
- data/doc/SDM/Athena.html +2 -2
- data/doc/SDM/AuroraMysql.html +2 -2
- data/doc/SDM/AuroraPostgres.html +2 -2
- data/doc/SDM/BigQuery.html +2 -2
- data/doc/SDM/Cassandra.html +2 -2
- data/doc/SDM/Citus.html +2 -2
- data/doc/SDM/Client.html +18 -4
- data/doc/SDM/Clustrix.html +2 -2
- data/doc/SDM/Cockroach.html +2 -2
- data/doc/SDM/ControlPanel.html +236 -0
- data/doc/SDM/ControlPanelGetSSHCAPublicKeyResponse.html +267 -0
- data/doc/SDM/DB2LUW.html +2 -2
- data/doc/SDM/DB2i.html +2 -2
- data/doc/SDM/Druid.html +2 -2
- data/doc/SDM/DynamoDB.html +2 -2
- data/doc/SDM/Elastic.html +2 -2
- data/doc/SDM/ElasticacheRedis.html +2 -2
- data/doc/SDM/Gateway.html +2 -2
- data/doc/SDM/GoogleGKE.html +2 -2
- data/doc/SDM/Greenplum.html +2 -2
- data/doc/SDM/HTTPAuth.html +2 -2
- data/doc/SDM/HTTPBasicAuth.html +2 -2
- data/doc/SDM/HTTPNoAuth.html +2 -2
- data/doc/SDM/Kubernetes.html +2 -2
- data/doc/SDM/KubernetesBasicAuth.html +2 -2
- data/doc/SDM/KubernetesServiceAccount.html +2 -2
- data/doc/SDM/Maria.html +2 -2
- data/doc/SDM/Memcached.html +2 -2
- data/doc/SDM/Memsql.html +2 -2
- data/doc/SDM/MongoHost.html +2 -2
- data/doc/SDM/MongoLegacyHost.html +2 -2
- data/doc/SDM/MongoLegacyReplicaset.html +2 -2
- data/doc/SDM/MongoReplicaSet.html +2 -2
- data/doc/SDM/Mysql.html +2 -2
- data/doc/SDM/NodeCreateResponse.html +2 -2
- data/doc/SDM/NodeDeleteResponse.html +2 -2
- data/doc/SDM/NodeGetResponse.html +2 -2
- data/doc/SDM/NodeUpdateResponse.html +2 -2
- data/doc/SDM/Nodes.html +6 -6
- data/doc/SDM/Oracle.html +2 -2
- data/doc/SDM/Plumbing.html +542 -378
- data/doc/SDM/Postgres.html +2 -2
- data/doc/SDM/Presto.html +2 -2
- data/doc/SDM/RDP.html +2 -2
- data/doc/SDM/Redis.html +2 -2
- data/doc/SDM/Redshift.html +2 -2
- data/doc/SDM/Relay.html +2 -2
- data/doc/SDM/ResourceCreateResponse.html +2 -2
- data/doc/SDM/ResourceDeleteResponse.html +2 -2
- data/doc/SDM/ResourceGetResponse.html +2 -2
- data/doc/SDM/ResourceUpdateResponse.html +2 -2
- data/doc/SDM/Resources.html +6 -6
- data/doc/SDM/Role.html +2 -2
- data/doc/SDM/RoleAttachment.html +2 -2
- data/doc/SDM/RoleAttachmentCreateResponse.html +2 -2
- data/doc/SDM/RoleAttachmentDeleteResponse.html +2 -2
- data/doc/SDM/RoleAttachmentGetResponse.html +2 -2
- data/doc/SDM/RoleAttachments.html +5 -5
- data/doc/SDM/RoleCreateResponse.html +2 -2
- data/doc/SDM/RoleDeleteResponse.html +2 -2
- data/doc/SDM/RoleGetResponse.html +2 -2
- data/doc/SDM/RoleGrant.html +2 -2
- data/doc/SDM/RoleGrantCreateResponse.html +2 -2
- data/doc/SDM/RoleGrantDeleteResponse.html +2 -2
- data/doc/SDM/RoleGrantGetResponse.html +2 -2
- data/doc/SDM/RoleGrants.html +5 -5
- data/doc/SDM/RoleUpdateResponse.html +2 -2
- data/doc/SDM/Roles.html +6 -6
- data/doc/SDM/SQLServer.html +2 -2
- data/doc/SDM/SSH.html +2 -2
- data/doc/SDM/SSHCert.html +2 -2
- data/doc/SDM/Snowflake.html +2 -2
- data/doc/SDM/Sybase.html +2 -2
- data/doc/SDM/SybaseIQ.html +2 -2
- data/doc/SDM/Teradata.html +2 -2
- data/doc/V1.html +10 -0
- data/doc/V1/ControlPanel.html +113 -0
- data/doc/V1/ControlPanel/Service.html +119 -0
- data/doc/created.rid +39 -35
- data/doc/index.html +8 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/lib/version.html +1 -1
- data/doc/table_of_contents.html +142 -82
- data/lib/grpc/control_panel_pb.rb +39 -0
- data/lib/grpc/control_panel_services_pb.rb +37 -0
- data/lib/grpc/plumbing.rb +39 -0
- data/lib/models/porcelain.rb +36 -0
- data/lib/strongdm.rb +3 -0
- data/lib/svc.rb +45 -0
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +8 -3
- data/doc/SDM/DB2.html +0 -391
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright 2020 StrongDM Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
16
|
+
# source: control_panel.proto
|
17
|
+
|
18
|
+
require "google/protobuf"
|
19
|
+
|
20
|
+
require "google/api/annotations_pb"
|
21
|
+
require "options_pb"
|
22
|
+
require "spec_pb"
|
23
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
24
|
+
add_file("control_panel.proto", :syntax => :proto3) do
|
25
|
+
add_message "v1.ControlPanelGetSSHCAPublicKeyRequest" do
|
26
|
+
optional :meta, :message, 1, "v1.GetRequestMetadata"
|
27
|
+
end
|
28
|
+
add_message "v1.ControlPanelGetSSHCAPublicKeyResponse" do
|
29
|
+
optional :meta, :message, 1, "v1.GetResponseMetadata"
|
30
|
+
optional :public_key, :string, 2
|
31
|
+
optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
module V1
|
37
|
+
ControlPanelGetSSHCAPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.ControlPanelGetSSHCAPublicKeyRequest").msgclass
|
38
|
+
ControlPanelGetSSHCAPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.ControlPanelGetSSHCAPublicKeyResponse").msgclass
|
39
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright 2020 StrongDM Inc
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
16
|
+
# Source: control_panel.proto for package 'v1'
|
17
|
+
|
18
|
+
require "grpc"
|
19
|
+
require "control_panel_pb"
|
20
|
+
|
21
|
+
module V1
|
22
|
+
module ControlPanel
|
23
|
+
# ControlPanel contains all administrative controls.
|
24
|
+
class Service
|
25
|
+
include GRPC::GenericService
|
26
|
+
|
27
|
+
self.marshal_class_method = :encode
|
28
|
+
self.unmarshal_class_method = :decode
|
29
|
+
self.service_name = "v1.ControlPanel"
|
30
|
+
|
31
|
+
# GetSSHCAPublicKey retrieves the SSH CA public key.
|
32
|
+
rpc :GetSSHCAPublicKey, ControlPanelGetSSHCAPublicKeyRequest, ControlPanelGetSSHCAPublicKeyResponse
|
33
|
+
end
|
34
|
+
|
35
|
+
Stub = Service.rpc_stub_class
|
36
|
+
end
|
37
|
+
end
|
data/lib/grpc/plumbing.rb
CHANGED
@@ -24,6 +24,7 @@ require_relative "./account_attachments_pb"
|
|
24
24
|
require_relative "./account_grants_pb"
|
25
25
|
require_relative "./tags_pb"
|
26
26
|
require_relative "./accounts_pb"
|
27
|
+
require_relative "./control_panel_pb"
|
27
28
|
require_relative "./drivers_pb"
|
28
29
|
require_relative "./nodes_pb"
|
29
30
|
require_relative "./resources_pb"
|
@@ -840,6 +841,44 @@ module SDM
|
|
840
841
|
end
|
841
842
|
items
|
842
843
|
end
|
844
|
+
def self.convert_control_panel_get_sshca_public_key_response_to_porcelain(plumbing)
|
845
|
+
if plumbing == nil
|
846
|
+
return nil
|
847
|
+
end
|
848
|
+
porcelain = ControlPanelGetSSHCAPublicKeyResponse.new()
|
849
|
+
porcelain.meta = convert_get_response_metadata_to_porcelain(plumbing.meta)
|
850
|
+
porcelain.public_key = (plumbing.public_key)
|
851
|
+
porcelain.rate_limit = convert_rate_limit_metadata_to_porcelain(plumbing.rate_limit)
|
852
|
+
porcelain
|
853
|
+
end
|
854
|
+
|
855
|
+
def self.convert_control_panel_get_sshca_public_key_response_to_plumbing(porcelain)
|
856
|
+
if porcelain == nil
|
857
|
+
return nil
|
858
|
+
end
|
859
|
+
plumbing = V1::ControlPanelGetSSHCAPublicKeyResponse.new()
|
860
|
+
plumbing.meta = convert_get_response_metadata_to_plumbing(porcelain.meta) unless porcelain.meta == nil
|
861
|
+
plumbing.public_key = (porcelain.public_key) unless porcelain.public_key == nil
|
862
|
+
plumbing.rate_limit = convert_rate_limit_metadata_to_plumbing(porcelain.rate_limit) unless porcelain.rate_limit == nil
|
863
|
+
plumbing
|
864
|
+
end
|
865
|
+
def self.convert_repeated_control_panel_get_sshca_public_key_response_to_plumbing(porcelains)
|
866
|
+
items = Array.new
|
867
|
+
porcelains.each do |porcelain|
|
868
|
+
plumbing = convert_control_panel_get_sshca_public_key_response_to_plumbing(porcelain)
|
869
|
+
items.append(plumbing)
|
870
|
+
end
|
871
|
+
items
|
872
|
+
end
|
873
|
+
|
874
|
+
def self.convert_repeated_control_panel_get_sshca_public_key_response_to_porcelain(plumbings)
|
875
|
+
items = Array.new
|
876
|
+
plumbings.each do |plumbing|
|
877
|
+
porcelain = convert_control_panel_get_sshca_public_key_response_to_porcelain(plumbing)
|
878
|
+
items.append(porcelain)
|
879
|
+
end
|
880
|
+
items
|
881
|
+
end
|
843
882
|
def self.convert_resource_to_plumbing(porcelain)
|
844
883
|
if porcelain == nil
|
845
884
|
return nil
|
data/lib/models/porcelain.rb
CHANGED
@@ -621,6 +621,42 @@ module SDM
|
|
621
621
|
end
|
622
622
|
end
|
623
623
|
|
624
|
+
# ControlPanelGetSSHCAPublicKeyResponse represents a request for an
|
625
|
+
# organization's SSH Certificate Authority public key.
|
626
|
+
class ControlPanelGetSSHCAPublicKeyResponse
|
627
|
+
# Reserved for future use.
|
628
|
+
attr_accessor :meta
|
629
|
+
# The public key of the SSH Certificate Authority, in OpenSSH RSA public
|
630
|
+
# key format.
|
631
|
+
attr_accessor :public_key
|
632
|
+
# Rate limit information.
|
633
|
+
attr_accessor :rate_limit
|
634
|
+
|
635
|
+
def initialize(
|
636
|
+
meta: nil,
|
637
|
+
public_key: nil,
|
638
|
+
rate_limit: nil
|
639
|
+
)
|
640
|
+
if meta != nil
|
641
|
+
@meta = meta
|
642
|
+
end
|
643
|
+
if public_key != nil
|
644
|
+
@public_key = public_key
|
645
|
+
end
|
646
|
+
if rate_limit != nil
|
647
|
+
@rate_limit = rate_limit
|
648
|
+
end
|
649
|
+
end
|
650
|
+
|
651
|
+
def to_json(options = {})
|
652
|
+
hash = {}
|
653
|
+
self.instance_variables.each do |var|
|
654
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
655
|
+
end
|
656
|
+
hash.to_json
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
624
660
|
class Athena
|
625
661
|
# Unique identifier of the Resource.
|
626
662
|
attr_accessor :id
|
data/lib/strongdm.rb
CHANGED
@@ -37,6 +37,7 @@ module SDM
|
|
37
37
|
@account_attachments = AccountAttachments.new(host, insecure, self)
|
38
38
|
@account_grants = AccountGrants.new(host, insecure, self)
|
39
39
|
@accounts = Accounts.new(host, insecure, self)
|
40
|
+
@control_panel = ControlPanel.new(host, insecure, self)
|
40
41
|
@nodes = Nodes.new(host, insecure, self)
|
41
42
|
@resources = Resources.new(host, insecure, self)
|
42
43
|
@role_attachments = RoleAttachments.new(host, insecure, self)
|
@@ -98,6 +99,8 @@ module SDM
|
|
98
99
|
# 1. **Users:** humans who are authenticated through username and password or SSO.
|
99
100
|
# 2. **Service Accounts:** machines that are authenticated using a service token.
|
100
101
|
attr_reader :accounts
|
102
|
+
# ControlPanel contains all administrative controls.
|
103
|
+
attr_reader :control_panel
|
101
104
|
# Nodes make up the strongDM network, and allow your users to connect securely to your resources. There are two types of nodes:
|
102
105
|
# - **Gateways** are the entry points into network. They listen for connection from the strongDM client, and provide access to databases and servers.
|
103
106
|
# - **Relays** are used to extend the strongDM network into segmented subnets. They provide access to databases and servers but do not listen for incoming connections.
|
data/lib/svc.rb
CHANGED
@@ -486,6 +486,51 @@ module SDM
|
|
486
486
|
end
|
487
487
|
end
|
488
488
|
|
489
|
+
# ControlPanel contains all administrative controls.
|
490
|
+
class ControlPanel
|
491
|
+
def initialize(host, insecure, parent)
|
492
|
+
begin
|
493
|
+
if insecure
|
494
|
+
@stub = V1::ControlPanel::Stub.new(host, :this_channel_is_insecure)
|
495
|
+
else
|
496
|
+
cred = GRPC::Core::ChannelCredentials.new()
|
497
|
+
@stub = V1::ControlPanel::Stub.new(host, cred)
|
498
|
+
end
|
499
|
+
rescue => exception
|
500
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
501
|
+
end
|
502
|
+
@parent = parent
|
503
|
+
end
|
504
|
+
|
505
|
+
# GetSSHCAPublicKey retrieves the SSH CA public key.
|
506
|
+
def get_sshca_public_key(
|
507
|
+
deadline: nil
|
508
|
+
)
|
509
|
+
req = V1::ControlPanelGetSSHCAPublicKeyRequest.new()
|
510
|
+
|
511
|
+
tries = 0
|
512
|
+
plumbing_response = nil
|
513
|
+
loop do
|
514
|
+
begin
|
515
|
+
plumbing_response = @stub.get_sshca_public_key(req, metadata: @parent.get_metadata("ControlPanel.GetSSHCAPublicKey", req), deadline: deadline)
|
516
|
+
rescue => exception
|
517
|
+
if (@parent.shouldRetry(tries, exception))
|
518
|
+
tries + +@parent.jitterSleep(tries)
|
519
|
+
next
|
520
|
+
end
|
521
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
522
|
+
end
|
523
|
+
break
|
524
|
+
end
|
525
|
+
|
526
|
+
resp = ControlPanelGetSSHCAPublicKeyResponse.new()
|
527
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
528
|
+
resp.public_key = (plumbing_response.public_key)
|
529
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
530
|
+
resp
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
489
534
|
# Nodes make up the strongDM network, and allow your users to connect securely to your resources. There are two types of nodes:
|
490
535
|
# - **Gateways** are the entry points into network. They listen for connection from the strongDM client, and provide access to databases and servers.
|
491
536
|
# - **Relays** are used to extend the strongDM network into segmented subnets. They provide access to databases and servers but do not listen for incoming connections.
|
data/lib/version
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strongdm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- strongDM Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -118,8 +118,9 @@ files:
|
|
118
118
|
- doc/SDM/Client.html
|
119
119
|
- doc/SDM/Clustrix.html
|
120
120
|
- doc/SDM/Cockroach.html
|
121
|
+
- doc/SDM/ControlPanel.html
|
122
|
+
- doc/SDM/ControlPanelGetSSHCAPublicKeyResponse.html
|
121
123
|
- doc/SDM/CreateResponseMetadata.html
|
122
|
-
- doc/SDM/DB2.html
|
123
124
|
- doc/SDM/DB2LUW.html
|
124
125
|
- doc/SDM/DB2i.html
|
125
126
|
- doc/SDM/DeadlineExceededError.html
|
@@ -203,6 +204,8 @@ files:
|
|
203
204
|
- doc/V1/AccountGrants/Service.html
|
204
205
|
- doc/V1/Accounts.html
|
205
206
|
- doc/V1/Accounts/Service.html
|
207
|
+
- doc/V1/ControlPanel.html
|
208
|
+
- doc/V1/ControlPanel/Service.html
|
206
209
|
- doc/V1/Nodes.html
|
207
210
|
- doc/V1/Nodes/Service.html
|
208
211
|
- doc/V1/Resources.html
|
@@ -275,6 +278,8 @@ files:
|
|
275
278
|
- lib/grpc/account_grants_services_pb.rb
|
276
279
|
- lib/grpc/accounts_pb.rb
|
277
280
|
- lib/grpc/accounts_services_pb.rb
|
281
|
+
- lib/grpc/control_panel_pb.rb
|
282
|
+
- lib/grpc/control_panel_services_pb.rb
|
278
283
|
- lib/grpc/drivers_pb.rb
|
279
284
|
- lib/grpc/nodes_pb.rb
|
280
285
|
- lib/grpc/nodes_services_pb.rb
|
data/doc/SDM/DB2.html
DELETED
@@ -1,391 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class SDM::DB2 - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<script type="text/javascript">
|
10
|
-
var rdoc_rel_prefix = "../";
|
11
|
-
var index_rel_prefix = "../";
|
12
|
-
</script>
|
13
|
-
|
14
|
-
<script src="../js/navigation.js" defer></script>
|
15
|
-
<script src="../js/search.js" defer></script>
|
16
|
-
<script src="../js/search_index.js" defer></script>
|
17
|
-
<script src="../js/searcher.js" defer></script>
|
18
|
-
<script src="../js/darkfish.js" defer></script>
|
19
|
-
|
20
|
-
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
-
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<body id="top" role="document" class="class">
|
27
|
-
<nav role="navigation">
|
28
|
-
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
|
-
<h2>
|
31
|
-
<a href="../index.html" rel="home">Home</a>
|
32
|
-
</h2>
|
33
|
-
|
34
|
-
<div id="table-of-contents-navigation">
|
35
|
-
<a href="../table_of_contents.html#pages">Pages</a>
|
36
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
37
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
42
|
-
<form action="#" method="get" accept-charset="utf-8">
|
43
|
-
<div id="search-field-wrapper">
|
44
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
45
|
-
aria-autocomplete="list" aria-controls="search-results"
|
46
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
47
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
48
|
-
</div>
|
49
|
-
|
50
|
-
<ul id="search-results" aria-label="Search Results"
|
51
|
-
aria-busy="false" aria-expanded="false"
|
52
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
53
|
-
</form>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
</div>
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div id="parent-class-section" class="nav-section">
|
63
|
-
<h3>Parent</h3>
|
64
|
-
|
65
|
-
|
66
|
-
<p class="link"><a href="../Object.html">Object</a>
|
67
|
-
|
68
|
-
</div>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<!-- Method Quickref -->
|
73
|
-
<div id="method-list-section" class="nav-section">
|
74
|
-
<h3>Methods</h3>
|
75
|
-
|
76
|
-
<ul class="link-list" role="directory">
|
77
|
-
|
78
|
-
<li ><a href="#method-c-new">::new</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-i-to_json">#to_json</a>
|
81
|
-
|
82
|
-
</ul>
|
83
|
-
</div>
|
84
|
-
|
85
|
-
</div>
|
86
|
-
</nav>
|
87
|
-
|
88
|
-
<main role="main" aria-labelledby="class-SDM::DB2">
|
89
|
-
<h1 id="class-SDM::DB2" class="class">
|
90
|
-
class SDM::DB2
|
91
|
-
</h1>
|
92
|
-
|
93
|
-
<section class="description">
|
94
|
-
|
95
|
-
</section>
|
96
|
-
|
97
|
-
|
98
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<section class="attribute-method-details" class="method-section">
|
107
|
-
<header>
|
108
|
-
<h3>Attributes</h3>
|
109
|
-
</header>
|
110
|
-
|
111
|
-
|
112
|
-
<div id="attribute-i-database" class="method-detail">
|
113
|
-
<div class="method-heading attribute-method-heading">
|
114
|
-
<span class="method-name">database</span><span
|
115
|
-
class="attribute-access-type">[RW]</span>
|
116
|
-
</div>
|
117
|
-
|
118
|
-
<div class="method-description">
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
</div>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
<div id="attribute-i-healthy" class="method-detail">
|
126
|
-
<div class="method-heading attribute-method-heading">
|
127
|
-
<span class="method-name">healthy</span><span
|
128
|
-
class="attribute-access-type">[RW]</span>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div class="method-description">
|
132
|
-
|
133
|
-
<p>True if the datasource is reachable and the credentials are valid.</p>
|
134
|
-
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
<div id="attribute-i-hostname" class="method-detail">
|
139
|
-
<div class="method-heading attribute-method-heading">
|
140
|
-
<span class="method-name">hostname</span><span
|
141
|
-
class="attribute-access-type">[RW]</span>
|
142
|
-
</div>
|
143
|
-
|
144
|
-
<div class="method-description">
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div id="attribute-i-id" class="method-detail">
|
152
|
-
<div class="method-heading attribute-method-heading">
|
153
|
-
<span class="method-name">id</span><span
|
154
|
-
class="attribute-access-type">[RW]</span>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
<div class="method-description">
|
158
|
-
|
159
|
-
<p>Unique identifier of the Resource.</p>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div id="attribute-i-name" class="method-detail">
|
165
|
-
<div class="method-heading attribute-method-heading">
|
166
|
-
<span class="method-name">name</span><span
|
167
|
-
class="attribute-access-type">[RW]</span>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
<div class="method-description">
|
171
|
-
|
172
|
-
<p>Unique human-readable name of the Resource.</p>
|
173
|
-
|
174
|
-
</div>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div id="attribute-i-password" class="method-detail">
|
178
|
-
<div class="method-heading attribute-method-heading">
|
179
|
-
<span class="method-name">password</span><span
|
180
|
-
class="attribute-access-type">[RW]</span>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
<div class="method-description">
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
|
190
|
-
<div id="attribute-i-port" class="method-detail">
|
191
|
-
<div class="method-heading attribute-method-heading">
|
192
|
-
<span class="method-name">port</span><span
|
193
|
-
class="attribute-access-type">[RW]</span>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div class="method-description">
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
<div id="attribute-i-port_override" class="method-detail">
|
204
|
-
<div class="method-heading attribute-method-heading">
|
205
|
-
<span class="method-name">port_override</span><span
|
206
|
-
class="attribute-access-type">[RW]</span>
|
207
|
-
</div>
|
208
|
-
|
209
|
-
<div class="method-description">
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
</div>
|
214
|
-
</div>
|
215
|
-
|
216
|
-
<div id="attribute-i-tags" class="method-detail">
|
217
|
-
<div class="method-heading attribute-method-heading">
|
218
|
-
<span class="method-name">tags</span><span
|
219
|
-
class="attribute-access-type">[RW]</span>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div class="method-description">
|
223
|
-
|
224
|
-
<p>Tags is a map of key, value pairs.</p>
|
225
|
-
|
226
|
-
</div>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
<div id="attribute-i-username" class="method-detail">
|
230
|
-
<div class="method-heading attribute-method-heading">
|
231
|
-
<span class="method-name">username</span><span
|
232
|
-
class="attribute-access-type">[RW]</span>
|
233
|
-
</div>
|
234
|
-
|
235
|
-
<div class="method-description">
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
</section>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
247
|
-
<header>
|
248
|
-
<h3>Public Class Methods</h3>
|
249
|
-
</header>
|
250
|
-
|
251
|
-
|
252
|
-
<div id="method-c-new" class="method-detail ">
|
253
|
-
|
254
|
-
<div class="method-heading">
|
255
|
-
<span class="method-name">new</span><span
|
256
|
-
class="method-args">( id:nil \ , name:nil \ , healthy:nil \ , tags:nil \ , hostname:nil \ , username:nil \ , password:nil \ , database:nil \ , port_override:nil \ , port:nil \ )</span>
|
257
|
-
|
258
|
-
<span class="method-click-advice">click to toggle source</span>
|
259
|
-
|
260
|
-
</div>
|
261
|
-
|
262
|
-
|
263
|
-
<div class="method-description">
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<div class="method-source-code" id="new-source">
|
271
|
-
<pre><span class="ruby-comment"># File lib/models/porcelain.rb, line 864</span>
|
272
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(
|
273
|
-
<span class="ruby-value">id:</span><span class="ruby-keyword">nil</span> \
|
274
|
-
,
|
275
|
-
<span class="ruby-value">name:</span><span class="ruby-keyword">nil</span> \
|
276
|
-
,
|
277
|
-
<span class="ruby-value">healthy:</span><span class="ruby-keyword">nil</span> \
|
278
|
-
,
|
279
|
-
<span class="ruby-value">tags:</span><span class="ruby-keyword">nil</span> \
|
280
|
-
,
|
281
|
-
<span class="ruby-value">hostname:</span><span class="ruby-keyword">nil</span> \
|
282
|
-
,
|
283
|
-
<span class="ruby-value">username:</span><span class="ruby-keyword">nil</span> \
|
284
|
-
,
|
285
|
-
<span class="ruby-value">password:</span><span class="ruby-keyword">nil</span> \
|
286
|
-
,
|
287
|
-
<span class="ruby-value">database:</span><span class="ruby-keyword">nil</span> \
|
288
|
-
,
|
289
|
-
<span class="ruby-value">port_override:</span><span class="ruby-keyword">nil</span> \
|
290
|
-
,
|
291
|
-
<span class="ruby-value">port:</span><span class="ruby-keyword">nil</span> \
|
292
|
-
)
|
293
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
294
|
-
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
|
295
|
-
<span class="ruby-keyword">end</span>
|
296
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
297
|
-
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
298
|
-
<span class="ruby-keyword">end</span>
|
299
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">healthy</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
300
|
-
<span class="ruby-ivar">@healthy</span> = <span class="ruby-identifier">healthy</span>
|
301
|
-
<span class="ruby-keyword">end</span>
|
302
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">tags</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
303
|
-
<span class="ruby-ivar">@tags</span> = <span class="ruby-identifier">tags</span>
|
304
|
-
<span class="ruby-keyword">end</span>
|
305
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">hostname</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
306
|
-
<span class="ruby-ivar">@hostname</span> = <span class="ruby-identifier">hostname</span>
|
307
|
-
<span class="ruby-keyword">end</span>
|
308
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">username</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
309
|
-
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
310
|
-
<span class="ruby-keyword">end</span>
|
311
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">password</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
312
|
-
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
313
|
-
<span class="ruby-keyword">end</span>
|
314
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">database</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
315
|
-
<span class="ruby-ivar">@database</span> = <span class="ruby-identifier">database</span>
|
316
|
-
<span class="ruby-keyword">end</span>
|
317
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port_override</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
318
|
-
<span class="ruby-ivar">@port_override</span> = <span class="ruby-identifier">port_override</span>
|
319
|
-
<span class="ruby-keyword">end</span>
|
320
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
321
|
-
<span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
|
322
|
-
<span class="ruby-keyword">end</span>
|
323
|
-
<span class="ruby-keyword">end</span></pre>
|
324
|
-
</div>
|
325
|
-
|
326
|
-
</div>
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
</div>
|
332
|
-
|
333
|
-
|
334
|
-
</section>
|
335
|
-
|
336
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
337
|
-
<header>
|
338
|
-
<h3>Public Instance Methods</h3>
|
339
|
-
</header>
|
340
|
-
|
341
|
-
|
342
|
-
<div id="method-i-to_json" class="method-detail ">
|
343
|
-
|
344
|
-
<div class="method-heading">
|
345
|
-
<span class="method-name">to_json</span><span
|
346
|
-
class="method-args">(options={})</span>
|
347
|
-
|
348
|
-
<span class="method-click-advice">click to toggle source</span>
|
349
|
-
|
350
|
-
</div>
|
351
|
-
|
352
|
-
|
353
|
-
<div class="method-description">
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
<div class="method-source-code" id="to_json-source">
|
361
|
-
<pre><span class="ruby-comment"># File lib/models/porcelain.rb, line 916</span>
|
362
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_json</span>(<span class="ruby-identifier">options</span>={})
|
363
|
-
<span class="ruby-identifier">hash</span> = {}
|
364
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">var</span><span class="ruby-operator">|</span>
|
365
|
-
<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">var</span>.<span class="ruby-identifier">id2name</span>.<span class="ruby-identifier">delete_prefix</span>(<span class="ruby-string">'@'</span>)] = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">instance_variable_get</span> <span class="ruby-identifier">var</span>
|
366
|
-
<span class="ruby-keyword">end</span>
|
367
|
-
<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">to_json</span>
|
368
|
-
<span class="ruby-keyword">end</span></pre>
|
369
|
-
</div>
|
370
|
-
|
371
|
-
</div>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
</div>
|
377
|
-
|
378
|
-
|
379
|
-
</section>
|
380
|
-
|
381
|
-
</section>
|
382
|
-
|
383
|
-
</main>
|
384
|
-
|
385
|
-
|
386
|
-
<footer id="validator-badges" role="contentinfo">
|
387
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
388
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.2.
|
389
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
390
|
-
</footer>
|
391
|
-
|