Class: Kaltura::KalturaServerNodeService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Server Node service

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaServerNodeService

Returns a new instance of KalturaServerNodeService.



4288
4289
4290
# File 'lib/kaltura_client.rb', line 4288

def initialize(client)
	super(client)
end

Instance Method Details

#add(server_node) ⇒ KalturaServerNode

Adds a server node to the Kaltura DB.

Returns:



4294
4295
4296
4297
4298
4299
4300
4301
4302
# File 'lib/kaltura_client.rb', line 4294

def add(server_node)
	kparams = {}
	client.add_param(kparams, 'serverNode', server_node)
	client.queue_service_action_call('servernode', 'add', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#delete(server_node_id) ⇒ Object

delete server node by id

Returns:



4306
4307
4308
4309
4310
4311
4312
4313
4314
# File 'lib/kaltura_client.rb', line 4306

def delete(server_node_id)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.queue_service_action_call('servernode', 'delete', '', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#disable(server_node_id) ⇒ KalturaServerNode

Disable server node by id

Returns:



4318
4319
4320
4321
4322
4323
4324
4325
4326
# File 'lib/kaltura_client.rb', line 4318

def disable(server_node_id)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.queue_service_action_call('servernode', 'disable', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#enable(server_node_id) ⇒ KalturaServerNode

Enable server node by id

Returns:



4330
4331
4332
4333
4334
4335
4336
4337
4338
# File 'lib/kaltura_client.rb', line 4330

def enable(server_node_id)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.queue_service_action_call('servernode', 'enable', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get(server_node_id) ⇒ KalturaServerNode

Get server node by id

Returns:



4342
4343
4344
4345
4346
4347
4348
4349
4350
# File 'lib/kaltura_client.rb', line 4342

def get(server_node_id)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.queue_service_action_call('servernode', 'get', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#get_full_path(host_name, protocol = 'http', delivery_format = KalturaNotImplemented, delivery_type = KalturaNotImplemented) ⇒ string

Get the edge server node full path

Returns:

  • (string)


4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
# File 'lib/kaltura_client.rb', line 4354

def get_full_path(host_name, protocol='http', delivery_format=KalturaNotImplemented, delivery_type=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'hostName', host_name)
	client.add_param(kparams, 'protocol', protocol)
	client.add_param(kparams, 'deliveryFormat', delivery_format)
	client.add_param(kparams, 'deliveryType', delivery_type)
	client.queue_service_action_call('servernode', 'getFullPath', 'string', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaServerNodeListResponse



4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
# File 'lib/kaltura_client.rb', line 4368

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter)
	client.add_param(kparams, 'pager', pager)
	client.queue_service_action_call('servernode', 'list', 'KalturaServerNodeListResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#mark_offline(server_node_id) ⇒ KalturaServerNode

Mark server node offline

Returns:



4381
4382
4383
4384
4385
4386
4387
4388
4389
# File 'lib/kaltura_client.rb', line 4381

def mark_offline(server_node_id)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.queue_service_action_call('servernode', 'markOffline', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#report_status(host_name, server_node = KalturaNotImplemented, server_node_status = 1) ⇒ KalturaServerNode

Update server node status

Returns:



4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
# File 'lib/kaltura_client.rb', line 4393

def report_status(host_name, server_node=KalturaNotImplemented, server_node_status=1)
	kparams = {}
	client.add_param(kparams, 'hostName', host_name)
	client.add_param(kparams, 'serverNode', server_node)
	client.add_param(kparams, 'serverNodeStatus', server_node_status)
	client.queue_service_action_call('servernode', 'reportStatus', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#update(server_node_id, server_node) ⇒ KalturaServerNode

Update server node by id

Returns:



4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
# File 'lib/kaltura_client.rb', line 4407

def update(server_node_id, server_node)
	kparams = {}
	client.add_param(kparams, 'serverNodeId', server_node_id)
	client.add_param(kparams, 'serverNode', server_node)
	client.queue_service_action_call('servernode', 'update', 'KalturaServerNode', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end