mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into vmsync
Conflicts: plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImgException.java server/src/com/cloud/async/AsyncJobManagerImpl.java server/src/com/cloud/async/SyncQueueManager.java server/src/com/cloud/hypervisor/kvm/discoverer/LxcServerDiscoverer.java server/src/com/cloud/storage/VolumeManagerImpl.java utils/src/com/cloud/utils/component/AdapterList.java
This commit is contained in:
commit
2ee8fd2152
|
|
@ -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
|
||||
|
|
|
|||
64
LICENSE
64
LICENSE
|
|
@ -180,70 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation
|
|||
|
||||
|
||||
This distribution contains third party resources.
|
||||
Within the . directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the awsapi directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the console-proxy/js directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@ public class EventTypes {
|
|||
//registering SSH keypair events
|
||||
public static final String EVENT_REGISTER_SSH_KEYPAIR = "REGISTER.SSH.KEYPAIR";
|
||||
|
||||
//register for user API and secret keys
|
||||
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
|
||||
|
||||
// Template Events
|
||||
public static final String EVENT_TEMPLATE_CREATE = "TEMPLATE.CREATE";
|
||||
public static final String EVENT_TEMPLATE_DELETE = "TEMPLATE.DELETE";
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,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;
|
||||
|
|
@ -132,6 +133,7 @@ public abstract class BaseCmd {
|
|||
@Inject public NetworkUsageService _networkUsageService;
|
||||
@Inject public VMSnapshotService _vmSnapshotService;
|
||||
@Inject public DataStoreProviderApiService dataStoreProviderApiService;
|
||||
@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);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class ListGlobalLoadBalancerRuleCmd extends BaseListTaggedResourcesCmd {
|
|||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, description = "the ID of the global load balancer rule")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.REGION_ID, type = CommandType.UUID, entityType = RegionResponse.class, description = "region ID")
|
||||
@Parameter(name = ApiConstants.REGION_ID, type = CommandType.INTEGER, entityType = RegionResponse.class, description = "region ID")
|
||||
private Integer regionId;
|
||||
|
||||
// ///////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -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>();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
119
client/pom.xml
119
client/pom.xml
|
|
@ -65,16 +65,6 @@
|
|||
<artifactId>cloud-plugin-network-nvp</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-network-ovs</artifactId>
|
||||
|
|
@ -90,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>
|
||||
|
|
@ -224,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>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
|
|
@ -279,6 +279,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 +326,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 +405,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 +525,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,6 +32,12 @@
|
|||
|
||||
<context:annotation-config />
|
||||
|
||||
<!--=====================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- core OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=====================================================================================================-->
|
||||
|
||||
<!--
|
||||
@DB support
|
||||
-->
|
||||
|
|
@ -379,6 +385,12 @@
|
|||
<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
|
||||
|
|
@ -499,6 +511,10 @@
|
|||
<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>
|
||||
|
|
@ -568,6 +584,10 @@
|
|||
<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>
|
||||
|
|
@ -578,7 +598,55 @@
|
|||
|
||||
<!--
|
||||
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" />
|
||||
|
|
@ -637,9 +705,97 @@
|
|||
<bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
|
||||
<bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl" />
|
||||
|
||||
<!--
|
||||
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="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" />
|
||||
|
||||
|
||||
<!--=======================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- Module-basis OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=======================================================================================================-->
|
||||
|
||||
<!--
|
||||
Baremetal components
|
||||
-->
|
||||
|
||||
<!--
|
||||
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
|
||||
<property name="name" value="BareMetalDhcp"/>
|
||||
|
|
@ -675,91 +831,9 @@
|
|||
<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="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" />
|
||||
-->
|
||||
|
||||
<!--
|
||||
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="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" />
|
||||
<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" />
|
||||
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
|
|
@ -30,94 +31,104 @@
|
|||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<!--
|
||||
OSS deployment component configuration
|
||||
-->
|
||||
<!--
|
||||
|
||||
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="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
<bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl" />
|
||||
|
||||
<!--
|
||||
Managers & pluggable adapters configuration under OSS deployment
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
|
||||
|
||||
<!--
|
||||
Nicira support components
|
||||
-->
|
||||
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
|
||||
<property name="UserAuthenticators">
|
||||
<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>
|
||||
|
||||
<!--
|
||||
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>
|
||||
<property name="SecurityCheckers">
|
||||
</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>
|
||||
|
||||
<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">
|
||||
<!-- 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>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
|
||||
<property name="Investigators">
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
|
|
@ -125,7 +136,10 @@
|
|||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="FenceBuilders">
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
|
|
@ -134,28 +148,73 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
|
||||
<property name="HostAllocators">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="Planners">
|
||||
<!-- 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="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
|
||||
<property name="NetworkGurus">
|
||||
<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"/>
|
||||
|
|
@ -166,55 +225,29 @@
|
|||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="NetworkElements">
|
||||
</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>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -32,11 +32,23 @@
|
|||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
|
||||
<!--
|
||||
Non-OSS deployment component configuration
|
||||
-->
|
||||
<!--
|
||||
|
||||
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="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" >
|
||||
<property name="GslbServiceProvider">
|
||||
<ref bean="Netscaler"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
DAO with customized configuration under non-OSS deployment
|
||||
-->
|
||||
|
|
@ -78,6 +90,10 @@
|
|||
<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>
|
||||
|
|
@ -128,73 +144,59 @@
|
|||
<property name="name" value="BigSwitchVnsElement"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managers & pluggable adapters configuration under non-OSS deployment
|
||||
|
||||
<!--
|
||||
Midonet support components
|
||||
-->
|
||||
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
|
||||
<property name="UserAuthenticators">
|
||||
<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>
|
||||
<property name="SecurityCheckers">
|
||||
</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>
|
||||
|
||||
<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">
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
|
|
@ -204,12 +206,13 @@
|
|||
-->
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
<ref bean="vmwareServerDiscoverer"/>
|
||||
</list>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
|
||||
<property name="Investigators">
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
|
|
@ -218,7 +221,10 @@
|
|||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="FenceBuilders">
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
|
|
@ -228,26 +234,73 @@
|
|||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
|
||||
<property name="HostAllocators">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="Planners">
|
||||
<!-- 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="networkManagerImpl" class="com.cloud.network.NetworkManagerImpl" >
|
||||
<property name="NetworkGurus">
|
||||
<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"/>
|
||||
|
|
@ -258,51 +311,21 @@
|
|||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
<property name="NetworkElements">
|
||||
<list>
|
||||
<ref bean="JuniperSRX"/>
|
||||
<ref bean="Netscaler"/>
|
||||
<ref bean="F5BigIP"/>
|
||||
<ref bean="CiscoNexus1000vVSM"/>
|
||||
<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>
|
||||
<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"/>
|
||||
-->
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
|
||||
<property name="NetworkElements">
|
||||
|
||||
<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"/>
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -1,231 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!-- Note: A "Server" is not itself a "Container", so you may not
|
||||
define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/server.html
|
||||
-->
|
||||
<Server port="8005" shutdown="SHUTDOWN">
|
||||
|
||||
<!--APR library loader. Documentation at /docs/apr.html -->
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
||||
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
|
||||
<Listener className="org.apache.catalina.core.JasperListener" />
|
||||
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
|
||||
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||
|
||||
<!-- Global JNDI resources
|
||||
Documentation at /docs/jndi-resources-howto.html
|
||||
-->
|
||||
<GlobalNamingResources>
|
||||
<!-- Editable user database that can also be used by
|
||||
UserDatabaseRealm to authenticate users
|
||||
-->
|
||||
<Resource name="UserDatabase" auth="Container"
|
||||
type="org.apache.catalina.UserDatabase"
|
||||
description="User database that can be updated and saved"
|
||||
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
||||
pathname="conf/tomcat-users.xml" />
|
||||
</GlobalNamingResources>
|
||||
|
||||
<!-- A "Service" is a collection of one or more "Connectors" that share
|
||||
a single "Container" Note: A "Service" is not itself a "Container",
|
||||
so you may not define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/service.html
|
||||
-->
|
||||
<Service name="Catalina">
|
||||
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
||||
maxThreads="150" minSpareThreads="25"/>
|
||||
|
||||
|
||||
<!-- A "Connector" represents an endpoint by which requests are received
|
||||
and responses are returned. Documentation at :
|
||||
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
|
||||
Java AJP Connector: /docs/config/ajp.html
|
||||
APR (HTTP/AJP) Connector: /docs/apr.html
|
||||
Define a non-SSL HTTP/1.1 Connector on port 8080
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443" />
|
||||
-->
|
||||
<!-- A "Connector" using the shared thread pool-->
|
||||
<Connector executor="tomcatThreadPool" URIEncoding="UTF-8"
|
||||
port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
connectionTimeout="20000" disableUploadTimeout="true"
|
||||
acceptCount="150" enableLookups="false" maxThreads="150"
|
||||
maxHttpHeaderSize="8192" redirectPort="8443" />
|
||||
|
||||
|
||||
<!-- Define a SSL HTTP/1.1 Connector on port 8443
|
||||
This connector uses the JSSE configuration, when using APR, the
|
||||
connector should be using the OpenSSL style configuration
|
||||
described in the APR documentation -->
|
||||
<!--
|
||||
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
|
||||
maxThreads="150" scheme="https" secure="true"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="PKCS12"
|
||||
keystoreFile="conf\cloud-localhost.pk12"
|
||||
keystorePass="password"
|
||||
/>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
<Connector port="20400" protocol="AJP/1.3" redirectPort="8443" />
|
||||
|
||||
|
||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||
every request. The Engine implementation for Tomcat stand alone
|
||||
analyzes the HTTP headers included with the request, and passes them
|
||||
on to the appropriate Host (virtual host).
|
||||
Documentation at /docs/config/engine.html -->
|
||||
|
||||
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
||||
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
||||
-->
|
||||
<Engine name="Catalina" defaultHost="localhost">
|
||||
|
||||
<!--For clustering, please take a look at documentation at:
|
||||
/docs/cluster-howto.html (simple how to)
|
||||
/docs/config/cluster.html (reference documentation) -->
|
||||
<!--
|
||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||
-->
|
||||
|
||||
<!-- The request dumper valve dumps useful debugging information about
|
||||
the request and response data received and sent by Tomcat.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
|
||||
-->
|
||||
|
||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||
resources under the key "UserDatabase". Any edits
|
||||
that are performed against this UserDatabase are immediately
|
||||
available for use by the Realm. -->
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||
resourceName="UserDatabase"/>
|
||||
|
||||
<!-- Define the default virtual host
|
||||
Note: XML Schema validation will not work with Xerces 2.2.
|
||||
-->
|
||||
<Host name="localhost" appBase="webapps"
|
||||
unpackWARs="true" autoDeploy="true"
|
||||
xmlValidation="false" xmlNamespaceAware="false">
|
||||
|
||||
<!-- SingleSignOn valve, share authentication between web applications
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||
-->
|
||||
|
||||
<!-- Access log processes all example.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
|
||||
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
|
||||
|
||||
<Service name="Catalina7080">
|
||||
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<Executor name="tomcatThreadPool-internal" namePrefix="catalina-exec-int-"
|
||||
maxThreads="150" minSpareThreads="25"/>
|
||||
|
||||
<Connector executor="tomcatThreadPool-internal" URIEncoding="UTF-8"
|
||||
port="7080" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
connectionTimeout="20000" disableUploadTimeout="true"
|
||||
acceptCount="150" enableLookups="false" maxThreads="150"
|
||||
maxHttpHeaderSize="8192" redirectPort="8443" />
|
||||
|
||||
<!-- Define a SSL HTTP/1.1 Connector on port 8443
|
||||
This connector uses the JSSE configuration, when using APR, the
|
||||
connector should be using the OpenSSL style configuration
|
||||
described in the APR documentation -->
|
||||
<!--
|
||||
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
|
||||
maxThreads="150" scheme="https" secure="true"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="PKCS12"
|
||||
keystoreFile="conf\cloud-localhost.pk12"
|
||||
keystorePass="password"
|
||||
/>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
|
||||
|
||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||
every request. The Engine implementation for Tomcat stand alone
|
||||
analyzes the HTTP headers included with the request, and passes them
|
||||
on to the appropriate Host (virtual host).
|
||||
Documentation at /docs/config/engine.html -->
|
||||
|
||||
<Engine name="Catalina7080" defaultHost="localhost">
|
||||
|
||||
<!--For clustering, please take a look at documentation at:
|
||||
/docs/cluster-howto.html (simple how to)
|
||||
/docs/config/cluster.html (reference documentation) -->
|
||||
<!--
|
||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||
-->
|
||||
|
||||
<!-- The request dumper valve dumps useful debugging information about
|
||||
the request and response data received and sent by Tomcat.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
|
||||
-->
|
||||
|
||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||
resources under the key "UserDatabase". Any edits
|
||||
that are performed against this UserDatabase are immediately
|
||||
available for use by the Realm. -->
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||
resourceName="UserDatabase"/>
|
||||
|
||||
<!-- Define the default virtual host
|
||||
Note: XML Schema validation will not work with Xerces 2.2.
|
||||
-->
|
||||
<Host name="localhost" appBase="webapps7080"
|
||||
unpackWARs="true" autoDeploy="true"
|
||||
xmlValidation="false" xmlNamespaceAware="false">
|
||||
|
||||
<!-- SingleSignOn valve, share authentication between web applications
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||
-->
|
||||
|
||||
<!-- Access log processes all example.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
|
||||
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
|
||||
</Server>
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
|
||||
<!--
|
||||
~ 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="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="SimulatorDiscoverer"/>
|
||||
<ref bean="SimulatorSecondaryDiscoverer"/>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
</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="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="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@"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
# 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
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
/etc/cloudstack/agent/log4j-cloud.xml
|
||||
/etc/init.d/cloudstack-agent
|
||||
/usr/bin/cloudstack-setup-agent
|
||||
/usr/bin/cloud-ssh
|
||||
/usr/bin/cloudstack-ssh
|
||||
/var/log/cloudstack/agent
|
||||
/usr/share/cloudstack-agent/lib/*
|
||||
/usr/share/cloudstack-agent/plugins
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
# 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
|
||||
|
|
@ -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/bin/cloud-set-guest-password
|
||||
/usr/bin/cloud-set-guest-sshkey
|
||||
/usr/share/cloudstack-common/lib/*
|
||||
/usr/bin/cloudstack-set-guest-password
|
||||
/usr/bin/cloudstack-set-guest-sshkey
|
||||
/usr/lib/python2.?/*-packages/*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/etc/cloudstack/server/*
|
||||
/etc/cloudstack/management/*
|
||||
/etc/init.d/cloudstack-management
|
||||
/etc/security/limits.d/cloudstack-limits.conf
|
||||
|
|
@ -26,10 +25,10 @@
|
|||
/var/log/cloudstack/management
|
||||
/var/lib/cloudstack/mnt
|
||||
/var/lib/cloudstack/management
|
||||
/usr/bin/cloud-update-xenserver-licenses
|
||||
/usr/bin/cloud-setup-management
|
||||
/usr/bin/cloud-setup-databases
|
||||
/usr/bin/cloud-migrate-databases
|
||||
/usr/bin/cloudstack-update-xenserver-licenses
|
||||
/usr/bin/cloudstack-setup-management
|
||||
/usr/bin/cloudstack-setup-databases
|
||||
/usr/bin/cloudstack-migrate-databases
|
||||
/usr/bin/cloudstack-setup-encryption
|
||||
/usr/bin/cloudstack-sysvmadm
|
||||
/usr/share/cloudstack-management/*
|
||||
/usr/share/java/*
|
||||
/usr/share/tomcat6/lib/*
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
# 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
|
||||
|
|
@ -20,22 +20,33 @@ 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 \
|
||||
/var/cache/cloudstack/management/work \
|
||||
/var/cache/cloudstack/management/temp \
|
||||
/var/log/cloudstack/management \
|
||||
/etc/cloudstack/management/Catalina \
|
||||
/etc/cloudstack/management/Catalina/localhost \
|
||||
/var/lib/cloudstack/management \
|
||||
/etc/cloudstack/management/Catalina/localhost/client
|
||||
/var/lib/cloudstack/management
|
||||
do
|
||||
chmod 0770 $i
|
||||
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
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ install:
|
|||
install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
|
||||
install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
|
||||
install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloudstack-setup-agent
|
||||
install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloud-ssh
|
||||
install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloudstack-ssh
|
||||
install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
|
||||
|
||||
# cloudstack-management
|
||||
|
|
@ -98,16 +98,15 @@ install:
|
|||
chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/cloudstack
|
||||
|
||||
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
|
||||
ln -s server-nonssl.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/server.xml
|
||||
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
|
||||
install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloudstack-update-xenserver-licenses
|
||||
ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
|
||||
# Remove configuration in /ur/share/cloudstack-management/webapps/client/WEB-INF
|
||||
# This should all be in /etc/cloudstack/management
|
||||
rm $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/WEB-INF/classes/*.*
|
||||
ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
|
||||
ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
|
||||
ln -s ../../java/$(PACKAGE)-server.jar $(DESTDIR)/usr/share/tomcat6/lib/$(PACKAGE)-server.jar
|
||||
ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
|
||||
ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp
|
||||
ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work
|
||||
|
|
@ -116,17 +115,22 @@ 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
|
||||
cp -r scripts/util $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
cp -r scripts/vm $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
|
||||
install -D client/target/utilities/bin/cloud-migrate-databases $(DESTDIR)/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-set-guest-password $(DESTDIR)/usr/bin
|
||||
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 client/target/utilities/bin/cloud-migrate-databases $(DESTDIR)/usr/bin/cloudstack-migrate-databases
|
||||
install -D client/target/utilities/bin/cloud-set-guest-password $(DESTDIR)/usr/bin/cloudstack-set-guest-password
|
||||
install -D client/target/utilities/bin/cloud-set-guest-sshkey $(DESTDIR)/usr/bin/cloudstack-set-guest-sshkey
|
||||
install -D client/target/utilities/bin/cloud-setup-databases $(DESTDIR)/usr/bin/cloudstack-setup-databases
|
||||
install -D client/target/utilities/bin/cloud-setup-management $(DESTDIR)/usr/bin/cloudstack-setup-management
|
||||
install -D client/target/utilities/bin/cloud-setup-encryption $(DESTDIR)/usr/bin/cloudstack-setup-encryption
|
||||
install -D client/target/utilities/bin/cloud-sysvmadm $(DESTDIR)/usr/bin/cloudstack-sysvmadm
|
||||
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
|
||||
|
|
@ -152,10 +156,7 @@ install:
|
|||
binary: install
|
||||
dh_install
|
||||
dh_installchangelogs
|
||||
dh_installdocs LICENSE
|
||||
dh_installdocs DISCLAIMER
|
||||
dh_installdocs NOTICE
|
||||
dh_installdocs INSTALL.md
|
||||
dh_installdocs -A tools/whisker/LICENSE tools/whisker/NOTICE INSTALL.md
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -22,23 +22,26 @@
|
|||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<bookinfo id="book-release-notes-3.0.4">
|
||||
<title>&PRODUCT; Guide</title>
|
||||
<subtitle>Revised August 9, 2012 10:48 pm Pacific</subtitle>
|
||||
<productname>Apache CloudStack</productname>
|
||||
<productnumber>4.0.0</productnumber>
|
||||
<edition>1</edition>
|
||||
<pubsnumber/>
|
||||
<abstract>
|
||||
<para> Complete technical documentation of &PRODUCT;. </para>
|
||||
</abstract>
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"/>
|
||||
</imageobject>
|
||||
</inlinemediaobject>
|
||||
</corpauthor>
|
||||
<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<title>&PRODUCT; Guide</title>
|
||||
<subtitle>Revised August 9, 2012 10:48 pm Pacific</subtitle>
|
||||
<productname>Apache CloudStack</productname>
|
||||
<productnumber>4.0.0-incubating</productnumber>
|
||||
<edition>1</edition>
|
||||
<pubsnumber></pubsnumber>
|
||||
<abstract>
|
||||
<para>
|
||||
Complete technical documentation of &PRODUCT;.
|
||||
</para>
|
||||
</abstract>
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="Common_Content/images/title_logo.svg" format="SVG" />
|
||||
</imageobject>
|
||||
</inlinemediaobject>
|
||||
</corpauthor>
|
||||
<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</bookinfo>
|
||||
|
|
|
|||
|
|
@ -18,14 +18,13 @@
|
|||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<bookinfo id="book-release-notes-4.0">
|
||||
<title>Version 4.0.0-incubating Release Notes</title>
|
||||
<subtitle>Revised October 17, 2012 19:49 UTC</subtitle>
|
||||
<bookinfo id="book-release-notes-4.1">
|
||||
<title>Version 4.1.0 Release Notes</title>
|
||||
<productname>Apache CloudStack</productname>
|
||||
<productnumber/>
|
||||
<pubsnumber/>
|
||||
<abstract>
|
||||
<para>Release notes for the Apache CloudStack 4.0.0-incubating release.</para>
|
||||
<para>Release notes for the Apache CloudStack 4.1.0 release.</para>
|
||||
</abstract>
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
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
|
||||
|
|
@ -50,6 +52,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"/>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -73,105 +73,36 @@
|
|||
<listitem>
|
||||
<para>Provide the following information in the dialog. The fields below make reference to
|
||||
values from vCenter.</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/add-cluster.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>addcluster.png: add a cluster</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<para>There might be a slight delay while the cluster is provisioned. It will automatically
|
||||
display in the UI.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Cluster Name</emphasis>: Enter the name of the cluster you
|
||||
created in vCenter. For example, "cloud.cluster.2.2.1"</para>
|
||||
<para>Cluster Name. Enter the name of the cluster you created in vCenter. For example,
|
||||
"cloud.cluster.2.2.1"</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">vCenter Username</emphasis>: Enter the username that &PRODUCT;
|
||||
should use to connect to vCenter. This user must have all the administrative
|
||||
privileges.</para>
|
||||
<para>vCenter Host. Enter the hostname or IP address of the vCenter server. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">CPU overcommit ratio</emphasis>: Enter the CPU overcommit
|
||||
ratio for the cluster. The value you enter determines the CPU consumption of each VM in
|
||||
the selected cluster. By increasing the over-provisioning ratio, more resource capacity
|
||||
will be used. If no value is specified, the value is defaulted to 1, which implies no
|
||||
over-provisioning is done.</para>
|
||||
<para>vCenter Username. Enter the username that &PRODUCT; should use to connect to
|
||||
vCenter. This user must have all administrative privileges.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">RAM overcommit ratio</emphasis>: Enter the RAM overcommit
|
||||
ratio for the cluster. The value you enter determines the memory consumption of each VM
|
||||
in the selected cluster. By increasing the over-provisioning ratio, more resource
|
||||
capacity will be used. If no value is specified, the value is defaulted to 1, which
|
||||
implies no over-provisioning is done.</para>
|
||||
<para>vCenter Password. Enter the password for the user named above</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">vCenter Host</emphasis>: Enter the hostname or IP address of
|
||||
the vCenter server.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">vCenter Password</emphasis>: Enter the password for the user
|
||||
named above.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">vCenter Datacenter</emphasis>: Enter the vCenter datacenter
|
||||
that the cluster is in. For example, "cloud.dc.VM".</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Override Public Traffic</emphasis>: Enable this option to
|
||||
override the zone-wide public traffic for the cluster you are creating.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Public Traffic vSwitch Type</emphasis>: This option is
|
||||
displayed only if you enable the Override Public Traffic option. Select a desirable
|
||||
switch. If the vmware.use.dvswitch global parameter is true, the default option will be
|
||||
VMware vNetwork Distributed Virtual Switch.</para>
|
||||
<para>If you have enabled Nexus dvSwitch in the environment, the following parameters for
|
||||
dvSwitch configuration are displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch IP Address: The IP address of the Nexus VSM appliance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch Username: The username required to access the Nexus VSM
|
||||
applicance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch Password: The password associated with the username specified
|
||||
above.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Override Guest Traffic</emphasis>: Enable this option to
|
||||
override the zone-wide guest traffic for the cluster you are creating.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold">Guest Traffic vSwitch Type</emphasis>: This option is
|
||||
displayed only if you enable the Override Guest Traffic option. Select a desirable
|
||||
switch. If the vmware.use.dvswitch global parameter is true, the default option will be
|
||||
VMware vNetwork Distributed Virtual Switch.</para>
|
||||
<para>If you have enabled Nexus dvSwitch in the environment, the following parameters for
|
||||
dvSwitch configuration are displayed:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch IP Address: The IP address of the Nexus VSM appliance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch Username: The username required to access the Nexus VSM
|
||||
applicance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus dvSwitch Password: The password associated with the username specified
|
||||
above.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>vCenter Datacenter. Enter the vCenter datacenter that the cluster is in. For
|
||||
example, "cloud.dc.VM".</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/add-cluster.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>addcluster.png: add cluster</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<para>There might be a slight delay while the cluster is provisioned. It will
|
||||
automatically display in the UI.</para>
|
||||
automatically display in the UI</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
under the License.
|
||||
-->
|
||||
<chapter id="global-config">
|
||||
<title>Global Configuration Parameters</title>
|
||||
<section id="setting-global-config-parameters">
|
||||
<title>Setting Global Configuration Parameters</title>
|
||||
<para>&PRODUCT; provides parameters that you can set to control many aspects of the cloud. When
|
||||
&PRODUCT; is first installed, and periodically thereafter, you might need to modify these
|
||||
|
|
@ -51,4 +53,81 @@
|
|||
must click the name of the hypervisor first to display the editing screen.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="about-global-config-parameters">
|
||||
<title>About Global Configuration Parameters</title>
|
||||
<para>&PRODUCT; provides a variety of settings you can use to set limits, configure features,
|
||||
and enable or disable features in the cloud. Once your Management Server is running, you might
|
||||
need to set some of these global configuration parameters, depending on what optional features
|
||||
you are setting up.</para>
|
||||
<para>To modify global configuration parameters, use the steps in "Setting Global Configuration
|
||||
Parameters."</para>
|
||||
<para>The documentation for each &PRODUCT; feature should direct you to the names of the applicable
|
||||
parameters. Many of them are discussed in the &PRODUCT; Administration Guide. The following table
|
||||
shows a few of the more useful parameters.</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colnum="1" colname="c1" colwidth="2*"/>
|
||||
<colspec colnum="2" colname="c2" colwidth="1*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Field</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>management.network.cidr</para></entry>
|
||||
<entry><para>A CIDR that describes the network that the management CIDRs reside on. This
|
||||
variable must be set for deployments that use vSphere. It is recommended to be set for
|
||||
other deployments as well. Example: 192.168.3.0/24.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>xen.setup.multipath</para></entry>
|
||||
<entry><para>For XenServer nodes, this is a true/false variable that instructs CloudStack to
|
||||
enable iSCSI multipath on the XenServer Hosts when they are added. This defaults to false.
|
||||
Set it to true if you would like CloudStack to enable multipath.</para>
|
||||
<para>If this is true for a NFS-based deployment multipath will still be enabled on the
|
||||
XenServer host. However, this does not impact NFS operation and is harmless.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>secstorage.allowed.internal.sites</para></entry>
|
||||
<entry><para>This is used to protect your internal network from rogue attempts to download
|
||||
arbitrary files using the template download feature. This is a comma-separated list of CIDRs.
|
||||
If a requested URL matches any of these CIDRs the Secondary Storage VM will use the private
|
||||
network interface to fetch the URL. Other URLs will go through the public interface.
|
||||
We suggest you set this to 1 or 2 hardened internal machines where you keep your templates.
|
||||
For example, set it to 192.168.1.66/32.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>use.local.storage</para></entry>
|
||||
<entry><para>Determines whether CloudStack will use storage that is local to the Host for data
|
||||
disks, templates, and snapshots. By default CloudStack will not use this storage. You should
|
||||
change this to true if you want to use local storage and you understand the reliability and
|
||||
feature drawbacks to choosing local storage.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>host</para></entry>
|
||||
<entry><para>This is the IP address of the Management Server. If you are using multiple
|
||||
Management Servers you should enter a load balanced IP address that is reachable via
|
||||
the private network.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>default.page.size</para></entry>
|
||||
<entry><para>Maximum number of items per page that can be returned by a CloudStack API command.
|
||||
The limit applies at the cloud level and can vary from cloud to cloud. You can override this
|
||||
with a lower value on a particular API call by using the page and pagesize API command parameters.
|
||||
For more information, see the Developer's Guide. Default: 500.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>ha.tag</para></entry>
|
||||
<entry><para>The label you want to use throughout the cloud to designate certain hosts as dedicated
|
||||
HA hosts. These hosts will be used only for HA-enabled VMs that are restarting due to the failure
|
||||
of another host. For example, you could set this to ha_host. Specify the ha.tag value as a host tag
|
||||
when you add a new host to the cloud.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</section>
|
||||
</chapter>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<listitem><para>49152 - 49216 (libvirt live migration)</para></listitem>
|
||||
</orderedlist>
|
||||
<para>It depends on the firewall you are using how to open these ports. Below you'll find examples how to open these ports in RHEL/CentOS and Ubuntu.</para>
|
||||
<section id="hypervisor-host-install-firewall-rhel">
|
||||
<section>
|
||||
<title>Open ports in RHEL/CentOS</title>
|
||||
<para>RHEL and CentOS use iptables for firewalling the system, you can open extra ports by executing the following iptable commands:</para>
|
||||
<programlisting language="Bash"><command>$ iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT</command></programlisting>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<para>These iptable settings are not persistent accross reboots, we have to save them first.</para>
|
||||
<programlisting language="Bash"><command>$ iptables-save > /etc/sysconfig/iptables</command></programlisting>
|
||||
</section>
|
||||
<section id="hypervisor-host-install-firewall-ubuntu">
|
||||
<section>
|
||||
<title>Open ports in Ubuntu</title>
|
||||
<para>The default firewall under Ubuntu is UFW (Uncomplicated FireWall), which is a Python wrapper around iptables.</para>
|
||||
<para>To open the required ports, execute the following commands:</para>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<para>In order to forward traffic to your instances you will need at least two bridges: <emphasis>public</emphasis> and <emphasis>private</emphasis>.</para>
|
||||
<para>By default these bridges are called <emphasis>cloudbr0</emphasis> and <emphasis>cloudbr1</emphasis>, but you do have to make sure they are available on each hypervisor.</para>
|
||||
<para>The most important factor is that you keep the configuration consistent on all your hypervisors.</para>
|
||||
<section id="hypervisor-host-install-network-vlan">
|
||||
<section>
|
||||
<title>Network example</title>
|
||||
<para>There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network.</para>
|
||||
<para>We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's:</para>
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
<para>On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1</para>
|
||||
<note><para>The Hypervisor and Management server don't have to be in the same subnet!</para></note>
|
||||
</section>
|
||||
<section id="hypervisor-host-install-network-configure">
|
||||
<section>
|
||||
<title>Configuring the network bridges</title>
|
||||
<para>It depends on the distribution you are using how to configure these, below you'll find examples for RHEL/CentOS and Ubuntu.</para>
|
||||
<note><para>The goal is to have two bridges called 'cloudbr0' and 'cloudbr1' after this section. This should be used as a guideline only. The exact configuration will depend on your network layout.</para></note>
|
||||
<section id="hypervisor-host-install-network-configure-rhel">
|
||||
<section>
|
||||
<title>Configure in RHEL or CentOS</title>
|
||||
<para>The required packages were installed when libvirt was installed, we can proceed to configuring the network.</para>
|
||||
<para>First we configure eth0</para>
|
||||
|
|
@ -111,7 +111,7 @@ STP=yes]]></programlisting>
|
|||
<para>With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly.</para>
|
||||
<warning><para>Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!</para></warning>
|
||||
</section>
|
||||
<section id="hypervisor-host-install-network-configure-ubuntu">
|
||||
<section>
|
||||
<title>Configure in Ubuntu</title>
|
||||
<para>All the required packages were installed when you installed libvirt, so we only have to configure the network.</para>
|
||||
<programlisting language="Bash">vi /etc/network/interfaces</programlisting>
|
||||
|
|
|
|||
|
|
@ -28,4 +28,5 @@
|
|||
<xi:include href="citrix-xenserver-installation.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="vmware-install.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- <xi:include href="ovm-install.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> -->
|
||||
<xi:include href="lxc-install.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</chapter>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section 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.
|
||||
-->
|
||||
|
||||
<section id="lxc-install">
|
||||
<title>LXC Installation and Configuration</title>
|
||||
<section id="lxc-requirements">
|
||||
<title>System Requirements for LXC Hosts</title>
|
||||
<para>LXC requires the Linux kernel cgroups functionality which is available starting 2.6.24. Although you are not required to run these distributions, the following are recommended:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>CentOS / RHEL: 6.3</para></listitem>
|
||||
<listitem><para>Ubuntu: 12.04(.1)</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>The main requirement for LXC hypervisors is the libvirt and Qemu version. No matter what
|
||||
Linux distribution you are using, make sure the following requirements are met:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>libvirt: 1.0.0 or higher</para></listitem>
|
||||
<listitem><para>Qemu/KVM: 1.0 or higher</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>The default bridge in &PRODUCT; is the Linux native bridge implementation (bridge module). &PRODUCT; includes an option to work with OpenVswitch, the requirements are listed below</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>libvirt: 1.0.0 or higher</para></listitem>
|
||||
<listitem><para>openvswitch: 1.7.1 or higher</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>In addition, the following hardware requirements apply:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Within a single cluster, the hosts must be of the same distribution version.</para></listitem>
|
||||
<listitem><para>All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags.</para></listitem>
|
||||
<listitem><para>Must support HVM (Intel-VT or AMD-V enabled)</para></listitem>
|
||||
<listitem><para>64-bit x86 CPU (more cores results in better performance)</para></listitem>
|
||||
<listitem><para>4 GB of memory</para></listitem>
|
||||
<listitem><para>At least 1 NIC</para></listitem>
|
||||
<listitem><para>When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running</para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="lxc-install-overview">
|
||||
<title>LXC Installation Overview</title>
|
||||
<para>LXC does not have any native system VMs, instead KVM will be used to run system VMs. This means that your host will need to support both LXC and KVM, thus most of the installation and configuration will be identical to the KVM installation. The material in this section doesn't duplicate KVM installation docs. It provides the &PRODUCT;-specific steps that are needed to prepare a KVM host to work with &PRODUCT;.</para>
|
||||
<warning><para>Before continuing, make sure that you have applied the latest updates to your host.</para></warning>
|
||||
<warning><para>It is NOT recommended to run services on this host not controlled by &PRODUCT;.</para></warning>
|
||||
<para>The procedure for installing an LXC Host is:</para>
|
||||
<orderedlist>
|
||||
<listitem><para>Prepare the Operating System</para></listitem>
|
||||
<listitem><para>Install and configure libvirt</para></listitem>
|
||||
<listitem><para>Configure Security Policies (AppArmor and SELinux)</para></listitem>
|
||||
<listitem><para>Install and configure the Agent</para></listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
<section id="lxc-install-prepare-os">
|
||||
<xi:include href="hypervisor-host-install-prepare-os.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
<section id="lxc-install-agent">
|
||||
<title>Install and configure the Agent</title>
|
||||
<para>To manage LXC instances on the host &PRODUCT; uses a Agent. This Agent communicates with the Management server and controls all the instances on the host.</para>
|
||||
<para>First we start by installing the agent:</para>
|
||||
<para>In RHEL or CentOS:</para>
|
||||
<programlisting language="Bash"><command>$ yum install cloud-agent</command></programlisting>
|
||||
<para>In Ubuntu:</para>
|
||||
<programlisting language="Bash"><command>$ apt-get install cloud-agent</command></programlisting>
|
||||
<para>Next step is to update the Agent configuration setttings. The settings are in <filename>/etc/cloudstack/agent/agent.properties</filename></para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Set the Agent to run in LXC mode:</para>
|
||||
<programlisting>hypervisor.type=lxc</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Optional: If you would like to use direct networking (instead of the default bridge networking), configure these lines:</para>
|
||||
<programlisting>libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver</programlisting>
|
||||
<programlisting>network.direct.source.mode=private</programlisting>
|
||||
<programlisting>network.direct.device=eth0</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<para>The host is now ready to be added to a cluster. This is covered in a later section, see <xref linkend="host-add" />. It is recommended that you continue to read the documentation before adding the host!</para>
|
||||
</section>
|
||||
<section id="lxc-install-libvirt">
|
||||
<xi:include href="hypervisor-host-install-libvirt.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
<section id="lxc-install-security-policies">
|
||||
<xi:include href="hypervisor-host-install-security-policies.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
<section id="lxc-install-network">
|
||||
<xi:include href="hypervisor-host-install-network.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
<section id="lxc-install-firewall">
|
||||
<xi:include href="hypervisor-host-install-firewall.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
<section id="lxc-install-finish">
|
||||
<xi:include href="hypervisor-host-install-finish.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</section>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section 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.
|
||||
-->
|
||||
<section id="lxc-topology-req">
|
||||
<title>LXC Topology Requirements</title>
|
||||
<para>The Management Servers communicate with LXC hosts on port 22 (ssh).</para>
|
||||
</section>
|
||||
|
|
@ -53,6 +53,10 @@
|
|||
<para>For KVM:</para>
|
||||
<programlisting># /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>For LXC:</para>
|
||||
<programlisting># /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h lxc -s <optional-management-server-secret-key> -F</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>On Ubuntu, use the following path instead:</para>
|
||||
<programlisting># /usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt</programlisting>
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
<listitem><para><xref linkend="system-requirements-xenserver-hosts"/></para></listitem>
|
||||
<listitem><para><xref linkend="vmware-requirements"/></para></listitem>
|
||||
<!-- <listitem><para><xref linkend="ovm-requirements"/></para></listitem> -->
|
||||
<listitem><para><xref linkend="lxc-requirements"/></para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@
|
|||
<para>For KVM:</para>
|
||||
<programlisting># /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>For LXC:</para>
|
||||
<programlisting># /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h lxc -s <optional-management-server-secret-key> -F</programlisting>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -28,4 +28,5 @@
|
|||
<xi:include href="xenserver-topology-req.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="vmware-topology-req.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="kvm-topology-req.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</section>
|
||||
<xi:include href="lxc-topology-req.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,192 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section 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.
|
||||
-->
|
||||
<section id="vmware-cluster-config-dvswitch">
|
||||
<title>Configuring a vSphere Cluster with VMware Distributed Virtual Switch</title>
|
||||
<para>&PRODUCT;supports VMware vNetwork Distributed Switch (VDS) for virtual network configuration
|
||||
in a VMware vSphere environment. This section helps you configure VMware VDS in a &PRODUCT;
|
||||
deployment. Each vCenter server instance can support up to 128 VDS instances and each VDS
|
||||
instance can manage up to 500 VMware hosts.</para>
|
||||
<section id="about-dvswitch">
|
||||
<title>About VMware Distributed Virtual Switch</title>
|
||||
<para>VMware VDS is an aggregation of host-level virtual switches on a VMware vCenter server.
|
||||
VDS abstracts the configuration of individual virtual switches that span across a large number
|
||||
of hosts, and enables centralized provisioning, administration, and monitoring for your entire
|
||||
datacenter from a centralized interface. In effect, a VDS acts as a single virtual switch at
|
||||
the datacenter level and manages networking for a number of hosts in a datacenter from a
|
||||
centralized VMware vCenter server. Each VDS maintains network runtime state for VMs as they
|
||||
move across multiple hosts, enabling inline monitoring and centralized firewall services. A
|
||||
VDS can be deployed with or without Virtual Standard Switch and a Nexus 1000V virtual
|
||||
switch.</para>
|
||||
</section>
|
||||
<section id="prereq-dvswitch">
|
||||
<title>Prerequisites and Guidelines</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Do not attempt to configure VDS by altering VMware traffic label when configuring
|
||||
physical networks. This will only work for Standard Virtual Switch and should not be
|
||||
distributed.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>VMware VDS does not support multiple VDS per traffic type. If a user has many VDS
|
||||
switches, only one can be used for Guest traffic and one for Public traffic.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Management and Storage network does not support VDS and use Standard Switch for these
|
||||
networks.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="enable-dvswitch">
|
||||
<title>Enabling Virtual Distributed Switch in &PRODUCT;</title>
|
||||
<para>To make a &PRODUCT; deployment VDS enabled, set the vmware.use.dvswitch parameter to true
|
||||
by using the Global Settings page in the &PRODUCT; UI and restart the Management Server.
|
||||
Unless you enable the vmware.use.dvswitch parameter, you cannot see any UI options specific to
|
||||
VDS, and &PRODUCT; ignores the VDS-specific parameters given in the AddClusterCmd API call.
|
||||
Additionally, &PRODUCT; uses VDS for virtual network infrastructure if the value of
|
||||
vmware.use.dvswitch parameter is true and the value of vmware.use.nexus.dvswitch parameter is
|
||||
false.</para>
|
||||
<para>&PRODUCT; supports configuring virtual networks in a deployment with a mix of Virtual
|
||||
Distributed Switch, Standard Virtual Switch and Nexus 1000v Virtual Switch. </para>
|
||||
</section>
|
||||
<section id="config-dvswitch">
|
||||
<title>Configuring Distributed Virtual Switch in &PRODUCT;</title>
|
||||
<para>You can configure VDS by adding the necessary resources while a zone is created.</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/dvSwitch-config.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>dvSwitchConfig.png: Configuring dvSwitch</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<para>Alternatively, you can create an additional cluster with VDS enabled in the existing zone.
|
||||
Use the Add Cluster option. For information as given in <xref linkend="add-clusters-vsphere"
|
||||
/>.</para>
|
||||
<para>In both these cases, you must specify the following parameters to configure VDS:</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Parameters</para></entry>
|
||||
<entry><para>Description</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>Cluster Name</para></entry>
|
||||
<entry><para>Enter the name of the cluster you created in vCenter. For example,
|
||||
"cloud.cluster".</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Host</para></entry>
|
||||
<entry><para>Enter the host name or the IP address of the vCenter host where you have
|
||||
deployed the Nexus virtual switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter User name</para></entry>
|
||||
<entry><para>Enter the username that &PRODUCT; should use to connect to vCenter. This
|
||||
user must have all administrative privileges.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Password</para></entry>
|
||||
<entry><para>Enter the password for the user named above.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Datacenter</para></entry>
|
||||
<entry><para>Enter the vCenter datacenter that the cluster is in. For example,
|
||||
"cloud.dc.VM".</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Override Public Traffic</para></entry>
|
||||
<entry><para>Enable this option to override the zone-wide public traffic for the cluster
|
||||
you are creating. </para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Public Traffic vSwitch Type</para></entry>
|
||||
<entry><para>This option is displayed only if you enable the Override Public Traffic
|
||||
option. Select VMware vNetwork Distributed Virtual Switch. If the
|
||||
vmware.use.dvswitch global parameter is true, the default option will be VMware
|
||||
vNetwork Distributed Virtual Switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Public Traffic vSwitch Name</para></entry>
|
||||
<entry><para>Specify a name to identify the switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Override Guest Traffic</para></entry>
|
||||
<entry><para>Enable the option to override the zone-wide guest traffic for the cluster
|
||||
you are creating.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Guest Traffic vSwitch Type</para></entry>
|
||||
<entry><para>This option is displayed only if you enable the Override Guest Traffic
|
||||
option. Select VMware vNetwork Distributed Virtual Switch. If the
|
||||
vmware.use.dvswitch global parameter is true, the default option will be VMware
|
||||
vNetwork Distributed Virtual Switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Guest Traffic vSwitch Name</para></entry>
|
||||
<entry><para>Specify a name to identify the switch.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</section>
|
||||
<section id="vmware-dvswitch-remove">
|
||||
<title>Removing Nexus Virtual Switch</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>In the vCenter datacenter that is served by the VMware dvSwitch, ensure that you
|
||||
delete all the hosts in the corresponding cluster.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Log in with Admin permissions to the &PRODUCT; administrator UI.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation bar, select Infrastructure.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Infrastructure page, click View all under Clusters.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Select the cluster where you want to remove the virtual switch.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the VMware dvSwitch tab, click the name of the virtual switch.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> In the Details page, click Delete VMware dvSwitch icon. <inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/delete-button.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>DeleteButton.png: button to delete dvSwitch</phrase>
|
||||
</textobject>
|
||||
</inlinemediaobject>
|
||||
</para>
|
||||
<para>Click Yes in the confirmation dialog box.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!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;
|
||||
]>
|
||||
|
|
@ -11,7 +11,9 @@
|
|||
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
|
||||
|
|
@ -325,439 +327,282 @@ esxcfg-firewall -o 59000-60000,tcp,out,vncextras
|
|||
guide.</para>
|
||||
</section>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch">
|
||||
<!-- <section id="vmware-vsphere-cluster-config-nexus-vswitch">
|
||||
<title>Configuring a vSphere Cluster with Nexus 1000v Virtual Switch</title>
|
||||
<para>&PRODUCT; supports Cisco Nexus 1000v dvSwitch (Distributed Virtual Switch) for virtual
|
||||
network configuration in a VMware vSphere environment. This section helps you configure a
|
||||
vSphere cluster with Nexus 1000v virtual switch in a VMware vCenter environment. For
|
||||
information on creating a vSphere cluster, see <xref linkend="vmware-install"/></para>
|
||||
<para>&PRODUCT; supports Cisco Nexus 1000v dvSwitch (Distributed Virtual Switch) for virtual network configuration in a VMware vSphere environment. This section helps you configure a vSphere cluster with Nexus 1000v virtual switch in a VMware vCenter environment. For information on creating a vSphere cluster, see <xref linkend="vmware-install" /></para>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-about">
|
||||
<title>About Cisco Nexus 1000v Distributed Virtual Switch</title>
|
||||
<para>The Cisco Nexus 1000V virtual switch is a software-based virtual machine access switch
|
||||
for VMware vSphere environments. It can span multiple hosts running VMware ESXi 4.0 and
|
||||
later. A Nexus virtual switch consists of two components: the Virtual Supervisor Module
|
||||
(VSM) and the Virtual Ethernet Module (VEM). The VSM is a virtual appliance that acts as the
|
||||
switch's supervisor. It controls multiple VEMs as a single network device. The VSM is
|
||||
installed independent of the VEM and is deployed in redundancy mode as pairs or as a
|
||||
standalone appliance. The VEM is installed on each VMware ESXi server to provide
|
||||
packet-forwarding capability. It provides each virtual machine with dedicated switch ports.
|
||||
This VSM-VEM architecture is analogous to a physical Cisco switch's supervisor
|
||||
(standalone or configured in high-availability mode) and multiple linecards
|
||||
architecture.</para>
|
||||
<para>Nexus 1000v switch uses vEthernet port profiles to simplify network provisioning for
|
||||
virtual machines. There are two types of port profiles: Ethernet port profile and vEthernet
|
||||
port profile. The Ethernet port profile is applied to the physical uplink ports-the NIC
|
||||
ports of the physical NIC adapter on an ESXi server. The vEthernet port profile is
|
||||
associated with the virtual NIC (vNIC) that is plumbed on a guest VM on the ESXi server. The
|
||||
port profiles help the network administrators define network policies which can be reused
|
||||
for new virtual machines. The Ethernet port profiles are created on the VSM and are
|
||||
represented as port groups on the vCenter server.</para>
|
||||
<title>About Cisco Nexus 1000v Distributed Virtual Switch</title>
|
||||
<para>The Cisco Nexus 1000V virtual switch is a software-based virtual machine access switch for VMware vSphere environments. It can span multiple hosts running VMware ESXi 4.0 and later. A Nexus virtual switch consists of two components: the Virtual Supervisor Module (VSM) and the Virtual Ethernet Module (VEM). The VSM is a virtual appliance that acts as the switch's supervisor. It controls multiple VEMs as a single network device. The VSM is installed independent of the VEM and is deployed in redundancy mode as pairs or as a standalone appliance. The VEM is installed on each VMware ESXi server to provide packet-forwarding capability. It provides each virtual machine with dedicated switch ports. This VSM-VEM architecture is analogous to a physical Cisco switch's supervisor (standalone or configured in high-availability mode) and multiple linecards architecture.</para>
|
||||
<para>Nexus 1000v switch uses vEthernet port profiles to simplify network provisioning for virtual machines. There are two types of port profiles: Ethernet port profile and vEthernet port profile. The Ethernet port profile is applied to the physical uplink ports-the NIC ports of the physical NIC adapter on an ESXi server. The vEthernet port profile is associated with the virtual NIC (vNIC) that is plumbed on a guest VM on the ESXi server. The port profiles help the network administrators define network policies which can be reused for new virtual machines. The Ethernet port profiles are created on the VSM and are represented as port groups on the vCenter server.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-prerequisite-guide">
|
||||
<title>Prerequisites and Guidelines</title>
|
||||
<para>This section discusses prerequisites and guidelines for using Nexus virtual switch in
|
||||
&PRODUCT;. Before configuring Nexus virtual switch, ensure that your system meets the
|
||||
following requirements:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>A cluster of servers (ESXi 4.1 or later) is configured in the vCenter.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Each cluster managed by &PRODUCT; is the only cluster in its vCenter
|
||||
datacenter.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>A Cisco Nexus 1000v virtual switch is installed to serve the datacenter that
|
||||
contains the vCenter cluster. This ensures that &PRODUCT; doesn't have to deal with
|
||||
dynamic migration of virtual adapters or networks across other existing virtual
|
||||
switches. See <ulink
|
||||
url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_5_1/install_upgrade/vsm_vem/guide/n1000v_installupgrade.html"
|
||||
>Cisco Nexus 1000V Installation and Upgrade Guide</ulink> for guidelines on how to
|
||||
install the Nexus 1000v VSM and VEM modules.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The Nexus 1000v VSM is not deployed on a vSphere host that is managed by
|
||||
&PRODUCT;.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>When the maximum number of VEM modules per VSM instance is reached, an additional
|
||||
VSM instance is created before introducing any more ESXi hosts. The limit is 64 VEM
|
||||
modules for each VSM instance.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&PRODUCT; expects that the Management Network of the ESXi host is configured on the
|
||||
standard vSwitch and searches for it in the standard vSwitch. Therefore, ensure that you
|
||||
do not migrate the management network to Nexus 1000v virtual switch during
|
||||
configuration.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>All information given in <xref
|
||||
linkend="vmware-vsphere-cluster-config-nexus-vswitch-preconfig"/></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<title>Prerequisites and Guidelines</title>
|
||||
<para>This section discusses prerequisites and guidelines for using Nexus virtual switch in &PRODUCT;. Before configuring Nexus virtual switch, ensure that your system meets the following requirements:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>A cluster of servers (ESXi 4.1 or later) is configured in the vCenter.</para></listitem>
|
||||
<listitem><para>Each cluster managed by &PRODUCT; is the only cluster in its vCenter datacenter.</para></listitem>
|
||||
<listitem><para>A Cisco Nexus 1000v virtual switch is installed to serve the datacenter that contains the vCenter cluster. This ensures that &PRODUCT; doesn't have to deal with dynamic migration of virtual adapters or networks across other existing virtual switches. See <ulink url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_5_1/install_upgrade/vsm_vem/guide/n1000v_installupgrade.html">Cisco Nexus 1000V Installation and Upgrade Guide</ulink> for guidelines on how to install the Nexus 1000v VSM and VEM modules.</para></listitem>
|
||||
<listitem><para>The Nexus 1000v VSM is not deployed on a vSphere host that is managed by &PRODUCT;.</para></listitem>
|
||||
<listitem><para>When the maximum number of VEM modules per VSM instance is reached, an additional VSM instance is created before introducing any more ESXi hosts. The limit is 64 VEM modules for each VSM instance.</para></listitem>
|
||||
<listitem><para>&PRODUCT; expects that the Management Network of the ESXi host is configured on the standard vSwitch and searches for it in the standard vSwitch. Therefore, ensure that you do not migrate the management network to Nexus 1000v virtual switch during configuration.</para></listitem>
|
||||
<listitem><para>All information given in <xref linkend="vmware-vsphere-cluster-config-nexus-vswitch-preconfig" /></para></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-preconfig">
|
||||
<title>Nexus 1000v Virtual Switch Preconfiguration</title>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-preconfig-checklist">
|
||||
<title>Nexus 1000v Virtual Switch Preconfiguration</title>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-preconfig-checklist">
|
||||
<title>Preparation Checklist</title>
|
||||
<para>For a smoother configuration of Nexus 1000v switch, gather the following information
|
||||
before you start:</para>
|
||||
<para>For a smoother configuration of Nexus 1000v switch, gather the following information before you start:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>vCenter Credentials</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus 1000v VSM IP address</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Nexus 1000v VSM Credentials</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Ethernet port profile names</para>
|
||||
</listitem>
|
||||
<listitem><para>vCenter Credentials</para></listitem>
|
||||
<listitem><para>Nexus 1000v VSM IP address</para></listitem>
|
||||
<listitem><para>Nexus 1000v VSM Credentials</para></listitem>
|
||||
<listitem><para>Ethernet port profile names</para></listitem>
|
||||
</itemizedlist>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-vcenter-credential-checklist">
|
||||
<title>vCenter Credentials Checklist</title>
|
||||
<para>You will need the following information about vCenter:</para>
|
||||
<informaltable frame="all">
|
||||
<title>vCenter Credentials Checklist</title>
|
||||
<para>You will need the following information about vCenter:</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="3" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<colspec colname="c3"/>
|
||||
<thead>
|
||||
<colspec colname="c1" />
|
||||
<colspec colname="c2" />
|
||||
<colspec colname="c3" />
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Nexus vSwitch Requirements</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
<entry><para>Nexus vSwitch Requirements</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>vCenter IP</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The IP address of the vCenter.</para></entry>
|
||||
<entry><para>vCenter IP</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The IP address of the vCenter.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Secure HTTP Port Number</para></entry>
|
||||
<entry><para>443</para></entry>
|
||||
<entry><para>Port 443 is configured by default; however, you can change the port
|
||||
if needed.</para></entry>
|
||||
<entry><para>Secure HTTP Port Number</para></entry>
|
||||
<entry><para>443</para></entry>
|
||||
<entry><para>Port 443 is configured by default; however, you can change the port if needed.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter User ID</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The vCenter user with administrator-level privileges. The vCenter
|
||||
User ID is required when you configure the virtual switch in
|
||||
&PRODUCT;.</para></entry>
|
||||
<entry><para>vCenter User ID</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The vCenter user with administrator-level privileges. The vCenter User ID is required when you configure the virtual switch in &PRODUCT;.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Password</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The password for the vCenter user specified above. The password for
|
||||
this vCenter user is required when you configure the switch in
|
||||
&PRODUCT;.</para></entry>
|
||||
<entry><para>vCenter Password</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The password for the vCenter user specified above. The password for this vCenter user is required when you configure the switch in &PRODUCT;.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</informaltable>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-net-config-checklist">
|
||||
<title>Network Configuration Checklist</title>
|
||||
<para>The following information specified in the Nexus Configure Networking screen is
|
||||
displayed in the Details tab of the Nexus dvSwitch in the &PRODUCT; UI:</para>
|
||||
<informaltable frame="all">
|
||||
<title>Network Configuration Checklist</title>
|
||||
<para>The following information specified in the Nexus Configure Networking screen is displayed in the Details tab of the Nexus dvSwitch in the &PRODUCT; UI:</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="3" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<colspec colname="c3"/>
|
||||
<thead>
|
||||
<colspec colname="c1" />
|
||||
<colspec colname="c2" />
|
||||
<colspec colname="c3" />
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Network Requirements</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
<entry><para>Network Requirements</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>Control Port Group VLAN ID</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The VLAN ID of the Control Port Group. The control VLAN is used for
|
||||
communication between the VSM and the VEMs.</para></entry>
|
||||
<entry><para>Control Port Group VLAN ID</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The VLAN ID of the Control Port Group. The control VLAN is used for communication between the VSM and the VEMs.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Management Port Group VLAN ID</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The VLAN ID of the Management Port Group. The management VLAN
|
||||
corresponds to the mgmt0 interface that is used to establish and maintain the
|
||||
connection between the VSM and VMware vCenter Server.</para></entry>
|
||||
<entry><para>Management Port Group VLAN ID</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The VLAN ID of the Management Port Group. The management VLAN corresponds to the mgmt0 interface that is used to establish and maintain the connection between the VSM and VMware vCenter Server.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Packet Port Group VLAN ID</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The VLAN ID of the Packet Port Group. The packet VLAN forwards
|
||||
relevant data packets from the VEMs to the VSM.</para></entry>
|
||||
<entry><para>Packet Port Group VLAN ID</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The VLAN ID of the Packet Port Group. The packet VLAN forwards relevant data packets from the VEMs to the VSM.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<note>
|
||||
<para>The VLANs used for control, packet, and management port groups can be the
|
||||
same.</para>
|
||||
</note>
|
||||
<para>For more information, see <ulink
|
||||
url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_4_b/getting_started/configuration/guide/n1000v_gsg.pdf"
|
||||
>Cisco Nexus 1000V Getting Started Guide</ulink>.</para>
|
||||
</informaltable>
|
||||
<note><para>The VLANs used for control, packet, and management port groups can be the same.</para></note>
|
||||
<para>For more information, see <ulink url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_4_b/getting_started/configuration/guide/n1000v_gsg.pdf">Cisco Nexus 1000V Getting Started Guide</ulink>.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-vsm-config-checklist">
|
||||
<title>VSM Configuration Checklist</title>
|
||||
<para>You will need the following information about network configuration:</para>
|
||||
<informaltable frame="all">
|
||||
<title>VSM Configuration Checklist</title>
|
||||
<para>You will need the following information about network configuration:</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="3" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<colspec colname="c3"/>
|
||||
<thead>
|
||||
<colspec colname="c1" />
|
||||
<colspec colname="c2" />
|
||||
<colspec colname="c3" />
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>VSM Configuration Parameters Value Notes</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
<entry><para>VSM Configuration Parameters Value Notes</para></entry>
|
||||
<entry><para>Value</para></entry>
|
||||
<entry><para>Notes</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>Admin Name and Password</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>The admin name and password to connect to the VSM appliance. You must
|
||||
specify these credentials while configuring Nexus virtual
|
||||
switch.</para></entry>
|
||||
<entry><para>Admin Name and Password</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>The admin name and password to connect to the VSM appliance. You must specify these credentials while configuring Nexus virtual switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Management IP Address</para></entry>
|
||||
<entry><para/></entry>
|
||||
<entry><para>This is the IP address of the VSM appliance. This is the IP address
|
||||
you specify in the virtual switch IP Address field while configuting Nexus
|
||||
virtual switch.</para></entry>
|
||||
<entry><para>Management IP Address</para></entry>
|
||||
<entry><para></para></entry>
|
||||
<entry><para>This is the IP address of the VSM appliance. This is the IP address you specify in the virtual switch IP Address field while configuting Nexus virtual switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>SSL</para></entry>
|
||||
<entry><para>Enable</para></entry>
|
||||
<entry><para>Always enable SSL. SSH is usually enabled by default during the VSM
|
||||
installation. However, check whether the SSH connection to the VSM is working,
|
||||
without which &PRODUCT; failes to connect to the VSM.</para></entry>
|
||||
<entry><para>SSL</para></entry>
|
||||
<entry><para>Enable</para></entry>
|
||||
<entry><para>Always enable SSL. SSH is usually enabled by default during the VSM installation. However, check whether the SSH connection to the VSM is working, without which &PRODUCT; failes to connect to the VSM.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</informaltable>
|
||||
</section>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-create-port-profile">
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-create-port-profile">
|
||||
<title>Creating a Port Profile</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Whether you create a Basic or Advanced zone configuration, ensure that you always
|
||||
create an Ethernet port profile on the VSM after you install it and before you create
|
||||
the zone.</para>
|
||||
<listitem>
|
||||
<para>Whether you create a Basic or Advanced zone configuration, ensure that you always create an Ethernet port profile on the VSM after you install it and before you create the zone.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The Ethernet port profile created to represent the physical network or
|
||||
networks used by an Advanced zone configuration trunk all the VLANs including
|
||||
guest VLANs, the VLANs that serve the native VLAN, and the
|
||||
packet/control/data/management VLANs of the VSM.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The Ethernet port profile created for a Basic zone configuration does not
|
||||
trunk the guest VLANs because the guest VMs do not get their own VLANs provisioned
|
||||
on their network interfaces in a Basic zone.</para>
|
||||
</listitem>
|
||||
<listitem><para>The Ethernet port profile created to represent the physical network or networks used by an Advanced zone configuration trunk all the VLANs including guest VLANs, the VLANs that serve the native VLAN, and the packet/control/data/management VLANs of the VSM.</para></listitem>
|
||||
<listitem><para>The Ethernet port profile created for a Basic zone configuration does not trunk the guest VLANs because the guest VMs do not get their own VLANs provisioned on their network interfaces in a Basic zone.</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>An Ethernet port profile configured on the Nexus 1000v virtual switch should not
|
||||
use in its set of system VLANs, or any of the VLANs configured or intended to be
|
||||
configured for use towards VMs or VM resources in the &PRODUCT; environment.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>You do not have to create any vEthernet port profiles – &PRODUCT; does that during
|
||||
VM deployment.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Ensure that you create required port profiles to be used by &PRODUCT; for
|
||||
different traffic types of &PRODUCT;, such as Management traffic, Guest traffic,
|
||||
Storage traffic, and Public traffic. The physical networks configured during zone
|
||||
creation should have a one-to-one relation with the Ethernet port profiles.</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
<listitem><para>An Ethernet port profile configured on the Nexus 1000v virtual switch should not use in its set of system VLANs, or any of the VLANs configured or intended to be configured for use towards VMs or VM resources in the &PRODUCT; environment.</para></listitem>
|
||||
<listitem><para>You do not have to create any vEthernet port profiles – &PRODUCT; does that during VM deployment.</para></listitem>
|
||||
<listitem><para>Ensure that you create required port profiles to be used by &PRODUCT; for different traffic types of &PRODUCT;, such as Management traffic, Guest traffic, Storage traffic, and Public traffic. The physical networks configured during zone creation should have a one-to-one relation with the Ethernet port profiles.</para></listitem>
|
||||
</itemizedlist>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/vmware-nexus-port-profile.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>vsphereclient.png: vSphere client</phrase>
|
||||
</textobject>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<para>For information on creating a port profile, see <ulink
|
||||
url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_4_a/port_profile/configuration/guide/n1000v_port_profile.html"
|
||||
>Cisco Nexus 1000V Port Profile Configuration Guide</ulink>.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-assign-nic-adapters">
|
||||
<para>For information on creating a port profile, see <ulink url="http://www.cisco.com/en/US/docs/switches/datacenter/nexus1000/sw/4_2_1_s_v_1_4_a/port_profile/configuration/guide/n1000v_port_profile.html">Cisco Nexus 1000V Port Profile Configuration Guide</ulink>.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-assign-nic-adapters">
|
||||
<title>Assigning Physical NIC Adapters</title>
|
||||
<para>Assign ESXi host's physical NIC adapters, which correspond to each physical
|
||||
network, to the port profiles. In each ESXi host that is part of the vCenter cluster,
|
||||
observe the physical networks assigned to each port profile and note down the names of the
|
||||
port profile for future use. This mapping information helps you when configuring physical
|
||||
networks during the zone configuration on &PRODUCT;. These Ethernet port profile names are
|
||||
later specified as VMware Traffic Labels for different traffic types when configuring
|
||||
physical networks during the zone configuration. For more information on configuring
|
||||
physical networks, see <xref linkend="vmware-vsphere-cluster-config-nexus-vswitch"
|
||||
/>.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-add-vlan-range">
|
||||
<para>Assign ESXi host's physical NIC adapters, which correspond to each physical network, to the port profiles. In each ESXi host that is part of the vCenter cluster, observe the physical networks assigned to each port profile and note down the names of the port profile for future use. This mapping information helps you when configuring physical networks during the zone configuration on &PRODUCT;. These Ethernet port profile names are later specified as VMware Traffic Labels for different traffic types when configuring physical networks during the zone configuration. For more information on configuring physical networks, see <xref linkend="vmware-vsphere-cluster-config-nexus-vswitch" />.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-add-vlan-range">
|
||||
<title>Adding VLAN Ranges</title>
|
||||
<para>Determine the public VLAN, System VLAN, and Guest VLANs to be used by the &PRODUCT;.
|
||||
Ensure that you add them to the port profile database. Corresponding to each physical
|
||||
network, add the VLAN range to port profiles. In the VSM command prompt, run the
|
||||
switchport trunk allowed vlan<range> command to add the VLAN ranges to the port
|
||||
profile.</para>
|
||||
<para>Determine the public VLAN, System VLAN, and Guest VLANs to be used by the &PRODUCT;. Ensure that you add them to the port profile database. Corresponding to each physical network, add the VLAN range to port profiles. In the VSM command prompt, run the switchport trunk allowed vlan<range> command to add the VLAN ranges to the port profile.</para>
|
||||
<para>For example:</para>
|
||||
<programlisting>switchport trunk allowed vlan 1,140-147,196-203</programlisting>
|
||||
<para>In this example, the allowed VLANs added are 1, 140-147, and 196-203</para>
|
||||
<para>You must also add all the public and private VLANs or VLAN ranges to the switch. This
|
||||
range is the VLAN range you specify in your zone.</para>
|
||||
<note>
|
||||
<para>Before you run the vlan command, ensure that the configuration mode is enabled in
|
||||
Nexus 1000v virtual switch.</para>
|
||||
</note>
|
||||
<para>You must also add all the public and private VLANs or VLAN ranges to the switch. This range is the VLAN range you specify in your zone.</para>
|
||||
<note><para>Before you run the vlan command, ensure that the configuration mode is enabled in Nexus 1000v virtual switch.</para></note>
|
||||
<para>For example:</para>
|
||||
<para>If you want the VLAN 200 to be used on the switch, run the following command:</para>
|
||||
<programlisting>vlan 200</programlisting>
|
||||
<para>If you want the VLAN range 1350-1750 to be used on the switch, run the following
|
||||
command:</para>
|
||||
<para>If you want the VLAN range 1350-1750 to be used on the switch, run the following command:</para>
|
||||
<programlisting>vlan 1350-1750</programlisting>
|
||||
<para>Refer to Cisco Nexus 1000V Command Reference of specific product version.</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-enable">
|
||||
<title>Enabling Nexus Virtual Switch in &PRODUCT;</title>
|
||||
<para>To make a &PRODUCT; deployment Nexus enabled, you must set the vmware.use.nexus.vswitch
|
||||
parameter true by using the Global Settings page in the &PRODUCT; UI. Unless this parameter
|
||||
is set to "true" and restart the management server, you cannot see any UI options
|
||||
specific to Nexus virtual switch, and &PRODUCT; ignores the Nexus virtual switch specific
|
||||
parameters specified in the AddTrafficTypeCmd, UpdateTrafficTypeCmd, and AddClusterCmd API
|
||||
calls.</para>
|
||||
<para>Unless the &PRODUCT; global parameter "vmware.use.nexus.vswitch" is set to
|
||||
"true", &PRODUCT; by default uses VMware standard vSwitch for virtual network
|
||||
infrastructure. In this release, &PRODUCT; doesn’t support configuring virtual networks in a
|
||||
deployment with a mix of standard vSwitch and Nexus 1000v virtual switch. The deployment can
|
||||
have either standard vSwitch or Nexus 1000v virtual switch.</para>
|
||||
<title>Enabling Nexus Virtual Switch in &PRODUCT;</title>
|
||||
<para>To make a &PRODUCT; deployment Nexus enabled, you must set the vmware.use.nexus.vswitch parameter true by using the Global Settings page in the &PRODUCT; UI. Unless this parameter is set to "true" and restart the management server, you cannot see any UI options specific to Nexus virtual switch, and &PRODUCT; ignores the Nexus virtual switch specific parameters specified in the AddTrafficTypeCmd, UpdateTrafficTypeCmd, and AddClusterCmd API calls.</para>
|
||||
<para>Unless the &PRODUCT; global parameter "vmware.use.nexus.vswitch" is set to "true", &PRODUCT; by default uses VMware standard vSwitch for virtual network infrastructure. In this release, &PRODUCT; doesn’t support configuring virtual networks in a deployment with a mix of standard vSwitch and Nexus 1000v virtual switch. The deployment can have either standard vSwitch or Nexus 1000v virtual switch.</para>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-config">
|
||||
<title>Configuring Nexus 1000v Virtual Switch in &PRODUCT;</title>
|
||||
<para>You can configure Nexus dvSwitch by adding the necessary resources while the zone is
|
||||
being created.</para>
|
||||
<mediaobject>
|
||||
<title>Configuring Nexus 1000v Virtual Switch in &PRODUCT;</title>
|
||||
<para>You can configure Nexus dvSwitch by adding the necessary resources while the zone is being created.</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/vmware-nexus-add-cluster.png"/>
|
||||
<imagedata fileref="./images/vmware-nexus-add-cluster.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>vsphereclient.png: vSphere client</phrase>
|
||||
<phrase>vsphereclient.png: vSphere client</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<para>After the zone is created, if you want to create an additional cluster along with Nexus
|
||||
1000v virtual switch in the existing zone, use the Add Cluster option. For information on
|
||||
creating a cluster, see <xref linkend="add-clusters-vsphere"/>.</para>
|
||||
<para>In both these cases, you must specify the following parameters to configure Nexus
|
||||
virtual switch:</para>
|
||||
<informaltable frame="all">
|
||||
</mediaobject>
|
||||
<para>After the zone is created, if you want to create an additional cluster along with Nexus 1000v virtual switch in the existing zone, use the Add Cluster option. For information on creating a cluster, see <xref linkend="add-clusters-vsphere" />.</para>
|
||||
<para>In both these cases, you must specify the following parameters to configure Nexus virtual switch:</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<thead>
|
||||
<colspec colname="c1" />
|
||||
<colspec colname="c2" />
|
||||
<thead>
|
||||
<row>
|
||||
<entry><para>Parameters</para></entry>
|
||||
<entry><para>Description</para></entry>
|
||||
<entry><para>Parameters</para></entry>
|
||||
<entry><para>Description</para></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>Cluster Name</para></entry>
|
||||
<entry><para>Enter the name of the cluster you created in vCenter. For example,
|
||||
"cloud.cluster".</para></entry>
|
||||
<entry><para>Cluster Name</para></entry>
|
||||
<entry><para>Enter the name of the cluster you created in vCenter. For example, "cloud.cluster".</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Host</para></entry>
|
||||
<entry><para>Enter the host name or the IP address of the vCenter host where you have
|
||||
deployed the Nexus virtual switch.</para></entry>
|
||||
<entry><para>vCenter Host</para></entry>
|
||||
<entry><para>Enter the host name or the IP address of the vCenter host where you have deployed the Nexus virtual switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter User name</para></entry>
|
||||
<entry><para>Enter the username that &PRODUCT; should use to connect to vCenter. This
|
||||
user must have all administrative privileges.</para></entry>
|
||||
<entry><para>vCenter User name</para></entry>
|
||||
<entry><para>Enter the username that &PRODUCT; should use to connect to vCenter. This user must have all administrative privileges.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Password</para></entry>
|
||||
<entry><para>Enter the password for the user named above.</para></entry>
|
||||
<entry><para>vCenter Password</para></entry>
|
||||
<entry><para>Enter the password for the user named above.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>vCenter Datacenter</para></entry>
|
||||
<entry><para>Enter the vCenter datacenter that the cluster is in. For example,
|
||||
"cloud.dc.VM".</para></entry>
|
||||
<entry><para>vCenter Datacenter</para></entry>
|
||||
<entry><para>Enter the vCenter datacenter that the cluster is in. For example, "cloud.dc.VM".</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Nexus dvSwitch IP Address</para></entry>
|
||||
<entry><para>The IP address of the VSM component of the Nexus 1000v virtual
|
||||
switch.</para></entry>
|
||||
<entry><para>Nexus dvSwitch IP Address</para></entry>
|
||||
<entry><para>The IP address of the VSM component of the Nexus 1000v virtual switch.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Nexus dvSwitch Username</para></entry>
|
||||
<entry><para>The admin name to connect to the VSM appliance.</para></entry>
|
||||
<entry><para>Nexus dvSwitch Username</para></entry>
|
||||
<entry><para>The admin name to connect to the VSM appliance.</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Nexus dvSwitch Password</para></entry>
|
||||
<entry><para>The corresponding password for the admin user specified
|
||||
above.</para></entry>
|
||||
<entry><para>Nexus dvSwitch Password</para></entry>
|
||||
<entry><para>The corresponding password for the admin user specified above.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</informaltable>
|
||||
</section>
|
||||
<section id="vmware-vsphere-cluster-config-nexus-vswitch-remove">
|
||||
<title>Removing Nexus Virtual Switch</title>
|
||||
<orderedlist>
|
||||
<title>Removing Nexus Virtual Switch</title>
|
||||
<orderedlist>
|
||||
<listitem><para>In the vCenter datacenter that is served by the Nexus virtual switch, ensure that you delete all the hosts in the corresponding cluster.</para></listitem>
|
||||
<listitem><para>Log in with Admin permissions to the &PRODUCT; administrator UI.</para></listitem>
|
||||
<listitem><para>In the left navigation bar, select Infrastructure.</para></listitem>
|
||||
<listitem><para>In the Infrastructure page, click View all under Clusters.</para></listitem>
|
||||
<listitem><para>Select the cluster where you want to remove the virtual switch.</para></listitem>
|
||||
<listitem><para>In the dvSwitch tab, click the name of the virtual switch.</para></listitem>
|
||||
<listitem>
|
||||
<para>In the vCenter datacenter that is served by the Nexus virtual switch, ensure that
|
||||
you delete all the hosts in the corresponding cluster.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Log in with Admin permissions to the &PRODUCT; administrator UI.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the left navigation bar, select Infrastructure.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Infrastructure page, click View all under Clusters.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Select the cluster where you want to remove the virtual switch.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the dvSwitch tab, click the name of the virtual switch.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> In the Details page, click Delete Nexus dvSwitch icon. <inlinemediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/delete-button.png"/>
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>DeleteButton.png: button to delete dvSwitch</phrase>
|
||||
</textobject>
|
||||
<para>
|
||||
In the Details page, click Delete Nexus dvSwitch icon.
|
||||
<inlinemediaobject>
|
||||
<imageobject><imagedata fileref="./images/delete-button.png" /></imageobject>
|
||||
<textobject><phrase>DeleteButton.png: button to delete dvSwitch</phrase></textobject>
|
||||
</inlinemediaobject>
|
||||
</para>
|
||||
<para>Click Yes in the confirmation dialog box.</para>
|
||||
</para>
|
||||
<para>Click Yes in the confirmation dialog box.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
<xi:include href="vmware-cluster-config-dvswitch.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section> -->
|
||||
<section id="vmware-vsphere-iscsi-storage-preparation">
|
||||
<title>Storage Preparation for vSphere (iSCSI only)</title>
|
||||
<para>Use of iSCSI requires preparatory work in vCenter. You must add an iSCSI target and create
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
doc_url: "http://incubator.apache.org/cloudstack/docs"
|
||||
prod_url: "http://cloudstack.org"
|
||||
doc_url: "http://cloudstack.apache.org/docs"
|
||||
prod_url: "http://cloudstack.apache.org"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,33 +2,43 @@
|
|||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
]>
|
||||
<!-- 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.
|
||||
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.
|
||||
-->
|
||||
|
||||
<section>
|
||||
<title>We Need Feedback!</title>
|
||||
<indexterm>
|
||||
<section id="feedback">
|
||||
<title>Submitting Feedback and Getting Help</title>
|
||||
<indexterm>
|
||||
<primary>feedback1</primary>
|
||||
<secondary>contact information for this brand</secondary>
|
||||
<secondary>contact information for this brand</secondary>
|
||||
|
||||
</indexterm>
|
||||
<para>If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK">https://issues.apache.org/jira/browse/CLOUDSTACK</ulink> against the component <application>Doc</application>.</para>
|
||||
<para>If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK">https://issues.apache.org/jira/browse/CLOUDSTACK</ulink> against the component <application>Doc</application>.</para>
|
||||
<para>If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.</para>
|
||||
<para>Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the CloudStack source code, kept in the project's git repository.</para>
|
||||
<para>Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the &PRODUCT; source code, kept in the project's git repository.</para>
|
||||
<para>The most efficient way to get help with &PRODUCT; is to ask on the mailing lists.</para>
|
||||
<para>The Apache CloudStack project has mailing lists for users and developers. These are the
|
||||
official channels of communication for the project and are the best way to get answers about
|
||||
using and contributing to CloudStack. It's a good idea to subscribe to the
|
||||
users@cloudstack.apache.org mailing list if you've deployed or are deploying
|
||||
CloudStack into production, and even for test deployments.</para>
|
||||
<para>The CloudStack developer's mailing list (dev@cloudstack.apache.org) is for discussions
|
||||
about CloudStack development, and is the best list for discussing possible bugs in CloudStack.
|
||||
Anyone contributing to CloudStack should be on this mailing list.</para>
|
||||
<para>To posts to the lists, you'll need to be subscribed. See the
|
||||
<ulink url="http://cloudstack.apache.org/mailing-lists.html">CloudStack Web site</ulink>
|
||||
for instructions.</para>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue