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(id: nil, name: nil, healthy: nil, tags: nil, secret_store_id: nil, egress_filter: nil, hostname: nil, username: nil, port: nil, public_key: nil, port_forwarding: nil, allow_deprecated_key_exchanges: nil) ⇒ SSH

Returns a new instance of SSH.



5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
# File 'lib/models/porcelain.rb', line 5381

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

Instance Attribute Details

#allow_deprecated_key_exchangesObject

Returns the value of attribute allow_deprecated_key_exchanges.



5379
5380
5381
# File 'lib/models/porcelain.rb', line 5379

def allow_deprecated_key_exchanges
  @allow_deprecated_key_exchanges
end

#egress_filterObject

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



5367
5368
5369
# File 'lib/models/porcelain.rb', line 5367

def egress_filter
  @egress_filter
end

#healthyObject

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



5361
5362
5363
# File 'lib/models/porcelain.rb', line 5361

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



5369
5370
5371
# File 'lib/models/porcelain.rb', line 5369

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



5357
5358
5359
# File 'lib/models/porcelain.rb', line 5357

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



5359
5360
5361
# File 'lib/models/porcelain.rb', line 5359

def name
  @name
end

#portObject

Returns the value of attribute port.



5373
5374
5375
# File 'lib/models/porcelain.rb', line 5373

def port
  @port
end

#port_forwardingObject

Returns the value of attribute port_forwarding.



5377
5378
5379
# File 'lib/models/porcelain.rb', line 5377

def port_forwarding
  @port_forwarding
end

#public_keyObject

Returns the value of attribute public_key.



5375
5376
5377
# File 'lib/models/porcelain.rb', line 5375

def public_key
  @public_key
end

#secret_store_idObject

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



5365
5366
5367
# File 'lib/models/porcelain.rb', line 5365

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



5363
5364
5365
# File 'lib/models/porcelain.rb', line 5363

def tags
  @tags
end

#usernameObject

Returns the value of attribute username.



5371
5372
5373
# File 'lib/models/porcelain.rb', line 5371

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5433
5434
5435
5436
5437
5438
5439
# File 'lib/models/porcelain.rb', line 5433

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