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.



4230
4231
4232
# File 'lib/kaltura_client.rb', line 4230

def initialize(client)
	super(client)
end

Instance Method Details

#add(server_node) ⇒ KalturaServerNode

Adds a server node to the Kaltura DB.

Returns:



4236
4237
4238
4239
4240
4241
4242
4243
4244
# File 'lib/kaltura_client.rb', line 4236

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:



4248
4249
4250
4251
4252
4253
4254
4255
4256
# File 'lib/kaltura_client.rb', line 4248

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:



4260
4261
4262
4263
4264
4265
4266
4267
4268
# File 'lib/kaltura_client.rb', line 4260

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:



4272
4273
4274
4275
4276
4277
4278
4279
4280
# File 'lib/kaltura_client.rb', line 4272

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:



4284
4285
4286
4287
4288
4289
4290
4291
4292
# File 'lib/kaltura_client.rb', line 4284

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)


4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
# File 'lib/kaltura_client.rb', line 4296

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



4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
# File 'lib/kaltura_client.rb', line 4310

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:



4323
4324
4325
4326
4327
4328
4329
4330
4331
# File 'lib/kaltura_client.rb', line 4323

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:



4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
# File 'lib/kaltura_client.rb', line 4335

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:



4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
# File 'lib/kaltura_client.rb', line 4349

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