mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into affinity_groups
Conflicts: api/src/org/apache/cloudstack/api/BaseCmd.java client/tomcatconf/applicationContext.xml.in client/tomcatconf/componentContext.xml.in server/src/com/cloud/api/ApiDBUtils.java server/src/com/cloud/server/ManagementServerImpl.java server/src/com/cloud/user/AccountManagerImpl.java setup/db/db/schema-410to420.sql
This commit is contained in:
commit
ca1a7948f1
|
|
@ -75,3 +75,11 @@ docs/runbook/tmp
|
|||
docs/runbook/publish
|
||||
.project
|
||||
Gemfile.lock
|
||||
debian/tmp
|
||||
debian/files
|
||||
debian/cloudstack-*/*
|
||||
debian/*.substvars
|
||||
debian/*.debhelper
|
||||
replace.properties.tmp
|
||||
build-indep-stamp
|
||||
configure-stamp
|
||||
|
|
|
|||
|
|
@ -80,3 +80,12 @@ domr.scripts.dir=scripts/network/domr/kvm
|
|||
# native = com.cloud.hypervisor.kvm.resource.BridgeVifDriver
|
||||
# openvswitch = com.cloud.hypervisor.kvm.resource.OvsBridgeDriver
|
||||
#libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver
|
||||
|
||||
# set the hypervisor type, values are: kvm, lxc
|
||||
# hypervisor.type=kvm
|
||||
|
||||
# settings to enable direct networking in libvirt, should not be used
|
||||
# on hosts that run system vms, values for mode are: private, bridge, vepa
|
||||
# libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver
|
||||
# network.direct.source.mode=private
|
||||
# network.direct.device=eth0
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
|
|||
*/
|
||||
public abstract class Command {
|
||||
|
||||
public static final String HYPERVISOR_TYPE = "hypervisorType";
|
||||
|
||||
// allow command to carry over hypervisor or other environment related context info
|
||||
@LogLevel(Log4jLevel.Trace)
|
||||
protected Map<String, String> contextMap = new HashMap<String, String>();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
// under the License.
|
||||
package com.cloud.agent.api;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
|
||||
public class RebootCommand extends Command {
|
||||
|
|
|
|||
|
|
@ -38,10 +38,9 @@ public class StopCommand extends RebootCommand {
|
|||
super(vm);
|
||||
this.vnet = vnet;
|
||||
}
|
||||
|
||||
public StopCommand(VirtualMachine vm, String vmName, String vnet) {
|
||||
super(vmName);
|
||||
this.vnet = vnet;
|
||||
|
||||
public StopCommand(VirtualMachine vm) {
|
||||
super(vm);
|
||||
}
|
||||
|
||||
public StopCommand(String vmName) {
|
||||
|
|
|
|||
|
|
@ -122,9 +122,11 @@ public class EventTypes {
|
|||
public static final String EVENT_GLOBAL_LOAD_BALANCER_DELETE = "GLOBAL.LB.DELETE";
|
||||
|
||||
// Account events
|
||||
public static final String EVENT_ACCOUNT_ENABLE = "ACCOUNT.ENABLE";
|
||||
public static final String EVENT_ACCOUNT_DISABLE = "ACCOUNT.DISABLE";
|
||||
public static final String EVENT_ACCOUNT_CREATE = "ACCOUNT.CREATE";
|
||||
public static final String EVENT_ACCOUNT_DELETE = "ACCOUNT.DELETE";
|
||||
public static final String EVENT_ACCOUNT_UPDATE = "ACCOUNT.UPDATE";
|
||||
public static final String EVENT_ACCOUNT_MARK_DEFAULT_ZONE = "ACCOUNT.MARK.DEFAULT.ZONE";
|
||||
|
||||
// UserVO Events
|
||||
|
|
@ -137,6 +139,9 @@ public class EventTypes {
|
|||
public static final String EVENT_USER_ENABLE = "USER.ENABLE";
|
||||
public static final String EVENT_USER_LOCK = "USER.LOCK";
|
||||
|
||||
//registering SSH keypair events
|
||||
public static final String EVENT_REGISTER_SSH_KEYPAIR = "REGISTER.SSH.KEYPAIR";
|
||||
|
||||
// Template Events
|
||||
public static final String EVENT_TEMPLATE_CREATE = "TEMPLATE.CREATE";
|
||||
public static final String EVENT_TEMPLATE_DELETE = "TEMPLATE.DELETE";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,19 @@
|
|||
// 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.exception;
|
||||
|
||||
import com.cloud.utils.SerialVersionUID;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public class Hypervisor {
|
|||
BareMetal,
|
||||
Simulator,
|
||||
Ovm,
|
||||
LXC,
|
||||
|
||||
Any; /*If you don't care about the hypervisor type*/
|
||||
|
||||
|
|
@ -54,6 +55,8 @@ public class Hypervisor {
|
|||
return HypervisorType.Simulator;
|
||||
} else if (hypervisor.equalsIgnoreCase("Ovm")) {
|
||||
return HypervisorType.Ovm;
|
||||
} else if (hypervisor.equalsIgnoreCase("LXC")) {
|
||||
return HypervisorType.LXC;
|
||||
} else if (hypervisor.equalsIgnoreCase("Any")) {
|
||||
return HypervisorType.Any;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -136,8 +136,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
|||
public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
|
||||
public static final Provider None = new Provider("None", false);
|
||||
// NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking
|
||||
public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
|
||||
public static final Provider MidokuraMidonet = new Provider("MidokuraMidonet", true);
|
||||
public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
|
||||
|
||||
private String name;
|
||||
private boolean isExternal;
|
||||
|
|
|
|||
|
|
@ -260,5 +260,7 @@ public interface NetworkModel {
|
|||
|
||||
String getStartIpv6Address(long id);
|
||||
|
||||
Nic getPlaceholderNic(Network network, Long podId);
|
||||
boolean isProviderEnabledInZone(long zoneId, String provider);
|
||||
|
||||
Nic getPlaceholderNicForRouter(Network network, Long podId);
|
||||
}
|
||||
|
|
@ -62,6 +62,7 @@ public class Networks {
|
|||
Vnet("vnet", Long.class),
|
||||
Storage("storage", Integer.class),
|
||||
Lswitch("lswitch", String.class),
|
||||
Mido("mido", String.class),
|
||||
UnDecided(null, null);
|
||||
|
||||
private String scheme;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ public interface PhysicalNetwork extends Identity, InternalIdentity {
|
|||
L3,
|
||||
GRE,
|
||||
STT,
|
||||
VNS;
|
||||
VNS,
|
||||
MIDO;
|
||||
}
|
||||
|
||||
public enum BroadcastDomainRange {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,10 @@
|
|||
package com.cloud.network;
|
||||
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
public interface RemoteAccessVpn extends ControlledEntity {
|
||||
public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Identity {
|
||||
enum State {
|
||||
Added,
|
||||
Running,
|
||||
|
|
|
|||
|
|
@ -20,32 +20,63 @@ import org.apache.cloudstack.acl.ControlledEntity;
|
|||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.network.Network;
|
||||
|
||||
public interface Vpc extends ControlledEntity, Identity, InternalIdentity {
|
||||
|
||||
public enum State {
|
||||
Enabled,
|
||||
Inactive
|
||||
}
|
||||
|
||||
public static final String _supportedProviders = Network.Provider.VPCVirtualRouter.getName();
|
||||
|
||||
boolean readyToUse();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
|
||||
/**
|
||||
* @return the id of the zone the VPC belongs to
|
||||
*/
|
||||
long getZoneId();
|
||||
|
||||
|
||||
/**
|
||||
* @return super CIDR of the VPC. All the networks participating in VPC, should have CIDRs that are the part of the super cidr
|
||||
*/
|
||||
String getCidr();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC state
|
||||
*/
|
||||
State getState();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC offering id - the offering that VPC is created from
|
||||
*/
|
||||
long getVpcOfferingId();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC display text
|
||||
*/
|
||||
String getDisplayText();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC network domain. All networks participating in the VPC, become the part of the same network domain
|
||||
*/
|
||||
String getNetworkDomain();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if restart is required for the VPC; false otherwise
|
||||
*/
|
||||
boolean isRestartRequired();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,18 +27,33 @@ public interface VpcOffering extends InternalIdentity, Identity {
|
|||
|
||||
public static final String defaultVPCOfferingName = "Default VPC offering";
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC offering name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
String getUniqueName();
|
||||
|
||||
|
||||
/**
|
||||
* @return VPC offering display text
|
||||
*/
|
||||
String getDisplayText();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return VPC offering state
|
||||
*/
|
||||
State getState();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if offering is default - came with the cloudStack fresh install; false otherwise
|
||||
*/
|
||||
boolean isDefault();
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @return service offering id used by VPC virutal router
|
||||
*/
|
||||
Long getServiceOfferingId();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
// 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.vpc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface VpcProvisioningService {
|
||||
|
||||
public VpcOffering getVpcOffering(long vpcOfferingId);
|
||||
|
||||
public VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices, Map<String, List<String>> serviceProviders);
|
||||
|
||||
List<? extends VpcOffering> listVpcOfferings(Long id, String name, String displayText, List<String> supportedServicesStr,
|
||||
Boolean isDefault, String keyword, String state, Long startIndex, Long pageSizeVal);
|
||||
|
||||
/**
|
||||
* @param offId
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteVpcOffering(long offId);
|
||||
|
||||
/**
|
||||
* @param vpcOffId
|
||||
* @param vpcOfferingName
|
||||
* @param displayText
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
public VpcOffering updateVpcOffering(long vpcOffId, String vpcOfferingName, String displayText, String state);
|
||||
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@ package com.cloud.network.vpc;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.cloudstack.api.command.user.vpc.ListPrivateGatewaysCmd;
|
||||
import org.apache.cloudstack.api.command.user.vpc.ListStaticRoutesCmd;
|
||||
|
|
@ -31,45 +30,29 @@ import com.cloud.exception.ResourceAllocationException;
|
|||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.IpAddress;
|
||||
import com.cloud.network.Network;
|
||||
import com.cloud.network.Network.Provider;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.User;
|
||||
import com.cloud.utils.Pair;
|
||||
|
||||
public interface VpcService {
|
||||
|
||||
public VpcOffering getVpcOffering(long vpcOfferingId);
|
||||
|
||||
public VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices, Map<String, List<String>> serviceProviders);
|
||||
|
||||
/**Returns existing VPC found by id
|
||||
*
|
||||
* @param vpcId
|
||||
* @return
|
||||
*/
|
||||
public Vpc getVpc(long vpcId);
|
||||
|
||||
public Vpc getActiveVpc(long vpcId);
|
||||
|
||||
|
||||
/**
|
||||
* Returns all the Guest networks that are part of VPC
|
||||
*
|
||||
* @param vpcId
|
||||
* @return
|
||||
*/
|
||||
public List<? extends Network> getVpcNetworks(long vpcId);
|
||||
|
||||
Map<Service, Set<Provider>> getVpcOffSvcProvidersMap(long vpcOffId);
|
||||
|
||||
List<? extends VpcOffering> listVpcOfferings(Long id, String name, String displayText, List<String> supportedServicesStr,
|
||||
Boolean isDefault, String keyword, String state, Long startIndex, Long pageSizeVal);
|
||||
|
||||
/**
|
||||
* @param offId
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteVpcOffering(long offId);
|
||||
|
||||
/**
|
||||
* @param vpcOffId
|
||||
* @param vpcOfferingName
|
||||
* @param displayText
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
public VpcOffering updateVpcOffering(long vpcOffId, String vpcOfferingName, String displayText, String state);
|
||||
|
||||
/**
|
||||
* Persists VPC record in the database
|
||||
*
|
||||
* @param zoneId
|
||||
* @param vpcOffId
|
||||
* @param vpcOwnerId
|
||||
|
|
@ -83,7 +66,10 @@ public interface VpcService {
|
|||
public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr,
|
||||
String networkDomain) throws ResourceAllocationException;
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a VPC
|
||||
*
|
||||
* @param vpcId
|
||||
* @return
|
||||
* @throws InsufficientCapacityException
|
||||
|
|
@ -92,7 +78,10 @@ public interface VpcService {
|
|||
*/
|
||||
public boolean deleteVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Updates VPC with new name/displayText
|
||||
*
|
||||
* @param vpcId
|
||||
* @param vpcName
|
||||
* @param displayText
|
||||
|
|
@ -100,7 +89,10 @@ public interface VpcService {
|
|||
*/
|
||||
public Vpc updateVpc(long vpcId, String vpcName, String displayText);
|
||||
|
||||
|
||||
/**
|
||||
* Lists VPC(s) based on the parameters passed to the method call
|
||||
*
|
||||
* @param id
|
||||
* @param vpcName
|
||||
* @param displayText
|
||||
|
|
@ -127,6 +119,8 @@ public interface VpcService {
|
|||
Boolean restartRequired, Map<String, String> tags, Long projectId);
|
||||
|
||||
/**
|
||||
* Starts VPC which includes starting VPC provider and applying all the neworking rules on the backend
|
||||
*
|
||||
* @param vpcId
|
||||
* @param destroyOnFailure TODO
|
||||
* @return
|
||||
|
|
@ -138,6 +132,8 @@ public interface VpcService {
|
|||
ResourceUnavailableException, InsufficientCapacityException;
|
||||
|
||||
/**
|
||||
* Shuts down the VPC which includes shutting down all VPC provider and rules cleanup on the backend
|
||||
*
|
||||
* @param vpcId
|
||||
* @return
|
||||
* @throws ConcurrentOperationException
|
||||
|
|
@ -145,16 +141,28 @@ public interface VpcService {
|
|||
*/
|
||||
boolean shutdownVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Restarts the VPC. VPC gets shutdown and started as a part of it
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @throws InsufficientCapacityException
|
||||
*/
|
||||
boolean restartVpc(long id) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
|
||||
|
||||
/**
|
||||
* Returns a Private gateway found in the VPC by id
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
PrivateGateway getVpcPrivateGateway(long id);
|
||||
|
||||
|
||||
/**
|
||||
* Persists VPC private gateway in the Database.
|
||||
*
|
||||
* @param vpcId TODO
|
||||
* @param physicalNetworkId
|
||||
* @param vlan
|
||||
|
|
@ -172,6 +180,8 @@ public interface VpcService {
|
|||
ConcurrentOperationException, InsufficientCapacityException;
|
||||
|
||||
/**
|
||||
* Applies VPC private gateway on the backend, so it becomes functional
|
||||
*
|
||||
* @param gatewayId
|
||||
* @param destroyOnFailure TODO
|
||||
* @return
|
||||
|
|
@ -180,7 +190,10 @@ public interface VpcService {
|
|||
*/
|
||||
public PrivateGateway applyVpcPrivateGateway(long gatewayId, boolean destroyOnFailure) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Deletes VPC private gateway
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @throws ResourceUnavailableException
|
||||
|
|
@ -188,52 +201,76 @@ public interface VpcService {
|
|||
*/
|
||||
boolean deleteVpcPrivateGateway(long gatewayId) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the list of Private gateways existing in the VPC
|
||||
*
|
||||
* @param listPrivateGatewaysCmd
|
||||
* @return
|
||||
*/
|
||||
public Pair<List<PrivateGateway>, Integer> listPrivateGateway(ListPrivateGatewaysCmd listPrivateGatewaysCmd);
|
||||
|
||||
|
||||
/**
|
||||
* Returns Static Route found by Id
|
||||
*
|
||||
* @param routeId
|
||||
* @return
|
||||
*/
|
||||
StaticRoute getStaticRoute(long routeId);
|
||||
|
||||
|
||||
/**
|
||||
* Applies existing Static Routes to the VPC elements
|
||||
*
|
||||
* @param vpcId
|
||||
* @return
|
||||
* @throws ResourceUnavailableException
|
||||
*/
|
||||
public boolean applyStaticRoutes(long vpcId) throws ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Deletes static route from the backend and the database
|
||||
*
|
||||
* @param routeId
|
||||
* @return TODO
|
||||
* @throws ResourceUnavailableException
|
||||
*/
|
||||
public boolean revokeStaticRoute(long routeId) throws ResourceUnavailableException;
|
||||
|
||||
|
||||
/**
|
||||
* Persists static route entry in the Database
|
||||
*
|
||||
* @param gatewayId
|
||||
* @param cidr
|
||||
* @return
|
||||
*/
|
||||
public StaticRoute createStaticRoute(long gatewayId, String cidr) throws NetworkRuleConflictException;
|
||||
|
||||
|
||||
/**
|
||||
* Lists static routes based on parameters passed to the call
|
||||
*
|
||||
* @param listStaticRoutesCmd
|
||||
* @return
|
||||
*/
|
||||
public Pair<List<? extends StaticRoute>, Integer> listStaticRoutes(ListStaticRoutesCmd cmd);
|
||||
|
||||
|
||||
/**
|
||||
* Returns gateway (VPN or Public) existign in the VPC
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
VpcGateway getVpcGateway(long id);
|
||||
|
||||
|
||||
/**
|
||||
* Associates IP address from the Public network, to the VPC
|
||||
*
|
||||
* @param ipId
|
||||
* @param vpcId
|
||||
* @return
|
||||
|
|
@ -245,6 +282,4 @@ public interface VpcService {
|
|||
IpAddress associateIPToVpc(long ipId, long vpcId) throws ResourceAllocationException, ResourceUnavailableException,
|
||||
InsufficientAddressCapacityException, ConcurrentOperationException;
|
||||
|
||||
public Network updateVpcGuestNetwork(long networkId, String name, String displayText, Account callerAccount,
|
||||
User callerUser, String domainSuffix, Long ntwkOffId, Boolean changeCidr, String guestVmCidr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,6 @@ public interface RemoteAccessVpnService {
|
|||
|
||||
List<? extends RemoteAccessVpn> listRemoteAccessVpns(long networkId);
|
||||
|
||||
RemoteAccessVpn getRemoteAccessVpn(long vpnId);
|
||||
RemoteAccessVpn getRemoteAccessVpn(long vpnAddrId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ public interface ResourceTag extends ControlledEntity, Identity, InternalIdentit
|
|||
Vpc,
|
||||
NetworkACL,
|
||||
StaticRoute,
|
||||
VMSnapshot
|
||||
VMSnapshot,
|
||||
RemoteAccessVpn
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ public class Storage {
|
|||
VHD(true, true, true),
|
||||
ISO(false, false, false),
|
||||
OVA(true, true, true, "ova"),
|
||||
BAREMETAL(false, false, false);
|
||||
BAREMETAL(false, false, false),
|
||||
TAR(false, false, false);
|
||||
|
||||
private final boolean thinProvisioned;
|
||||
private final boolean supportSparse;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,19 @@
|
|||
// 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 org.apache.cloudstack.affinity;
|
||||
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,19 @@
|
|||
// 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 org.apache.cloudstack.affinity;
|
||||
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,19 @@
|
|||
// 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 org.apache.cloudstack.affinity;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import com.cloud.network.firewall.NetworkACLService;
|
|||
import com.cloud.network.lb.LoadBalancingRulesService;
|
||||
import com.cloud.network.rules.RulesService;
|
||||
import com.cloud.network.security.SecurityGroupService;
|
||||
import com.cloud.network.vpc.VpcProvisioningService;
|
||||
import com.cloud.network.vpc.VpcService;
|
||||
import com.cloud.network.vpn.RemoteAccessVpnService;
|
||||
import com.cloud.network.vpn.Site2SiteVpnService;
|
||||
|
|
@ -134,6 +135,7 @@ public abstract class BaseCmd {
|
|||
@Inject public VMSnapshotService _vmSnapshotService;
|
||||
@Inject public DataStoreProviderApiService dataStoreProviderApiService;
|
||||
@Inject public AffinityGroupService _affinityGroupService;
|
||||
@Inject public VpcProvisioningService _vpcProvSvc;
|
||||
|
||||
public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class CreateAccountCmd extends BaseCmd {
|
|||
@Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, required=true, description="lastname")
|
||||
private String lastName;
|
||||
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.")
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Clear text password (Default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.")
|
||||
private String password;
|
||||
|
||||
@Parameter(name=ApiConstants.TIMEZONE, type=CommandType.STRING, description="Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.")
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class CreateUserCmd extends BaseCmd {
|
|||
@Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, required=true, description="lastname")
|
||||
private String lastname;
|
||||
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.")
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Clear text password (Default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.")
|
||||
private String password;
|
||||
|
||||
@Parameter(name=ApiConstants.TIMEZONE, type=CommandType.STRING, description="Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.")
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class UpdateUserCmd extends BaseCmd {
|
|||
@Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, description="last name")
|
||||
private String lastname;
|
||||
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="Hashed password (default is MD5). If you wish to use any other hasing algorithm, you would need to write a custom authentication adapter")
|
||||
@Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="Clear text password (default hashed to SHA256SALT). If you wish to use any other hasing algorithm, you would need to write a custom authentication adapter")
|
||||
private String password;
|
||||
|
||||
@Parameter(name=ApiConstants.SECRET_KEY, type=CommandType.STRING, description="The secret key for the user. Must be specified with userApiKey")
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd{
|
|||
|
||||
@Override
|
||||
public void create() throws ResourceAllocationException {
|
||||
VpcOffering vpcOff = _vpcService.createVpcOffering(getVpcOfferingName(), getDisplayText(), getSupportedServices(), getServiceProviders());
|
||||
VpcOffering vpcOff = _vpcProvSvc.createVpcOffering(getVpcOfferingName(), getDisplayText(), getSupportedServices(), getServiceProviders());
|
||||
if (vpcOff != null) {
|
||||
this.setEntityId(vpcOff.getId());
|
||||
this.setEntityUuid(vpcOff.getUuid());
|
||||
|
|
@ -109,7 +109,7 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd{
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
VpcOffering vpc = _vpcService.getVpcOffering(this.getEntityId());
|
||||
VpcOffering vpc = _vpcProvSvc.getVpcOffering(this.getEntityId());
|
||||
if (vpc != null) {
|
||||
VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(vpc);
|
||||
response.setResponseName(getCommandName());
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class DeleteVPCOfferingCmd extends BaseAsyncCmd{
|
|||
|
||||
@Override
|
||||
public void execute(){
|
||||
boolean result = _vpcService.deleteVpcOffering(getId());
|
||||
boolean result = _vpcProvSvc.deleteVpcOffering(getId());
|
||||
if (result) {
|
||||
SuccessResponse response = new SuccessResponse(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class UpdateVPCOfferingCmd extends BaseAsyncCmd{
|
|||
|
||||
@Override
|
||||
public void execute(){
|
||||
VpcOffering result = _vpcService.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState());
|
||||
VpcOffering result = _vpcProvSvc.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState());
|
||||
if (result != null) {
|
||||
VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(result);
|
||||
response.setResponseName(getCommandName());
|
||||
|
|
|
|||
|
|
@ -129,14 +129,9 @@ public class UpdateNetworkCmd extends BaseAsyncCmd {
|
|||
throw new InvalidParameterValueException("Couldn't find network by id");
|
||||
}
|
||||
|
||||
Network result = null;
|
||||
if (network.getVpcId() != null) {
|
||||
result = _vpcService.updateVpcGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
|
||||
Network result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
|
||||
callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr());
|
||||
} else {
|
||||
result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
|
||||
callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr());
|
||||
}
|
||||
|
||||
|
||||
if (result != null) {
|
||||
NetworkResponse response = _responseGenerator.createNetworkResponse(result);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import com.cloud.vm.NicSecondaryIp;
|
|||
@APICommand(name = "listNics", description = "list the vm nics IP to NIC", responseObject = NicResponse.class)
|
||||
public class ListNicsCmd extends BaseListCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListNicsCmd.class.getName());
|
||||
private static final String s_name = "listnics";
|
||||
private static final String s_name = "listnicsresponse";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class ListVPCOfferingsCmd extends BaseListCmd{
|
|||
|
||||
@Override
|
||||
public void execute(){
|
||||
List<? extends VpcOffering> offerings = _vpcService.listVpcOfferings(getId(), getVpcOffName(), getDisplayText(),
|
||||
List<? extends VpcOffering> offerings = _vpcProvSvc.listVpcOfferings(getId(), getVpcOffName(), getDisplayText(),
|
||||
getSupportedServices(), isDefault, this.getKeyword(), getState(), this.getStartIndex(), this.getPageSizeVal());
|
||||
ListResponse<VpcOfferingResponse> response = new ListResponse<VpcOfferingResponse>();
|
||||
List<VpcOfferingResponse> offeringResponses = new ArrayList<VpcOfferingResponse>();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class DeleteRemoteAccessVpnCmd extends BaseAsyncCmd {
|
|||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
if (ownerId == null) {
|
||||
RemoteAccessVpn vpnEntity = _entityMgr.findById(RemoteAccessVpn.class, publicIpId);
|
||||
RemoteAccessVpn vpnEntity = _ravService.getRemoteAccessVpn(publicIpId);
|
||||
if(vpnEntity != null)
|
||||
return vpnEntity.getAccountId();
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
|
|||
|
||||
@SerializedName(ApiConstants.STATE) @Param(description="the state of the rule")
|
||||
private String state;
|
||||
|
||||
@SerializedName(ApiConstants.ID) @Param(description="the id of the remote access vpn")
|
||||
private String id;
|
||||
|
||||
public void setPublicIp(String publicIp) {
|
||||
this.publicIp = publicIp;
|
||||
|
|
@ -100,5 +103,9 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE
|
|||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,13 +16,12 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ServiceResponse extends BaseResponse {
|
||||
|
|
@ -30,7 +29,7 @@ public class ServiceResponse extends BaseResponse {
|
|||
@SerializedName(ApiConstants.NAME) @Param(description="the service name")
|
||||
private String name;
|
||||
|
||||
@SerializedName(ApiConstants.PROVIDER) @Param(description="the service provider name")
|
||||
@SerializedName(ApiConstants.PROVIDER) @Param(description="the service provider name", responseObject = ProviderResponse.class)
|
||||
private List<ProviderResponse> providers;
|
||||
|
||||
@SerializedName("capability") @Param(description="the list of capabilities", responseObject = CapabilityResponse.class)
|
||||
|
|
|
|||
|
|
@ -79,9 +79,26 @@ public class StoragePoolResponse extends BaseResponse {
|
|||
|
||||
@SerializedName(ApiConstants.STATE) @Param(description="the state of the storage pool")
|
||||
private StoragePoolStatus state;
|
||||
|
||||
@SerializedName(ApiConstants.SCOPE) @Param(description="the scope of the storage pool")
|
||||
private String scope;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return the scope
|
||||
*/
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param scope the scope to set
|
||||
*/
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectId() {
|
||||
return this.getId();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public interface ExternalNetworkDeviceManager extends Manager {
|
|||
public static final NetworkDevice F5BigIpLoadBalancer = new NetworkDevice("F5BigIpLoadBalancer", Network.Provider.F5BigIp.getName());
|
||||
public static final NetworkDevice JuniperSRXFirewall = new NetworkDevice("JuniperSRXFirewall", Network.Provider.JuniperSRX.getName());
|
||||
public static final NetworkDevice NiciraNvp = new NetworkDevice("NiciraNvp", Network.Provider.NiciraNvp.getName());
|
||||
public static final NetworkDevice MidokuraMidonet = new NetworkDevice("MidokuraMidonet", Network.Provider.MidokuraMidonet.getName());
|
||||
|
||||
public NetworkDevice(String deviceName, String ntwkServiceprovider) {
|
||||
_name = deviceName;
|
||||
|
|
|
|||
|
|
@ -37,17 +37,19 @@
|
|||
<!--
|
||||
@DB support
|
||||
-->
|
||||
<aop:config proxy-target-class="true">
|
||||
<aop:aspect id="dbContextBuilder" ref="transactionContextBuilder">
|
||||
<aop:pointcut id="captureAnyMethod"
|
||||
expression="execution(* *(..))"
|
||||
/>
|
||||
|
||||
<aop:around pointcut-ref="captureAnyMethod" method="AroundAnyMethod"/>
|
||||
</aop:aspect>
|
||||
|
||||
</aop:config>
|
||||
|
||||
<!--
|
||||
@DB support
|
||||
-->
|
||||
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
|
||||
<bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
|
||||
|
||||
|
||||
<bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
|
||||
<property name="Interceptors">
|
||||
<list>
|
||||
<ref bean="transactionContextBuilder" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,14 @@
|
|||
#new labels (begin) **********************************************************************************************
|
||||
message.redirecting.region=Redirecting to region...
|
||||
label.use.vm.ip=Use VM IP:
|
||||
label.cpu.limits=CPU limits
|
||||
label.memory.limits=Memory limits (MiB)
|
||||
label.primary.storage.limits=Primary Storage limits (GiB)
|
||||
label.secondary.storage.limits=Secondary Storage limits (GiB)
|
||||
label.max.cpus=Max. CPU cores
|
||||
label.max.memory=Max. memory (MiB)
|
||||
label.max.primary.storage=Max. primary (GiB)
|
||||
label.max.secondary.storage=Max. secondary (GiB)
|
||||
label.menu.regions=Regions
|
||||
label.region=Region
|
||||
label.add.region=Add Region
|
||||
|
|
@ -1574,6 +1582,10 @@ label.nicira.controller.address=Controller Address
|
|||
label.nicira.transportzoneuuid=Transport Zone Uuid
|
||||
label.nicira.l3gatewayserviceuuid=L3 Gateway Service Uuid
|
||||
|
||||
label.add.BigSwitchVns.device=Add BigSwitch Vns Controller
|
||||
label.delete.BigSwitchVns=Remove BigSwitch Vns Controller
|
||||
label.bigswitch.controller.address=BigSwitch Vns Controller Address
|
||||
|
||||
#resizeVolumes
|
||||
label.resize.new.size=New Size(GB)
|
||||
label.action.resize.volume=Resize Volume
|
||||
|
|
|
|||
114
client/pom.xml
114
client/pom.xml
|
|
@ -65,11 +65,6 @@
|
|||
<artifactId>cloud-plugin-network-nvp</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-snmp-alerts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-network-ovs</artifactId>
|
||||
|
|
@ -85,6 +80,11 @@
|
|||
<artifactId>cloud-plugin-network-vns</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-network-midonet</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-hypervisor-xen</artifactId>
|
||||
|
|
@ -219,16 +219,21 @@
|
|||
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-hypervisor-ucs</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-storage-volume-default</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-syslog-alerts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-snmp-alerts</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-host-anti-affinity</artifactId>
|
||||
|
|
@ -279,6 +284,26 @@
|
|||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<!-- Copy the systemvm in the package phase as it is generated
|
||||
by console-proxy in the package phase.
|
||||
-->
|
||||
<execution>
|
||||
<id>copy-systemvm</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${basedir}/target/generated-webapp/WEB-INF/classes/vms">
|
||||
<fileset dir="${basedir}/../services/console-proxy/server/dist">
|
||||
<include name="systemvm.zip" />
|
||||
<include name="systemvm.iso" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-resource</id>
|
||||
<phase>generate-resources</phase>
|
||||
|
|
@ -306,12 +331,6 @@
|
|||
<include name="resources/**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${basedir}/target/generated-webapp/WEB-INF/classes/vms">
|
||||
<fileset dir="${basedir}/../services/console-proxy/server/dist">
|
||||
<include name="systemvm.zip" />
|
||||
<include name="systemvm.iso" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${basedir}/target/generated-webapp">
|
||||
<fileset dir="${basedir}/../ui" />
|
||||
</copy>
|
||||
|
|
@ -391,22 +410,38 @@
|
|||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-nonoss</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target if="${nonoss}">
|
||||
<echo>test</echo>
|
||||
<replaceregexp
|
||||
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
|
||||
match="cloud-stack-components-specification=.*"
|
||||
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-nonoss</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target if="${nonoss}">
|
||||
<echo>test</echo>
|
||||
<replaceregexp
|
||||
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
|
||||
match="cloud-stack-components-specification=.*"
|
||||
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-simulator-context</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target if="${simulator}">
|
||||
<echo>test</echo>
|
||||
<replaceregexp
|
||||
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
|
||||
match="classpath:componentContext.xml"
|
||||
replace="classpath:simulatorComponentContext.xml" byline="true" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-nonoss-spring-context</id>
|
||||
<phase>process-resources</phase>
|
||||
|
|
@ -495,6 +530,21 @@
|
|||
</pluginManagement>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>developer</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>simulator</name>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>netapp</id>
|
||||
<activation>
|
||||
|
|
|
|||
|
|
@ -32,32 +32,28 @@
|
|||
|
||||
<context:annotation-config />
|
||||
|
||||
<context:component-scan base-package="org.apache.cloudstack, com.cloud" />
|
||||
|
||||
<!--=====================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- core OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=====================================================================================================-->
|
||||
|
||||
<!--
|
||||
@DB support
|
||||
-->
|
||||
<aop:config>
|
||||
<aop:aspect id="dbContextBuilder" ref="transactionContextBuilder">
|
||||
<aop:pointcut id="captureAnyMethod"
|
||||
expression="execution(* *(..))"
|
||||
/>
|
||||
|
||||
<aop:around pointcut-ref="captureAnyMethod" method="AroundAnyMethod"/>
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="actionEventInterceptorAspect" ref="actionEventInterceptor">
|
||||
<aop:pointcut id="captureEventMethod"
|
||||
expression="execution(* *(..)) and @annotation(com.cloud.event.ActionEvent)"
|
||||
/>
|
||||
|
||||
<aop:around pointcut-ref="captureEventMethod" method="AroundAnyMethod"/>
|
||||
</aop:aspect>
|
||||
</aop:config>
|
||||
|
||||
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
|
||||
<bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
|
||||
<bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
|
||||
|
||||
<bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
|
||||
<property name="Interceptors">
|
||||
<list>
|
||||
<ref bean="transactionContextBuilder" />
|
||||
<ref bean="actionEventInterceptor" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
RPC/Async/EventBus
|
||||
-->
|
||||
|
|
@ -91,9 +87,6 @@
|
|||
<!--
|
||||
DAO with customized configuration
|
||||
-->
|
||||
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
|
||||
</bean>
|
||||
|
||||
<bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
|
|
@ -165,15 +158,688 @@
|
|||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="AffinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl"/>
|
||||
<bean id="DeploymentPlanningManager" class="com.cloud.deploy.DeploymentPlanningManagerImpl" />
|
||||
|
||||
<bean id="AffinityGroupJoinDaoImpl" class="com.cloud.api.query.dao.AffinityGroupJoinDaoImpl">
|
||||
<!--
|
||||
DAOs with default configuration
|
||||
-->
|
||||
<bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
|
||||
<bean id="accountDetailsDaoImpl" class="com.cloud.user.AccountDetailsDaoImpl" />
|
||||
<bean id="accountJoinDaoImpl" class="com.cloud.api.query.dao.AccountJoinDaoImpl" />
|
||||
<bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
|
||||
<bean id="agentUpgradeDaoImpl" class="com.cloud.maint.dao.AgentUpgradeDaoImpl" />
|
||||
<bean id="alertDaoImpl" class="com.cloud.alert.dao.AlertDaoImpl" />
|
||||
<bean id="asyncJobDaoImpl" class="com.cloud.async.dao.AsyncJobDaoImpl" />
|
||||
<bean id="asyncJobJoinDaoImpl" class="com.cloud.api.query.dao.AsyncJobJoinDaoImpl" />
|
||||
<bean id="autoScalePolicyConditionMapDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyConditionMapDaoImpl" />
|
||||
<bean id="autoScalePolicyDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyDaoImpl" />
|
||||
<bean id="autoScaleVmGroupDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupDaoImpl" />
|
||||
<bean id="autoScaleVmGroupPolicyMapDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDaoImpl" />
|
||||
<bean id="autoScaleVmProfileDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmProfileDaoImpl" />
|
||||
<bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
|
||||
<bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
|
||||
<bean id="capacityDaoImpl" class="com.cloud.capacity.dao.CapacityDaoImpl" />
|
||||
<bean id="certificateDaoImpl" class="com.cloud.certificate.dao.CertificateDaoImpl" />
|
||||
<bean id="clusterDaoImpl" class="com.cloud.dc.dao.ClusterDaoImpl" />
|
||||
<bean id="clusterDetailsDaoImpl" class="com.cloud.dc.ClusterDetailsDaoImpl" />
|
||||
<bean id="clusterVSMMapDaoImpl" class="com.cloud.dc.dao.ClusterVSMMapDaoImpl" />
|
||||
<bean id="commandExecLogDaoImpl" class="com.cloud.secstorage.CommandExecLogDaoImpl" />
|
||||
<bean id="conditionDaoImpl" class="com.cloud.network.as.dao.ConditionDaoImpl" />
|
||||
<bean id="consoleProxyDaoImpl" class="com.cloud.vm.dao.ConsoleProxyDaoImpl" />
|
||||
<bean id="counterDaoImpl" class="com.cloud.network.as.dao.CounterDaoImpl" />
|
||||
<bean id="dataCenterIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterIpAddressDaoImpl" />
|
||||
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
|
||||
<bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
|
||||
<bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
|
||||
<bean id="dataStoreProviderDaoImpl" class="org.apache.cloudstack.storage.datastore.db.DataStoreProviderDaoImpl" />
|
||||
<bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
|
||||
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
|
||||
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
|
||||
<bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
|
||||
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
|
||||
<bean id="domainRouterJoinDaoImpl" class="com.cloud.api.query.dao.DomainRouterJoinDaoImpl" />
|
||||
<bean id="elasticLbVmMapDaoImpl" class="com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl" />
|
||||
<bean id="engineClusterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDaoImpl" />
|
||||
<bean id="engineDataCenterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDaoImpl" />
|
||||
<bean id="engineHostDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDaoImpl" />
|
||||
<bean id="engineHostPodDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDaoImpl" />
|
||||
<bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
|
||||
<bean id="eventJoinDaoImpl" class="com.cloud.event.dao.EventJoinDaoImpl" />
|
||||
<bean id="externalFirewallDeviceDaoImpl" class="com.cloud.network.dao.ExternalFirewallDeviceDaoImpl" />
|
||||
<bean id="externalLoadBalancerDeviceDaoImpl" class="com.cloud.network.dao.ExternalLoadBalancerDeviceDaoImpl" />
|
||||
<bean id="externalPublicIpStatisticsDaoImpl" class="com.cloud.usage.dao.ExternalPublicIpStatisticsDaoImpl" />
|
||||
<bean id="firewallRulesCidrsDaoImpl" class="com.cloud.network.dao.FirewallRulesCidrsDaoImpl" />
|
||||
<bean id="firewallRulesDaoImpl" class="com.cloud.network.dao.FirewallRulesDaoImpl" />
|
||||
<bean id="globalLoadBalancerDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerDaoImpl" />
|
||||
<bean id="globalLoadBalancerLbRuleMapDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerLbRuleMapDaoImpl" />
|
||||
<bean id="guestOSCategoryDaoImpl" class="com.cloud.storage.dao.GuestOSCategoryDaoImpl" />
|
||||
<bean id="guestOSDaoImpl" class="com.cloud.storage.dao.GuestOSDaoImpl" />
|
||||
<bean id="highAvailabilityDaoImpl" class="com.cloud.ha.dao.HighAvailabilityDaoImpl" />
|
||||
<bean id="hostDaoImpl" class="com.cloud.host.dao.HostDaoImpl" />
|
||||
<bean id="engineHostDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostDetailsDaoImpl" class="com.cloud.host.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostJoinDaoImpl" class="com.cloud.api.query.dao.HostJoinDaoImpl" />
|
||||
<bean id="engineHostTagsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
|
||||
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
|
||||
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
|
||||
<bean id="imageDaoStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageDaoStoreDaoImpl" />
|
||||
<bean id="imageDataStoreProviderDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageDataStoreProviderDaoImpl" />
|
||||
<bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
|
||||
<bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
|
||||
<bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
|
||||
<bean id="instanceGroupVMMapDaoImpl" class="com.cloud.vm.dao.InstanceGroupVMMapDaoImpl" />
|
||||
<bean id="itWorkDaoImpl" class="com.cloud.vm.ItWorkDaoImpl" />
|
||||
<bean id="keystoreDaoImpl" class="com.cloud.keystore.KeystoreDaoImpl" />
|
||||
<bean id="lBHealthCheckPolicyDaoImpl" class="com.cloud.network.dao.LBHealthCheckPolicyDaoImpl" />
|
||||
<bean id="lBStickinessPolicyDaoImpl" class="com.cloud.network.dao.LBStickinessPolicyDaoImpl" />
|
||||
<bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl" />
|
||||
<bean id="loadBalancerDaoImpl" class="com.cloud.network.dao.LoadBalancerDaoImpl" />
|
||||
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
|
||||
<bean id="managementServerHostDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
|
||||
<bean id="managementServerHostPeerDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostPeerDaoImpl" />
|
||||
<bean id="mockConfigurationDaoImpl" class="com.cloud.simulator.dao.MockConfigurationDaoImpl" />
|
||||
<bean id="mockHostDaoImpl" class="com.cloud.simulator.dao.MockHostDaoImpl" />
|
||||
<bean id="mockSecStorageDaoImpl" class="com.cloud.simulator.dao.MockSecStorageDaoImpl" />
|
||||
<bean id="mockSecurityRulesDaoImpl" class="com.cloud.simulator.dao.MockSecurityRulesDaoImpl" />
|
||||
<bean id="mockStoragePoolDaoImpl" class="com.cloud.simulator.dao.MockStoragePoolDaoImpl" />
|
||||
<bean id="mockVMDaoImpl" class="com.cloud.simulator.dao.MockVMDaoImpl" />
|
||||
<bean id="mockVolumeDaoImpl" class="com.cloud.simulator.dao.MockVolumeDaoImpl" />
|
||||
<bean id="networkAccountDaoImpl" class="com.cloud.network.dao.NetworkAccountDaoImpl" />
|
||||
<bean id="networkDaoImpl" class="com.cloud.network.dao.NetworkDaoImpl" />
|
||||
<bean id="networkDomainDaoImpl" class="com.cloud.network.dao.NetworkDomainDaoImpl" />
|
||||
<bean id="networkExternalFirewallDaoImpl" class="com.cloud.network.dao.NetworkExternalFirewallDaoImpl" />
|
||||
<bean id="networkExternalLoadBalancerDaoImpl" class="com.cloud.network.dao.NetworkExternalLoadBalancerDaoImpl" />
|
||||
<bean id="networkOfferingDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" />
|
||||
<bean id="networkOfferingServiceMapDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" />
|
||||
<bean id="networkOpDaoImpl" class="com.cloud.network.dao.NetworkOpDaoImpl" />
|
||||
<bean id="networkRuleConfigDaoImpl" class="com.cloud.network.dao.NetworkRuleConfigDaoImpl" />
|
||||
<bean id="networkServiceMapDaoImpl" class="com.cloud.network.dao.NetworkServiceMapDaoImpl" />
|
||||
<bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
|
||||
<bean id="nicSecondaryIpDaoImpl" class="com.cloud.vm.dao.NicSecondaryIpDaoImpl" />
|
||||
<bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
|
||||
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
|
||||
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
|
||||
<bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />
|
||||
<bean id="physicalNetworkTagDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTagDaoImpl" />
|
||||
<bean id="physicalNetworkTrafficTypeDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTrafficTypeDaoImpl" />
|
||||
<bean id="podVlanDaoImpl" class="com.cloud.dc.dao.PodVlanDaoImpl" />
|
||||
<bean id="podVlanMapDaoImpl" class="com.cloud.dc.dao.PodVlanMapDaoImpl" />
|
||||
<bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
|
||||
<bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
|
||||
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
|
||||
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDaoImpl" />
|
||||
<bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
|
||||
<bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
|
||||
<bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
|
||||
<bean id="projectDaoImpl" class="com.cloud.projects.dao.ProjectDaoImpl" />
|
||||
<bean id="projectInvitationDaoImpl" class="com.cloud.projects.dao.ProjectInvitationDaoImpl" />
|
||||
<bean id="projectInvitationJoinDaoImpl" class="com.cloud.api.query.dao.ProjectInvitationJoinDaoImpl" />
|
||||
<bean id="projectJoinDaoImpl" class="com.cloud.api.query.dao.ProjectJoinDaoImpl" />
|
||||
<bean id="regionDaoImpl" class="org.apache.cloudstack.region.dao.RegionDaoImpl" />
|
||||
<bean id="remoteAccessVpnDaoImpl" class="com.cloud.network.dao.RemoteAccessVpnDaoImpl" />
|
||||
<bean id="resourceCountDaoImpl" class="com.cloud.configuration.dao.ResourceCountDaoImpl" />
|
||||
<bean id="resourceLimitDaoImpl" class="com.cloud.configuration.dao.ResourceLimitDaoImpl" />
|
||||
<bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
|
||||
<bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
|
||||
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
||||
<bean id="s3DaoImpl" class="com.cloud.storage.dao.S3DaoImpl" />
|
||||
<bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
|
||||
<bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
|
||||
<bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
|
||||
<bean id="securityGroupJoinDaoImpl" class="com.cloud.api.query.dao.SecurityGroupJoinDaoImpl" />
|
||||
<bean id="securityGroupRuleDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRuleDaoImpl" />
|
||||
<bean id="securityGroupRulesDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRulesDaoImpl" />
|
||||
<bean id="securityGroupVMMapDaoImpl" class="com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl" />
|
||||
<bean id="securityGroupWorkDaoImpl" class="com.cloud.network.security.dao.SecurityGroupWorkDaoImpl" />
|
||||
<bean id="serviceOfferingJoinDaoImpl" class="com.cloud.api.query.dao.ServiceOfferingJoinDaoImpl" />
|
||||
<bean id="site2SiteCustomerGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" />
|
||||
<bean id="site2SiteVpnConnectionDaoImpl" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" />
|
||||
<bean id="site2SiteVpnGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" />
|
||||
<bean id="snapshotDao2Impl" class="org.apache.cloudstack.storage.snapshot.db.SnapshotDao2Impl" />
|
||||
<bean id="snapshotDaoImpl" class="com.cloud.storage.dao.SnapshotDaoImpl" />
|
||||
<bean id="snapshotPolicyDaoImpl" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" />
|
||||
<bean id="snapshotScheduleDaoImpl" class="com.cloud.storage.dao.SnapshotScheduleDaoImpl" />
|
||||
<bean id="stackMaidDaoImpl" class="com.cloud.cluster.dao.StackMaidDaoImpl" />
|
||||
<bean id="staticRouteDaoImpl" class="com.cloud.network.vpc.dao.StaticRouteDaoImpl" />
|
||||
<bean id="storageNetworkIpAddressDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpAddressDaoImpl" />
|
||||
<bean id="storageNetworkIpRangeDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpRangeDaoImpl" />
|
||||
<bean id="storagePoolDetailsDaoImpl" class="com.cloud.storage.dao.StoragePoolDetailsDaoImpl" />
|
||||
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
|
||||
<bean id="storagePoolJoinDaoImpl" class="com.cloud.api.query.dao.StoragePoolJoinDaoImpl" />
|
||||
<bean id="storagePoolWorkDaoImpl" class="com.cloud.storage.dao.StoragePoolWorkDaoImpl" />
|
||||
<bean id="swiftDaoImpl" class="com.cloud.storage.dao.SwiftDaoImpl" />
|
||||
<bean id="syncQueueDaoImpl" class="com.cloud.async.dao.SyncQueueDaoImpl" />
|
||||
<bean id="syncQueueItemDaoImpl" class="com.cloud.async.dao.SyncQueueItemDaoImpl" />
|
||||
<bean id="templatePrimaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.volume.db.TemplatePrimaryDataStoreDaoImpl" />
|
||||
<bean id="uploadDaoImpl" class="com.cloud.storage.dao.UploadDaoImpl" />
|
||||
<bean id="usageDaoImpl" class="com.cloud.usage.dao.UsageDaoImpl" />
|
||||
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
|
||||
<bean id="usageIPAddressDaoImpl" class="com.cloud.usage.dao.UsageIPAddressDaoImpl" />
|
||||
<bean id="usageJobDaoImpl" class="com.cloud.usage.dao.UsageJobDaoImpl" />
|
||||
<bean id="usageLoadBalancerPolicyDaoImpl" class="com.cloud.usage.dao.UsageLoadBalancerPolicyDaoImpl" />
|
||||
<bean id="usageNetworkDaoImpl" class="com.cloud.usage.dao.UsageNetworkDaoImpl" />
|
||||
<bean id="usageNetworkOfferingDaoImpl" class="com.cloud.usage.dao.UsageNetworkOfferingDaoImpl" />
|
||||
<bean id="usagePortForwardingRuleDaoImpl" class="com.cloud.usage.dao.UsagePortForwardingRuleDaoImpl" />
|
||||
<bean id="usageSecurityGroupDaoImpl" class="com.cloud.usage.dao.UsageSecurityGroupDaoImpl" />
|
||||
<bean id="usageStorageDaoImpl" class="com.cloud.usage.dao.UsageStorageDaoImpl" />
|
||||
<bean id="usageVMInstanceDaoImpl" class="com.cloud.usage.dao.UsageVMInstanceDaoImpl" />
|
||||
<bean id="usageVPNUserDaoImpl" class="com.cloud.usage.dao.UsageVPNUserDaoImpl" />
|
||||
<bean id="usageVolumeDaoImpl" class="com.cloud.usage.dao.UsageVolumeDaoImpl" />
|
||||
<bean id="userAccountDaoImpl" class="com.cloud.user.dao.UserAccountDaoImpl" />
|
||||
<bean id="userAccountJoinDaoImpl" class="com.cloud.api.query.dao.UserAccountJoinDaoImpl" />
|
||||
<bean id="userIpv6AddressDaoImpl" class="com.cloud.network.dao.UserIpv6AddressDaoImpl" />
|
||||
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
|
||||
<bean id="userStatsLogDaoImpl" class="com.cloud.user.dao.UserStatsLogDaoImpl" />
|
||||
<bean id="userVmCloneSettingDaoImpl" class="com.cloud.vm.dao.UserVmCloneSettingDaoImpl" />
|
||||
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
|
||||
<bean id="userVmDetailsDaoImpl" class="com.cloud.vm.dao.UserVmDetailsDaoImpl" />
|
||||
<bean id="userVmJoinDaoImpl" class="com.cloud.api.query.dao.UserVmJoinDaoImpl" />
|
||||
<bean id="vMComputeTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMComputeTagDaoImpl" />
|
||||
<bean id="vMEntityDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDaoImpl" />
|
||||
<bean id="vMInstanceDaoImpl" class="com.cloud.vm.dao.VMInstanceDaoImpl" />
|
||||
<bean id="vMNetworkMapDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDaoImpl" />
|
||||
<bean id="vMReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDaoImpl" />
|
||||
<bean id="vMRootDiskTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMRootDiskTagDaoImpl" />
|
||||
<bean id="vMSnapshotDaoImpl" class="com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl" />
|
||||
<bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
|
||||
<bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
|
||||
<bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
|
||||
<bean id="vMTemplateS3DaoImpl" class="com.cloud.storage.dao.VMTemplateS3DaoImpl" />
|
||||
<bean id="vMTemplateSwiftDaoImpl" class="com.cloud.storage.dao.VMTemplateSwiftDaoImpl" />
|
||||
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
||||
<bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
|
||||
<bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
|
||||
<bean id="vmRulesetLogDaoImpl" class="com.cloud.network.security.dao.VmRulesetLogDaoImpl" />
|
||||
<bean id="volumeDao2Impl" class="org.apache.cloudstack.storage.volume.db.VolumeDao2Impl" />
|
||||
<bean id="volumeDaoImpl" class="com.cloud.storage.dao.VolumeDaoImpl" />
|
||||
<bean id="volumeHostDaoImpl" class="com.cloud.storage.dao.VolumeHostDaoImpl" />
|
||||
<bean id="volumeJoinDaoImpl" class="com.cloud.api.query.dao.VolumeJoinDaoImpl" />
|
||||
<bean id="volumeReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VolumeReservationDaoImpl" />
|
||||
<bean id="vpcDaoImpl" class="com.cloud.network.vpc.dao.VpcDaoImpl" />
|
||||
<bean id="vpcGatewayDaoImpl" class="com.cloud.network.vpc.dao.VpcGatewayDaoImpl" />
|
||||
<bean id="vpcOfferingDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingDaoImpl" />
|
||||
<bean id="vpcOfferingServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingServiceMapDaoImpl" />
|
||||
<bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
|
||||
<bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
|
||||
<bean id="affinityGroupJoinDaoImpl" class="com.cloud.api.query.dao.AffinityGroupJoinDaoImpl" />
|
||||
<bean id="affinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl" />
|
||||
<bean id="affinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl" />
|
||||
|
||||
<!--
|
||||
Checkers
|
||||
-->
|
||||
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
|
||||
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
|
||||
<bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
|
||||
<bean id="domainChecker" class="com.cloud.acl.DomainChecker" />
|
||||
|
||||
<!--
|
||||
Authenticators
|
||||
-->
|
||||
<bean id="basicAgentAuthManager" class="com.cloud.agent.manager.authn.impl.BasicAgentAuthManager">
|
||||
<property name="name" value="BASIC"/>
|
||||
</bean>
|
||||
<bean id="AffinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl">
|
||||
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
|
||||
<property name="name" value="MD5"/>
|
||||
</bean>
|
||||
<bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl">
|
||||
<bean id="LDAPUserAuthenticator" class="com.cloud.server.auth.LDAPUserAuthenticator">
|
||||
<property name="name" value="LDAP"/>
|
||||
</bean>
|
||||
<bean id="SHA256SaltedUserAuthenticator" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator">
|
||||
<property name="name" value="SHA256SALT"/>
|
||||
</bean>
|
||||
<bean id="PlainTextUserAuthenticator" class="com.cloud.server.auth.PlainTextUserAuthenticator">
|
||||
<property name="name" value="PLAINTEXT"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Network Elements
|
||||
-->
|
||||
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
|
||||
<property name="name" value="Ovs"/>
|
||||
</bean>
|
||||
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
|
||||
<property name="name" value="SecurityGroupProvider"/>
|
||||
</bean>
|
||||
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
|
||||
<property name="name" value="VirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
|
||||
<property name="name" value="VpcVirtualRouter"/>
|
||||
</bean>
|
||||
|
||||
<bean id="elasticLoadBalancerElement" class="com.cloud.network.element.ElasticLoadBalancerElement">
|
||||
<property name="name" value="ElasticLoadBalancerElement"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
General allocators
|
||||
-->
|
||||
<bean id="firstFitAllocator" class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator" />
|
||||
<bean id="randomAllocator" class="com.cloud.agent.manager.allocator.impl.RandomAllocator" />
|
||||
|
||||
<!--
|
||||
Host Allocators
|
||||
-->
|
||||
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
|
||||
<property name="name" value="FirstFitRouting"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Storage pool allocators
|
||||
-->
|
||||
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
|
||||
<property name="name" value="LocalStorage"/>
|
||||
</bean>
|
||||
<bean id="clusterScopeStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ClusterScopeStoragePoolAllocator" />
|
||||
<bean id="zoneWideStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator" />
|
||||
<bean id="garbageCollectingStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.GarbageCollectingStoragePoolAllocator">
|
||||
<property name="name" value="GCStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
|
||||
<property name="name" value="UserFirst"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="recreatableFencer" class="com.cloud.ha.RecreatableFencer" />
|
||||
<bean id="recreateHostAllocator" class="com.cloud.agent.manager.allocator.impl.RecreateHostAllocator" />
|
||||
<bean id="secondaryStorageVmDefaultAllocator" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator" />
|
||||
|
||||
|
||||
<!--
|
||||
Misc allocator & Adapters
|
||||
-->
|
||||
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
|
||||
<property name="name" value="Balance"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
|
||||
<property name="name" value="Basic"/>
|
||||
</bean>
|
||||
|
||||
<bean id="hyervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
|
||||
<bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" />
|
||||
<bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" />
|
||||
<bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" />
|
||||
<bean id="clusterServiceServletAdapter" class="com.cloud.cluster.ClusterServiceServletAdapter" />
|
||||
|
||||
<!--
|
||||
Investigators
|
||||
-->
|
||||
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
|
||||
<property name="name" value="SimpleInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
|
||||
<property name="name" value="XenServerInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
|
||||
<property name="name" value="PingInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
|
||||
<property name="name" value="ManagementIPSysVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Fencers
|
||||
-->
|
||||
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
|
||||
<property name="name" value="XenServerFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
|
||||
<property name="name" value="KVMFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
|
||||
<property name="name" value="OvmFenceBuilder"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Discovers
|
||||
-->
|
||||
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
|
||||
<property name="name" value="XCP Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SecondaryStorageDiscoverer" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
|
||||
<property name="name" value="KVM Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LxcServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.LxcServerDiscoverer">
|
||||
<property name="name" value="Lxc Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervServerDiscoverer" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer">
|
||||
<property name="name" value="SCVMMServer"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
|
||||
<property name="name" value="Ovm Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="dummyHostDiscoverer" class="com.cloud.resource.DummyHostDiscoverer">
|
||||
<property name="name" value="dummyHostDiscoverer" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Deployment planners
|
||||
-->
|
||||
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
|
||||
<property name="name" value="UserDispersing"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
|
||||
<property name="name" value="UserConcentratedPod"/>
|
||||
</bean>
|
||||
|
||||
<bean id="clusterBasedAgentLoadBalancerPlanner" class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
|
||||
<property name="name" value="ClusterBasedAgentLoadBalancerPlanner"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Network Gurus
|
||||
-->
|
||||
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
|
||||
<property name="name" value="StorageNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
|
||||
<property name="name" value="ExternalGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
|
||||
<property name="name" value="PublicNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
|
||||
<property name="name" value="PodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
|
||||
<property name="name" value="ControlNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
|
||||
<property name="name" value="DirectNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
|
||||
<property name="name" value="DirectPodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
|
||||
<property name="name" value="OvsGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
|
||||
<property name="name" value="PrivateNetworkGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Hypervisor Gurus
|
||||
-->
|
||||
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
|
||||
<property name="name" value="XenServerGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
|
||||
<property name="name" value="KVMGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LXCGuru" class="com.cloud.hypervisor.LXCGuru">
|
||||
<property name="name" value="LXCGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
|
||||
<property name="name" value="OvmGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervisorPlannerSelector" class="com.cloud.deploy.HypervisorVmPlannerSelector">
|
||||
<property name="name" value="HypervisorPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managers
|
||||
-->
|
||||
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
|
||||
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
|
||||
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
|
||||
<property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
|
||||
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
|
||||
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
|
||||
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
|
||||
<property name="name" value="First Fit"/>
|
||||
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
|
||||
<property name="PodAllocators" value="#{podAllocators.Adapters}" />
|
||||
<property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
|
||||
<property name="Investigators" value="#{haInvestigators.Adapters}" />
|
||||
<property name="FenceBuilders" value="#{haFenceBuilders.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
<property name="Planners" value="#{deploymentPlanners.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
|
||||
<property name="NetworkGurus" value="#{networkGurus.Adapters}" />
|
||||
<property name="NetworkElements" value="#{networkElements.Adapters}" />
|
||||
<property name="IpDeployers" value="#{ipDeployers.Adapters}" />
|
||||
<property name="DhcpProviders" value="#{dhcpProviders.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
|
||||
<property name="NetworkElements" value="#{networkElements.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
|
||||
|
||||
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
|
||||
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
|
||||
|
||||
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
|
||||
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
|
||||
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
|
||||
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
|
||||
|
||||
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
||||
|
||||
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
||||
|
||||
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
|
||||
<bean id="asyncJobExecutorContextImpl" class="com.cloud.async.AsyncJobExecutorContextImpl" />
|
||||
<bean id="asyncJobManagerImpl" class="com.cloud.async.AsyncJobManagerImpl" />
|
||||
<bean id="autoScaleManagerImpl" class="com.cloud.network.as.AutoScaleManagerImpl" />
|
||||
<bean id="capacityManagerImpl" class="com.cloud.capacity.CapacityManagerImpl" />
|
||||
<bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl" />
|
||||
<bean id="configurationManagerImpl" class="com.cloud.configuration.ConfigurationManagerImpl" />
|
||||
<bean id="dataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl" />
|
||||
<bean id="elasticLoadBalancerManagerImpl" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl" />
|
||||
<bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
|
||||
<bean id="externalLoadBalancerUsageManagerImpl" class="com.cloud.network.ExternalLoadBalancerUsageManagerImpl" />
|
||||
<bean id="externalNetworkDeviceManagerImpl" class="com.cloud.network.ExternalNetworkDeviceManagerImpl" />
|
||||
<bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl" />
|
||||
<bean id="hypervisorGuruManagerImpl" class="com.cloud.hypervisor.HypervisorGuruManagerImpl" />
|
||||
<bean id="identityServiceImpl" class="com.cloud.uuididentity.IdentityServiceImpl" />
|
||||
<bean id="keystoreManagerImpl" class="com.cloud.keystore.KeystoreManagerImpl" />
|
||||
<bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl" />
|
||||
<bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl" />
|
||||
<bean id="networkServiceImpl" class="com.cloud.network.NetworkServiceImpl" />
|
||||
<bean id="networkUsageManagerImpl" class="com.cloud.network.NetworkUsageManagerImpl" />
|
||||
<bean id="oCFS2ManagerImpl" class="com.cloud.storage.OCFS2ManagerImpl" />
|
||||
<bean id="ovsTunnelManagerImpl" class="com.cloud.network.ovs.OvsTunnelManagerImpl" />
|
||||
<bean id="projectManagerImpl" class="com.cloud.projects.ProjectManagerImpl" />
|
||||
<bean id="queryManagerImpl" class="com.cloud.api.query.QueryManagerImpl" />
|
||||
<bean id="regionManagerImpl" class="org.apache.cloudstack.region.RegionManagerImpl" />
|
||||
<bean id="regionServiceImpl" class="org.apache.cloudstack.region.RegionServiceImpl" />
|
||||
<bean id="remoteAccessVpnManagerImpl" class="com.cloud.network.vpn.RemoteAccessVpnManagerImpl" />
|
||||
<bean id="resourceLimitManagerImpl" class="com.cloud.resourcelimit.ResourceLimitManagerImpl" />
|
||||
<bean id="rulesManagerImpl" class="com.cloud.network.rules.RulesManagerImpl" />
|
||||
<bean id="s3ManagerImpl" class="com.cloud.storage.s3.S3ManagerImpl" />
|
||||
<bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl" />
|
||||
<bean id="snapshotManagerImpl" class="com.cloud.storage.snapshot.SnapshotManagerImpl" />
|
||||
<bean id="snapshotSchedulerImpl" class="com.cloud.storage.snapshot.SnapshotSchedulerImpl" />
|
||||
<bean id="storageNetworkManagerImpl" class="com.cloud.network.StorageNetworkManagerImpl" />
|
||||
<bean id="swiftManagerImpl" class="com.cloud.storage.swift.SwiftManagerImpl" />
|
||||
<bean id="syncQueueManagerImpl" class="com.cloud.async.SyncQueueManagerImpl" />
|
||||
<bean id="taggedResourceManagerImpl" class="com.cloud.tags.TaggedResourceManagerImpl" />
|
||||
<bean id="templateManagerImpl" class="com.cloud.template.TemplateManagerImpl" />
|
||||
<bean id="upgradeManagerImpl" class="com.cloud.maint.UpgradeManagerImpl" />
|
||||
<bean id="uploadMonitorImpl" class="com.cloud.storage.upload.UploadMonitorImpl" />
|
||||
<bean id="usageServiceImpl" class="com.cloud.usage.UsageServiceImpl" />
|
||||
<bean id="virtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VirtualNetworkApplianceManagerImpl" />
|
||||
<bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
|
||||
<bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl" />
|
||||
<bean id="deploymentPlanningManagerImpl" class="com.cloud.deploy.DeploymentPlanningManagerImpl" />
|
||||
|
||||
<!--
|
||||
Misc components
|
||||
-->
|
||||
<bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
|
||||
<bean id="agentMonitor" class="com.cloud.agent.manager.AgentMonitor" />
|
||||
<bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
|
||||
<bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
|
||||
<bean id="ancientImageDataStoreProvider" class="org.apache.cloudstack.storage.image.store.AncientImageDataStoreProvider" />
|
||||
<bean id="ancientSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.strategy.AncientSnapshotStrategy" />
|
||||
<bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
|
||||
<bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" />
|
||||
<bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" />
|
||||
<bean id="apiResponseHelper" class="com.cloud.api.ApiResponseHelper" />
|
||||
<bean id="apiServer" class="com.cloud.api.ApiServer" />
|
||||
<bean id="apiServlet" class="com.cloud.api.ApiServlet" />
|
||||
<bean id="bAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
|
||||
<bean id="cloudOrchestrator" class="org.apache.cloudstack.platform.orchestration.CloudOrchestrator" />
|
||||
<bean id="clusterRestService" class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
|
||||
<bean id="consoleProxyServlet" class="com.cloud.servlet.ConsoleProxyServlet" />
|
||||
<bean id="dataCenterResourceManagerImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
|
||||
<bean id="dataDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
|
||||
<bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl" />
|
||||
<bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl" />
|
||||
<bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl" />
|
||||
<bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
|
||||
<bean id="defaultPrimaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.DefaultPrimaryDataStoreProviderManagerImpl" />
|
||||
<bean id="eventUtils" class="com.cloud.event.EventUtils" />
|
||||
<bean id="globalLoadBalancingRulesServiceImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
|
||||
<bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer" />
|
||||
<bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
|
||||
<bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
|
||||
<bean id="imageDataFactoryImpl" class="org.apache.cloudstack.storage.image.ImageDataFactoryImpl" />
|
||||
<bean id="imageDataManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageDataManagerImpl" />
|
||||
<bean id="imageDataStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper" />
|
||||
<bean id="imageDataStoreManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageDataStoreManagerImpl" />
|
||||
<bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
|
||||
<bean id="imageServiceImpl" class="org.apache.cloudstack.storage.image.ImageServiceImpl" />
|
||||
<bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
|
||||
<bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem" />
|
||||
<bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
|
||||
<bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
|
||||
<bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl" />
|
||||
<bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
|
||||
<bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper" />
|
||||
<bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
|
||||
<bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
|
||||
<bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet" />
|
||||
<bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
|
||||
<bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl" />
|
||||
<bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl" />
|
||||
<bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl" />
|
||||
<bean id="statsCollector" class="com.cloud.server.StatsCollector" />
|
||||
<bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" />
|
||||
<bean id="templateInstallStrategyImpl" class="org.apache.cloudstack.storage.volume.TemplateInstallStrategyImpl" />
|
||||
<bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
|
||||
<bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
|
||||
<bean id="userContextInitializer" class="com.cloud.user.UserContextInitializer" />
|
||||
<bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
|
||||
<bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" />
|
||||
<bean id="virtualMachineEntityFactory" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityFactory" />
|
||||
<bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
|
||||
<bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
|
||||
<bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl" />
|
||||
<bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
|
||||
<bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl" />
|
||||
<bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
|
||||
<bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
|
||||
<bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor" />
|
||||
<bean id="managementServerNode" class="com.cloud.cluster.ManagementServerNode" />
|
||||
<bean id="testingAllocator" class="com.cloud.agent.manager.allocator.impl.TestingAllocator" />
|
||||
<bean id="domainManagerImpl" class="com.cloud.user.DomainManagerImpl" />
|
||||
<bean id="downloadMonitorImpl" class="com.cloud.storage.download.DownloadMonitorImpl" />
|
||||
<bean id="lBHealthCheckManagerImpl" class="com.cloud.network.lb.LBHealthCheckManagerImpl" />
|
||||
<bean id="mockAgentManagerImpl" class="com.cloud.agent.manager.MockAgentManagerImpl" />
|
||||
<bean id="mockStorageManagerImpl" class="com.cloud.agent.manager.MockStorageManagerImpl" />
|
||||
<bean id="mockVmManagerImpl" class="com.cloud.agent.manager.MockVmManagerImpl" />
|
||||
<bean id="simulatorManagerImpl" class="com.cloud.agent.manager.SimulatorManagerImpl" />
|
||||
<bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl" />
|
||||
<bean id="volumeManagerImpl" class="com.cloud.storage.VolumeManagerImpl" />
|
||||
<bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl" />
|
||||
<bean id="affinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl"/>
|
||||
|
||||
<!--=======================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- Module-basis OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=======================================================================================================-->
|
||||
|
||||
<!--
|
||||
Baremetal components
|
||||
-->
|
||||
|
||||
<!--
|
||||
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
|
||||
<property name="name" value="BareMetalDhcp"/>
|
||||
</bean>
|
||||
<bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
|
||||
<property name="name" value="BareMetalPxe"/>
|
||||
</bean>
|
||||
<bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
|
||||
<property name="name" value="BareMetalUserdata"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" />
|
||||
|
||||
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
|
||||
<property name="name" value="Bare Metal Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
|
||||
<property name="name" value="BareMetal Fit"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
|
||||
<property name="name" value="BaremetalGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalPlannerSelector" class="com.cloud.baremetal.manager.BaremetalPlannerSelector">
|
||||
<property name="name" value="BaremetalPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
|
||||
<bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
|
||||
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
|
||||
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
|
||||
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
|
||||
|
||||
<bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
|
||||
<bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
|
||||
<bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
|
||||
-->
|
||||
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
|
|
@ -30,309 +31,222 @@
|
|||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
|
||||
<!--
|
||||
Compose a CloudStack deployment with selected components here
|
||||
-->
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
|
||||
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
|
||||
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" >
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
|
||||
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" />
|
||||
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
|
||||
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
|
||||
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
|
||||
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
|
||||
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
|
||||
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
||||
|
||||
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
||||
<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
|
||||
<bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
|
||||
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
|
||||
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
|
||||
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
|
||||
<bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
|
||||
<bean id="UcsBladeDao" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
|
||||
<bean id="UcsManagerDao" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
|
||||
|
||||
<!--
|
||||
Network Elements
|
||||
-->
|
||||
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
|
||||
<property name="name" value="Ovs"/>
|
||||
</bean>
|
||||
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
|
||||
<property name="name" value="BareMetalDhcp"/>
|
||||
</bean>
|
||||
<bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
|
||||
<property name="name" value="BareMetalPxe"/>
|
||||
</bean>
|
||||
<bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
|
||||
<property name="name" value="BareMetalUserdata"/>
|
||||
</bean>
|
||||
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
|
||||
<property name="name" value="SecurityGroupProvider"/>
|
||||
</bean>
|
||||
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
|
||||
<property name="name" value="VirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
|
||||
<property name="name" value="VpcVirtualRouter"/>
|
||||
</bean>
|
||||
<!--
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<bean id="BigSwitchVnsElementService" class="com.cloud.network.element.BigSwitchVnsElement">
|
||||
<property name="name" value="BigSwitchVnsElementService"/>
|
||||
</bean>
|
||||
|
||||
OSS deployment configuration
|
||||
|
||||
OSS/non-OSS counter-exclusive components and related configurations should be put here
|
||||
for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
|
||||
its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
|
||||
independent configuration
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Adapters
|
||||
-->
|
||||
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
|
||||
<property name="name" value="FirstFitRouting"/>
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
|
||||
<property name="name" value="HypervisorAdapter"/>
|
||||
</bean>
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl" />
|
||||
|
||||
<!--
|
||||
Storage pool allocators
|
||||
-->
|
||||
|
||||
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
|
||||
<property name="name" value="LocalStorage"/>
|
||||
</bean>
|
||||
<!--
|
||||
<bean id="FirstFitStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.FirstFitStoragePoolAllocator">
|
||||
<property name="name" value="Storage"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
|
||||
<property name="name" value="User First"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
|
||||
<property name="name" value="Balance"/>
|
||||
</bean>
|
||||
|
||||
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
|
||||
|
||||
<bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
|
||||
<property name="name" value="Basic"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
|
||||
<property name="name" value="HypervisorAdapter"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" >
|
||||
<property name="name" value="BareMetalTemplateAdapter"/>
|
||||
</bean>
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
|
||||
|
||||
<!--
|
||||
Authenticators
|
||||
Nicira support components
|
||||
-->
|
||||
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
|
||||
<property name="name" value="MD5"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LDAPUserAuthenticator" class="com.cloud.server.auth.LDAPUserAuthenticator">
|
||||
<property name="name" value="LDAP"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Investigators
|
||||
-->
|
||||
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
|
||||
<property name="name" value="SimpleInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
|
||||
<property name="name" value="XenServerInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
|
||||
<property name="name" value="PingInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
|
||||
<property name="name" value="ManagementIPSysVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Fencers
|
||||
-->
|
||||
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
|
||||
<property name="name" value="XenServerFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
|
||||
<property name="name" value="KVMFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
|
||||
<property name="name" value="OvmFenceBuilder"/>
|
||||
</bean>
|
||||
|
||||
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
|
||||
<property name="name" value="XCP Agent"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
<bean id="SimulatorSecondaryStorageDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="SecondaryStorageDiscoverer" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
|
||||
<property name="name" value="KVM Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
|
||||
<property name="name" value="Simulator Agent"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
|
||||
<property name="name" value="Bare Metal Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervServerDiscoverer" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer">
|
||||
<property name="name" value="SCVMMServer"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
|
||||
<property name="name" value="Ovm Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
|
||||
<property name="name" value="FirstFitPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
|
||||
<property name="name" value="UserDispersingPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
|
||||
<property name="name" value="UserConcentratedPodPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
|
||||
<property name="name" value="BareMetalPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalPlannerSelector" class="com.cloud.baremetal.manager.BaremetalPlannerSelector">
|
||||
<property name="name" value="BaremetalPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervisorPlannerSelector" class="com.cloud.deploy.HypervisorVmPlannerSelector">
|
||||
<property name="name" value="HypervisorPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
Network Gurus
|
||||
-->
|
||||
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
|
||||
<property name="name" value="StorageNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
|
||||
<property name="name" value="ExternalGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
|
||||
<property name="name" value="PublicNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
|
||||
<property name="name" value="PodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
|
||||
<property name="name" value="ControlNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
|
||||
<property name="name" value="DirectNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
|
||||
<property name="name" value="DirectPodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
|
||||
<property name="name" value="OvsGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
|
||||
<property name="name" value="PrivateNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
|
||||
<bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
|
||||
<bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
|
||||
<bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
|
||||
<property name="name" value="NiciraNvpGuestNetworkGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
<bean id="BigSwitchVnsGuestNetworkGuru" class=".BigSwitchVnsGuestNetworkGuru">
|
||||
<property name="name" value="com.cloud.network.guru.BigSwitchVnsGuestNetworkGuru"/>
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Hypervisor Gurus
|
||||
|
||||
<!--
|
||||
Midonet support components
|
||||
-->
|
||||
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
|
||||
<property name="name" value="XenServerGuru"/>
|
||||
<bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
|
||||
<property name="name" value="MidoNetGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
|
||||
<property name="name" value="MidoNetElement"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
|
||||
<property name="name" value="KVMGuru"/>
|
||||
<!--
|
||||
|
||||
Deployment configurations of various adapters
|
||||
|
||||
It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
|
||||
|
||||
-->
|
||||
|
||||
<!-- Security adapters -->
|
||||
<bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervGuru" class="com.cloud.hypervisor.guru.HypervGuru">
|
||||
<property name="name" value="HypervGuru"/>
|
||||
<bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
|
||||
<property name="name" value="OvmGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
|
||||
<property name="name" value="SimulatorGuru"/>
|
||||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
|
||||
<property name="name" value="BaremetalGuru"/>
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
|
||||
<!--
|
||||
<ref bean="BareMetalDiscoverer"/>
|
||||
-->
|
||||
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Deployment/allocation adapters -->
|
||||
<bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
|
||||
<!--
|
||||
<ref bean="BareMetalPlanner" />
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Networking adapters -->
|
||||
<bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkElements" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="NiciraNvp" />
|
||||
<ref bean="MidoNetElement"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
AffinityGroup Processors
|
||||
|
|
@ -341,6 +255,4 @@
|
|||
<property name="name" value="HostAntiAffinityProcessor"/>
|
||||
<property name="type" value="host anti-affinity"/>
|
||||
</bean>
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -1,68 +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.
|
||||
|
||||
# management server clustering parameters, change cluster.node.IP to the machine IP address
|
||||
# in which the management server(Tomcat) is running
|
||||
cluster.node.IP=127.0.0.1
|
||||
cluster.servlet.port=9090
|
||||
|
||||
# CloudStack database settings
|
||||
db.cloud.username=@DBUSER@
|
||||
db.cloud.password=@DBPW@
|
||||
db.cloud.host=@DBHOST@
|
||||
db.cloud.port=3306
|
||||
db.cloud.name=cloud
|
||||
|
||||
# CloudStack database tuning parameters
|
||||
db.cloud.maxActive=250
|
||||
db.cloud.maxIdle=30
|
||||
db.cloud.maxWait=10000
|
||||
db.cloud.autoReconnect=true
|
||||
db.cloud.validationQuery=SELECT 1
|
||||
db.cloud.testOnBorrow=true
|
||||
db.cloud.testWhileIdle=true
|
||||
db.cloud.timeBetweenEvictionRunsMillis=40000
|
||||
db.cloud.minEvictableIdleTimeMillis=240000
|
||||
db.cloud.poolPreparedStatements=false
|
||||
db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true
|
||||
|
||||
# CloudStack database SSL settings
|
||||
db.cloud.useSSL=false
|
||||
db.cloud.keyStore=
|
||||
db.cloud.keyStorePassword=
|
||||
db.cloud.trustStore=
|
||||
db.cloud.trustStorePassword=
|
||||
|
||||
# Encryption Settings
|
||||
db.cloud.encryption.type=file
|
||||
db.cloud.encrypt.secret=password
|
||||
|
||||
# usage database settings
|
||||
db.usage.username=@DBUSER@
|
||||
db.usage.password=@DBPW@
|
||||
db.usage.host=@DBHOST@
|
||||
db.usage.port=3306
|
||||
db.usage.name=cloud_usage
|
||||
|
||||
# usage database tuning parameters
|
||||
db.usage.maxActive=100
|
||||
db.usage.maxIdle=30
|
||||
db.usage.maxWait=10000
|
||||
db.usage.autoReconnect=true
|
||||
|
||||
# awsapi database settings
|
||||
db.awsapi.name=cloudbridge
|
||||
|
|
@ -74,6 +74,20 @@ under the License.
|
|||
<param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- ============================== -->
|
||||
<!-- Append alerts to the syslog if it is configured -->
|
||||
<!-- ============================== -->
|
||||
|
||||
<appender name="ALERTSYSLOG" class="org.apache.cloudstack.syslog.AlertsSyslogAppender">
|
||||
<param name="Threshold" value="WARN"/>
|
||||
<param name="SyslogHosts" value=""/>
|
||||
<param name="Facility" value="LOCAL6"/>
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- ============================== -->
|
||||
<!-- send alert warnings+ as the SNMP trap if it is configured! -->
|
||||
<!-- ============================== -->
|
||||
|
|
@ -166,6 +180,7 @@ under the License.
|
|||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="SNMP"/>
|
||||
<appender-ref ref="ALERTSYSLOG"/>
|
||||
</logger>
|
||||
|
||||
<!-- ======================= -->
|
||||
|
|
|
|||
|
|
@ -32,305 +32,20 @@
|
|||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
|
||||
<!--
|
||||
Compose a CloudStack deployment with selected components here
|
||||
-->
|
||||
<!--
|
||||
|
||||
non-OSS deployment configuration
|
||||
|
||||
OSS/non-OSS counter-exclusive components and related configurations should be put here
|
||||
for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
|
||||
its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
|
||||
independent configuration
|
||||
|
||||
-->
|
||||
<bean id="premiumDatabaseUpgradeChecker" class="com.cloud.upgrade.PremiumDatabaseUpgradeChecker"/>
|
||||
|
||||
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" >
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
|
||||
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" />
|
||||
|
||||
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
|
||||
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
|
||||
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
|
||||
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
|
||||
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
|
||||
|
||||
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
||||
|
||||
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
||||
|
||||
<!-- bean id="bareMetalVmManagerImpl" class="com.cloud.baremetal.BareMetalVmManagerImpl" / -->
|
||||
<bean id="VmwareManager" class="com.cloud.hypervisor.vmware.manager.VmwareManagerImpl"/>
|
||||
<bean id="NetappManager" class="com.cloud.netapp.NetappManagerImpl"/>
|
||||
<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
|
||||
<bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
|
||||
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
|
||||
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
|
||||
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
|
||||
<!--
|
||||
Network Elements
|
||||
-->
|
||||
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
|
||||
<property name="name" value="Ovs"/>
|
||||
</bean>
|
||||
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
|
||||
<property name="name" value="BareMetalDhcp"/>
|
||||
</bean>
|
||||
<bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
|
||||
<property name="name" value="BareMetalPxe"/>
|
||||
</bean>
|
||||
<bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
|
||||
<property name="name" value="BareMetalUserdata"/>
|
||||
</bean>
|
||||
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
|
||||
<property name="name" value="SecurityGroupProvider"/>
|
||||
</bean>
|
||||
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
|
||||
<property name="name" value="VirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
|
||||
<property name="name" value="VpcVirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
|
||||
<bean id="JuniperSRX" class="com.cloud.network.element.JuniperSRXExternalFirewallElement">
|
||||
<property name="name" value="JuniperSRX"/>
|
||||
</bean>
|
||||
<bean id="Netscaler" class="com.cloud.network.element.NetscalerElement">
|
||||
<property name="name" value="Netscaler"/>
|
||||
</bean>
|
||||
<bean id="F5BigIP" class="com.cloud.network.element.F5ExternalLoadBalancerElement">
|
||||
<property name="name" value="F5BigIP"/>
|
||||
</bean>
|
||||
<bean id="CiscoNexus1000vVSM" class="com.cloud.network.element.CiscoNexusVSMElement">
|
||||
<property name="name" value="CiscoNexus1000vVSM"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Adapters
|
||||
-->
|
||||
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
|
||||
<property name="name" value="FirstFitRouting"/>
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
|
||||
<property name="name" value="HypervisorAdapter"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Storage pool allocators
|
||||
-->
|
||||
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
|
||||
<property name="name" value="LocalStorage"/>
|
||||
</bean>
|
||||
<!--
|
||||
<bean id="FirstFitStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.FirstFitStoragePoolAllocator">
|
||||
<property name="name" value="Storage"/>
|
||||
</bean>
|
||||
-->
|
||||
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
|
||||
<property name="name" value="User First"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
|
||||
<property name="name" value="Balance"/>
|
||||
</bean>
|
||||
|
||||
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
|
||||
|
||||
<bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
|
||||
<property name="name" value="Basic"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" >
|
||||
<property name="name" value="BareMetalTemplateAdapter"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Authenticators
|
||||
-->
|
||||
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
|
||||
<property name="name" value="MD5"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LDAPUserAuthenticator" class="com.cloud.server.auth.LDAPUserAuthenticator">
|
||||
<property name="name" value="LDAP"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Investigators
|
||||
-->
|
||||
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
|
||||
<property name="name" value="SimpleInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
|
||||
<property name="name" value="XenServerInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
|
||||
<property name="name" value="PingInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
|
||||
<property name="name" value="ManagementIPSysVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="VmwareInvestigator" class="com.cloud.ha.VmwareInvestigator">
|
||||
<property name="name" value="VMwareInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Fencers
|
||||
-->
|
||||
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
|
||||
<property name="name" value="XenServerFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
|
||||
<property name="name" value="KVMFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
|
||||
<property name="name" value="OvmFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="VmwareFencer" class="com.cloud.ha.VmwareFencer">
|
||||
<property name="name" value="VMwareFenceBuilder"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Discovers
|
||||
-->
|
||||
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
|
||||
<property name="name" value="XCP Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SecondaryStorageDiscoverer" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
|
||||
<property name="name" value="KVM Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
|
||||
<property name="name" value="Bare Metal Agent"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="HypervServerDiscoverer" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer">
|
||||
<property name="name" value="SCVMMServer"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
|
||||
<property name="name" value="Ovm Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="vmwareServerDiscoverer" class="com.cloud.hypervisor.vmware.VmwareServerDiscoverer">
|
||||
<property name="name" value="VMware Discover"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Deployment planners
|
||||
-->
|
||||
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
|
||||
<property name="name" value="First Fit"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
|
||||
<property name="name" value="UserDispersing"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
|
||||
<property name="name" value="UserConcentratedPod"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
|
||||
<property name="name" value="BareMetal Fit"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Network Gurus
|
||||
-->
|
||||
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
|
||||
<property name="name" value="StorageNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
|
||||
<property name="name" value="ExternalGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
|
||||
<property name="name" value="PublicNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
|
||||
<property name="name" value="PodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
|
||||
<property name="name" value="ControlNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
|
||||
<property name="name" value="DirectNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
|
||||
<property name="name" value="DirectPodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
|
||||
<property name="name" value="OvsGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
|
||||
<property name="name" value="PrivateNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
|
||||
<property name="name" value="NiciraNvpGuestNetworkGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Hypervisor Gurus
|
||||
-->
|
||||
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
|
||||
<property name="name" value="XenServerGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
|
||||
<property name="name" value="KVMGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
|
||||
<property name="name" value="OvmGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="VMwareGuru" class="com.cloud.hypervisor.guru.VMwareGuru">
|
||||
<property name="name" value="VMwareGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
|
||||
<property name="name" value="BaremetalGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalPlannerSelector" class="com.cloud.baremetal.manager.BaremetalPlannerSelector">
|
||||
<property name="name" value="BaremetalPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
<bean id="HypervisorPlannerSelector" class="com.cloud.deploy.HypervisorVmPlannerSelector">
|
||||
<property name="name" value="HypervisorPlannerSelector"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
DAO with customized configuration
|
||||
DAO with customized configuration under non-OSS deployment
|
||||
-->
|
||||
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
|
||||
<property name="configParams">
|
||||
|
|
@ -340,4 +55,282 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
VMware support components
|
||||
-->
|
||||
<bean id="VmwareFencer" class="com.cloud.ha.VmwareFencer">
|
||||
<property name="name" value="VMwareFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="vmwareServerDiscoverer" class="com.cloud.hypervisor.vmware.VmwareServerDiscoverer">
|
||||
<property name="name" value="VMware Discover"/>
|
||||
</bean>
|
||||
<bean id="VMwareGuru" class="com.cloud.hypervisor.guru.VMwareGuru">
|
||||
<property name="name" value="VMwareGuru"/>
|
||||
</bean>
|
||||
<bean id="VmwareInvestigator" class="com.cloud.ha.VmwareInvestigator">
|
||||
<property name="name" value="VMwareInvestigator"/>
|
||||
</bean>
|
||||
<bean id="VmwareManager" class="com.cloud.hypervisor.vmware.manager.VmwareManagerImpl"/>
|
||||
<bean id="vmwareContextFactory" class="com.cloud.hypervisor.vmware.resource.VmwareContextFactory" />
|
||||
|
||||
<!--
|
||||
Nicira support components
|
||||
-->
|
||||
<bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
|
||||
<bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
|
||||
<bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
|
||||
<bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
|
||||
<property name="name" value="NiciraNvpGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
BigSwitch Components
|
||||
-->
|
||||
<bean id="BigSwitchVns" class="com.cloud.network.element.BigSwitchVnsElement">
|
||||
<property name="name" value="BigSwitchVns"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Netapp support components
|
||||
-->
|
||||
<bean id="lunDaoImpl" class="com.cloud.netapp.dao.LunDaoImpl" />
|
||||
<bean id="poolDaoImpl" class="com.cloud.netapp.dao.PoolDaoImpl" />
|
||||
<bean id="netappVolumeDaoImpl" class="com.cloud.netapp.dao.VolumeDaoImpl" />
|
||||
<bean id="NetappManager" class="com.cloud.netapp.NetappManagerImpl"/>
|
||||
|
||||
<!--
|
||||
JuniperSRX support components
|
||||
-->
|
||||
<bean id="JuniperSRX" class="com.cloud.network.element.JuniperSRXExternalFirewallElement">
|
||||
<property name="name" value="JuniperSRX"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
NetScalar support components
|
||||
-->
|
||||
<bean id="netScalerPodDaoImpl" class="com.cloud.network.dao.NetScalerPodDaoImpl" />
|
||||
<bean id="Netscaler" class="com.cloud.network.element.NetscalerElement">
|
||||
<property name="name" value="Netscaler"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
F5BigIP support components
|
||||
-->
|
||||
<bean id="F5BigIP" class="com.cloud.network.element.F5ExternalLoadBalancerElement">
|
||||
<property name="name" value="F5BigIP"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Cisco Nexus support components
|
||||
-->
|
||||
<bean id="ciscoNexusVSMDeviceDaoImpl" class="com.cloud.network.dao.CiscoNexusVSMDeviceDaoImpl" />
|
||||
<bean id="CiscoNexus1000vVSM" class="com.cloud.network.element.CiscoNexusVSMElement">
|
||||
<property name="name" value="CiscoNexus1000vVSM"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
BigSwitch support components
|
||||
-->
|
||||
<bean id="bigSwitchVnsDaoImpl" class="com.cloud.network.dao.BigSwitchVnsDaoImpl" />
|
||||
<bean id="bigSwitchVnsElement" class="com.cloud.network.element.BigSwitchVnsElement">
|
||||
<property name="name" value="BigSwitchVnsElement"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
Midonet support components
|
||||
-->
|
||||
<bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
|
||||
<property name="name" value="MidoNetGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
|
||||
<property name="name" value="MidoNetElement"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
Deployment configurations of various adapters
|
||||
|
||||
It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
|
||||
|
||||
-->
|
||||
|
||||
<!-- Security adapters -->
|
||||
<bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDiscoverer"/>
|
||||
-->
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
<ref bean="vmwareServerDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="VmwareInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
<ref bean="VmwareFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Deployment/allocation adapters -->
|
||||
<bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
|
||||
<!--
|
||||
<ref bean="BareMetalPlanner" />
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Networking adapters -->
|
||||
<bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkElements" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="JuniperSRX"/>
|
||||
<ref bean="Netscaler"/>
|
||||
<ref bean="F5BigIP"/>
|
||||
<ref bean="CiscoNexus1000vVSM"/>
|
||||
<ref bean="NiciraNvp" />
|
||||
<ref bean="MidoNetElement" />
|
||||
<ref bean="bigSwitchVnsElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
maxThreads="150" scheme="https" secure="true" URIEncoding="UTF-8"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="JKS"
|
||||
keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore"
|
||||
keystoreFile="/etc/cloudstack/management/cloudmanagementserver.keystore"
|
||||
keystorePass="vmops.com"/>
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
maxThreads="150" scheme="https" secure="true"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="JKS"
|
||||
keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore"
|
||||
keystoreFile="/etc/cloudstack/management/cloudmanagementserver.keystore"
|
||||
keystorePass="vmops.com"/>
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,235 @@
|
|||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<!--
|
||||
OSS deployment component configuration
|
||||
-->
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl" />
|
||||
|
||||
<!-- simulator components -->
|
||||
<bean id="SimulatorSecondaryDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
<bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
|
||||
<property name="name" value="Simulator Agent"/>
|
||||
</bean>
|
||||
<bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
|
||||
<property name="name" value="Simulator Guru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managers & pluggable adapters configuration under OSS deployment
|
||||
-->
|
||||
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="SecurityCheckers">
|
||||
<list>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
|
||||
<property name="UserAuthenticators">
|
||||
<list>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LDAPUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HostAllocators">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl">
|
||||
<property name="StoragePoolAllocators">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
|
||||
<property name="name" value="First Fit"/>
|
||||
<property name="StoragePoolAllocators">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="HostAllocators">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
|
||||
<property name="PodAllocators">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="Discoverers">
|
||||
<list>
|
||||
<ref bean="SimulatorDiscoverer"/>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SimulatorSecondaryDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
|
||||
<!--
|
||||
<ref bean="BareMetalDiscoverer"/>
|
||||
-->
|
||||
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
|
||||
<property name="Investigators">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="FenceBuilders">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
|
||||
<property name="HostAllocators">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="Planners">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
|
||||
<!--
|
||||
<ref bean="BareMetalPlanner" />
|
||||
-->
|
||||
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
|
||||
<property name="NetworkGurus">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="NetworkElements">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
<property name="IpDeployers">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="DhcpProviders">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
|
||||
<property name="NetworkElements">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<!--
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
-->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -40,7 +40,7 @@ CATALINA_TMPDIR="@MSENVIRON@/temp"
|
|||
|
||||
# Use JAVA_OPTS to set java.library.path for libtcnative.so
|
||||
#JAVA_OPTS="-Djava.library.path=/usr/lib64"
|
||||
JAVA_OPTS="-Djava.awt.headless=true -Djavax.net.ssl.trustStore=/etc/cloud/management/cloudmanagementserver.keystore -Djavax.net.ssl.trustStorePassword=vmops.com -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:MaxPermSize=800m -XX:PermSize=512M"
|
||||
JAVA_OPTS="-Djava.awt.headless=true -Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloudmanagementserver.keystore -Djavax.net.ssl.trustStorePassword=vmops.com -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:MaxPermSize=800m -XX:PermSize=512M"
|
||||
|
||||
# What user should run tomcat
|
||||
TOMCAT_USER="@MSUSER@"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/*
|
||||
/usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh
|
||||
/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/*
|
||||
/usr/share/cloudstack-common/lib/*
|
||||
/usr/bin/cloud-set-guest-password
|
||||
/usr/bin/cloud-set-guest-sshkey
|
||||
/usr/lib/python2.?/*-packages/*
|
||||
|
|
|
|||
|
|
@ -31,5 +31,4 @@
|
|||
/usr/bin/cloud-setup-databases
|
||||
/usr/bin/cloud-migrate-databases
|
||||
/usr/share/cloudstack-management/*
|
||||
/usr/share/java/*
|
||||
/usr/share/tomcat6/lib/*
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if [ "$1" = configure ]; then
|
|||
if ! getent passwd cloud >/dev/null; then
|
||||
adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management cloud
|
||||
else
|
||||
usermod -m -d /var/lib/cloudstack/management cloud
|
||||
usermod -m -d /var/lib/cloudstack/management cloud || true
|
||||
fi
|
||||
|
||||
for i in /var/cache/cloudstack/management \
|
||||
|
|
@ -36,6 +36,20 @@ if [ "$1" = configure ]; then
|
|||
chgrp cloud $i
|
||||
done
|
||||
|
||||
OLDCONFDIR="/etc/cloud/management"
|
||||
NEWCONFDIR="/etc/cloudstack/management"
|
||||
CONFFILES="db.properties cloud.keystore key"
|
||||
|
||||
# Copy old configuration so the admin doesn't have to do that
|
||||
# Only do so when we are installing for the first time
|
||||
if [ -z "$2" ]; then
|
||||
for FILE in $CONFFILES; do
|
||||
if [ -f "$OLDCONFDIR/${FILE}" ]; then
|
||||
cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
chmod 0640 /etc/cloudstack/management/db.properties
|
||||
chgrp cloud /etc/cloudstack/management/db.properties
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ Description: A common package which contains files which are shared by several C
|
|||
|
||||
Package: cloudstack-management
|
||||
Architecture: all
|
||||
Depends: cloudstack-common (= ${source:Version}), tomcat6, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools
|
||||
Depends: cloudstack-common (= ${source:Version}), tomcat6, sysvinit-utils, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools
|
||||
Conflicts: cloud-server, cloud-client, cloud-client-ui
|
||||
Description: CloudStack server library
|
||||
The CloudStack management server
|
||||
|
||||
Package: cloudstack-agent
|
||||
Architecture: all
|
||||
Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), libcommons-daemon-java, libjna-java, openssh-client, libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, perl-base, perl-modules, ebtables, vlan, wget, jsvc
|
||||
Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), libcommons-daemon-java, libjna-java, openssh-client, libvirt0, sysvinit-utils, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, perl-base, perl-modules, ebtables, vlan, wget, jsvc, ipset
|
||||
Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts
|
||||
Description: CloudStack agent
|
||||
The CloudStack agent is in charge of managing shared computing resources in
|
||||
|
|
|
|||
|
|
@ -100,10 +100,8 @@ install:
|
|||
ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf
|
||||
mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client
|
||||
mkdir -p ${DESTDIR}/usr/share/tomcat6/lib
|
||||
mkdir -p ${DESTDIR}/usr/share/java
|
||||
install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management
|
||||
install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses
|
||||
install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/java/$(PACKAGE)-server.jar
|
||||
ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
|
||||
ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
|
||||
ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
|
||||
|
|
@ -116,6 +114,7 @@ install:
|
|||
mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-common
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/setup
|
||||
mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/lib
|
||||
cp -r scripts/installer $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
cp -r scripts/network $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
cp -r scripts/storage $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
|
|
@ -126,7 +125,9 @@ install:
|
|||
install -D client/target/utilities/bin/cloud-set-guest-sshkey $(DESTDIR)/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-setup-databases $(DESTDIR)/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-setup-management $(DESTDIR)/usr/bin
|
||||
install -D client/target/cloud-client-ui-$(VERSION)-SNAPSHOT/WEB-INF/classes/vms/systemvm.iso $(DESTDIR)/usr/share/$(PACKAGE)-common/vms/systemvm.iso
|
||||
install -D services/console-proxy/server/dist/systemvm.iso $(DESTDIR)/usr/share/$(PACKAGE)-common/vms/systemvm.iso
|
||||
# We need jasypt for cloud-install-sys-tmplt, so this is a nasty hack to get it into the right place
|
||||
install -D agent/target/dependencies/jasypt-1.9.0.jar $(DESTDIR)/usr/share/$(PACKAGE)-common/lib
|
||||
|
||||
# cloudstack-python
|
||||
mkdir -p $(DESTDIR)/usr/lib/python2.7/dist-packages
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
|||
-- Add system user with encrypted password=password
|
||||
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
||||
lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
|
||||
'2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW());
|
||||
'2', 'Admin', 'User', 'admin@mailprovider.com', 'disabled', NOW());
|
||||
|
||||
-- Add configurations
|
||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
<xi:include href="additional-installation-options.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="choosing-a-deployment-architecture.xml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="choosing-a-hypervisor.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="aws-interface-compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="network-setup.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="networks.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
]>
|
||||
<!-- 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.
|
||||
-->
|
||||
|
||||
<chapter id="choosing-a-hypervisor">
|
||||
<title>Choosing a Hypervisor: Supported Features</title>
|
||||
<para>&PRODUCT; supports many popular hypervisors. Your cloud can consist entirely of hosts running a single hypervisor, or you can use multiple hypervisors. Each cluster of hosts must run the same hypervisor.</para>
|
||||
<para>You might already have an installed base of nodes running a particular hypervisor, in which case, your choice of hypervisor has already been made. If you are starting from scratch, you need to decide what hypervisor software best suits your needs. A discussion of the relative advantages of each hypervisor is outside the scope of our documentation. However, it will help you to know which features of each hypervisor are supported by &PRODUCT;. The following table provides this information.</para>
|
||||
<informaltable frame="all">
|
||||
<!-- <title>Hypervisor supported features</title> -->
|
||||
<tgroup cols="6" align="left" colsep="1" rowsep="1">
|
||||
<colspec colnum="1" colname="c1" colwidth="2*"/>
|
||||
<colspec colnum="2" colname="c2" colwidth="1*"/>
|
||||
<colspec colnum="3" colname="c3" colwidth="1*"/>
|
||||
<colspec colnum="4" colname="c4" colwidth="1*"/>
|
||||
<colspec colnum="5" colname="c5" colwidth="1*"/>
|
||||
<colspec colnum="6" colname="c6" colwidth="1*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Feature</para></entry>
|
||||
<entry><para>XenServer 6.0.2</para></entry>
|
||||
<entry><para>vSphere 4.1/5.0</para></entry>
|
||||
<entry><para>KVM - RHEL 6.2</para></entry>
|
||||
<entry><para>OVM 2.3</para></entry>
|
||||
<entry><para>Bare Metal</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>Network Throttling</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Security groups in zones that use basic networking</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>iSCSI</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>FibreChannel</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Local Disk</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>HA</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes (Native)</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Snapshots of local disk</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Local disk as data disk</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Work load balancing</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>DRS</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Manual live migration of VMs from host to host</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Conserve management traffic IP address by using link local network to communicate with virtual router</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>No</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>Yes</para></entry>
|
||||
<entry><para>N/A</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</chapter>
|
||||
|
|
@ -14,48 +14,47 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
|
||||
public interface HostEntity extends DataCenterResourceEntity {
|
||||
|
||||
/**
|
||||
* @return total amount of memory.
|
||||
*/
|
||||
Long getTotalMemory();
|
||||
|
||||
/**
|
||||
* @return # of cores in a machine. Note two cpus with two cores each returns 4.
|
||||
*/
|
||||
Integer getCpus();
|
||||
|
||||
/**
|
||||
* @return speed of each cpu in mhz.
|
||||
*/
|
||||
Long getSpeed();
|
||||
|
||||
/**
|
||||
* @return the pod.
|
||||
*/
|
||||
Long getPodId();
|
||||
|
||||
/**
|
||||
* @return availability zone.
|
||||
*/
|
||||
long getDataCenterId();
|
||||
|
||||
/**
|
||||
* @return type of hypervisor
|
||||
*/
|
||||
HypervisorType getHypervisorType();
|
||||
|
||||
/**
|
||||
* @return the mac address of the host.
|
||||
*/
|
||||
String getGuid();
|
||||
|
||||
Long getClusterId();
|
||||
|
||||
}
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
|
||||
public interface HostEntity extends DataCenterResourceEntity {
|
||||
|
||||
/**
|
||||
* @return total amount of memory.
|
||||
*/
|
||||
Long getTotalMemory();
|
||||
|
||||
/**
|
||||
* @return # of cores in a machine. Note two cpus with two cores each returns 4.
|
||||
*/
|
||||
Integer getCpus();
|
||||
|
||||
/**
|
||||
* @return speed of each cpu in mhz.
|
||||
*/
|
||||
Long getSpeed();
|
||||
|
||||
/**
|
||||
* @return the pod.
|
||||
*/
|
||||
Long getPodId();
|
||||
|
||||
/**
|
||||
* @return availability zone.
|
||||
*/
|
||||
long getDataCenterId();
|
||||
|
||||
/**
|
||||
* @return type of hypervisor
|
||||
*/
|
||||
HypervisorType getHypervisorType();
|
||||
|
||||
/**
|
||||
* @return the mac address of the host.
|
||||
*/
|
||||
String getGuid();
|
||||
|
||||
Long getClusterId();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,86 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("ClusterRestService")
|
||||
@Produces("application/json")
|
||||
public class ClusterRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/clusters")
|
||||
public List<ClusterEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@GET @Path("/cluster/{clusterid}")
|
||||
public ClusterEntity get(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/enable")
|
||||
public String enable(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/disable")
|
||||
public String disable(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/deactivate")
|
||||
public String deactivate(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/reactivate")
|
||||
public String reactivate(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/cluster/create")
|
||||
public ClusterEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/cluster/{clusterid}/update")
|
||||
public ClusterEntity update(
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("ClusterRestService")
|
||||
@Produces("application/json")
|
||||
public class ClusterRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/clusters")
|
||||
public List<ClusterEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@GET @Path("/cluster/{clusterid}")
|
||||
public ClusterEntity get(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/enable")
|
||||
public String enable(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/disable")
|
||||
public String disable(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/deactivate")
|
||||
public String deactivate(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/cluster/{clusterid}/reactivate")
|
||||
public String reactivate(@PathParam("clusterid") String clusterId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/cluster/create")
|
||||
public ClusterEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/cluster/{clusterid}/update")
|
||||
public ClusterEntity update(
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,62 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("NetworkRestService")
|
||||
@Component
|
||||
@Produces("application/json")
|
||||
public class NetworkRestService {
|
||||
@PUT @Path("/network/create")
|
||||
public NetworkEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/network/{network-id}")
|
||||
public NetworkEntity get(@PathParam("network-id") String networkId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/networks")
|
||||
public List<NetworkEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/network/{network-id}/")
|
||||
public String deploy(@PathParam("network-id") String networkId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("NetworkRestService")
|
||||
@Component
|
||||
@Produces("application/json")
|
||||
public class NetworkRestService {
|
||||
@PUT @Path("/network/create")
|
||||
public NetworkEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/network/{network-id}")
|
||||
public NetworkEntity get(@PathParam("network-id") String networkId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/networks")
|
||||
public List<NetworkEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/network/{network-id}/")
|
||||
public String deploy(@PathParam("network-id") String networkId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1,79 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("PodService")
|
||||
@Produces({"application/json"})
|
||||
public class PodRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/pod/{pod-id}")
|
||||
public PodEntity getPod(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/enable")
|
||||
public String enable(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/disable")
|
||||
public String disable(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/deactivate")
|
||||
public String deactivate(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/reactivate")
|
||||
public String reactivate(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/pod/create")
|
||||
public PodEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/pod/{pod-id}")
|
||||
public PodEntity update(
|
||||
@PathParam("pod-id") String podId,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("PodService")
|
||||
@Produces({"application/json"})
|
||||
public class PodRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/pod/{pod-id}")
|
||||
public PodEntity getPod(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/enable")
|
||||
public String enable(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/disable")
|
||||
public String disable(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/deactivate")
|
||||
public String deactivate(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/pod/{pod-id}/reactivate")
|
||||
public String reactivate(@PathParam("pod-id") String podId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/pod/create")
|
||||
public PodEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/pod/{pod-id}")
|
||||
public PodEntity update(
|
||||
@PathParam("pod-id") String podId,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,56 +1,56 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("VirtualMachineRestService")
|
||||
@Produces("application/xml")
|
||||
public class VirtualMachineRestService {
|
||||
|
||||
@GET @Path("/vm/{vmid}")
|
||||
public VirtualMachineEntity get(@PathParam("vmid") String vmId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/vm/create")
|
||||
public VirtualMachineEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("hostname") String hostname,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/vms")
|
||||
public List<VirtualMachineEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("VirtualMachineRestService")
|
||||
@Produces("application/xml")
|
||||
public class VirtualMachineRestService {
|
||||
|
||||
@GET @Path("/vm/{vmid}")
|
||||
public VirtualMachineEntity get(@PathParam("vmid") String vmId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT @Path("/vm/create")
|
||||
public VirtualMachineEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("hostname") String hostname,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/vms")
|
||||
public List<VirtualMachineEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,76 +1,76 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("VolumeRestService")
|
||||
@Produces("application/json")
|
||||
public class VolumeRestService {
|
||||
|
||||
@PUT @Path("/vol/create")
|
||||
public VolumeEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/deploy")
|
||||
public String deploy(@PathParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/vols")
|
||||
public List<VolumeEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/attach-to")
|
||||
public String attachTo(
|
||||
@PathParam("volid") String volumeId,
|
||||
@QueryParam("vmid") String vmId,
|
||||
@QueryParam("device-order") short device) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@DELETE @Path("/vol/{volid}")
|
||||
public String delete(@PathParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/detach")
|
||||
public String detach(@QueryParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("VolumeRestService")
|
||||
@Produces("application/json")
|
||||
public class VolumeRestService {
|
||||
|
||||
@PUT @Path("/vol/create")
|
||||
public VolumeEntity create(
|
||||
@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/deploy")
|
||||
public String deploy(@PathParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET @Path("/vols")
|
||||
public List<VolumeEntity> listAll() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/attach-to")
|
||||
public String attachTo(
|
||||
@PathParam("volid") String volumeId,
|
||||
@QueryParam("vmid") String vmId,
|
||||
@QueryParam("device-order") short device) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@DELETE @Path("/vol/{volid}")
|
||||
public String delete(@PathParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/vol/{volid}/detach")
|
||||
public String detach(@QueryParam("volid") String volumeId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,87 +1,87 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("zoneService")
|
||||
@Produces({"application/json"})
|
||||
public class ZoneRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/zones")
|
||||
public List<ZoneEntity> listAll() {
|
||||
return _provisioningService.listZones();
|
||||
}
|
||||
|
||||
@GET @Path("/zone/{zone-id}")
|
||||
public ZoneEntity get(@PathParam("zone-id") String zoneId) {
|
||||
return _provisioningService.getZone(zoneId);
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/enable")
|
||||
public String enable(String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/disable")
|
||||
public String disable(@PathParam("zone-id") String zoneId) {
|
||||
ZoneEntity zoneEntity = _provisioningService.getZone(zoneId);
|
||||
zoneEntity.disable();
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/deactivate")
|
||||
public String deactivate(@PathParam("zone-id") String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/activate")
|
||||
public String reactivate(@PathParam("zone-id") String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@PUT @Path("/zone/create")
|
||||
public ZoneEntity createZone(@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@DELETE @Path("/zone/{zone-id}")
|
||||
public String deleteZone(@QueryParam("zone-id") String xid) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.rest.service.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Component
|
||||
@Service("zoneService")
|
||||
@Produces({"application/json"})
|
||||
public class ZoneRestService {
|
||||
// @Inject
|
||||
ProvisioningService _provisioningService;
|
||||
|
||||
@GET @Path("/zones")
|
||||
public List<ZoneEntity> listAll() {
|
||||
return _provisioningService.listZones();
|
||||
}
|
||||
|
||||
@GET @Path("/zone/{zone-id}")
|
||||
public ZoneEntity get(@PathParam("zone-id") String zoneId) {
|
||||
return _provisioningService.getZone(zoneId);
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/enable")
|
||||
public String enable(String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/disable")
|
||||
public String disable(@PathParam("zone-id") String zoneId) {
|
||||
ZoneEntity zoneEntity = _provisioningService.getZone(zoneId);
|
||||
zoneEntity.disable();
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/deactivate")
|
||||
public String deactivate(@PathParam("zone-id") String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST @Path("/zone/{zone-id}/activate")
|
||||
public String reactivate(@PathParam("zone-id") String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@PUT @Path("/zone/create")
|
||||
public ZoneEntity createZone(@QueryParam("xid") String xid,
|
||||
@QueryParam("display-name") String displayName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@DELETE @Path("/zone/{zone-id}")
|
||||
public String deleteZone(@QueryParam("zone-id") String xid) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,34 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.compute;
|
||||
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
/**
|
||||
* ComputeGuru understands everything about the hypervisor.
|
||||
*
|
||||
*/
|
||||
public interface ComputeGuru {
|
||||
String getVersion();
|
||||
String getHypervisor();
|
||||
void start(VirtualMachineProfile vm);
|
||||
void stop(VirtualMachineProfile vm);
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.compute;
|
||||
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
/**
|
||||
* ComputeGuru understands everything about the hypervisor.
|
||||
*
|
||||
*/
|
||||
public interface ComputeGuru {
|
||||
String getVersion();
|
||||
String getHypervisor();
|
||||
void start(VirtualMachineProfile vm);
|
||||
void stop(VirtualMachineProfile vm);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,32 +14,32 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.OperationTimedoutException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
package org.apache.cloudstack.engine.cloud.entity.api;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.OperationTimedoutException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface VMEntityManager {
|
||||
|
||||
VMEntityVO loadVirtualMachine(String vmId);
|
||||
|
||||
void saveVirtualMachine(VMEntityVO vmInstanceVO);
|
||||
|
||||
String reserveVirtualMachine(VMEntityVO vmEntityVO, String plannerToUse, DeploymentPlan plan, ExcludeList exclude) throws InsufficientCapacityException, ResourceUnavailableException;
|
||||
|
||||
|
||||
public interface VMEntityManager {
|
||||
|
||||
VMEntityVO loadVirtualMachine(String vmId);
|
||||
|
||||
void saveVirtualMachine(VMEntityVO vmInstanceVO);
|
||||
|
||||
String reserveVirtualMachine(VMEntityVO vmEntityVO, String plannerToUse, DeploymentPlan plan, ExcludeList exclude) throws InsufficientCapacityException, ResourceUnavailableException;
|
||||
|
||||
void deployVirtualMachine(String reservationId, String caller, Map<VirtualMachineProfile.Param, Object> params) throws InsufficientCapacityException, ResourceUnavailableException;
|
||||
|
||||
boolean stopvirtualmachine(VMEntityVO vmEntityVO, String caller) throws ResourceUnavailableException;
|
||||
|
||||
boolean destroyVirtualMachine(VMEntityVO vmEntityVO, String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException;
|
||||
}
|
||||
|
||||
boolean stopvirtualmachine(VMEntityVO vmEntityVO, String caller) throws ResourceUnavailableException;
|
||||
|
||||
boolean destroyVirtualMachine(VMEntityVO vmEntityVO, String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,33 +14,33 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
package org.apache.cloudstack.engine.cloud.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.OperationTimedoutException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.OperationTimedoutException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
@Component
|
||||
public class VirtualMachineEntityImpl implements VirtualMachineEntity {
|
||||
|
||||
@Inject private VMEntityManager manager;
|
||||
|
||||
private VMEntityVO vmEntityVO;
|
||||
public class VirtualMachineEntityImpl implements VirtualMachineEntity {
|
||||
|
||||
@Inject private VMEntityManager manager;
|
||||
|
||||
private VMEntityVO vmEntityVO;
|
||||
|
||||
public VirtualMachineEntityImpl() {
|
||||
}
|
||||
|
|
@ -61,204 +61,204 @@ public class VirtualMachineEntityImpl implements VirtualMachineEntity {
|
|||
|
||||
manager.saveVirtualMachine(vmEntityVO);
|
||||
}
|
||||
|
||||
public VirtualMachineEntityImpl(String vmId, VMEntityManager manager) {
|
||||
this.manager = manager;
|
||||
this.vmEntityVO = this.manager.loadVirtualMachine(vmId);
|
||||
}
|
||||
|
||||
public VirtualMachineEntityImpl(String vmId, String owner, String hostName, String displayName, int cpu, int speed, long memory, List<String> computeTags, List<String> rootDiskTags, List<String> networks, VMEntityManager manager) {
|
||||
this(vmId, manager);
|
||||
this.vmEntityVO.setOwner(owner);
|
||||
this.vmEntityVO.setHostname(hostName);
|
||||
this.vmEntityVO.setDisplayname(displayName);
|
||||
this.vmEntityVO.setSpeed(speed);
|
||||
this.vmEntityVO.setComputeTags(computeTags);
|
||||
this.vmEntityVO.setRootDiskTags(rootDiskTags);
|
||||
this.vmEntityVO.setNetworkIds(networks);
|
||||
|
||||
manager.saveVirtualMachine(vmEntityVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return vmEntityVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return vmEntityVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return vmEntityVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return vmEntityVO.getUpdateTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return vmEntityVO.getDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
vmEntityVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listVolumeIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeEntity> listVolumes() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listNicUuids() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NicEntity> listNics() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateEntity getTemplate() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listTags() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTag() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delTag() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String reserve(String plannerToUse, DeploymentPlan plan,
|
||||
ExcludeList exclude, String caller) throws InsufficientCapacityException, ResourceUnavailableException {
|
||||
return manager.reserveVirtualMachine(this.vmEntityVO, plannerToUse, plan, exclude);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void migrateTo(String reservationId, String caller) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public VirtualMachineEntityImpl(String vmId, VMEntityManager manager) {
|
||||
this.manager = manager;
|
||||
this.vmEntityVO = this.manager.loadVirtualMachine(vmId);
|
||||
}
|
||||
|
||||
public VirtualMachineEntityImpl(String vmId, String owner, String hostName, String displayName, int cpu, int speed, long memory, List<String> computeTags, List<String> rootDiskTags, List<String> networks, VMEntityManager manager) {
|
||||
this(vmId, manager);
|
||||
this.vmEntityVO.setOwner(owner);
|
||||
this.vmEntityVO.setHostname(hostName);
|
||||
this.vmEntityVO.setDisplayname(displayName);
|
||||
this.vmEntityVO.setSpeed(speed);
|
||||
this.vmEntityVO.setComputeTags(computeTags);
|
||||
this.vmEntityVO.setRootDiskTags(rootDiskTags);
|
||||
this.vmEntityVO.setNetworkIds(networks);
|
||||
|
||||
manager.saveVirtualMachine(vmEntityVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return vmEntityVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return vmEntityVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return vmEntityVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return vmEntityVO.getUpdateTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return vmEntityVO.getDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
vmEntityVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listVolumeIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeEntity> listVolumes() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listNicUuids() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NicEntity> listNics() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateEntity getTemplate() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listTags() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTag() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delTag() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String reserve(String plannerToUse, DeploymentPlan plan,
|
||||
ExcludeList exclude, String caller) throws InsufficientCapacityException, ResourceUnavailableException {
|
||||
return manager.reserveVirtualMachine(this.vmEntityVO, plannerToUse, plan, exclude);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void migrateTo(String reservationId, String caller) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deploy(String reservationId, String caller, Map<VirtualMachineProfile.Param, Object> params) throws InsufficientCapacityException, ResourceUnavailableException{
|
||||
manager.deployVirtualMachine(reservationId, caller, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stop(String caller) throws ResourceUnavailableException{
|
||||
return manager.stopvirtualmachine(this.vmEntityVO, caller);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanup() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean destroy(String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException {
|
||||
return manager.destroyVirtualMachine(this.vmEntityVO, caller);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VirtualMachineEntity duplicate(String externalId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SnapshotEntity takeSnapshotOf() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(VolumeEntity volume, short deviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(VolumeEntity volume) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectTo(NetworkEntity network, short nicId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnectFrom(NetworkEntity netowrk, short nicId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stop(String caller) throws ResourceUnavailableException{
|
||||
return manager.stopvirtualmachine(this.vmEntityVO, caller);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanup() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean destroy(String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException {
|
||||
return manager.destroyVirtualMachine(this.vmEntityVO, caller);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VirtualMachineEntity duplicate(String externalId) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SnapshotEntity takeSnapshotOf() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(VolumeEntity volume, short deviceId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(VolumeEntity volume) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectTo(NetworkEntity network, short nicId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnectFrom(NetworkEntity netowrk, short nicId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,54 +14,54 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
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 = "vm_compute_tags")
|
||||
public class VMComputeTagVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name = "compute_tag")
|
||||
private String computeTag;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMComputeTagVO() {
|
||||
}
|
||||
|
||||
public VMComputeTagVO(long vmId, String tag) {
|
||||
this.vmId = vmId;
|
||||
this.computeTag = tag;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public String getComputeTag() {
|
||||
return computeTag;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
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 = "vm_compute_tags")
|
||||
public class VMComputeTagVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name = "compute_tag")
|
||||
private String computeTag;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMComputeTagVO() {
|
||||
}
|
||||
|
||||
public VMComputeTagVO(long vmId, String tag) {
|
||||
this.vmId = vmId;
|
||||
this.computeTag = tag;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public String getComputeTag() {
|
||||
return computeTag;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -574,4 +574,4 @@ public class VMEntityVO implements VirtualMachine, FiniteStateObject<State, Virt
|
|||
this.vmReservation = vmReservation;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,58 +14,58 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
|
||||
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 = "vm_network_map")
|
||||
public class VMNetworkMapVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="network_id")
|
||||
private long networkId;
|
||||
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMNetworkMapVO() {
|
||||
}
|
||||
|
||||
public VMNetworkMapVO(long vmId, long networkId) {
|
||||
this.vmId = vmId;
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
|
||||
public long getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
|
||||
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 = "vm_network_map")
|
||||
public class VMNetworkMapVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="network_id")
|
||||
private long networkId;
|
||||
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMNetworkMapVO() {
|
||||
}
|
||||
|
||||
public VMNetworkMapVO(long vmId, long networkId) {
|
||||
this.vmId = vmId;
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
|
||||
public long getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,114 +14,114 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
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 javax.persistence.Transient;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
@Entity
|
||||
@Table(name = "vm_reservation")
|
||||
public class VMReservationVO implements Identity, InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="uuid")
|
||||
private String uuid;
|
||||
|
||||
@Column(name="data_center_id")
|
||||
private long dataCenterId;
|
||||
|
||||
@Column(name="pod_id")
|
||||
private long podId;
|
||||
|
||||
@Column(name="cluster_id")
|
||||
private long clusterId;
|
||||
|
||||
@Column(name="host_id")
|
||||
private long hostId;
|
||||
|
||||
@Column(name=GenericDao.CREATED_COLUMN)
|
||||
private Date created;
|
||||
|
||||
@Column(name=GenericDao.REMOVED_COLUMN)
|
||||
private Date removed;
|
||||
|
||||
// VolumeId -> poolId
|
||||
@Transient
|
||||
Map<Long,Long> volumeReservationMap;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMReservationVO() {
|
||||
}
|
||||
|
||||
public VMReservationVO(long vmId, long dataCenterId, long podId, long clusterId, long hostId) {
|
||||
this.vmId = vmId;
|
||||
this.dataCenterId = dataCenterId;
|
||||
this.podId = podId;
|
||||
this.clusterId = clusterId;
|
||||
this.hostId = hostId;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public long getDataCenterId() {
|
||||
return dataCenterId;
|
||||
}
|
||||
|
||||
public Long getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
public Long getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public Long getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
public Map<Long,Long> getVolumeReservation(){
|
||||
return volumeReservationMap;
|
||||
}
|
||||
|
||||
public void setVolumeReservation(Map<Long,Long> volumeReservationMap){
|
||||
this.volumeReservationMap = volumeReservationMap;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
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 javax.persistence.Transient;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
@Entity
|
||||
@Table(name = "vm_reservation")
|
||||
public class VMReservationVO implements Identity, InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="uuid")
|
||||
private String uuid;
|
||||
|
||||
@Column(name="data_center_id")
|
||||
private long dataCenterId;
|
||||
|
||||
@Column(name="pod_id")
|
||||
private long podId;
|
||||
|
||||
@Column(name="cluster_id")
|
||||
private long clusterId;
|
||||
|
||||
@Column(name="host_id")
|
||||
private long hostId;
|
||||
|
||||
@Column(name=GenericDao.CREATED_COLUMN)
|
||||
private Date created;
|
||||
|
||||
@Column(name=GenericDao.REMOVED_COLUMN)
|
||||
private Date removed;
|
||||
|
||||
// VolumeId -> poolId
|
||||
@Transient
|
||||
Map<Long,Long> volumeReservationMap;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMReservationVO() {
|
||||
}
|
||||
|
||||
public VMReservationVO(long vmId, long dataCenterId, long podId, long clusterId, long hostId) {
|
||||
this.vmId = vmId;
|
||||
this.dataCenterId = dataCenterId;
|
||||
this.podId = podId;
|
||||
this.clusterId = clusterId;
|
||||
this.hostId = hostId;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public long getDataCenterId() {
|
||||
return dataCenterId;
|
||||
}
|
||||
|
||||
public Long getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
public Long getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public Long getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
public Map<Long,Long> getVolumeReservation(){
|
||||
return volumeReservationMap;
|
||||
}
|
||||
|
||||
public void setVolumeReservation(Map<Long,Long> volumeReservationMap){
|
||||
this.volumeReservationMap = volumeReservationMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,54 +14,54 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
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 = "vm_root_disk_tags")
|
||||
public class VMRootDiskTagVO implements InternalIdentity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name = "root_disk_tag")
|
||||
private String rootDiskTag;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMRootDiskTagVO() {
|
||||
}
|
||||
|
||||
public VMRootDiskTagVO(long vmId, String rootDiskTag) {
|
||||
this.vmId = vmId;
|
||||
this.rootDiskTag = rootDiskTag;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public String getRootDiskTag() {
|
||||
return rootDiskTag;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
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 = "vm_root_disk_tags")
|
||||
public class VMRootDiskTagVO implements InternalIdentity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name = "root_disk_tag")
|
||||
private String rootDiskTag;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VMRootDiskTagVO() {
|
||||
}
|
||||
|
||||
public VMRootDiskTagVO(long vmId, String rootDiskTag) {
|
||||
this.vmId = vmId;
|
||||
this.rootDiskTag = rootDiskTag;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public String getRootDiskTag() {
|
||||
return rootDiskTag;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,87 +14,87 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
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 javax.persistence.Transient;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
@Entity
|
||||
@Table(name = "volume_reservation")
|
||||
public class VolumeReservationVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_reservation_id")
|
||||
private Long vmReservationId;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="volume_id")
|
||||
private long volumeId;
|
||||
|
||||
@Column(name="pool_id")
|
||||
private long poolId;
|
||||
|
||||
// VolumeId -> poolId
|
||||
@Transient
|
||||
Map<String, String> volumeReservationMap;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VolumeReservationVO() {
|
||||
}
|
||||
|
||||
public VolumeReservationVO(long vmId, long volumeId, long poolId, Long vmReservationId) {
|
||||
this.vmId = vmId;
|
||||
this.volumeId = volumeId;
|
||||
this.poolId = poolId;
|
||||
this.vmReservationId = vmReservationId;
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public Long geVmReservationId() {
|
||||
return vmReservationId;
|
||||
}
|
||||
|
||||
public long getVolumeId() {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
public Long getPoolId() {
|
||||
return poolId;
|
||||
}
|
||||
|
||||
|
||||
public Map<String,String> getVolumeReservation(){
|
||||
return volumeReservationMap;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
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 javax.persistence.Transient;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
@Entity
|
||||
@Table(name = "volume_reservation")
|
||||
public class VolumeReservationVO implements InternalIdentity{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
|
||||
@Column(name = "vm_reservation_id")
|
||||
private Long vmReservationId;
|
||||
|
||||
@Column(name = "vm_id")
|
||||
private long vmId;
|
||||
|
||||
@Column(name="volume_id")
|
||||
private long volumeId;
|
||||
|
||||
@Column(name="pool_id")
|
||||
private long poolId;
|
||||
|
||||
// VolumeId -> poolId
|
||||
@Transient
|
||||
Map<String, String> volumeReservationMap;
|
||||
|
||||
/**
|
||||
* There should never be a public constructor for this class. Since it's
|
||||
* only here to define the table for the DAO class.
|
||||
*/
|
||||
protected VolumeReservationVO() {
|
||||
}
|
||||
|
||||
public VolumeReservationVO(long vmId, long volumeId, long poolId, Long vmReservationId) {
|
||||
this.vmId = vmId;
|
||||
this.volumeId = volumeId;
|
||||
this.poolId = poolId;
|
||||
this.vmReservationId = vmReservationId;
|
||||
}
|
||||
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getVmId() {
|
||||
return vmId;
|
||||
}
|
||||
|
||||
public Long geVmReservationId() {
|
||||
return vmReservationId;
|
||||
}
|
||||
|
||||
public long getVolumeId() {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
public Long getPoolId() {
|
||||
return poolId;
|
||||
}
|
||||
|
||||
|
||||
public Map<String,String> getVolumeReservation(){
|
||||
return volumeReservationMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMComputeTagDao extends GenericDao<VMComputeTagVO, Long>{
|
||||
|
||||
void persist(long vmId, List<String> computeTags);
|
||||
|
||||
List<String> getComputeTags(long vmId);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMComputeTagDao extends GenericDao<VMComputeTagVO, Long>{
|
||||
|
||||
void persist(long vmId, List<String> computeTags);
|
||||
|
||||
List<String> getComputeTags(long vmId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,76 +14,76 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO;
|
||||
|
||||
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.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMComputeTagDao.class })
|
||||
public class VMComputeTagDaoImpl extends GenericDaoBase<VMComputeTagVO, Long> implements VMComputeTagDao {
|
||||
|
||||
protected SearchBuilder<VMComputeTagVO> VmIdSearch;
|
||||
|
||||
public VMComputeTagDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<String> computeTags) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMComputeTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (String tag : computeTags) {
|
||||
if(tag != null){
|
||||
tag = tag.trim();
|
||||
if(tag.length() > 0) {
|
||||
VMComputeTagVO vo = new VMComputeTagVO(vmId, tag);
|
||||
persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getComputeTags(long vmId) {
|
||||
|
||||
SearchCriteria<VMComputeTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMComputeTagVO> results = search(sc, null);
|
||||
List<String> computeTags = new ArrayList<String>(results.size());
|
||||
for (VMComputeTagVO result : results) {
|
||||
computeTags.add(result.getComputeTag());
|
||||
}
|
||||
|
||||
return computeTags;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO;
|
||||
|
||||
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.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMComputeTagDao.class })
|
||||
public class VMComputeTagDaoImpl extends GenericDaoBase<VMComputeTagVO, Long> implements VMComputeTagDao {
|
||||
|
||||
protected SearchBuilder<VMComputeTagVO> VmIdSearch;
|
||||
|
||||
public VMComputeTagDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<String> computeTags) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMComputeTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (String tag : computeTags) {
|
||||
if(tag != null){
|
||||
tag = tag.trim();
|
||||
if(tag.length() > 0) {
|
||||
VMComputeTagVO vo = new VMComputeTagVO(vmId, tag);
|
||||
persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getComputeTags(long vmId) {
|
||||
|
||||
SearchCriteria<VMComputeTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMComputeTagVO> results = search(sc, null);
|
||||
List<String> computeTags = new ArrayList<String>(results.size());
|
||||
for (VMComputeTagVO result : results) {
|
||||
computeTags.add(result.getComputeTag());
|
||||
}
|
||||
|
||||
return computeTags;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMNetworkMapDao extends GenericDao<VMNetworkMapVO, Long>{
|
||||
|
||||
void persist(long vmId, List<Long> networks);
|
||||
|
||||
List<Long> getNetworks(long vmId);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMNetworkMapDao extends GenericDao<VMNetworkMapVO, Long>{
|
||||
|
||||
void persist(long vmId, List<Long> networks);
|
||||
|
||||
List<Long> getNetworks(long vmId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,72 +14,72 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.cloud.network.dao.NetworkDao;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMNetworkMapDao.class })
|
||||
public class VMNetworkMapDaoImpl extends GenericDaoBase<VMNetworkMapVO, Long> implements VMNetworkMapDao {
|
||||
|
||||
protected SearchBuilder<VMNetworkMapVO> VmIdSearch;
|
||||
|
||||
@Inject
|
||||
protected NetworkDao _networkDao;
|
||||
|
||||
public VMNetworkMapDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<Long> networks) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (Long networkId : networks) {
|
||||
VMNetworkMapVO vo = new VMNetworkMapVO(vmId, networkId);
|
||||
persist(vo);
|
||||
}
|
||||
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getNetworks(long vmId) {
|
||||
|
||||
SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMNetworkMapVO> results = search(sc, null);
|
||||
List<Long> networks = new ArrayList<Long>(results.size());
|
||||
for (VMNetworkMapVO result : results) {
|
||||
networks.add(result.getNetworkId());
|
||||
}
|
||||
|
||||
return networks;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.cloud.network.dao.NetworkDao;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMNetworkMapDao.class })
|
||||
public class VMNetworkMapDaoImpl extends GenericDaoBase<VMNetworkMapVO, Long> implements VMNetworkMapDao {
|
||||
|
||||
protected SearchBuilder<VMNetworkMapVO> VmIdSearch;
|
||||
|
||||
@Inject
|
||||
protected NetworkDao _networkDao;
|
||||
|
||||
public VMNetworkMapDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<Long> networks) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (Long networkId : networks) {
|
||||
VMNetworkMapVO vo = new VMNetworkMapVO(vmId, networkId);
|
||||
persist(vo);
|
||||
}
|
||||
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getNetworks(long vmId) {
|
||||
|
||||
SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMNetworkMapVO> results = search(sc, null);
|
||||
List<Long> networks = new ArrayList<Long>(results.size());
|
||||
for (VMNetworkMapVO result : results) {
|
||||
networks.add(result.getNetworkId());
|
||||
}
|
||||
|
||||
return networks;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,21 +14,21 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMReservationDao extends GenericDao<VMReservationVO, Long>{
|
||||
|
||||
VMReservationVO findByVmId(long vmId);
|
||||
|
||||
void loadVolumeReservation(VMReservationVO reservation);
|
||||
|
||||
VMReservationVO findByReservationId(String reservationId);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMReservationDao extends GenericDao<VMReservationVO, Long>{
|
||||
|
||||
VMReservationVO findByVmId(long vmId);
|
||||
|
||||
void loadVolumeReservation(VMReservationVO reservation);
|
||||
|
||||
VMReservationVO findByReservationId(String reservationId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,98 +14,98 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.host.dao.HostTagsDaoImpl;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMReservationDao.class })
|
||||
public class VMReservationDaoImpl extends GenericDaoBase<VMReservationVO, Long> implements VMReservationDao {
|
||||
|
||||
protected SearchBuilder<VMReservationVO> VmIdSearch;
|
||||
|
||||
@Inject protected VolumeReservationDao _volumeReservationDao;
|
||||
|
||||
public VMReservationDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMReservationVO findByVmId(long vmId) {
|
||||
SearchCriteria<VMReservationVO> sc = VmIdSearch.create("vmId", vmId);
|
||||
VMReservationVO vmRes = findOneBy(sc);
|
||||
loadVolumeReservation(vmRes);
|
||||
return vmRes;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loadVolumeReservation(VMReservationVO reservation){
|
||||
if(reservation != null){
|
||||
List<VolumeReservationVO> volumeResList = _volumeReservationDao.listVolumeReservation(reservation.getId());
|
||||
Map<Long, Long> volumeReservationMap = new HashMap<Long,Long>();
|
||||
|
||||
for(VolumeReservationVO res : volumeResList){
|
||||
volumeReservationMap.put(res.getVolumeId(), res.getPoolId());
|
||||
}
|
||||
reservation.setVolumeReservation(volumeReservationMap);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@DB
|
||||
public VMReservationVO persist(VMReservationVO reservation) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
txn.start();
|
||||
|
||||
VMReservationVO dbVO = super.persist(reservation);
|
||||
|
||||
saveVolumeReservation(reservation);
|
||||
loadVolumeReservation(dbVO);
|
||||
|
||||
txn.commit();
|
||||
|
||||
return dbVO;
|
||||
}
|
||||
|
||||
private void saveVolumeReservation(VMReservationVO reservation) {
|
||||
if(reservation.getVolumeReservation() != null){
|
||||
for(Long volumeId : reservation.getVolumeReservation().keySet()){
|
||||
VolumeReservationVO volumeReservation = new VolumeReservationVO(reservation.getVmId(), volumeId, reservation.getVolumeReservation().get(volumeId), reservation.getId());
|
||||
_volumeReservationDao.persist(volumeReservation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMReservationVO findByReservationId(String reservationId) {
|
||||
VMReservationVO vmRes = super.findByUuid(reservationId);
|
||||
loadVolumeReservation(vmRes);
|
||||
return vmRes;
|
||||
}
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.host.dao.HostTagsDaoImpl;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMReservationDao.class })
|
||||
public class VMReservationDaoImpl extends GenericDaoBase<VMReservationVO, Long> implements VMReservationDao {
|
||||
|
||||
protected SearchBuilder<VMReservationVO> VmIdSearch;
|
||||
|
||||
@Inject protected VolumeReservationDao _volumeReservationDao;
|
||||
|
||||
public VMReservationDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMReservationVO findByVmId(long vmId) {
|
||||
SearchCriteria<VMReservationVO> sc = VmIdSearch.create("vmId", vmId);
|
||||
VMReservationVO vmRes = findOneBy(sc);
|
||||
loadVolumeReservation(vmRes);
|
||||
return vmRes;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loadVolumeReservation(VMReservationVO reservation){
|
||||
if(reservation != null){
|
||||
List<VolumeReservationVO> volumeResList = _volumeReservationDao.listVolumeReservation(reservation.getId());
|
||||
Map<Long, Long> volumeReservationMap = new HashMap<Long,Long>();
|
||||
|
||||
for(VolumeReservationVO res : volumeResList){
|
||||
volumeReservationMap.put(res.getVolumeId(), res.getPoolId());
|
||||
}
|
||||
reservation.setVolumeReservation(volumeReservationMap);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@DB
|
||||
public VMReservationVO persist(VMReservationVO reservation) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
txn.start();
|
||||
|
||||
VMReservationVO dbVO = super.persist(reservation);
|
||||
|
||||
saveVolumeReservation(reservation);
|
||||
loadVolumeReservation(dbVO);
|
||||
|
||||
txn.commit();
|
||||
|
||||
return dbVO;
|
||||
}
|
||||
|
||||
private void saveVolumeReservation(VMReservationVO reservation) {
|
||||
if(reservation.getVolumeReservation() != null){
|
||||
for(Long volumeId : reservation.getVolumeReservation().keySet()){
|
||||
VolumeReservationVO volumeReservation = new VolumeReservationVO(reservation.getVmId(), volumeId, reservation.getVolumeReservation().get(volumeId), reservation.getId());
|
||||
_volumeReservationDao.persist(volumeReservation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMReservationVO findByReservationId(String reservationId) {
|
||||
VMReservationVO vmRes = super.findByUuid(reservationId);
|
||||
loadVolumeReservation(vmRes);
|
||||
return vmRes;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMRootDiskTagDao extends GenericDao<VMRootDiskTagVO, Long>{
|
||||
|
||||
void persist(long vmId, List<String> diskTags);
|
||||
|
||||
List<String> getRootDiskTags(long vmId);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VMRootDiskTagDao extends GenericDao<VMRootDiskTagVO, Long>{
|
||||
|
||||
void persist(long vmId, List<String> diskTags);
|
||||
|
||||
List<String> getRootDiskTags(long vmId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,75 +14,75 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO;
|
||||
|
||||
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.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMRootDiskTagDao.class })
|
||||
public class VMRootDiskTagDaoImpl extends GenericDaoBase<VMRootDiskTagVO, Long> implements VMRootDiskTagDao {
|
||||
|
||||
protected SearchBuilder<VMRootDiskTagVO> VmIdSearch;
|
||||
|
||||
public VMRootDiskTagDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<String> rootDiskTags) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMRootDiskTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (String tag : rootDiskTags) {
|
||||
if(tag != null){
|
||||
tag = tag.trim();
|
||||
if(tag.length() > 0) {
|
||||
VMRootDiskTagVO vo = new VMRootDiskTagVO(vmId, tag);
|
||||
persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getRootDiskTags(long vmId) {
|
||||
SearchCriteria<VMRootDiskTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMRootDiskTagVO> results = search(sc, null);
|
||||
List<String> computeTags = new ArrayList<String>(results.size());
|
||||
for (VMRootDiskTagVO result : results) {
|
||||
computeTags.add(result.getRootDiskTag());
|
||||
}
|
||||
return computeTags;
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO;
|
||||
|
||||
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.Transaction;
|
||||
|
||||
@Component
|
||||
@Local(value = { VMRootDiskTagDao.class })
|
||||
public class VMRootDiskTagDaoImpl extends GenericDaoBase<VMRootDiskTagVO, Long> implements VMRootDiskTagDao {
|
||||
|
||||
protected SearchBuilder<VMRootDiskTagVO> VmIdSearch;
|
||||
|
||||
public VMRootDiskTagDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist(long vmId, List<String> rootDiskTags) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
||||
txn.start();
|
||||
SearchCriteria<VMRootDiskTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
expunge(sc);
|
||||
|
||||
for (String tag : rootDiskTags) {
|
||||
if(tag != null){
|
||||
tag = tag.trim();
|
||||
if(tag.length() > 0) {
|
||||
VMRootDiskTagVO vo = new VMRootDiskTagVO(vmId, tag);
|
||||
persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
txn.commit();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getRootDiskTags(long vmId) {
|
||||
SearchCriteria<VMRootDiskTagVO> sc = VmIdSearch.create();
|
||||
sc.setParameters("vmId", vmId);
|
||||
|
||||
List<VMRootDiskTagVO> results = search(sc, null);
|
||||
List<String> computeTags = new ArrayList<String>(results.size());
|
||||
for (VMRootDiskTagVO result : results) {
|
||||
computeTags.add(result.getRootDiskTag());
|
||||
}
|
||||
return computeTags;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VolumeReservationDao extends GenericDao<VolumeReservationVO, Long>{
|
||||
|
||||
VolumeReservationVO findByVmId(long vmId);
|
||||
|
||||
List<VolumeReservationVO> listVolumeReservation(long vmReservationId);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface VolumeReservationDao extends GenericDao<VolumeReservationVO, Long>{
|
||||
|
||||
VolumeReservationVO findByVmId(long vmId);
|
||||
|
||||
List<VolumeReservationVO> listVolumeReservation(long vmReservationId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,55 +14,55 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.host.dao.HostTagsDaoImpl;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
|
||||
@Component
|
||||
@Local(value = { VolumeReservationDao.class })
|
||||
public class VolumeReservationDaoImpl extends GenericDaoBase<VolumeReservationVO, Long> implements VolumeReservationDao {
|
||||
|
||||
protected SearchBuilder<VolumeReservationVO> VmIdSearch;
|
||||
protected SearchBuilder<VolumeReservationVO> VmReservationIdSearch;
|
||||
|
||||
public VolumeReservationDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
VmReservationIdSearch = createSearchBuilder();
|
||||
VmReservationIdSearch.and("vmReservationId", VmReservationIdSearch.entity().geVmReservationId(), SearchCriteria.Op.EQ);
|
||||
VmReservationIdSearch.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolumeReservationVO findByVmId(long vmId) {
|
||||
SearchCriteria<VolumeReservationVO> sc = VmIdSearch.create("vmId", vmId);
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeReservationVO> listVolumeReservation(long vmReservationId) {
|
||||
SearchCriteria<VolumeReservationVO> sc = VmReservationIdSearch.create("vmReservationId", vmReservationId);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.cloud.entity.api.db.dao;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO;
|
||||
import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.host.dao.HostTagsDaoImpl;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
|
||||
@Component
|
||||
@Local(value = { VolumeReservationDao.class })
|
||||
public class VolumeReservationDaoImpl extends GenericDaoBase<VolumeReservationVO, Long> implements VolumeReservationDao {
|
||||
|
||||
protected SearchBuilder<VolumeReservationVO> VmIdSearch;
|
||||
protected SearchBuilder<VolumeReservationVO> VmReservationIdSearch;
|
||||
|
||||
public VolumeReservationDaoImpl() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
VmIdSearch = createSearchBuilder();
|
||||
VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ);
|
||||
VmIdSearch.done();
|
||||
|
||||
VmReservationIdSearch = createSearchBuilder();
|
||||
VmReservationIdSearch.and("vmReservationId", VmReservationIdSearch.entity().geVmReservationId(), SearchCriteria.Op.EQ);
|
||||
VmReservationIdSearch.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolumeReservationVO findByVmId(long vmId) {
|
||||
SearchCriteria<VolumeReservationVO> sc = VmIdSearch.create("vmId", vmId);
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeReservationVO> listVolumeReservation(long vmReservationId) {
|
||||
SearchCriteria<VolumeReservationVO> sc = VmReservationIdSearch.create("vmReservationId", vmReservationId);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,196 +14,196 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.org.Cluster.ClusterType;
|
||||
import com.cloud.org.Grouping.AllocationState;
|
||||
import com.cloud.org.Managed.ManagedState;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
public class ClusterEntityImpl implements ClusterEntity {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineClusterVO clusterVO;
|
||||
|
||||
|
||||
public ClusterEntityImpl(String clusterId, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
this.clusterVO = this.manager.loadCluster(clusterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return clusterVO.getState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveCluster(clusterVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return clusterVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return clusterVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return clusterVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return clusterVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return clusterVO.getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return clusterVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return clusterVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPodId() {
|
||||
return clusterVO.getPodId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return clusterVO.getHypervisorType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterType getClusterType() {
|
||||
return clusterVO.getClusterType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllocationState getAllocationState() {
|
||||
return clusterVO.getAllocationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedState getManagedState() {
|
||||
return clusterVO.getManagedState();
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
clusterVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
clusterVO.setName(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.org.Cluster.ClusterType;
|
||||
import com.cloud.org.Grouping.AllocationState;
|
||||
import com.cloud.org.Managed.ManagedState;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
public class ClusterEntityImpl implements ClusterEntity {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineClusterVO clusterVO;
|
||||
|
||||
|
||||
public ClusterEntityImpl(String clusterId, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
this.clusterVO = this.manager.loadCluster(clusterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return clusterVO.getState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveCluster(clusterVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return clusterVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return clusterVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return clusterVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return clusterVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return clusterVO.getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return clusterVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return clusterVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPodId() {
|
||||
return clusterVO.getPodId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return clusterVO.getHypervisorType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterType getClusterType() {
|
||||
return clusterVO.getClusterType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllocationState getAllocationState() {
|
||||
return clusterVO.getAllocationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedState getManagedState() {
|
||||
return clusterVO.getManagedState();
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
clusterVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
clusterVO.setName(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,37 +14,37 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
|
||||
public interface DataCenterResourceManager {
|
||||
|
||||
EngineDataCenterVO loadDataCenter(String dataCenterId);
|
||||
|
||||
void saveDataCenter(EngineDataCenterVO dc);
|
||||
|
||||
void savePod(EngineHostPodVO dc);
|
||||
|
||||
void saveCluster(EngineClusterVO cluster);
|
||||
|
||||
boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException;
|
||||
|
||||
EngineHostPodVO loadPod(String uuid);
|
||||
|
||||
EngineClusterVO loadCluster(String uuid);
|
||||
|
||||
EngineHostVO loadHost(String uuid);
|
||||
|
||||
void saveHost(EngineHostVO hostVO);
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
|
||||
public interface DataCenterResourceManager {
|
||||
|
||||
EngineDataCenterVO loadDataCenter(String dataCenterId);
|
||||
|
||||
void saveDataCenter(EngineDataCenterVO dc);
|
||||
|
||||
void savePod(EngineHostPodVO dc);
|
||||
|
||||
void saveCluster(EngineClusterVO cluster);
|
||||
|
||||
boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException;
|
||||
|
||||
EngineHostPodVO loadPod(String uuid);
|
||||
|
||||
EngineClusterVO loadCluster(String uuid);
|
||||
|
||||
EngineHostVO loadHost(String uuid);
|
||||
|
||||
void saveHost(EngineHostVO hostVO);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,116 +14,116 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
|
||||
@Component
|
||||
public class DataCenterResourceManagerImpl implements DataCenterResourceManager {
|
||||
|
||||
@Inject
|
||||
EngineDataCenterDao _dataCenterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostPodDao _podDao;
|
||||
|
||||
@Inject
|
||||
EngineClusterDao _clusterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostDao _hostDao;
|
||||
|
||||
|
||||
protected StateMachine2<State, Event, DataCenterResourceEntity> _stateMachine = DataCenterResourceEntity.State.s_fsm;
|
||||
|
||||
@Override
|
||||
public EngineDataCenterVO loadDataCenter(String dataCenterId) {
|
||||
EngineDataCenterVO dataCenterVO = _dataCenterDao.findByUuid(dataCenterId);
|
||||
if(dataCenterVO == null){
|
||||
throw new InvalidParameterValueException("Zone does not exist");
|
||||
}
|
||||
return dataCenterVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDataCenter(EngineDataCenterVO dc) {
|
||||
_dataCenterDao.persist(dc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException {
|
||||
|
||||
if(entity instanceof ZoneEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _dataCenterDao);
|
||||
}else if(entity instanceof PodEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _podDao);
|
||||
}else if(entity instanceof ClusterEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _clusterDao);
|
||||
}else if(entity instanceof HostEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _hostDao);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineHostPodVO loadPod(String uuid) {
|
||||
EngineHostPodVO pod = _podDao.findByUuid(uuid);
|
||||
if(pod == null){
|
||||
throw new InvalidParameterValueException("Pod does not exist");
|
||||
}
|
||||
return pod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineClusterVO loadCluster(String uuid) {
|
||||
EngineClusterVO cluster = _clusterDao.findByUuid(uuid);
|
||||
if(cluster == null){
|
||||
throw new InvalidParameterValueException("Pod does not exist");
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePod(EngineHostPodVO pod) {
|
||||
_podDao.persist(pod);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveCluster(EngineClusterVO cluster) {
|
||||
_clusterDao.persist(cluster);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineHostVO loadHost(String uuid) {
|
||||
EngineHostVO host = _hostDao.findByUuid(uuid);
|
||||
if(host == null){
|
||||
throw new InvalidParameterValueException("Host does not exist");
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveHost(EngineHostVO hostVO) {
|
||||
_hostDao.persist(hostVO);
|
||||
}
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
|
||||
@Component
|
||||
public class DataCenterResourceManagerImpl implements DataCenterResourceManager {
|
||||
|
||||
@Inject
|
||||
EngineDataCenterDao _dataCenterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostPodDao _podDao;
|
||||
|
||||
@Inject
|
||||
EngineClusterDao _clusterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostDao _hostDao;
|
||||
|
||||
|
||||
protected StateMachine2<State, Event, DataCenterResourceEntity> _stateMachine = DataCenterResourceEntity.State.s_fsm;
|
||||
|
||||
@Override
|
||||
public EngineDataCenterVO loadDataCenter(String dataCenterId) {
|
||||
EngineDataCenterVO dataCenterVO = _dataCenterDao.findByUuid(dataCenterId);
|
||||
if(dataCenterVO == null){
|
||||
throw new InvalidParameterValueException("Zone does not exist");
|
||||
}
|
||||
return dataCenterVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDataCenter(EngineDataCenterVO dc) {
|
||||
_dataCenterDao.persist(dc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException {
|
||||
|
||||
if(entity instanceof ZoneEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _dataCenterDao);
|
||||
}else if(entity instanceof PodEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _podDao);
|
||||
}else if(entity instanceof ClusterEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _clusterDao);
|
||||
}else if(entity instanceof HostEntity){
|
||||
return _stateMachine.transitTo(entity, event, null, _hostDao);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineHostPodVO loadPod(String uuid) {
|
||||
EngineHostPodVO pod = _podDao.findByUuid(uuid);
|
||||
if(pod == null){
|
||||
throw new InvalidParameterValueException("Pod does not exist");
|
||||
}
|
||||
return pod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineClusterVO loadCluster(String uuid) {
|
||||
EngineClusterVO cluster = _clusterDao.findByUuid(uuid);
|
||||
if(cluster == null){
|
||||
throw new InvalidParameterValueException("Pod does not exist");
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePod(EngineHostPodVO pod) {
|
||||
_podDao.persist(pod);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveCluster(EngineClusterVO cluster) {
|
||||
_clusterDao.persist(cluster);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineHostVO loadHost(String uuid) {
|
||||
EngineHostVO host = _hostDao.findByUuid(uuid);
|
||||
if(host == null){
|
||||
throw new InvalidParameterValueException("Host does not exist");
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveHost(EngineHostVO hostVO) {
|
||||
_hostDao.persist(hostVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,202 +14,202 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
public class HostEntityImpl implements HostEntity {
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineHostVO hostVO;
|
||||
|
||||
public HostEntityImpl(String uuid, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
hostVO = manager.loadHost(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return hostVO.getOrchestrationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveHost(hostVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return hostVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return hostVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return hostVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return hostVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return hostVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
// TODO Auto-generated method stub
|
||||
return hostVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
public void setDetails(Map<String,String> details) {
|
||||
hostVO.setDetails(details);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return hostVO.getDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
hostVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getTotalMemory() {
|
||||
return hostVO.getTotalMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCpus() {
|
||||
return hostVO.getCpus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSpeed() {
|
||||
return hostVO.getSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getPodId() {
|
||||
return hostVO.getPodId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return hostVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return hostVO.getHypervisorType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuid() {
|
||||
return hostVO.getGuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getClusterId() {
|
||||
return hostVO.getClusterId();
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
hostVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
hostVO.setName(name);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
public class HostEntityImpl implements HostEntity {
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineHostVO hostVO;
|
||||
|
||||
public HostEntityImpl(String uuid, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
hostVO = manager.loadHost(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return hostVO.getOrchestrationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveHost(hostVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return hostVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return hostVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return hostVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return hostVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return hostVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
// TODO Auto-generated method stub
|
||||
return hostVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
public void setDetails(Map<String,String> details) {
|
||||
hostVO.setDetails(details);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return hostVO.getDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
hostVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getTotalMemory() {
|
||||
return hostVO.getTotalMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCpus() {
|
||||
return hostVO.getCpus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getSpeed() {
|
||||
return hostVO.getSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getPodId() {
|
||||
return hostVO.getPodId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return hostVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return hostVO.getHypervisorType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuid() {
|
||||
return hostVO.getGuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getClusterId() {
|
||||
return hostVO.getClusterId();
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
hostVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
hostVO.setName(name);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,211 +1,211 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
|
||||
import com.cloud.org.Cluster;
|
||||
import com.cloud.org.Grouping.AllocationState;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
public class PodEntityImpl implements PodEntity {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineHostPodVO podVO;
|
||||
|
||||
public PodEntityImpl(String uuid, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
podVO = manager.loadPod(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return podVO.getState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return podVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return podVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return podVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return podVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return podVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCidrAddress() {
|
||||
return podVO.getCidrAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCidrSize() {
|
||||
return podVO.getCidrSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGateway() {
|
||||
return podVO.getGateway();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return podVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return podVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllocationState getAllocationState() {
|
||||
return podVO.getAllocationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getExternalDhcp() {
|
||||
return podVO.getExternalDhcp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Cluster> listClusters() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.savePod(podVO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
podVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
podVO.setName(name);
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
|
||||
import com.cloud.org.Cluster;
|
||||
import com.cloud.org.Grouping.AllocationState;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
public class PodEntityImpl implements PodEntity {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineHostPodVO podVO;
|
||||
|
||||
public PodEntityImpl(String uuid, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
podVO = manager.loadPod(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return podVO.getState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return podVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return podVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return podVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return podVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return podVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCidrAddress() {
|
||||
return podVO.getCidrAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCidrSize() {
|
||||
return podVO.getCidrSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGateway() {
|
||||
return podVO.getGateway();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return podVO.getDataCenterId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return podVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllocationState getAllocationState() {
|
||||
return podVO.getAllocationState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getExternalDhcp() {
|
||||
return podVO.getExternalDhcp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Cluster> listClusters() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.savePod(podVO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
podVO.setOwner(owner);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
podVO.setName(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,201 +1,201 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import com.cloud.utils.fsm.FiniteStateObject;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
@Path("/zone/{id}")
|
||||
public class ZoneEntityImpl implements ZoneEntity, FiniteStateObject<DataCenterResourceEntity.State, DataCenterResourceEntity.State.Event> {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineDataCenterVO dataCenterVO;
|
||||
|
||||
|
||||
public ZoneEntityImpl(String dataCenterId, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
this.dataCenterVO = this.manager.loadDataCenter(dataCenterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GET
|
||||
public String getUuid() {
|
||||
return dataCenterVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return dataCenterVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return "state";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return "desired_state";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return dataCenterVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return dataCenterVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return dataCenterVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
public void setOwner(String owner) {
|
||||
dataCenterVO.setOwner(owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return dataCenterVO.getDetails();
|
||||
}
|
||||
|
||||
public void setDetails(Map<String,String> details) {
|
||||
dataCenterVO.setDetails(details);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
dataCenterVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return dataCenterVO.getState();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PodEntity> listPods() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setState(State state) {
|
||||
//use FSM to set state.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveDataCenter(dataCenterVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return dataCenterVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listPodIds() {
|
||||
List<String> podIds = new ArrayList<String>();
|
||||
podIds.add("pod-uuid-1");
|
||||
podIds.add("pod-uuid-2");
|
||||
return podIds;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
dataCenterVO.setName(name);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.datacenter.entity.api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import com.cloud.utils.fsm.FiniteStateObject;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
|
||||
|
||||
@Path("/zone/{id}")
|
||||
public class ZoneEntityImpl implements ZoneEntity, FiniteStateObject<DataCenterResourceEntity.State, DataCenterResourceEntity.State.Event> {
|
||||
|
||||
|
||||
private DataCenterResourceManager manager;
|
||||
|
||||
private EngineDataCenterVO dataCenterVO;
|
||||
|
||||
|
||||
public ZoneEntityImpl(String dataCenterId, DataCenterResourceManager manager) {
|
||||
this.manager = manager;
|
||||
this.dataCenterVO = this.manager.loadDataCenter(dataCenterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GET
|
||||
public String getUuid() {
|
||||
return dataCenterVO.getUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return dataCenterVO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enable() {
|
||||
try {
|
||||
manager.changeState(this, Event.EnableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disable() {
|
||||
try {
|
||||
manager.changeState(this, Event.DisableRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.DeactivateRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reactivate() {
|
||||
try {
|
||||
manager.changeState(this, Event.ActivatedRequest);
|
||||
} catch (NoTransitionException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentState() {
|
||||
// TODO Auto-generated method stub
|
||||
return "state";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDesiredState() {
|
||||
// TODO Auto-generated method stub
|
||||
return "desired_state";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreatedTime() {
|
||||
return dataCenterVO.getCreated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getLastUpdatedTime() {
|
||||
return dataCenterVO.getLastUpdated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwner() {
|
||||
return dataCenterVO.getOwner();
|
||||
}
|
||||
|
||||
|
||||
public void setOwner(String owner) {
|
||||
dataCenterVO.setOwner(owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDetails() {
|
||||
return dataCenterVO.getDetails();
|
||||
}
|
||||
|
||||
public void setDetails(Map<String,String> details) {
|
||||
dataCenterVO.setDetails(details);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addDetail(String name, String value) {
|
||||
dataCenterVO.setDetail(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDetail(String name, String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Method> getApplicableActions() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public State getState() {
|
||||
return dataCenterVO.getState();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PodEntity> listPods() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setState(State state) {
|
||||
//use FSM to set state.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void persist() {
|
||||
manager.saveDataCenter(dataCenterVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return dataCenterVO.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listPodIds() {
|
||||
List<String> podIds = new ArrayList<String>();
|
||||
podIds.add("pod-uuid-1");
|
||||
podIds.add("pod-uuid-2");
|
||||
return podIds;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
dataCenterVO.setName(name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.org.Cluster;
|
||||
|
||||
public interface EngineCluster extends Cluster {
|
||||
|
||||
}
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.org.Cluster;
|
||||
|
||||
public interface EngineCluster extends Cluster {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
|
||||
public interface EngineDataCenter extends DataCenter {
|
||||
|
||||
}
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
|
||||
public interface EngineDataCenter extends DataCenter {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
// 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.
|
||||
//
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
|
@ -39,43 +39,43 @@ import com.cloud.org.Grouping;
|
|||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
import com.cloud.utils.db.StateMachine;
|
||||
|
||||
@Entity
|
||||
@Table(name="data_center")
|
||||
public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Column(name="id")
|
||||
private long id;
|
||||
|
||||
@Column(name="name")
|
||||
private String name = null;
|
||||
|
||||
@Column(name="description")
|
||||
private String description = null;
|
||||
|
||||
@Column(name="dns1")
|
||||
private String dns1 = null;
|
||||
|
||||
@Column(name="dns2")
|
||||
private String dns2 = null;
|
||||
|
||||
@Column(name="ip6Dns1")
|
||||
private String ip6Dns1 = null;
|
||||
|
||||
@Column(name="ip6Dns2")
|
||||
private String ip6Dns2 = null;
|
||||
|
||||
@Column(name="internal_dns1")
|
||||
private String internalDns1 = null;
|
||||
|
||||
@Column(name="internal_dns2")
|
||||
private String internalDns2 = null;
|
||||
|
||||
@Column(name="router_mac_address", updatable = false, nullable=false)
|
||||
private String routerMacAddress = "02:00:00:00:00:01";
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name="data_center")
|
||||
public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Column(name="id")
|
||||
private long id;
|
||||
|
||||
@Column(name="name")
|
||||
private String name = null;
|
||||
|
||||
@Column(name="description")
|
||||
private String description = null;
|
||||
|
||||
@Column(name="dns1")
|
||||
private String dns1 = null;
|
||||
|
||||
@Column(name="dns2")
|
||||
private String dns2 = null;
|
||||
|
||||
@Column(name="ip6Dns1")
|
||||
private String ip6Dns1 = null;
|
||||
|
||||
@Column(name="ip6Dns2")
|
||||
private String ip6Dns2 = null;
|
||||
|
||||
@Column(name="internal_dns1")
|
||||
private String internalDns1 = null;
|
||||
|
||||
@Column(name="internal_dns2")
|
||||
private String internalDns2 = null;
|
||||
|
||||
@Column(name="router_mac_address", updatable = false, nullable=false)
|
||||
private String routerMacAddress = "02:00:00:00:00:01";
|
||||
|
||||
@Column(name="guest_network_cidr")
|
||||
private String guestNetworkCidr = null;
|
||||
|
||||
|
|
@ -207,13 +207,13 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
|||
}
|
||||
|
||||
public EngineDataCenterVO(long id, String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix) {
|
||||
this(name, description, dns1, dns2, dns3, dns4, guestCidr, domain, domainId, zoneType, zoneToken, domainSuffix, false, false, null, null);
|
||||
this(name, description, dns1, dns2, dns3, dns4, guestCidr, domain, domainId, zoneType, zoneToken, domainSuffix, false, false, null, null);
|
||||
this.id = id;
|
||||
this.allocationState = Grouping.AllocationState.Enabled;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
public EngineDataCenterVO(String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix, boolean securityGroupEnabled, boolean localStorageEnabled, String ip6Dns1, String ip6Dns2) {
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
public EngineDataCenterVO(String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix, boolean securityGroupEnabled, boolean localStorageEnabled, String ip6Dns1, String ip6Dns2) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.dns1 = dns1;
|
||||
|
|
@ -285,72 +285,72 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
|||
|
||||
public void setDomainId(Long domainId) {
|
||||
this.domainId = domainId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getRouterMacAddress() {
|
||||
return routerMacAddress;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getRouterMacAddress() {
|
||||
return routerMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDns1() {
|
||||
return dns1;
|
||||
}
|
||||
|
||||
public String getDns1() {
|
||||
return dns1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDns2() {
|
||||
return dns2;
|
||||
}
|
||||
|
||||
public String getDns2() {
|
||||
return dns2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInternalDns1() {
|
||||
return internalDns1;
|
||||
}
|
||||
|
||||
public String getInternalDns1() {
|
||||
return internalDns1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInternalDns2() {
|
||||
return internalDns2;
|
||||
}
|
||||
|
||||
protected EngineDataCenterVO() {
|
||||
}
|
||||
|
||||
public String getInternalDns2() {
|
||||
return internalDns2;
|
||||
}
|
||||
|
||||
protected EngineDataCenterVO() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDns1(String dns1) {
|
||||
this.dns1 = dns1;
|
||||
}
|
||||
|
||||
public void setDns2(String dns2) {
|
||||
this.dns2 = dns2;
|
||||
}
|
||||
|
||||
public void setInternalDns1(String dns3) {
|
||||
this.internalDns1 = dns3;
|
||||
}
|
||||
|
||||
public void setInternalDns2(String dns4) {
|
||||
this.internalDns2 = dns4;
|
||||
}
|
||||
|
||||
public void setRouterMacAddress(String routerMacAddress) {
|
||||
this.routerMacAddress = routerMacAddress;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDns1(String dns1) {
|
||||
this.dns1 = dns1;
|
||||
}
|
||||
|
||||
public void setDns2(String dns2) {
|
||||
this.dns2 = dns2;
|
||||
}
|
||||
|
||||
public void setInternalDns1(String dns3) {
|
||||
this.internalDns1 = dns3;
|
||||
}
|
||||
|
||||
public void setInternalDns2(String dns4) {
|
||||
this.internalDns2 = dns4;
|
||||
}
|
||||
|
||||
public void setRouterMacAddress(String routerMacAddress) {
|
||||
this.routerMacAddress = routerMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -501,4 +501,4 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
|||
public void setIp6Dns2(String ip6Dns2) {
|
||||
this.ip6Dns2 = ip6Dns2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
|
||||
public interface EngineHost extends Host {
|
||||
|
||||
}
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
|
||||
public interface EngineHost extends Host {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
// 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.
|
||||
//
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -34,42 +34,42 @@ import com.cloud.org.Grouping;
|
|||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
import com.cloud.utils.db.StateMachine;
|
||||
|
||||
@Entity
|
||||
@Table(name = "host_pod_ref")
|
||||
public class EngineHostPodVO implements EnginePod, Identity {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
long id;
|
||||
|
||||
@Column(name = "name")
|
||||
private String name = null;
|
||||
|
||||
@Column(name = "data_center_id")
|
||||
|
||||
@Entity
|
||||
@Table(name = "host_pod_ref")
|
||||
public class EngineHostPodVO implements EnginePod, Identity {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
long id;
|
||||
|
||||
@Column(name = "name")
|
||||
private String name = null;
|
||||
|
||||
@Column(name = "data_center_id")
|
||||
private long dataCenterId;
|
||||
|
||||
@Column(name = "gateway")
|
||||
private String gateway;
|
||||
|
||||
@Column(name = "cidr_address")
|
||||
private String cidrAddress;
|
||||
|
||||
@Column(name = "cidr_size")
|
||||
private int cidrSize;
|
||||
|
||||
@Column(name = "description")
|
||||
private String gateway;
|
||||
|
||||
@Column(name = "cidr_address")
|
||||
private String cidrAddress;
|
||||
|
||||
@Column(name = "cidr_size")
|
||||
private int cidrSize;
|
||||
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
@Column(name="allocation_state")
|
||||
@Enumerated(value=EnumType.STRING)
|
||||
AllocationState allocationState;
|
||||
AllocationState allocationState;
|
||||
|
||||
@Column(name = "external_dhcp")
|
||||
private Boolean externalDhcp;
|
||||
|
||||
@Column(name=GenericDao.REMOVED_COLUMN)
|
||||
private Date removed;
|
||||
|
||||
|
||||
@Column(name = "uuid")
|
||||
private String uuid;
|
||||
|
||||
|
|
@ -93,66 +93,66 @@ public class EngineHostPodVO implements EnginePod, Identity {
|
|||
@StateMachine(state=State.class, event=Event.class)
|
||||
@Column(name="engine_state", updatable=true, nullable=false, length=32)
|
||||
protected State engineState = null;
|
||||
|
||||
public EngineHostPodVO(String name, long dcId, String gateway, String cidrAddress, int cidrSize, String description) {
|
||||
this.name = name;
|
||||
|
||||
public EngineHostPodVO(String name, long dcId, String gateway, String cidrAddress, int cidrSize, String description) {
|
||||
this.name = name;
|
||||
this.dataCenterId = dcId;
|
||||
this.gateway = gateway;
|
||||
this.cidrAddress = cidrAddress;
|
||||
this.cidrSize = cidrSize;
|
||||
this.gateway = gateway;
|
||||
this.cidrAddress = cidrAddress;
|
||||
this.cidrSize = cidrSize;
|
||||
this.description = description;
|
||||
this.allocationState = Grouping.AllocationState.Enabled;
|
||||
this.externalDhcp = false;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.engineState = State.Disabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* public HostPodVO(String name, long dcId) { this(null, name, dcId); }
|
||||
*/
|
||||
protected EngineHostPodVO() {
|
||||
this.engineState = State.Disabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* public HostPodVO(String name, long dcId) { this(null, name, dcId); }
|
||||
*/
|
||||
protected EngineHostPodVO() {
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDataCenterId() {
|
||||
return dataCenterId;
|
||||
}
|
||||
|
||||
public void setDataCenterId(long dataCenterId) {
|
||||
this.dataCenterId = dataCenterId;
|
||||
}
|
||||
|
||||
public long getDataCenterId() {
|
||||
return dataCenterId;
|
||||
}
|
||||
|
||||
public void setDataCenterId(long dataCenterId) {
|
||||
this.dataCenterId = dataCenterId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCidrAddress() {
|
||||
return cidrAddress;
|
||||
}
|
||||
|
||||
public void setCidrAddress(String cidrAddress) {
|
||||
this.cidrAddress = cidrAddress;
|
||||
}
|
||||
|
||||
public String getCidrAddress() {
|
||||
return cidrAddress;
|
||||
}
|
||||
|
||||
public void setCidrAddress(String cidrAddress) {
|
||||
this.cidrAddress = cidrAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCidrSize() {
|
||||
return cidrSize;
|
||||
}
|
||||
|
||||
public void setCidrSize(int cidrSize) {
|
||||
this.cidrSize = cidrSize;
|
||||
public int getCidrSize() {
|
||||
return cidrSize;
|
||||
}
|
||||
|
||||
public void setCidrSize(int cidrSize) {
|
||||
this.cidrSize = cidrSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -162,15 +162,15 @@ public class EngineHostPodVO implements EnginePod, Identity {
|
|||
|
||||
public void setGateway(String gateway) {
|
||||
this.gateway = gateway;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -241,5 +241,5 @@ public class EngineHostPodVO implements EnginePod, Identity {
|
|||
|
||||
public State getState() {
|
||||
return engineState;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.dc.Pod;
|
||||
|
||||
public interface EnginePod extends Pod {
|
||||
|
||||
}
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import com.cloud.dc.Pod;
|
||||
|
||||
public interface EnginePod extends Pod {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,4 +82,4 @@ public interface EngineHostDao extends GenericDao<EngineHostVO, Long>, StateDao<
|
|||
* @return
|
||||
*/
|
||||
List<EngineHostVO> listAllUpAndEnabledNonHAHosts(Type type, Long clusterId, Long podId, long dcId, String haTag);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
// 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.
|
||||
//
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -21,13 +21,13 @@ import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
|||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
import com.cloud.utils.fsm.StateDao;
|
||||
|
||||
public interface EngineHostPodDao extends GenericDao<EngineHostPodVO, Long>, StateDao<DataCenterResourceEntity.State, DataCenterResourceEntity.State.Event, DataCenterResourceEntity> {
|
||||
public List<EngineHostPodVO> listByDataCenterId(long id);
|
||||
|
||||
public EngineHostPodVO findByName(String name, long dcId);
|
||||
|
||||
|
||||
public interface EngineHostPodDao extends GenericDao<EngineHostPodVO, Long>, StateDao<DataCenterResourceEntity.State, DataCenterResourceEntity.State.Event, DataCenterResourceEntity> {
|
||||
public List<EngineHostPodVO> listByDataCenterId(long id);
|
||||
|
||||
public EngineHostPodVO findByName(String name, long dcId);
|
||||
|
||||
public HashMap<Long, List<Object>> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip);
|
||||
|
||||
public List<Long> listDisabledPods(long zoneId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
// 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.
|
||||
//
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
package org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
|
@ -39,27 +39,27 @@ import com.cloud.utils.db.UpdateBuilder;
|
|||
import com.cloud.utils.db.SearchCriteria.Op;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
|
||||
@Component(value="EngineHostPodDao")
|
||||
@Local(value={EngineHostPodDao.class})
|
||||
public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long> implements EngineHostPodDao {
|
||||
private static final Logger s_logger = Logger.getLogger(EngineHostPodDaoImpl.class);
|
||||
|
||||
protected SearchBuilder<EngineHostPodVO> DataCenterAndNameSearch;
|
||||
@Component(value="EngineHostPodDao")
|
||||
@Local(value={EngineHostPodDao.class})
|
||||
public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long> implements EngineHostPodDao {
|
||||
private static final Logger s_logger = Logger.getLogger(EngineHostPodDaoImpl.class);
|
||||
|
||||
protected SearchBuilder<EngineHostPodVO> DataCenterAndNameSearch;
|
||||
protected SearchBuilder<EngineHostPodVO> DataCenterIdSearch;
|
||||
protected SearchBuilder<EngineHostPodVO> UUIDSearch;
|
||||
protected SearchBuilder<EngineHostPodVO> StateChangeSearch;
|
||||
|
||||
protected EngineHostPodDaoImpl() {
|
||||
DataCenterAndNameSearch = createSearchBuilder();
|
||||
DataCenterAndNameSearch.and("dc", DataCenterAndNameSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
DataCenterAndNameSearch.and("name", DataCenterAndNameSearch.entity().getName(), SearchCriteria.Op.EQ);
|
||||
DataCenterAndNameSearch.done();
|
||||
|
||||
DataCenterIdSearch = createSearchBuilder();
|
||||
DataCenterIdSearch.and("dcId", DataCenterIdSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
protected SearchBuilder<EngineHostPodVO> StateChangeSearch;
|
||||
|
||||
protected EngineHostPodDaoImpl() {
|
||||
DataCenterAndNameSearch = createSearchBuilder();
|
||||
DataCenterAndNameSearch.and("dc", DataCenterAndNameSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
DataCenterAndNameSearch.and("name", DataCenterAndNameSearch.entity().getName(), SearchCriteria.Op.EQ);
|
||||
DataCenterAndNameSearch.done();
|
||||
|
||||
DataCenterIdSearch = createSearchBuilder();
|
||||
DataCenterIdSearch.and("dcId", DataCenterIdSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
DataCenterIdSearch.done();
|
||||
|
||||
|
||||
|
||||
|
||||
UUIDSearch = createSearchBuilder();
|
||||
UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ);
|
||||
UUIDSearch.done();
|
||||
|
|
@ -67,56 +67,56 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
|||
StateChangeSearch = createSearchBuilder();
|
||||
StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ);
|
||||
StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ);
|
||||
StateChangeSearch.done();
|
||||
|
||||
}
|
||||
|
||||
StateChangeSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EngineHostPodVO> listByDataCenterId(long id) {
|
||||
SearchCriteria<EngineHostPodVO> sc = DataCenterIdSearch.create();
|
||||
sc.setParameters("dcId", id);
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
public List<EngineHostPodVO> listByDataCenterId(long id) {
|
||||
SearchCriteria<EngineHostPodVO> sc = DataCenterIdSearch.create();
|
||||
sc.setParameters("dcId", id);
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineHostPodVO findByName(String name, long dcId) {
|
||||
SearchCriteria<EngineHostPodVO> sc = DataCenterAndNameSearch.create();
|
||||
sc.setParameters("dc", dcId);
|
||||
sc.setParameters("name", name);
|
||||
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<Long, List<Object>> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip) {
|
||||
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
||||
|
||||
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
try {
|
||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
Long podId = rs.getLong("id");
|
||||
if (podId.longValue() == podIdToSkip) {
|
||||
public EngineHostPodVO findByName(String name, long dcId) {
|
||||
SearchCriteria<EngineHostPodVO> sc = DataCenterAndNameSearch.create();
|
||||
sc.setParameters("dc", dcId);
|
||||
sc.setParameters("name", name);
|
||||
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<Long, List<Object>> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip) {
|
||||
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
||||
|
||||
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
try {
|
||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
Long podId = rs.getLong("id");
|
||||
if (podId.longValue() == podIdToSkip) {
|
||||
continue;
|
||||
}
|
||||
String cidrAddress = rs.getString("cidr_address");
|
||||
long cidrSize = rs.getLong("cidr_size");
|
||||
List<Object> cidrPair = new ArrayList<Object>();
|
||||
cidrPair.add(0, cidrAddress);
|
||||
cidrPair.add(1, new Long(cidrSize));
|
||||
currentPodCidrSubnets.put(podId, cidrPair);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
s_logger.warn("DB exception " + ex.getMessage(), ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
return currentPodCidrSubnets;
|
||||
}
|
||||
|
||||
}
|
||||
String cidrAddress = rs.getString("cidr_address");
|
||||
long cidrSize = rs.getLong("cidr_size");
|
||||
List<Object> cidrPair = new ArrayList<Object>();
|
||||
cidrPair.add(0, cidrAddress);
|
||||
cidrPair.add(1, new Long(cidrSize));
|
||||
currentPodCidrSubnets.put(podId, cidrPair);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
s_logger.warn("DB exception " + ex.getMessage(), ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
return currentPodCidrSubnets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Long id) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
|
@ -179,6 +179,6 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
|||
return rows > 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,170 +1,170 @@
|
|||
/*
|
||||
* 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 org.apache.cloudstack.engine.service.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManager;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntityImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.storage.StoragePool;
|
||||
|
||||
|
||||
@Component
|
||||
@Service("provisioningService")
|
||||
@Path("/provisioning")
|
||||
public class ProvisioningServiceImpl implements ProvisioningService {
|
||||
|
||||
@Inject
|
||||
DataCenterResourceManager manager;
|
||||
|
||||
@Override
|
||||
public StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZoneEntity registerZone(String zoneUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
ZoneEntityImpl zoneEntity = new ZoneEntityImpl(zoneUuid, manager);
|
||||
zoneEntity.setName(name);
|
||||
zoneEntity.setOwner(owner);
|
||||
zoneEntity.setDetails(details);
|
||||
zoneEntity.persist();
|
||||
return zoneEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PodEntity registerPod(String podUuid, String name, String owner, String zoneUuid, List<String> tags, Map<String, String> details) {
|
||||
PodEntityImpl podEntity = new PodEntityImpl(podUuid, manager);
|
||||
podEntity.setOwner(owner);
|
||||
podEntity.setName(name);
|
||||
podEntity.persist();
|
||||
return podEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterEntity registerCluster(String clusterUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
ClusterEntityImpl clusterEntity = new ClusterEntityImpl(clusterUuid, manager);
|
||||
clusterEntity.setOwner(owner);
|
||||
clusterEntity.setName(name);
|
||||
clusterEntity.persist();
|
||||
return clusterEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostEntity registerHost(String hostUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
HostEntityImpl hostEntity = new HostEntityImpl(hostUuid, manager);
|
||||
hostEntity.setOwner(owner);
|
||||
hostEntity.setName(name);
|
||||
hostEntity.setDetails(details);
|
||||
|
||||
hostEntity.persist();
|
||||
return hostEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterStorage(String uuid) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterZone(String uuid) {
|
||||
ZoneEntityImpl zoneEntity = new ZoneEntityImpl(uuid, manager);
|
||||
zoneEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterPod(String uuid) {
|
||||
PodEntityImpl podEntity = new PodEntityImpl(uuid, manager);
|
||||
podEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterCluster(String uuid) {
|
||||
ClusterEntityImpl clusterEntity = new ClusterEntityImpl(uuid, manager);
|
||||
clusterEntity.disable();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterHost(String uuid) {
|
||||
HostEntityImpl hostEntity = new HostEntityImpl(uuid, manager);
|
||||
hostEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeState(String type, String entity, Status state) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Host> listHosts() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PodEntity> listPods() {
|
||||
List<PodEntity> pods = new ArrayList<PodEntity>();
|
||||
//pods.add(new PodEntityImpl("pod-uuid-1", "pod1"));
|
||||
//pods.add(new PodEntityImpl("pod-uuid-2", "pod2"));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZoneEntity> listZones() {
|
||||
List<ZoneEntity> zones = new ArrayList<ZoneEntity>();
|
||||
//zones.add(new ZoneEntityImpl("zone-uuid-1"));
|
||||
//zones.add(new ZoneEntityImpl("zone-uuid-2"));
|
||||
return zones;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StoragePool> listStorage() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZoneEntity getZone(String uuid) {
|
||||
ZoneEntityImpl impl = new ZoneEntityImpl(uuid, manager);
|
||||
return impl;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 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 org.apache.cloudstack.engine.service.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManager;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntityImpl;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntityImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.storage.StoragePool;
|
||||
|
||||
|
||||
@Component
|
||||
@Service("provisioningService")
|
||||
@Path("/provisioning")
|
||||
public class ProvisioningServiceImpl implements ProvisioningService {
|
||||
|
||||
@Inject
|
||||
DataCenterResourceManager manager;
|
||||
|
||||
@Override
|
||||
public StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZoneEntity registerZone(String zoneUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
ZoneEntityImpl zoneEntity = new ZoneEntityImpl(zoneUuid, manager);
|
||||
zoneEntity.setName(name);
|
||||
zoneEntity.setOwner(owner);
|
||||
zoneEntity.setDetails(details);
|
||||
zoneEntity.persist();
|
||||
return zoneEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PodEntity registerPod(String podUuid, String name, String owner, String zoneUuid, List<String> tags, Map<String, String> details) {
|
||||
PodEntityImpl podEntity = new PodEntityImpl(podUuid, manager);
|
||||
podEntity.setOwner(owner);
|
||||
podEntity.setName(name);
|
||||
podEntity.persist();
|
||||
return podEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterEntity registerCluster(String clusterUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
ClusterEntityImpl clusterEntity = new ClusterEntityImpl(clusterUuid, manager);
|
||||
clusterEntity.setOwner(owner);
|
||||
clusterEntity.setName(name);
|
||||
clusterEntity.persist();
|
||||
return clusterEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostEntity registerHost(String hostUuid, String name, String owner, List<String> tags, Map<String, String> details) {
|
||||
HostEntityImpl hostEntity = new HostEntityImpl(hostUuid, manager);
|
||||
hostEntity.setOwner(owner);
|
||||
hostEntity.setName(name);
|
||||
hostEntity.setDetails(details);
|
||||
|
||||
hostEntity.persist();
|
||||
return hostEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterStorage(String uuid) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterZone(String uuid) {
|
||||
ZoneEntityImpl zoneEntity = new ZoneEntityImpl(uuid, manager);
|
||||
zoneEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterPod(String uuid) {
|
||||
PodEntityImpl podEntity = new PodEntityImpl(uuid, manager);
|
||||
podEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterCluster(String uuid) {
|
||||
ClusterEntityImpl clusterEntity = new ClusterEntityImpl(uuid, manager);
|
||||
clusterEntity.disable();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deregisterHost(String uuid) {
|
||||
HostEntityImpl hostEntity = new HostEntityImpl(uuid, manager);
|
||||
hostEntity.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeState(String type, String entity, Status state) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Host> listHosts() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PodEntity> listPods() {
|
||||
List<PodEntity> pods = new ArrayList<PodEntity>();
|
||||
//pods.add(new PodEntityImpl("pod-uuid-1", "pod1"));
|
||||
//pods.add(new PodEntityImpl("pod-uuid-2", "pod2"));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZoneEntity> listZones() {
|
||||
List<ZoneEntity> zones = new ArrayList<ZoneEntity>();
|
||||
//zones.add(new ZoneEntityImpl("zone-uuid-1"));
|
||||
//zones.add(new ZoneEntityImpl("zone-uuid-2"));
|
||||
return zones;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StoragePool> listStorage() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZoneEntity getZone(String uuid) {
|
||||
ZoneEntityImpl impl = new ZoneEntityImpl(uuid, manager);
|
||||
return impl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,124 +14,124 @@
|
|||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.apache.cloudstack.engine.provisioning.test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations="classpath:/resource/provisioningContext.xml")
|
||||
public class ProvisioningTest extends TestCase {
|
||||
|
||||
@Inject
|
||||
ProvisioningService service;
|
||||
|
||||
@Inject
|
||||
EngineDataCenterDao dcDao;
|
||||
|
||||
@Inject
|
||||
EngineHostPodDao _podDao;
|
||||
|
||||
@Inject
|
||||
EngineClusterDao _clusterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostDao _hostDao;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
EngineDataCenterVO dc = new EngineDataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24",
|
||||
null, null, NetworkType.Basic, null, null, true, true, null, null);
|
||||
Mockito.when(dcDao.findByUuid(Mockito.anyString())).thenReturn(dc);
|
||||
Mockito.when(dcDao.persist((EngineDataCenterVO) Mockito.anyObject())).thenReturn(dc);
|
||||
|
||||
EngineHostPodVO pod = new EngineHostPodVO("lab", 123, "10.0.0.1", "10.0.0.1", 24, "test");
|
||||
Mockito.when(_podDao.findByUuid(Mockito.anyString())).thenReturn(pod);
|
||||
Mockito.when(_podDao.persist((EngineHostPodVO) Mockito.anyObject())).thenReturn(pod);
|
||||
|
||||
EngineClusterVO cluster = new EngineClusterVO();
|
||||
Mockito.when(_clusterDao.findByUuid(Mockito.anyString())).thenReturn(cluster);
|
||||
Mockito.when(_clusterDao.persist((EngineClusterVO) Mockito.anyObject())).thenReturn(cluster);
|
||||
|
||||
EngineHostVO host = new EngineHostVO("68765876598");
|
||||
Mockito.when(_hostDao.findByUuid(Mockito.anyString())).thenReturn(host);
|
||||
Mockito.when(_hostDao.persist((EngineHostVO) Mockito.anyObject())).thenReturn(host);
|
||||
|
||||
}
|
||||
|
||||
private void registerAndEnableZone() {
|
||||
ZoneEntity zone = service.registerZone("47547648", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = zone.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = zone.enable();
|
||||
System.out.println("result:"+result);
|
||||
|
||||
}
|
||||
|
||||
private void registerAndEnablePod() {
|
||||
PodEntity pod = service.registerPod("47547648", "lab","owner", "8709874074", null, new HashMap<String, String>());
|
||||
State state = pod.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = pod.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
private void registerAndEnableCluster() {
|
||||
ClusterEntity cluster = service.registerCluster("1265476542", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = cluster.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = cluster.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
private void registerAndEnableHost() {
|
||||
HostEntity host = service.registerHost("1265476542", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = host.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = host.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProvisioning() {
|
||||
registerAndEnableZone();
|
||||
registerAndEnablePod();
|
||||
registerAndEnableCluster();
|
||||
registerAndEnableHost();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.apache.cloudstack.engine.provisioning.test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao;
|
||||
import org.apache.cloudstack.engine.service.api.ProvisioningService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
|
||||
|
||||
import com.cloud.dc.DataCenter.NetworkType;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations="classpath:/resource/provisioningContext.xml")
|
||||
public class ProvisioningTest extends TestCase {
|
||||
|
||||
@Inject
|
||||
ProvisioningService service;
|
||||
|
||||
@Inject
|
||||
EngineDataCenterDao dcDao;
|
||||
|
||||
@Inject
|
||||
EngineHostPodDao _podDao;
|
||||
|
||||
@Inject
|
||||
EngineClusterDao _clusterDao;
|
||||
|
||||
@Inject
|
||||
EngineHostDao _hostDao;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
EngineDataCenterVO dc = new EngineDataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24",
|
||||
null, null, NetworkType.Basic, null, null, true, true, null, null);
|
||||
Mockito.when(dcDao.findByUuid(Mockito.anyString())).thenReturn(dc);
|
||||
Mockito.when(dcDao.persist((EngineDataCenterVO) Mockito.anyObject())).thenReturn(dc);
|
||||
|
||||
EngineHostPodVO pod = new EngineHostPodVO("lab", 123, "10.0.0.1", "10.0.0.1", 24, "test");
|
||||
Mockito.when(_podDao.findByUuid(Mockito.anyString())).thenReturn(pod);
|
||||
Mockito.when(_podDao.persist((EngineHostPodVO) Mockito.anyObject())).thenReturn(pod);
|
||||
|
||||
EngineClusterVO cluster = new EngineClusterVO();
|
||||
Mockito.when(_clusterDao.findByUuid(Mockito.anyString())).thenReturn(cluster);
|
||||
Mockito.when(_clusterDao.persist((EngineClusterVO) Mockito.anyObject())).thenReturn(cluster);
|
||||
|
||||
EngineHostVO host = new EngineHostVO("68765876598");
|
||||
Mockito.when(_hostDao.findByUuid(Mockito.anyString())).thenReturn(host);
|
||||
Mockito.when(_hostDao.persist((EngineHostVO) Mockito.anyObject())).thenReturn(host);
|
||||
|
||||
}
|
||||
|
||||
private void registerAndEnableZone() {
|
||||
ZoneEntity zone = service.registerZone("47547648", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = zone.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = zone.enable();
|
||||
System.out.println("result:"+result);
|
||||
|
||||
}
|
||||
|
||||
private void registerAndEnablePod() {
|
||||
PodEntity pod = service.registerPod("47547648", "lab","owner", "8709874074", null, new HashMap<String, String>());
|
||||
State state = pod.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = pod.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
private void registerAndEnableCluster() {
|
||||
ClusterEntity cluster = service.registerCluster("1265476542", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = cluster.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = cluster.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
private void registerAndEnableHost() {
|
||||
HostEntity host = service.registerHost("1265476542", "lab","owner", null, new HashMap<String, String>());
|
||||
State state = host.getState();
|
||||
System.out.println("state:"+state);
|
||||
boolean result = host.enable();
|
||||
System.out.println("result:"+result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProvisioning() {
|
||||
registerAndEnableZone();
|
||||
registerAndEnablePod();
|
||||
registerAndEnableCluster();
|
||||
registerAndEnableHost();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue