Sho SHIMIZU
Committed by Gerrit Code Review

Remove methods deprecated in Emu

Change-Id: I924533daf64e07a1164d456bad4f87ec79098b44
...@@ -95,26 +95,6 @@ public class OchSignal implements Lambda { ...@@ -95,26 +95,6 @@ public class OchSignal implements Lambda {
95 } 95 }
96 96
97 /** 97 /**
98 - * Create OCh signal from channel number.
99 - *
100 - * @param channel channel number
101 - * @param maxFrequency maximum frequency
102 - * @param grid grid spacing frequency
103 - *
104 - * @deprecated 1.4.0 Emu Release
105 - */
106 - @Deprecated
107 - public OchSignal(int channel, Frequency maxFrequency, Frequency grid) {
108 - // Calculate center frequency
109 - Frequency centerFrequency = maxFrequency.subtract(grid.multiply(channel - 1));
110 -
111 - this.gridType = DEFAULT_OCH_GRIDTYPE;
112 - this.channelSpacing = DEFAULT_CHANNEL_SPACING;
113 - this.spacingMultiplier = (int) (centerFrequency.subtract(Spectrum.CENTER_FREQUENCY).asHz() / grid.asHz());
114 - this.slotGranularity = (int) Math.round((double) grid.asHz() / ChannelSpacing.CHL_12P5GHZ.frequency().asHz());
115 - }
116 -
117 - /**
118 * Creates OCh signal. 98 * Creates OCh signal.
119 * 99 *
120 * @param centerFrequency frequency 100 * @param centerFrequency frequency
......
...@@ -44,16 +44,6 @@ public interface OvsdbClientService extends OvsdbRpc { ...@@ -44,16 +44,6 @@ public interface OvsdbClientService extends OvsdbRpc {
44 OvsdbNodeId nodeId(); 44 OvsdbNodeId nodeId();
45 45
46 /** 46 /**
47 - * Creates the configuration for tunnel.
48 - *
49 - * @param srcIp source IP address
50 - * @param dstIp destination IP address
51 - * @deprecated 1.4.0 Emu release
52 - */
53 - @Deprecated
54 - void createTunnel(IpAddress srcIp, IpAddress dstIp);
55 -
56 - /**
57 * Creates a tunnel port with given options. 47 * Creates a tunnel port with given options.
58 * 48 *
59 * @param bridgeName bridge name 49 * @param bridgeName bridge name
......
...@@ -706,77 +706,6 @@ public class DefaultOvsdbClient ...@@ -706,77 +706,6 @@ public class DefaultOvsdbClient
706 } 706 }
707 707
708 @Override 708 @Override
709 - public void createTunnel(IpAddress srcIp, IpAddress dstIp) {
710 - String bridgeUuid = getBridgeUuid(OvsdbConstant.INTEGRATION_BRIDGE);
711 - if (bridgeUuid == null) {
712 - log.warn("Could not find bridge {} and Could not create tunnel. ",
713 - OvsdbConstant.INTEGRATION_BRIDGE);
714 - return;
715 - }
716 -
717 - DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
718 - String portName = getTunnelName(OvsdbConstant.TYPEVXLAN, dstIp);
719 - String portUuid = getPortUuid(portName, bridgeUuid);
720 -
721 - Port port = (Port) TableGenerator
722 - .createTable(dbSchema, OvsdbTable.PORT);
723 - if (port != null) {
724 - port.setName(portName);
725 - }
726 -
727 - if (portUuid == null) {
728 - portUuid = insertConfig(OvsdbConstant.PORT, "_uuid", OvsdbConstant.BRIDGE,
729 - "ports", bridgeUuid, port.getRow());
730 - } else {
731 - updateConfig(OvsdbConstant.PORT, "_uuid", portUuid, port.getRow());
732 - }
733 -
734 - // When a tunnel is created, A row is inserted into port table and
735 - // interface table of the ovsdb node.
736 - // and the following step is to get the interface uuid from local store
737 - // in controller node.
738 - // but it need spend some time synchronising data between node and
739 - // controller.
740 - // so loop to judge if interfaceUUid is null is necessary.
741 - String interfaceUuid = null;
742 - for (int i = 0; i < 10; i++) {
743 - interfaceUuid = getInterfaceUuid(portUuid, portName);
744 - if (interfaceUuid == null) {
745 - try {
746 - Thread.sleep(500);
747 - } catch (InterruptedException e) {
748 - log.warn("Interrupted while waiting to get interfaceUuid");
749 - Thread.currentThread().interrupt();
750 - }
751 - } else {
752 - break;
753 - }
754 - }
755 -
756 - if (interfaceUuid != null) {
757 -
758 - Interface tunInterface = (Interface) TableGenerator
759 - .createTable(dbSchema, OvsdbTable.INTERFACE);
760 -
761 - if (tunInterface != null) {
762 -
763 - tunInterface.setType(OvsdbConstant.TYPEVXLAN);
764 - Map<String, String> options = Maps.newHashMap();
765 - options.put("key", "flow");
766 - options.put("local_ip", srcIp.toString());
767 - options.put("remote_ip", dstIp.toString());
768 - tunInterface.setOptions(options);
769 - updateConfig(OvsdbConstant.INTERFACE, "_uuid", interfaceUuid,
770 - tunInterface.getRow());
771 - log.info("Tunnel added success", tunInterface);
772 -
773 - }
774 - }
775 -
776 - return;
777 - }
778 -
779 - @Override
780 public boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options) { 709 public boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options) {
781 710
782 String bridgeUuid = getBridgeUuid(bridgeName); 711 String bridgeUuid = getBridgeUuid(bridgeName);
......
...@@ -49,11 +49,6 @@ public class OvsdbClientServiceAdapter implements OvsdbClientService { ...@@ -49,11 +49,6 @@ public class OvsdbClientServiceAdapter implements OvsdbClientService {
49 } 49 }
50 50
51 @Override 51 @Override
52 - public void createTunnel(IpAddress srcIp, IpAddress dstIp) {
53 -
54 - }
55 -
56 - @Override
57 public boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options) { 52 public boolean createTunnel(String bridgeName, String portName, String tunnelType, Map<String, String> options) {
58 return true; 53 return true;
59 } 54 }
......