CLOUDSTACK-212: migrate the namespace (network-ssp-plugin)

migrate the ssp plugin namespace from com.cloud to org.apache.cloudstack

Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
This commit is contained in:
Hiroaki KAWAI 2013-06-28 17:34:36 +09:00
parent 0f40cfbea8
commit 2091852175
20 changed files with 58 additions and 51 deletions

View File

@ -73,13 +73,13 @@
<!--
Stratosphere SSP support components
-->
<bean id="sspCredentialDaoImpl" class="com.cloud.network.dao.SspCredentialDaoImpl"/>
<bean id="sspTenantDaoImpl" class="com.cloud.network.dao.SspTenantDaoImpl"/>
<bean id="sspUuidDaoImpl" class="com.cloud.network.dao.SspUuidDaoImpl"/>
<bean id="SspGuestNetworkGuru" class="com.cloud.network.guru.SspGuestNetworkGuru">
<bean id="sspCredentialDaoImpl" class="org.apache.cloudstack.network.dao.SspCredentialDaoImpl"/>
<bean id="sspTenantDaoImpl" class="org.apache.cloudstack.network.dao.SspTenantDaoImpl"/>
<bean id="sspUuidDaoImpl" class="org.apache.cloudstack.network.dao.SspUuidDaoImpl"/>
<bean id="SspGuestNetworkGuru" class="org.apache.cloudstack.network.guru.SspGuestNetworkGuru">
<property name="name" value="SspGuestNetworkGuru"/>
</bean>
<bean id="StratosphereSsp" class="com.cloud.network.element.SspElement">
<bean id="StratosphereSsp" class="org.apache.cloudstack.network.element.SspElement">
<property name="name" value="StratosphereSsp"/>
</bean>

View File

@ -14,17 +14,18 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.api.commands;
package org.apache.cloudstack.api.commands;
import javax.inject.Inject;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.response.SspResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.network.element.SspService;
import org.apache.log4j.Logger;
import com.cloud.api.response.SspResponse;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@ -32,7 +33,6 @@ import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.host.Host;
import com.cloud.network.element.SspService;
import com.cloud.user.UserContext;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.api.commands;
package org.apache.cloudstack.api.commands;
import javax.inject.Inject;
@ -24,6 +24,7 @@ import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.network.element.SspService;
import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
@ -31,7 +32,6 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.element.SspService;
import com.cloud.user.UserContext;
@APICommand(name="deleteStratosphereSsp", responseObject=SuccessResponse.class, description="Removes stratosphere ssp server")

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.api.response;
package org.apache.cloudstack.api.response;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import com.cloud.utils.db.GenericDao;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import javax.ejb.Local;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import javax.persistence.Column;
import javax.persistence.Entity;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import com.cloud.utils.db.GenericDao;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import javax.ejb.Local;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import javax.persistence.Column;
import javax.persistence.Entity;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import java.util.List;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import java.util.List;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.dao;
package org.apache.cloudstack.network.dao;
import javax.persistence.Column;
import javax.persistence.Entity;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import java.net.MalformedURLException;
import java.net.URL;
@ -30,10 +30,16 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
import org.apache.cloudstack.api.commands.AddSspCmd;
import org.apache.cloudstack.api.commands.DeleteSspCmd;
import org.apache.cloudstack.network.dao.SspCredentialDao;
import org.apache.cloudstack.network.dao.SspCredentialVO;
import org.apache.cloudstack.network.dao.SspTenantDao;
import org.apache.cloudstack.network.dao.SspTenantVO;
import org.apache.cloudstack.network.dao.SspUuidDao;
import org.apache.cloudstack.network.dao.SspUuidVO;
import org.apache.log4j.Logger;
import com.cloud.api.commands.AddSspCmd;
import com.cloud.api.commands.DeleteSspCmd;
import com.cloud.configuration.dao.ConfigurationDao;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.deploy.DeployDestination;
@ -59,12 +65,8 @@ import com.cloud.network.dao.NetworkServiceMapDao;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.SspCredentialDao;
import com.cloud.network.dao.SspCredentialVO;
import com.cloud.network.dao.SspTenantDao;
import com.cloud.network.dao.SspTenantVO;
import com.cloud.network.dao.SspUuidDao;
import com.cloud.network.dao.SspUuidVO;
import com.cloud.network.element.ConnectivityProvider;
import com.cloud.network.element.NetworkElement;
import com.cloud.offering.NetworkOffering;
import com.cloud.utils.component.AdapterBase;
import com.cloud.utils.exception.CloudRuntimeException;
@ -180,7 +182,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
}
/* (non-Javadoc)
* @see com.cloud.network.element.NetworkElement#isReady(com.cloud.network.PhysicalNetworkServiceProvider)
* @see org.apache.cloudstack.network.element.NetworkElement#isReady(com.cloud.network.PhysicalNetworkServiceProvider)
*/
@Override
public boolean isReady(PhysicalNetworkServiceProvider provider) {
@ -199,7 +201,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
/* (non-Javadoc)
* If this element is ready, then it can be enabled.
* @see com.cloud.network.element.SspManager#isEnabled(com.cloud.network.PhysicalNetwork)
* @see org.apache.cloudstack.network.element.SspManager#isEnabled(com.cloud.network.PhysicalNetwork)
*/
@Override
public boolean canHandle(PhysicalNetwork physicalNetwork){
@ -472,7 +474,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
*
* This method will be called right after NetworkGuru#implement().
* see also {@link #shutdown(Network, ReservationContext, boolean)}
* @see com.cloud.network.element.NetworkElement#implement(com.cloud.network.Network, com.cloud.offering.NetworkOffering, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
* @see org.apache.cloudstack.network.element.NetworkElement#implement(com.cloud.network.Network, com.cloud.offering.NetworkOffering, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
*/
@Override
public boolean implement(Network network, NetworkOffering offering,
@ -488,7 +490,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
*
* This method will be called right BEFORE NetworkGuru#shutdown().
* The entities was acquired by {@link #implement(Network, NetworkOffering, DeployDestination, ReservationContext)}
* @see com.cloud.network.element.NetworkElement#shutdown(com.cloud.network.Network, com.cloud.vm.ReservationContext, boolean)
* @see org.apache.cloudstack.network.element.NetworkElement#shutdown(com.cloud.network.Network, com.cloud.vm.ReservationContext, boolean)
*/
@Override
public boolean shutdown(Network network, ReservationContext context,
@ -503,7 +505,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
*
* This method will be called right after NetworkGuru#reserve().
* The entities will be released by {@link #release(Network, NicProfile, VirtualMachineProfile, ReservationContext)}
* @see com.cloud.network.element.NetworkElement#prepare(com.cloud.network.Network, com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
* @see org.apache.cloudstack.network.element.NetworkElement#prepare(com.cloud.network.Network, com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
*/
@Override
public boolean prepare(Network network, NicProfile nic,
@ -520,7 +522,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
*
* This method will be called right AFTER NetworkGuru#release().
* The entities was acquired in {@link #prepare(Network, NicProfile, VirtualMachineProfile, DeployDestination, ReservationContext)}
* @see com.cloud.network.element.NetworkElement#release(com.cloud.network.Network, com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.vm.ReservationContext)
* @see org.apache.cloudstack.network.element.NetworkElement#release(com.cloud.network.Network, com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.vm.ReservationContext)
*/
@Override
public boolean release(Network network, NicProfile nic,
@ -535,7 +537,7 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp
* Destroy a network implementation.
*
* This method will be called right BEFORE NetworkGuru#trash() in "Expunge" phase.
* @see com.cloud.network.element.NetworkElement#destroy(com.cloud.network.Network)
* @see org.apache.cloudstack.network.element.NetworkElement#destroy(com.cloud.network.Network)
*/
@Override
public boolean destroy(Network network, ReservationContext context)

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import com.cloud.deploy.DeployDestination;
import com.cloud.network.Network;

View File

@ -14,10 +14,11 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import org.apache.cloudstack.api.commands.AddSspCmd;
import org.apache.cloudstack.api.commands.DeleteSspCmd;
import com.cloud.api.commands.AddSspCmd;
import com.cloud.api.commands.DeleteSspCmd;
import com.cloud.host.Host;
import com.cloud.utils.component.PluggableService;

View File

@ -14,11 +14,13 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.guru;
package org.apache.cloudstack.network.guru;
import javax.ejb.Local;
import javax.inject.Inject;
import org.apache.cloudstack.network.element.SspElement;
import org.apache.cloudstack.network.element.SspManager;
import org.apache.log4j.Logger;
import com.cloud.dc.DataCenter.NetworkType;
@ -31,8 +33,8 @@ import com.cloud.network.NetworkProfile;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetwork.IsolationMethod;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.element.SspElement;
import com.cloud.network.element.SspManager;
import com.cloud.network.guru.GuestNetworkGuru;
import com.cloud.network.guru.NetworkGuru;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
import com.cloud.vm.NicProfile;
@ -95,7 +97,7 @@ public class SspGuestNetworkGuru extends GuestNetworkGuru implements NetworkMigr
* Effective return object members are: cidr, broadcastUri, gateway, mode, physicalNetworkId
* The other members will be silently ignored.
* This method is called at DeployVMCmd#execute (running phase) - NetworkManagerImpl#prepare
* @see com.cloud.network.guru.GuestNetworkGuru#implement(com.cloud.network.Network, com.cloud.offering.NetworkOffering, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
* @see org.apache.cloudstack.network.guru.GuestNetworkGuru#implement(com.cloud.network.Network, com.cloud.offering.NetworkOffering, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext)
*/
@Override
public Network implement(Network network, NetworkOffering offering,

View File

@ -14,10 +14,11 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import java.util.UUID;
import org.apache.cloudstack.network.element.SspClient;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.URI;

View File

@ -14,11 +14,16 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.network.element;
package org.apache.cloudstack.network.element;
import java.util.Arrays;
import java.util.HashMap;
import org.apache.cloudstack.network.dao.SspCredentialDao;
import org.apache.cloudstack.network.dao.SspCredentialVO;
import org.apache.cloudstack.network.dao.SspTenantDao;
import org.apache.cloudstack.network.dao.SspUuidDao;
import org.apache.cloudstack.network.element.SspElement;
import org.junit.Before;
import org.junit.Test;
@ -36,10 +41,6 @@ import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.dao.SspCredentialDao;
import com.cloud.network.dao.SspCredentialVO;
import com.cloud.network.dao.SspTenantDao;
import com.cloud.network.dao.SspUuidDao;
import com.cloud.resource.ResourceManager;
import com.cloud.vm.dao.NicDao;