本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.getDescription()
方法的一些代码示例,展示了Interface.getDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interface.getDescription()
方法的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface
类名称:Interface
方法名:getDescription
[英]A textual description of the interface. A server implementation MAY map this leaf to the ifAlias MIB object. Such an implementation needs to use some mechanism to handle the differences in size and characters allowed between this leaf and ifAlias. The definition of such a mechanism is outside the scope of this document. Since ifAlias is defined to be stored in non-volatile storage, the MIB implementation MUST map ifAlias to the value of 'description' in the persistently stored datastore. Specifically, if the device supports ':startup', when ifAlias is read the device MUST return the value of 'description' in the 'startup' datastore, and when it is written, it MUST be written to the 'running' and 'startup' datastores. Note that it is up to the implementation to decide whether to modify this single leaf in 'startup' or perform an implicit copy-config from 'running' to 'startup'. If the device does not support ':startup', ifAlias MUST be mapped to the 'description' leaf in the 'running' datastore.
[中]接口的文本描述。服务器实现可以将此叶映射到ifAlias MIB对象。这样的实现需要使用某种机制来处理此leaf和ifAlias之间允许的大小和字符差异。这种机制的定义不在本文件的范围之内。由于ifAlias被定义为存储在非易失性存储中,MIB实现必须将ifAlias映射到持久存储的数据存储中的“description”值。具体而言,如果设备支持“:startup”,则读取ifAlias时,设备必须在“startup”数据存储中返回“description”值,写入时,必须将其写入“running”和“startup”数据存储。请注意,由实现决定是在“startup”中修改此单个叶,还是执行从“running”到“startup”的隐式复制配置。如果设备不支持“:startup”,则IFALIA必须映射到“running”数据存储中的“description”叶。
代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc7223
public InterfaceBuilder(Interface base) {
this.key = base.key();
this._name = base.getName();
this._description = base.getDescription();
this._linkUpDownTrapEnable = base.getLinkUpDownTrapEnable();
this._type = base.getType();
this._enabled = base.isEnabled();
if (base instanceof InterfaceImpl) {
InterfaceImpl impl = (InterfaceImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
Map<Class<? extends Augmentation<Interface>>, Augmentation<Interface>> aug =((AugmentationHolder<Interface>) base).augmentations();
if (!aug.isEmpty()) {
this.augmentation = new HashMap<>(aug);
}
}
}
代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc7223
if (!Objects.equals(_description, other.getDescription())) {
return false;
代码示例来源:origin: org.opendaylight.mdsal.model/ietf-interfaces
if (!Objects.equals(_description, other.getDescription())) {
return false;
代码示例来源:origin: org.opendaylight.genius/interfacemanager-shell
public static void showVlanOutput(InterfaceInfo ifaceInfo, Interface iface) {
StringBuilder sb = new StringBuilder();
Formatter fmt = new Formatter(sb);
IfL2vlan l2vlan = iface.getAugmentation(IfL2vlan.class);
int vlanId = l2vlan != null ? l2vlan.getVlanId() != null ? l2vlan.getVlanId().getValue() : 0 : 0;
System.out.println(fmt.format(VLAN_OUTPUT_FORMAT_LINE1,
iface.getName()));
sb.setLength(0);
System.out.println(fmt.format(VLAN_OUTPUT_FORMAT,
"", (ifaceInfo == null) ? UNSET : ifaceInfo.getDpId(),
(ifaceInfo == null) ? UNSET : ifaceInfo.getPortName(), vlanId));
sb.setLength(0);
System.out.println(fmt.format(VLAN_OUTPUT_FORMAT,
(ifaceInfo == null) ? UNSET : ifaceInfo.getInterfaceTag(),
(ifaceInfo == null) ? UNSET : ifaceInfo.getPortNo(),
(ifaceInfo == null) ? UNSET : ifaceInfo.getAdminState(),
(ifaceInfo == null) ? UNSET : ifaceInfo.getOpState()));
sb.setLength(0);
System.out.println(fmt.format(VLAN_OUTPUT_FORMAT + "\n",
iface.getDescription(), "", "", ""));
sb.setLength(0);
fmt.close();
}
代码示例来源:origin: org.opendaylight.genius/interfacemanager-shell
public static void showVxlanOutput(Interface iface, InterfaceInfo interfaceInfo) {
StringBuilder sb = new StringBuilder();
Formatter fmt = new Formatter(sb);
System.out.println(fmt.format(VXLAN_OUTPUT_FORMAT_LINE1,
iface.getName(),
iface.getDescription() == null ? UNSET : iface.getDescription()));
sb.setLength(0);
IfTunnel ifTunnel = iface.getAugmentation(IfTunnel.class);
System.out.println(fmt.format(VXLAN_OUTPUT_FORMAT,
ifTunnel.getTunnelSource().getIpv4Address().getValue(),
ifTunnel.getTunnelDestination().getIpv4Address().getValue(),
ifTunnel.getTunnelGateway() == null ? UNSET : ifTunnel.getTunnelGateway().getIpv4Address().getValue(),
(interfaceInfo == null) ? InterfaceInfo.InterfaceAdminState.DISABLED : interfaceInfo.getAdminState()));
sb.setLength(0);
ParentRefs parentRefs = iface.getAugmentation(ParentRefs.class);
System.out.println(fmt.format(VXLAN_OUTPUT_FORMAT + "\n",
(interfaceInfo == null) ? InterfaceOpState.DOWN : interfaceInfo.getOpState(),
String.format("%s/%s", parentRefs.getDatapathNodeIdentifier(),
iface.getName()),
(interfaceInfo == null) ? UNSET : interfaceInfo.getInterfaceTag(), ""));
fmt.close();
}
}
代码示例来源:origin: org.opendaylight.mdsal.model/ietf-interfaces
public InterfaceBuilder(Interface base) {
if (base.getKey() == null) {
this._key = new InterfaceKey(
base.getName()
);
this._name = base.getName();
} else {
this._key = base.getKey();
this._name = _key.getName();
}
this._description = base.getDescription();
this._linkUpDownTrapEnable = base.getLinkUpDownTrapEnable();
this._type = base.getType();
this._enabled = base.isEnabled();
if (base instanceof InterfaceImpl) {
InterfaceImpl impl = (InterfaceImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface>) base;
if (!casted.augmentations().isEmpty()) {
this.augmentation = new HashMap<>(casted.augmentations());
}
}
}
代码示例来源:origin: org.opendaylight.yangtools.model/ietf-interfaces
public InterfaceBuilder(Interface base) {
if (base.getKey() == null) {
this._key = new InterfaceKey(
base.getName()
);
this._name = base.getName();
} else {
this._key = base.getKey();
this._name = _key.getName();
}
this._description = base.getDescription();
this._linkUpDownTrapEnable = base.getLinkUpDownTrapEnable();
this._type = base.getType();
this._enabled = base.isEnabled();
if (base instanceof InterfaceImpl) {
InterfaceImpl impl = (InterfaceImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface>) base;
if (!casted.augmentations().isEmpty()) {
this.augmentation = new HashMap<>(casted.augmentations());
}
}
}
代码示例来源:origin: org.opendaylight.yangtools.model/ietf-interfaces
if (other.getDescription() != null) {
return false;
} else if(!_description.equals(other.getDescription())) {
return false;
内容来源于网络,如有侵权,请联系作者删除!