Skip to content

Commit ce12d0d

Browse files
tomoe@midokura.jpMurali Reddy
authored andcommitted
Submit Midokura SDN controller stubs
1 parent 2c9e9ee commit ce12d0d

5 files changed

Lines changed: 182 additions & 2 deletions

File tree

‎api/src/com/cloud/network/Network.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public static class Provider {
121121
public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
122122
public static final Provider None = new Provider("None", false);
123123
public static final Provider NiciraNvp = new Provider("NiciraNvp", true);
124+
public static final Provider MidokuraMidonet = new Provider("MidokuraMidonet", true);
124125

125126
private String name;
126127
private boolean isExternal;

‎plugins/network-elements/midokura-midonet/build.xml‎

Whitespace-only changes.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package com.cloud.network.element;
21+
22+
import com.cloud.deploy.DeployDestination;
23+
import com.cloud.exception.ConcurrentOperationException;
24+
import com.cloud.exception.InsufficientCapacityException;
25+
import com.cloud.exception.ResourceUnavailableException;
26+
import com.cloud.network.Network;
27+
import com.cloud.network.Network.Capability;
28+
import com.cloud.network.Network.Provider;
29+
import com.cloud.network.Network.Service;
30+
import com.cloud.network.PhysicalNetworkServiceProvider;
31+
import com.cloud.offering.NetworkOffering;
32+
import com.cloud.utils.component.AdapterBase;
33+
import com.cloud.utils.component.PluggableService;
34+
import com.cloud.vm.NicProfile;
35+
import com.cloud.vm.ReservationContext;
36+
import com.cloud.vm.VirtualMachine;
37+
import com.cloud.vm.VirtualMachineProfile;
38+
import org.apache.log4j.Logger;
39+
40+
import javax.ejb.Local;
41+
import java.util.Map;
42+
import java.util.Set;
43+
44+
/**
45+
* User: tomoe
46+
* Date: 8/8/12
47+
* Time: 1:38 PM
48+
*/
49+
50+
@Local(value = NetworkElement.class)
51+
public class MidokuraMidonetElement extends AdapterBase implements ConnectivityProvider, PluggableService {
52+
private static final Logger s_logger = Logger.getLogger(MidokuraMidonetElement.class);
53+
54+
@Override
55+
public Map<Service, Map<Capability, String>> getCapabilities() {
56+
// TODO: implement this.
57+
return null;
58+
}
59+
60+
@Override
61+
public Provider getProvider() {
62+
// TODO: implement this.
63+
return null;
64+
}
65+
66+
@Override
67+
public boolean implement(Network network, NetworkOffering offering, DeployDestination dest,
68+
ReservationContext context)
69+
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
70+
// TODO: implement this.
71+
return false;
72+
}
73+
74+
@Override
75+
public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
76+
DeployDestination dest, ReservationContext context)
77+
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
78+
// TODO: implement this.
79+
return false;
80+
}
81+
82+
@Override
83+
public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
84+
ReservationContext context)
85+
throws ConcurrentOperationException, ResourceUnavailableException {
86+
// TODO: implement this.
87+
return false;
88+
}
89+
90+
@Override
91+
public boolean shutdown(Network network, ReservationContext context, boolean cleanup)
92+
throws ConcurrentOperationException, ResourceUnavailableException {
93+
// TODO: implement this.
94+
return false;
95+
}
96+
97+
@Override
98+
public boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException {
99+
// TODO: implement this.
100+
return false;
101+
}
102+
103+
@Override
104+
public boolean isReady(PhysicalNetworkServiceProvider provider) {
105+
// TODO: implement this.
106+
return false;
107+
}
108+
109+
@Override
110+
public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
111+
throws ConcurrentOperationException, ResourceUnavailableException {
112+
// TODO: implement this.
113+
return false;
114+
}
115+
116+
@Override
117+
public boolean canEnableIndividualServices() {
118+
// TODO: implement this.
119+
return false;
120+
}
121+
122+
@Override
123+
public boolean verifyServicesCombination(Set<Service> services) {
124+
// TODO: implement this.
125+
return false;
126+
}
127+
128+
@Override
129+
public String getPropertiesFile() {
130+
// TODO: implement this.
131+
return null;
132+
}
133+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package com.cloud.network.guru;
21+
22+
import com.cloud.dc.DataCenter.NetworkType;
23+
import com.cloud.network.PhysicalNetwork;
24+
import com.cloud.offering.NetworkOffering;
25+
import org.apache.log4j.Logger;
26+
27+
import javax.ejb.Local;
28+
29+
/**
30+
* User: tomoe
31+
* Date: 8/8/12
32+
* Time: 10:46 AM
33+
*/
34+
35+
@Local(value = NetworkGuru.class)
36+
public class MidokuraMidonetGuestNetworkGuru extends GuestNetworkGuru {
37+
private static final Logger s_logger = Logger.getLogger(MidokuraMidonetGuestNetworkGuru.class);
38+
39+
40+
@Override
41+
protected boolean canHandle(NetworkOffering offering, NetworkType networkType,
42+
PhysicalNetwork physicalNetwork) {
43+
// TODO: implement this.
44+
return false;
45+
}
46+
}

‎server/src/com/cloud/network/ExternalNetworkDeviceManager.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public static class NetworkDevice {
4040
public static final NetworkDevice F5BigIpLoadBalancer = new NetworkDevice("F5BigIpLoadBalancer", Network.Provider.F5BigIp.getName());
4141
public static final NetworkDevice JuniperSRXFirewall = new NetworkDevice("JuniperSRXFirewall", Network.Provider.JuniperSRX.getName());
4242
public static final NetworkDevice NiciraNvp = new NetworkDevice("NiciraNvp", Network.Provider.NiciraNvp.getName());
43-
44-
43+
public static final NetworkDevice MidokuraMidonet = new NetworkDevice("MidokuraMidonet", Network.Provider.MidokuraMidonet.getName());
44+
4545
public NetworkDevice(String deviceName, String ntwkServiceprovider) {
4646
_name = deviceName;
4747
_provider = ntwkServiceprovider;

0 commit comments

Comments
 (0)