Java 类org.projectfloodlight.openflow.protocol.action.OFActionSetVlanVid 实例源码
项目:fresco_floodlight
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:iTAP-controller
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:SDN-Multicast
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:arscheduler
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:floodlight1.2-delay
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:floodlight-hardware
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:ACAMPController
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:fast-failover-demo
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:floodlightLB
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:DSC
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}
项目:floodlight
文件:ActionUtils.java
/**
* Parse set_vlan_id actions.
* The key and delimiter for the action should be omitted, and only the
* data should be presented to this decoder. Data with a leading 0x is permitted.
*
* @param actionToDecode; The action as a string to decode
* @param version; The OF version to create the action for
* @param log
* @return
*/
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode, OFVersion version, Logger log) {
Matcher n = Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid = VlanVid.ofVlan(get_short(n.group(1)));
OFActionSetVlanVid.Builder ab = OFFactories.getFactory(version).actions().buildSetVlanVid();
ab.setVlanVid(vlanid);
log.debug("action {}", ab.build());
return ab.build();
}
catch (NumberFormatException e) {
log.debug("Invalid VLAN in: {} (error ignored)", actionToDecode);
return null;
}
}
}
else {
log.debug("Invalid action: '{}'", actionToDecode);
return null;
}
return null;
}