当前位置: 首页>>代码示例>>Java>>正文


Java Description类代码示例

本文整理汇总了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;
}
 
开发者ID:Juniper,项目名称:vijava,代码行数:26,代码来源:CreateVM.java

示例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;
}
 
开发者ID:Juniper,项目名称:vijava,代码行数:39,代码来源:ExtMgrUtil.java


注:本文中的com.vmware.vim25.Description类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。