本文整理汇总了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;
}