本文整理匯總了Java中com.vmware.vim25.Description類的典型用法代碼示例。如果您正苦於以下問題:Java Description類的具體用法?Java Description怎麽用?Java Description使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Description類屬於com.vmware.vim25包,在下文中一共展示了Description類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createNicSpec
import com.vmware.vim25.Description; //導入依賴的package包/類
static VirtualDeviceConfigSpec createNicSpec(String netName,
String nicName) throws Exception
{
VirtualDeviceConfigSpec nicSpec =
new VirtualDeviceConfigSpec();
nicSpec.setOperation(VirtualDeviceConfigSpecOperation.add);
VirtualEthernetCard nic = new VirtualPCNet32();
VirtualEthernetCardNetworkBackingInfo nicBacking =
new VirtualEthernetCardNetworkBackingInfo();
nicBacking.setDeviceName(netName);
Description info = new Description();
info.setLabel(nicName);
info.setSummary(netName);
nic.setDeviceInfo(info);
// type: "generated", "manual", "assigned" by VC
nic.setAddressType("generated");
nic.setBacking(nicBacking);
nic.setKey(0);
nicSpec.setDevice(nic);
return nicSpec;
}
示例2: createExtensionObject
import com.vmware.vim25.Description; //導入依賴的package包/類
static Extension createExtensionObject(Properties props)
{
String companyStr = props.getProperty("companyStr");
String descStr = props.getProperty("descStr");
String keyStr = props.getProperty("keyStr");
String extUrl = props.getProperty("extUrl");
String adminEmail = props.getProperty("adminEmail");
String version = props.getProperty("version");
Description description = new Description();
description.setLabel(keyStr);
description.setSummary(descStr);
ExtensionServerInfo esi = new ExtensionServerInfo();
esi.setDescription(description);
esi.setUrl(extUrl);
esi.setCompany(companyStr);
// the following type must NOT be changed
esi.setType("com.vmware.vim.viClientScripts");
esi.setAdminEmail( new String[] { adminEmail } );
ExtensionClientInfo eci = new ExtensionClientInfo();
eci.setCompany(companyStr);
eci.setUrl(extUrl);
eci.setType("com.vmware.vim.viClientScripts");
eci.setVersion(version);
eci.setDescription(description);
Extension ext = new Extension();
ext.setServer(new ExtensionServerInfo[]{esi});
ext.setClient(new ExtensionClientInfo[] {eci});
ext.setDescription(description);
ext.setKey(keyStr);
ext.setVersion(version);
ext.setLastHeartbeatTime(Calendar.getInstance());
return ext;
}