Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 454900 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +56 lines)
Line  Link Here
0
-- ./src/libvirt-php.c
0
++ ./src/libvirt-php.c
Lines 111-116 static zend_function_entry libvirt_funct Link Here
111
	PHP_FE(libvirt_domain_get_connect, NULL)
111
	PHP_FE(libvirt_domain_get_connect, NULL)
112
	PHP_FE(libvirt_domain_migrate, NULL)
112
	PHP_FE(libvirt_domain_migrate, NULL)
113
	PHP_FE(libvirt_domain_migrate_to_uri, NULL)
113
	PHP_FE(libvirt_domain_migrate_to_uri, NULL)
114
	PHP_FE(libvirt_domain_migrate_to_uri2, NULL)
114
	PHP_FE(libvirt_domain_get_job_info, NULL)
115
	PHP_FE(libvirt_domain_get_job_info, NULL)
115
	PHP_FE(libvirt_domain_xml_xpath, NULL)
116
	PHP_FE(libvirt_domain_xml_xpath, NULL)
116
	PHP_FE(libvirt_domain_get_block_info, NULL)
117
	PHP_FE(libvirt_domain_get_block_info, NULL)
Lines 5367-5372 PHP_FUNCTION(libvirt_domain_migrate_to_u Link Here
5367
	RETURN_FALSE;
5368
	RETURN_FALSE;
5368
}
5369
}
5369
5370
5371
/*
5372
	Function name:	libvirt_domain_migrate_to_uri2
5373
	Since version:	0.4.6(-1)
5374
	Description:	Function is used migrate domain to another libvirt daemon specified by it's URI
5375
	Arguments:	@res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
5376
			@dconnuri [string]: URI for target libvirtd
5377
			@miguri [string]: URI for invoking the migration
5378
			@dxml [string]: XML config for launching guest on target
5379
			@flags [int]: migration flags
5380
			@dname [string]: domain name to rename domain to on destination side
5381
			@bandwidth [int]: migration bandwidth in Mbps
5382
	Returns:	TRUE for success, FALSE on error
5383
*/
5384
PHP_FUNCTION(libvirt_domain_migrate_to_uri2)
5385
{
5386
	php_libvirt_domain *domain=NULL;
5387
	zval *zdomain;
5388
	int retval;
5389
	char *dconnuri;
5390
	int dconnuri_len;
5391
	char *miguri;
5392
	int miguri_len;
5393
	char *dxml;
5394
	int dxml_len;
5395
	long flags=0;
5396
	char *dname;
5397
	int dname_len;
5398
	long bandwidth;	 
5399
 
5400
 	dconnuri=NULL;
5401
	dconnuri_len=0;
5402
	miguri=NULL;
5403
	miguri_len=0;
5404
	dxml=NULL;
5405
	dxml_len=0;
5406
	dname=NULL;
5407
	dname_len=0;
5408
	bandwidth=0;
5409
	GET_DOMAIN_FROM_ARGS("r|ssslsl",&zdomain,&dconnuri,&dconnuri_len,&miguri,&miguri_len,&dxml,&dxml_len,&flags,&dname,&dname_len,&bandwidth);
5410
5411
	// set to NULL if empty string
5412
	if (dconnuri_len == 0) dconnuri=NULL;
5413
	if (miguri_len == 0) miguri=NULL;
5414
	if (dxml_len == 0) dxml=NULL;
5415
	if (dname_len == 0) dname=NULL;
5416
5417
	retval=virDomainMigrateToURI2(domain->domain,dconnuri,miguri,dxml,flags,dname,bandwidth);
5418
	DPRINTF("%s: virDomainMigrateToURI2() returned %d\n", PHPFUNC, retval);
5419
5420
	if (retval == 0) RETURN_TRUE;
5421
	RETURN_FALSE;
5422
}
5370
5423
5371
/*
5424
/*
5372
	Function name:	libvirt_domain_migrate
5425
	Function name:	libvirt_domain_migrate
5373
-- ./src/libvirt-php.h
5426
++ ./src/libvirt-php.h
Lines 336-341 PHP_FUNCTION(libvirt_domain_xml_xpath); Link Here
336
PHP_FUNCTION(libvirt_domain_get_block_info);
336
PHP_FUNCTION(libvirt_domain_get_block_info);
337
PHP_FUNCTION(libvirt_domain_get_network_info);
337
PHP_FUNCTION(libvirt_domain_get_network_info);
338
PHP_FUNCTION(libvirt_domain_migrate_to_uri);
338
PHP_FUNCTION(libvirt_domain_migrate_to_uri);
339
PHP_FUNCTION(libvirt_domain_migrate_to_uri2);
339
PHP_FUNCTION(libvirt_domain_get_autostart);
340
PHP_FUNCTION(libvirt_domain_get_autostart);
340
PHP_FUNCTION(libvirt_domain_set_autostart);
341
PHP_FUNCTION(libvirt_domain_set_autostart);
341
PHP_FUNCTION(libvirt_domain_is_active);
342
PHP_FUNCTION(libvirt_domain_is_active);

Return to bug 454900