コード例 #1
0
ファイル: SfcL2SfgDataListener.java プロジェクト: vuva/sfc
  private String getSfDplIp(SfDataPlaneLocator sfDpl) {
    String sfIp = null;

    LocatorType sffLocatorType = sfDpl.getLocatorType();
    Class<? extends DataContainer> implementedInterface = sffLocatorType.getImplementedInterface();

    if (implementedInterface.equals(Ip.class)) {
      if (((IpPortLocator) sffLocatorType).getIp() != null) {
        sfIp = String.valueOf(((IpPortLocator) sffLocatorType).getIp().getValue());
      }
    }
    return sfIp;
  }
コード例 #2
0
ファイル: SfcL2SfgDataListener.java プロジェクト: vuva/sfc
  private String getSfDplMac(SfDataPlaneLocator sfDpl) {
    String sfMac = null;

    LocatorType sffLocatorType = sfDpl.getLocatorType();
    Class<? extends DataContainer> implementedInterface = sffLocatorType.getImplementedInterface();

    LOG.debug("implementedInterface: {}", implementedInterface);
    // Mac/IP and possibly VLAN
    if (implementedInterface.equals(Mac.class)) {
      if (((MacAddressLocator) sffLocatorType).getMac() != null) {
        sfMac = ((MacAddressLocator) sffLocatorType).getMac().getValue();
      }
    }

    return sfMac;
  }