Class: SDM::SSH

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_deprecated_key_exchanges: nil, egress_filter: nil, healthy: nil, hostname: nil, id: nil, name: nil, port: nil, port_forwarding: nil, public_key: nil, secret_store_id: nil, tags: nil, username: nil) ⇒ SSH

Returns a new instance of SSH.



6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
# File 'lib/models/porcelain.rb', line 6729

def initialize(
  allow_deprecated_key_exchanges: nil,
  egress_filter: nil,
  healthy: nil,
  hostname: nil,
  id: nil,
  name: nil,
  port: nil,
  port_forwarding: nil,
  public_key: nil,
  secret_store_id: nil,
  tags: nil,
  username: nil
)
  if allow_deprecated_key_exchanges != nil
    @allow_deprecated_key_exchanges = allow_deprecated_key_exchanges
  end
  if egress_filter != nil
    @egress_filter = egress_filter
  end
  if healthy != nil
    @healthy = healthy
  end
  if hostname != nil
    @hostname = hostname
  end
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if port != nil
    @port = port
  end
  if port_forwarding != nil
    @port_forwarding = port_forwarding
  end
  if public_key != nil
    @public_key = public_key
  end
  if secret_store_id != nil
    @secret_store_id = secret_store_id
  end
  if tags != nil
    @tags = tags
  end
  if username != nil
    @username = username
  end
end

Instance Attribute Details

#allow_deprecated_key_exchangesObject

Returns the value of attribute allow_deprecated_key_exchanges.



6705
6706
6707
# File 'lib/models/porcelain.rb', line 6705

def allow_deprecated_key_exchanges
  @allow_deprecated_key_exchanges
end

#egress_filterObject

A filter applied to the routing logic to pin datasource to nodes.



6707
6708
6709
# File 'lib/models/porcelain.rb', line 6707

def egress_filter
  @egress_filter
end

#healthyObject

True if the datasource is reachable and the credentials are valid.



6709
6710
6711
# File 'lib/models/porcelain.rb', line 6709

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



6711
6712
6713
# File 'lib/models/porcelain.rb', line 6711

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



6713
6714
6715
# File 'lib/models/porcelain.rb', line 6713

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



6715
6716
6717
# File 'lib/models/porcelain.rb', line 6715

def name
  @name
end

#portObject

Returns the value of attribute port.



6717
6718
6719
# File 'lib/models/porcelain.rb', line 6717

def port
  @port
end

#port_forwardingObject

Returns the value of attribute port_forwarding.



6719
6720
6721
# File 'lib/models/porcelain.rb', line 6719

def port_forwarding
  @port_forwarding
end

#public_keyObject

Returns the value of attribute public_key.



6721
6722
6723
# File 'lib/models/porcelain.rb', line 6721

def public_key
  @public_key
end

#secret_store_idObject

ID of the secret store containing credentials for this resource, if any.



6723
6724
6725
# File 'lib/models/porcelain.rb', line 6723

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



6725
6726
6727
# File 'lib/models/porcelain.rb', line 6725

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



6727
6728
6729
# File 'lib/models/porcelain.rb', line 6727

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6781
6782
6783
6784
6785
6786
6787
# File 'lib/models/porcelain.rb', line 6781

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end