org.opendaylight.controller.sal.utils.Status.toString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.opendaylight.controller.sal.utils.Status.toString()方法的一些代码示例,展示了Status.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Status.toString()方法的具体详情如下:
包路径:org.opendaylight.controller.sal.utils.Status
类名称:Status
方法名:toString

Status.toString介绍

暂无

代码示例

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> removeContainerFlow(String arg1, String arg2) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String cflowName = arg2;
  if (cflowName == null) {
    result.add("cflowName not specified");
    return result;
  }
  Set<String> set = new HashSet<String>(1);
  set.add(cflowName);
  result.add((this.removeContainerFlows(containerName, set)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> addContainer(String arg1, String arg2) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String staticVlan = arg2;
  ContainerConfig containerConfig = new ContainerConfig(containerName, staticVlan, null, null);
  result.add((this.addRemoveContainer(containerConfig, false)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> removeContainerShell(String arg1) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  ContainerConfig containerConfig = new ContainerConfig(containerName, "", null, null);
  result.add((this.addRemoveContainer(containerConfig, true)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> addContainerFlow(String arg1, String arg2, String arg3) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String cflowName = arg2;
  if (cflowName == null) {
    result.add("cflowName not specified");
    return result;
  }
  String unidirectional = arg3;
  boolean boolUnidirectional = Boolean.parseBoolean(unidirectional);
  List<ContainerFlowConfig> list = new ArrayList<ContainerFlowConfig>();
  list.add(createSampleContainerFlowConfig(cflowName, boolUnidirectional));
  result.add((this.addRemoveContainerFlow(containerName, list, false)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> saveConfig() {
    List<String> result = new ArrayList<String>();
    Status status = new Status(StatusCode.NOSERVICE, "Configuration service not reachable");

    IConfigurationService configService = (IConfigurationService) ServiceHelper.getGlobalInstance(
        IConfigurationService.class, this);
    if (configService != null) {
      status = configService.saveConfigurations();
    }
    result.add(status.toString());
    return result;
  }
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> removeContainerEntry(String arg1, String arg2, String arg3) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String nodeId = arg2;
  if (nodeId == null) {
    result.add("Node Id not specified");
    return result;
  }
  String portId = arg3;
  if (portId == null) {
    result.add("Port not specified");
    return result;
  }
  Node node = NodeCreator.createOFNode(Long.valueOf(nodeId));
  Short port = Short.valueOf(portId);
  NodeConnector nc = NodeConnectorCreator.createOFNodeConnector(port, node);
  List<String> portList = new ArrayList<String>(1);
  portList.add(nc.toString());
  result.add((this.addRemoveContainerEntries(containerName, portList, true)).toString());
  return result;
}
public List<String> addContainerFlow(String arg1, String arg2, String arg3) {

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> addContainerEntry(String arg1, String arg2, String arg3) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String nodeId = arg2;
  if (nodeId == null) {
    result.add("Node Id not specified");
    return result;
  }
  String portId = arg3;
  if (portId == null) {
    result.add("Port not specified");
    return result;
  }
  Node node = NodeCreator.createOFNode(Long.valueOf(nodeId));
  Short port = Short.valueOf(portId);
  NodeConnector nc = NodeConnectorCreator.createOFNodeConnector(port, node);
  List<String> portList = new ArrayList<String>(1);
  portList.add(nc.toString());
  result.add((this.addRemoveContainerEntries(containerName, portList, false)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/topologymanager

public List<String> addUserLink(String name, String ncStr1, String ncStr2) {
  List<String> result = new ArrayList<String>();
  if ((name == null)) {
    result.add("Please enter a valid Name");
    return result;
  }
  if (ncStr1 == null) {
    result.add("Please enter two node connector strings");
    return result;
  }
  if (ncStr2 == null) {
    result.add("Please enter second node connector string");
    return result;
  }
  NodeConnector nc1 = NodeConnector.fromString(ncStr1);
  if (nc1 == null) {
    result.add("Invalid input node connector 1 string: " + ncStr1);
    return result;
  }
  NodeConnector nc2 = NodeConnector.fromString(ncStr2);
  if (nc2 == null) {
    result.add("Invalid input node connector 2 string: " + ncStr2);
    return result;
  }
  TopologyUserLinkConfig config = new TopologyUserLinkConfig(name, ncStr1, ncStr2);
  result.add(this.addUserLink(config).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public List<String> createContainer(String arg1, String arg2) {
  List<String> result = new ArrayList<String>();
  String containerName = arg1;
  if (containerName == null) {
    result.add("Container Name not specified");
    return result;
  }
  String staticVlan = arg2;
  if (staticVlan == null) {
    result.add("Static Vlan not specified");
    return result;
  }
  List<String> ports = new ArrayList<String>();
  for (long l = 1L; l < 10L; l++) {
    ports.add(NodeConnectorCreator.createOFNodeConnector((short) 1, NodeCreator.createOFNode(l)).toString());
  }
  List<ContainerFlowConfig> cFlowList = new ArrayList<ContainerFlowConfig>();
  cFlowList.add(this.createSampleContainerFlowConfig("tcp", true));
  ContainerConfig containerConfig = new ContainerConfig(containerName, staticVlan, ports, cFlowList);
  result.add((this.addRemoveContainer(containerConfig, false)).toString());
  return result;
}

代码示例来源:origin: org.opendaylight.controller/containermanager.implementation

public void _saveConfig(CommandInterpreter ci) {
  Status status = new Status(StatusCode.NOSERVICE, "Configuration service not reachable");
  IConfigurationService configService = (IConfigurationService) ServiceHelper.getGlobalInstance(
      IConfigurationService.class, this);
  if (configService != null) {
    status = configService.saveConfigurations();
  }
  ci.println(status.toString());
}

相关文章