Package com.vmware.bdd.entity

Examples of com.vmware.bdd.entity.NicEntity


      // set ipconfigs field even IPs are not yet retrieved, otherwise if
      // Tomcat crashes, we will lost the ipconfigs template
      for (NicSpec nicSpec : vNode.getNics().values()) {
         NetworkEntity networkEntity =
               networkMgr.getNetworkEntityByName(nicSpec.getNetworkName());
         NicEntity nicEntity = nodeEntity.findNic(networkEntity);
         if (nicEntity == null) {
            nicEntity = new NicEntity();
            nodeEntity.getNics().add(nicEntity);
         }
         nicEntity.setIpv4Address(nicSpec.getIpv4Address());
         nicEntity.setIpv6Address(nicSpec.getIpv6Address());
         nicEntity.setMacAddress(nicSpec.getMacAddress());
         nicEntity.setNetTrafficDefs(nicSpec.getNetTrafficDefinitionSet());
         nicEntity.setNetworkEntity(networkEntity);
         nicEntity.setNodeEntity(nodeEntity);
         if (vNode.getVmMobId() != null) {
            VcVmUtil.populateNicInfo(nicEntity, vNode.getVmMobId(),
                  networkEntity.getPortGroup());
         }
      }
View Full Code Here


      netDefs2.add(netDef5);

      Set<NicSpec.NetTrafficDefinition> netDefs3 = new HashSet<NicSpec.NetTrafficDefinition>();
      netDefs3.add(netDef3);

      NicEntity nic1 = new NicEntity();
      NetworkEntity net1 = new NetworkEntity();
      net1.setPortGroup("pg1");
      net1.setName("net1");
      nic1.setIpv4Address("192.168.0.1");
      nic1.setNetTrafficDefs(netDefs1);
      nic1.setNetworkEntity(net1);

      NicEntity nic2 = new NicEntity();
      nic2.setIpv4Address("192.168.1.1");
      nic2.setNetTrafficDefs(netDefs2);
      NetworkEntity net2 = new NetworkEntity();
      net2.setPortGroup("pg2");
      net2.setName("net2");
      nic2.setNetworkEntity(net2);

      NicEntity nic3 = new NicEntity();
      nic3.setIpv4Address("192.168.2.1");
      nic3.setNetTrafficDefs(netDefs3);
      NetworkEntity net3 = new NetworkEntity();
      net3.setPortGroup("pg3");
      net3.setName("net3");
      nic3.setNetworkEntity(net3);

      nicEntitySet.add(nic1);
      nicEntitySet.add(nic2);
      nicEntitySet.add(nic3);
View Full Code Here

TOP

Related Classes of com.vmware.bdd.entity.NicEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.