http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsDestroyTunnelCommand.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsDestroyTunnelCommand.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsDestroyTunnelCommand.java
deleted file mode 100644
index 527dc7b..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsDestroyTunnelCommand.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Command;
-
-public class OvsDestroyTunnelCommand extends Command {
-
-    Long networkId;
-    Integer key;
-    String inPortName;
-
-    public OvsDestroyTunnelCommand(Long networkId, Integer key, String 
inPortName) {
-        this.networkId = networkId;
-        this.inPortName = inPortName;
-        this.key = key;
-    }
-
-    public Long getNetworkId() {
-        return networkId;
-    }
-
-    public String getInPortName() {
-        return inPortName;
-    }
-
-    public Integer getKey() {
-        return key;
-    }
-
-    @Override
-    public boolean executeInSequence() {
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceAnswer.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceAnswer.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceAnswer.java
deleted file mode 100644
index 1d09117..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceAnswer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class OvsFetchInterfaceAnswer extends Answer {
-    String ip;
-    String netmask;
-    String mac;
-    String label;
-
-    public OvsFetchInterfaceAnswer(Command cmd, boolean success, String 
details) {
-        super(cmd, success, details);
-        this.label = ((OvsFetchInterfaceCommand)cmd).getLabel();
-    }
-
-    public OvsFetchInterfaceAnswer(Command cmd, boolean success, String 
details, String ip, String netmask, String mac) {
-        super(cmd, success, details);
-        this.ip = ip;
-        this.netmask = netmask;
-        this.mac = mac;
-        this.label = ((OvsFetchInterfaceCommand)cmd).getLabel();
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public String getNetmask() {
-        return netmask;
-    }
-
-    public String getMac() {
-        return mac;
-    }
-
-    public String getLabel() {
-        return label;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceCommand.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceCommand.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceCommand.java
deleted file mode 100644
index c27daf0..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsFetchInterfaceCommand.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Command;
-
-public class OvsFetchInterfaceCommand extends Command {
-    String label;
-
-    @Override
-    public boolean executeInSequence() {
-        return true;
-    }
-
-    public OvsFetchInterfaceCommand(String label) {
-        this.label = label;
-    }
-
-    public String getLabel() {
-        return label;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowAnswer.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowAnswer.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowAnswer.java
deleted file mode 100644
index db40002..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowAnswer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class OvsSetTagAndFlowAnswer extends Answer {
-    Long vmId;
-    Long seqno;
-
-    public OvsSetTagAndFlowAnswer(Command cmd, boolean success, String 
details) {
-        super(cmd, success, details);
-        OvsSetTagAndFlowCommand c = (OvsSetTagAndFlowCommand)cmd;
-        this.vmId = c.getVmId();
-        this.seqno = Long.parseLong(c.getSeqNo());
-    }
-
-    public Long getVmId() {
-        return vmId;
-    }
-
-    public Long getSeqNo() {
-        return seqno;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowCommand.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowCommand.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowCommand.java
deleted file mode 100644
index 17121a0..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetTagAndFlowCommand.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Command;
-
-public class OvsSetTagAndFlowCommand extends Command {
-    String vlans;
-    String vmName;
-    String seqno;
-    String tag;
-    Long vmId;
-
-    @Override
-    public boolean executeInSequence() {
-        return true;
-    }
-
-    public String getSeqNo() {
-        return seqno;
-    }
-
-    public String getVlans() {
-        return vlans;
-    }
-
-    public String getVmName() {
-        return vmName;
-    }
-
-    public Long getVmId() {
-        return vmId;
-    }
-
-    public String getTag() {
-        return tag;
-    }
-
-    public OvsSetTagAndFlowCommand(String vmName, String tag, String vlans, 
String seqno, Long vmId) {
-        this.vmName = vmName;
-        this.tag = tag;
-        this.vlans = vlans;
-        this.seqno = seqno;
-        this.vmId = vmId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetupBridgeCommand.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetupBridgeCommand.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetupBridgeCommand.java
deleted file mode 100644
index 9c9924d..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsSetupBridgeCommand.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.Command;
-
-public class OvsSetupBridgeCommand extends Command {
-    Integer key;
-    Long hostId;
-    Long networkId;
-
-    @Override
-    public boolean executeInSequence() {
-        return true;
-    }
-
-    public OvsSetupBridgeCommand(Integer key, Long hostId, Long networkId) {
-        this.key = key;
-        this.hostId = hostId;
-        this.networkId = networkId;
-    }
-
-    public Integer getKey() {
-        return key;
-    }
-
-    public Long getHostId() {
-        return hostId;
-    }
-
-    public Long getNetworkId() {
-        return networkId;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
index 10815a4..81518fb 100644
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
+++ 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
@@ -35,6 +35,13 @@ import 
org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
+import com.cloud.agent.api.OvsCreateTunnelAnswer;
+import com.cloud.agent.api.OvsCreateTunnelCommand;
+import com.cloud.agent.api.OvsDestroyBridgeCommand;
+import com.cloud.agent.api.OvsDestroyTunnelCommand;
+import com.cloud.agent.api.OvsFetchInterfaceAnswer;
+import com.cloud.agent.api.OvsFetchInterfaceCommand;
+import com.cloud.agent.api.OvsSetupBridgeCommand;
 import com.cloud.agent.manager.Commands;
 import com.cloud.configuration.Config;
 import com.cloud.deploy.DeployDestination;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/StartupOvsCommand.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/StartupOvsCommand.java 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/StartupOvsCommand.java
deleted file mode 100644
index b85331e..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/StartupOvsCommand.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs;
-
-import com.cloud.agent.api.StartupCommand;
-import com.cloud.host.Host;
-
-public class StartupOvsCommand extends StartupCommand {
-
-       public StartupOvsCommand() {
-               super(Host.Type.L2Networking);
-       }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDao.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDao.java 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDao.java
deleted file mode 100644
index 794e45e..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDao.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs.dao;
-
-import java.util.List;
-
-import com.cloud.utils.db.GenericDao;
-
-public interface OvsDeviceDao extends GenericDao<OvsDeviceVO, Long> {
-
-       List<OvsDeviceVO> listByPhysicalNetwork(long physicalNetworkId);
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDaoImpl.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDaoImpl.java
 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDaoImpl.java
deleted file mode 100644
index 11a4d48..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceDaoImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs.dao;
-
-import java.util.List;
-
-import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.SearchCriteria.Op;
-
-@Component
-@Local(value=OvsDeviceDao.class)
-public class OvsDeviceDaoImpl extends GenericDaoBase<OvsDeviceVO, Long> 
implements OvsDeviceDao {
-
-       protected final SearchBuilder<OvsDeviceVO> physicalNetworkIdSearch;
-
-       public OvsDeviceDaoImpl() {
-        physicalNetworkIdSearch = createSearchBuilder();
-        physicalNetworkIdSearch.and("physicalNetworkId", 
physicalNetworkIdSearch.entity().getPhysicalNetworkId(), Op.EQ);
-        physicalNetworkIdSearch.done();
-    }
-
-       @Override
-       public List<OvsDeviceVO> listByPhysicalNetwork(long physicalNetworkId) {
-               SearchCriteria<OvsDeviceVO> sc = 
physicalNetworkIdSearch.create();
-               sc.setParameters("physicalNetworkId", physicalNetworkId);
-               return search(sc, null);
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceVO.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceVO.java 
b/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceVO.java
deleted file mode 100644
index cab63f6..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/ovs/dao/OvsDeviceVO.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.ovs.dao;
-
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="ovs_devices")
-public class OvsDeviceVO implements InternalIdentity {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-
-    @Column(name="uuid")
-    private String uuid;
-
-    @Column(name="host_id")
-    private long hostId;
-
-    @Column(name="physical_network_id")
-    private long physicalNetworkId;
-
-    @Column(name="device_name")
-    private String deviceName;
-
-
-    public OvsDeviceVO() {
-        this.uuid = UUID.randomUUID().toString();
-    }
-
-    public OvsDeviceVO(long hostId, long physicalNetworkId,
-            String deviceName) {
-        super();
-        this.hostId = hostId;
-        this.physicalNetworkId = physicalNetworkId;
-        this.deviceName = deviceName;
-        this.uuid = UUID.randomUUID().toString();
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public long getPhysicalNetworkId() {
-        return physicalNetworkId;
-    }
-
-    public long getHostId() {
-        return hostId;
-    }
-
-    public String getDeviceName() {
-        return deviceName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/plugins/network-elements/ovs/src/com/cloud/network/resource/OvsResource.java
----------------------------------------------------------------------
diff --git 
a/plugins/network-elements/ovs/src/com/cloud/network/resource/OvsResource.java 
b/plugins/network-elements/ovs/src/com/cloud/network/resource/OvsResource.java
deleted file mode 100644
index a94e4f8..0000000
--- 
a/plugins/network-elements/ovs/src/com/cloud/network/resource/OvsResource.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.cloud.network.resource;
-
-import java.util.Map;
-
-import javax.naming.ConfigurationException;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.agent.IAgentControl;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-import com.cloud.agent.api.MaintainAnswer;
-import com.cloud.agent.api.MaintainCommand;
-import com.cloud.agent.api.PingCommand;
-import com.cloud.agent.api.ReadyAnswer;
-import com.cloud.agent.api.ReadyCommand;
-import com.cloud.agent.api.StartupCommand;
-import com.cloud.host.Host;
-import com.cloud.host.Host.Type;
-import com.cloud.network.ovs.OvsApi;
-import com.cloud.network.ovs.StartupOvsCommand;
-import com.cloud.resource.ServerResource;
-import com.cloud.utils.component.ManagerBase;
-
-public class OvsResource extends ManagerBase implements ServerResource {
-       private static final Logger s_logger = 
Logger.getLogger(OvsResource.class);
-
-       private String _name;
-       private String _guid;
-       private String _zoneId;
-       private int _numRetries;
-
-       private OvsApi _ovsApi;
-
-       protected OvsApi createOvsApi() {
-               return new OvsApi();
-       }
-
-       @Override
-       public boolean configure(String name, Map<String, Object> params)
-                       throws ConfigurationException {
-               _name = (String) params.get("name");
-               if (_name == null) {
-                       throw new ConfigurationException("Unable to find name");
-               }
-
-               _guid = (String) params.get("guid");
-               if (_guid == null) {
-                       throw new ConfigurationException("Unable to find the 
guid");
-               }
-
-               _zoneId = (String) params.get("zoneId");
-               if (_zoneId == null) {
-                       throw new ConfigurationException("Unable to find zone");
-               }
-
-               _numRetries = 2;
-
-               String ip = (String) params.get("ip");
-               if (ip == null) {
-                       throw new ConfigurationException("Unable to find IP");
-               }
-
-               _ovsApi = createOvsApi();
-               _ovsApi.setControllerAddress(ip);
-
-               return true;
-       }
-
-       @Override
-       public boolean start() {
-               return true;
-       }
-
-       @Override
-       public boolean stop() {
-               return true;
-       }
-
-       @Override
-       public String getName() {
-               return _name;
-       }
-
-       @Override
-       public Type getType() {
-               return Host.Type.L2Networking;
-       }
-
-       @Override
-       public StartupCommand[] initialize() {
-               StartupOvsCommand sc = new StartupOvsCommand();
-               sc.setGuid(_guid);
-               sc.setName(_name);
-               sc.setDataCenter(_zoneId);
-               sc.setPod("");
-               sc.setPrivateIpAddress("");
-               sc.setStorageIpAddress("");
-               sc.setVersion("");
-               return new StartupCommand[] { sc };
-       }
-
-       @Override
-       public PingCommand getCurrentStatus(long id) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public Answer executeRequest(Command cmd) {
-               return executeRequest(cmd, _numRetries);
-       }
-
-       private Answer executeRequest(ReadyCommand cmd) {
-               return new ReadyAnswer(cmd);
-       }
-
-       private Answer executeRequest(MaintainCommand cmd) {
-               return new MaintainAnswer(cmd);
-       }
-
-       public Answer executeRequest(Command cmd, int numRetries) {
-               if (cmd instanceof ReadyCommand) {
-                       return executeRequest((ReadyCommand) cmd);
-               } else if (cmd instanceof MaintainCommand) {
-                       return executeRequest((MaintainCommand) cmd);
-               }
-               // TODO: implement services request
-               // else if (cmd instanceof CreateOvsNetworkCommand) {
-               // return executeRequest((CreateOvsNetworkCommand)cmd, 
numRetries);
-               // }
-               // else if (cmd instanceof DeleteOvsNetworkCommand) {
-               // return executeRequest((DeleteOvsNetworkCommand) cmd, 
numRetries);
-               // }
-               // else if (cmd instanceof CreateOvsPortCommand) {
-               // return executeRequest((CreateOvsPortCommand) cmd, 
numRetries);
-               // }
-               // else if (cmd instanceof DeleteOvsPortCommand) {
-               // return executeRequest((DeleteOvsPortCommand) cmd, 
numRetries);
-               // }
-               // else if (cmd instanceof UpdateOvsPortCommand) {
-               // return executeRequest((UpdateOvsPortCommand) cmd, 
numRetries);
-               // }
-               s_logger.debug("Received unsupported command " + 
cmd.toString());
-               return Answer.createUnsupportedCommandAnswer(cmd);
-       }
-
-       @Override
-       public void disconnected() {
-       }
-
-       private Answer retry(Command cmd, int numRetries) {
-               s_logger.warn("Retrying " + cmd.getClass().getSimpleName()
-                               + ". Number of retries remaining: " + 
numRetries);
-               return executeRequest(cmd, numRetries);
-       }
-
-       private String truncate(String string, int length) {
-               if (string.length() <= length) {
-                       return string;
-               } else {
-                       return string.substring(0, length);
-               }
-       }
-
-       @Override
-       public IAgentControl getAgentControl() {
-               return null;
-       }
-
-       @Override
-       public void setAgentControl(IAgentControl agentControl) {
-       }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e914b70/setup/db/create-schema.sql
----------------------------------------------------------------------
diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql
index bf32b8d..8d3aa20 100755
--- a/setup/db/create-schema.sql
+++ b/setup/db/create-schema.sql
@@ -196,7 +196,6 @@ DROP TABLE IF EXISTS `cloud`.`vm_network_map`;
 DROP TABLE IF EXISTS `cloud`.`netapp_volume`;
 DROP TABLE IF EXISTS `cloud`.`netapp_pool`;
 DROP TABLE IF EXISTS `cloud`.`netapp_lun`;
-DROP TABLE IF EXISTS `cloud`.`ovs_devices`;
 DROP TABLE IF EXISTS `cloud`.`ovs_nic_map`;
 
 CREATE TABLE `cloud`.`version` (
@@ -2477,17 +2476,6 @@ CREATE TABLE `cloud`.`nicira_nvp_nic_map` (
   CONSTRAINT `fk_nicira_nvp_nic_map__nic` FOREIGN KEY(`nic`) REFERENCES 
`nics`(`uuid`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
-CREATE TABLE `cloud`.`ovs_devices` (
-  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
-  `uuid` varchar(255) UNIQUE,
-  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical 
network in to which ovs device is added',
-  `device_name` varchar(255) NOT NULL COMMENT 'name of the ovs device',
-  `host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the ovs 
device',
-  PRIMARY KEY  (`id`),
-  CONSTRAINT `fk_ovs_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES 
`host`(`id`) ON DELETE CASCADE,
-  CONSTRAINT `fk_ovs_devices__physical_network_id` FOREIGN KEY 
(`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
 CREATE TABLE `cloud`.`ovs_nic_map` (
   `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
   `logicalswitch` varchar(255) NOT NULL COMMENT 'uuid of logical switch this 
port is provisioned on',

Reply via email to