Examples of NicSpec


Examples of com.vmware.bdd.spectypes.NicSpec

   private static Map<String, NicSpec> convertNics(Set<NicEntity> nicEntities) {
      Map<String, NicSpec> nicSpecMap = new HashMap<String, NicSpec>();
      if (nicEntities != null) {
         for (NicEntity nicEntity : nicEntities) {
            String pgName = nicEntity.getNetworkEntity().getPortGroup();
            NicSpec nicSpec = new NicSpec();
            nicSpec.setIpv4Address(nicEntity.getIpv4Address());
            nicSpec.setIpv6Address(nicEntity.getIpv6Address());
            nicSpec.setMacAddress(nicEntity.getMacAddress());
            nicSpec.setNetworkName(nicEntity.getNetworkEntity().getName());
            nicSpec.setNetTrafficDefinitionSet(nicEntity.getNetTrafficDefs());
            nicSpecMap.put(pgName, nicSpec);
         }
      }
      return nicSpecMap;
   }
View Full Code Here

Examples of com.vmware.bdd.spectypes.NicSpec

      for (NetTrafficType type : clusterNetConfig.keySet()) {
         int index = 0;
         for (String netName : clusterNetConfig.get(type)) {
            String pgName = netName2PgName.get(netName);
            NicSpec nicSpec = nics.get(pgName);
            if (nicSpec == null) {
               nicSpec = new NicSpec();
               nicSpec.setIpv4Address(Constants.NULL_IPV4_ADDRESS);
               nicSpec.setIpv6Address(Constants.NULL_IPV6_ADDRESS);
               nicSpec.setPortGroupName(pgName);
               nicSpec.addToNetDefs(type, index);
               nicSpec.setNetworkName(netName);
               nics.put(pgName, nicSpec);
            } else {
               nicSpec.addToNetDefs(type, index);
            }
            index++;
         }
      }
   }
View Full Code Here

Examples of com.vmware.bdd.spectypes.NicSpec

   public boolean updateNicOfPortGroup(String pgName, String ipv4Address,
         String ipv6Address, String macAddress) {
      if (nics == null || nics.isEmpty() || !nics.containsKey(pgName)) {
         return false;
      }
      NicSpec nicSpec = nics.get(pgName);
      if (ipv4Address != null) {
         nicSpec.setIpv4Address(ipv4Address);
      }
      if (ipv6Address != null) {
         nicSpec.setIpv6Address(ipv6Address);
      }
      if (macAddress != null) {
         nicSpec.setMacAddress(macAddress);
      }
      return true;
   }
View Full Code Here

Examples of com.vmware.bdd.spectypes.NicSpec

      assertTrue(def1.equals(def1));
      assertFalse(def1.equals(null));
      assertTrue(def1.equals(def2));
      assertTrue(def1.hashCode() == def2.hashCode());

      NicSpec nicSpec = new NicSpec();
      nicSpec.addToNetDefs(NetConfigInfo.NetTrafficType.MGT_NETWORK, 2);
      nicSpec.addToNetDefs(NetConfigInfo.NetTrafficType.MGT_NETWORK, 2);
      assertTrue(nicSpec.getNetTrafficDefinitionSet().size() == 1);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.