/** * Asynchronously add a flow to the network node * * @param node * @param flow * @param rid */ public Status addFlowAsync(Node node, Flow flow, long rid){ return new Status(StatusCode.SUCCESS); }
@Override public Status removeNodeAllProps(Node node) { this.nodeProps.remove(node); return new Status(StatusCode.SUCCESS); }
/** * {@inheritDoc} */ @Override public Status setControllerProperty(Property property) { if (property != null) { this.controllerGlobalProperties.put(property.getName(), property); return new Status(StatusCode.SUCCESS); } return new Status(StatusCode.BADREQUEST, "Invalid property provided when setting property"); }
@Override public Status removeSubnet(String name) { if (name.equalsIgnoreCase(DEFAULT_SUBNET_NAME)) { return new Status(StatusCode.NOTALLOWED, "The specified subnet gateway cannot be removed"); } SubnetConfig conf = subnetsConfigList.get(name); if (conf == null) { return new Status(StatusCode.SUCCESS, "Subnet not present"); } return this.addRemoveSubnet(conf, false); }
@Override public Status removeLocalUser(String userName) { if (userName == null || userName.trim().isEmpty()) { return new Status(StatusCode.BADREQUEST, "Invalid user name"); } if (!localUserConfigList.containsKey(userName)) { return new Status(StatusCode.NOTFOUND, "User does not exist"); } return changeLocalUser(localUserConfigList.get(userName), Command.REMOVE); }
protected Status assignResourceGroupToRoleInternal(String group, Privilege privilege, String role) { Set<ResourceGroup> roleGroups = groupsAuthorizations.get(role); roleGroups.add(new ResourceGroup(group, privilege)); // Update cluster groupsAuthorizations.put(role, roleGroups); return new Status(StatusCode.SUCCESS); }
private Status updateConfig(SubnetConfig conf, boolean add) { if (add) { if(subnetsConfigList.putIfAbsent(conf.getName(), conf) != null) { String msg = "Cluster conflict: Subnet with name " + conf.getName() + "already exists."; return new Status(StatusCode.CONFLICT, msg); } } else { subnetsConfigList.remove(conf.getName()); } return new Status(StatusCode.SUCCESS); }
@Override public Status addBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params) { if (pluginService != null) { IPluginInBridgeDomainConfigService plugin = this.pluginService.get(node.getType()); if (plugin != null) { return plugin.addBridgeDomainConfig(node, bridgeIdentifier, params); } } return new Status(StatusCode.NOSERVICE, "Requested Plugin Service Not available"); }
@Override public Status removePortConfig(Node node, String bridgeIdentifier, String portIdentifier, Map<ConfigConstants, Object> params) { if (pluginService != null) { IPluginInBridgeDomainConfigService plugin = this.pluginService.get(node.getType()); if (plugin != null) { return plugin.removePortConfig(node, bridgeIdentifier, portIdentifier, params); } } return new Status(StatusCode.NOSERVICE, "Requested Plugin Service Not available"); }
public Status saveConfigInternal() { Status saveStatus = configurationService.persistConfiguration( new ArrayList<ConfigurationObject>(userLinksDB.values()), USER_LINKS_FILE_NAME); if (!saveStatus.isSuccess()) { return new Status(StatusCode.INTERNALERROR, "Topology save failed: " + saveStatus.getDescription()); } return saveStatus; }
@Override public Status saveConfiguration() { ObjectWriter objWriter = new ObjectWriter(); objWriter.write(metaCache, topologyWebFileName); return new Status(StatusCode.SUCCESS, null); }
@Override public Status addFlow(Node node, Flow flow) { if (pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().addFlow(node, flow); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); }
@Override public Status modifyFlow(Node node, Flow oldFlow, Flow newFlow) { if (pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().modifyFlow(node, oldFlow, newFlow); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); }
@Override public Status asyncSendBarrierMessage(Node node) { if (this.pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().asyncSendBarrierMessage(node); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); } }
@Override public Status removeFlow(Node node, Flow flow) { if (pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().removeFlow(node, flow); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); }
@Override public Status removeAllFlows(Node node) { if (pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().removeAllFlows(node); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); }
@Override public Status syncSendBarrierMessage(Node node) { if (this.pluginFlowProgrammer != null) { ProtocolService<IPluginInFlowProgrammerService> service = this.pluginFlowProgrammer.get(node.getType()); if (service != null) { return service.getService().syncSendBarrierMessage(node); } } return new Status(StatusCode.NOSERVICE, "Plugin unuvailable"); }
@Override public Status removeSpanConfig(SpanConfig conf) { removeSpanPorts(conf.getNode(), conf.getPortArrayList()); // Update configuration spanConfigList.remove(conf); return new Status(StatusCode.SUCCESS); }
public static Status convertOvsdbStatusToSalStatus(org.opendaylight.ovsdb.plugin.api.Status status){ if(status.getRequestId() != 0){ return new org.opendaylight.controller.sal.utils.Status(convertOvsdbStatusCodeToSalStatusCode(status.getCode()),status.getRequestId()); }else{ return new org.opendaylight.controller.sal.utils.Status(convertOvsdbStatusCodeToSalStatusCode(status.getCode()),status.getDescription()); } }