Class: SDM::Kubernetes

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, hostname: nil, port: nil, certificate_authority: nil, certificate_authority_filename: nil, client_certificate: nil, client_certificate_filename: nil, client_key: nil, client_key_filename: nil) ⇒ Kubernetes

Returns a new instance of Kubernetes.



1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
# File 'lib/models/porcelain.rb', line 1427

def initialize(
	id:nil \
,
	name:nil \
,
	healthy:nil \
,
	tags:nil \
,
	hostname:nil \
,
	port:nil \
,
	certificate_authority:nil \
,
	certificate_authority_filename:nil \
,
	client_certificate:nil \
,
	client_certificate_filename:nil \
,
	client_key:nil \
,
	client_key_filename: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 hostname != nil
		@hostname = hostname
	end
	if port != nil
		@port = port
	end
	if certificate_authority != nil
		@certificate_authority = certificate_authority
	end
	if certificate_authority_filename != nil
		@certificate_authority_filename = certificate_authority_filename
	end
	if client_certificate != nil
		@client_certificate = client_certificate
	end
	if client_certificate_filename != nil
		@client_certificate_filename = client_certificate_filename
	end
	if client_key != nil
		@client_key = client_key
	end
	if client_key_filename != nil
		@client_key_filename = client_key_filename
	end
end

Instance Attribute Details

#certificate_authorityObject

Returns the value of attribute certificate_authority.



1416
1417
1418
# File 'lib/models/porcelain.rb', line 1416

def certificate_authority
  @certificate_authority
end

#certificate_authority_filenameObject

Returns the value of attribute certificate_authority_filename.



1418
1419
1420
# File 'lib/models/porcelain.rb', line 1418

def certificate_authority_filename
  @certificate_authority_filename
end

#client_certificateObject

Returns the value of attribute client_certificate.



1420
1421
1422
# File 'lib/models/porcelain.rb', line 1420

def client_certificate
  @client_certificate
end

#client_certificate_filenameObject

Returns the value of attribute client_certificate_filename.



1422
1423
1424
# File 'lib/models/porcelain.rb', line 1422

def client_certificate_filename
  @client_certificate_filename
end

#client_keyObject

Returns the value of attribute client_key.



1424
1425
1426
# File 'lib/models/porcelain.rb', line 1424

def client_key
  @client_key
end

#client_key_filenameObject

Returns the value of attribute client_key_filename.



1426
1427
1428
# File 'lib/models/porcelain.rb', line 1426

def client_key_filename
  @client_key_filename
end

#healthyObject

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



1408
1409
1410
# File 'lib/models/porcelain.rb', line 1408

def healthy
  @healthy
end

#hostnameObject

Returns the value of attribute hostname.



1412
1413
1414
# File 'lib/models/porcelain.rb', line 1412

def hostname
  @hostname
end

#idObject

Unique identifier of the Resource.



1404
1405
1406
# File 'lib/models/porcelain.rb', line 1404

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1406
1407
1408
# File 'lib/models/porcelain.rb', line 1406

def name
  @name
end

#portObject

Returns the value of attribute port.



1414
1415
1416
# File 'lib/models/porcelain.rb', line 1414

def port
  @port
end

#tagsObject

Tags is a map of key, value pairs.



1410
1411
1412
# File 'lib/models/porcelain.rb', line 1410

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1489
1490
1491
1492
1493
1494
1495
# File 'lib/models/porcelain.rb', line 1489

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