Open Kilda Java Documentation
SwitchService.java
Go to the documentation of this file.
1 package org.openkilda.service;
2 
3 import java.util.List;
4 
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service;
14 
20 @Service
21 public class SwitchService {
22 
23  @Autowired
24  private SwitchIntegrationService switchIntegrationService;
25 
32  public List<SwitchInfo> getSwitches() throws IntegrationException {
33  return switchIntegrationService.getSwitches();
34  }
35 
42  public List<IslLinkInfo> getIslLinks() {
43  return switchIntegrationService.getIslLinks();
44  }
45 
46 
54  List<LinkProps> linkPropsList = switchIntegrationService.getIslLinkProps(keys);
55  return (linkPropsList != null && !linkPropsList.isEmpty()) ? linkPropsList.get(0) : null;
56  }
57 
64  public String updateLinkProps(List<LinkProps> keys) {
65  return switchIntegrationService.updateIslLinkProps(keys);
66  }
67 
74  public String getSwitchRules(String switchId) {
75  return switchIntegrationService.getSwitchRules(switchId);
76  }
77 
86  public ConfiguredPort configurePort(String switchId, String port, PortConfiguration configuration) {
87  return switchIntegrationService.configurePort(switchId, port, configuration);
88  }
89 }
ConfiguredPort configurePort(String switchId, String port, PortConfiguration configuration)
LinkProps getLinkProps(LinkProps keys)
String updateLinkProps(List< LinkProps > keys)
String getSwitchRules(String switchId)