diff --git a/.gitignore b/.gitignore index b9dafcf47b9..58eafaf68d0 100644 --- a/.gitignore +++ b/.gitignore @@ -85,7 +85,6 @@ configure-stamp *_flymake.js engine/storage/integration-test/test-output tools/apidoc/log/ -log/ plugins/network-elements/juniper-contrail/logs/ scripts/vm/hypervisor/xenserver/vhd-util *.orig diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95d7a854ee5..c4ad1974eb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -105,4 +105,3 @@ $ git checkout master $ git branch -D feature_x $ git push origin :feature_x ``` - diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 66862cce95a..00000000000 --- a/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM ubuntu:14.04 - -RUN apt-get -y update && apt-get install -y \ - genisoimage \ - git \ - maven \ - openjdk-7-jdk \ - python-dev \ - python-setuptools \ - python-pip \ - supervisor - -RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \ - echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections; - -RUN apt-get install -qqy mysql-server && \ - apt-get clean all - -RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password '' - -RUN pip install --allow-external mysql-connector-python mysql-connector-python - -COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf -COPY . ./root -WORKDIR /root - -RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install - -RUN (/usr/bin/mysqld_safe &); \ - sleep 3; \ - mvn -Pdeveloper -pl developer -Ddeploydb; \ - mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \ - pip install tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz - -EXPOSE 8080 - -CMD ["/usr/bin/supervisord"] diff --git a/agent/bindir/cloud-setup-agent.in b/agent/bindir/cloud-setup-agent.in index 9ec24994e52..8d2b91961ae 100755 --- a/agent/bindir/cloud-setup-agent.in +++ b/agent/bindir/cloud-setup-agent.in @@ -65,7 +65,7 @@ def getUserInputs(): if oldHypervisor == "": oldHypervisor = "kvm" - hypervisor = raw_input("Please input the Hypervisor type kvm/lxc:[%s]"%oldCluster) + hypervisor = raw_input("Please input the Hypervisor type kvm/lxc:[%s]"%oldHypervisor) if hypervisor == "": hypervisor = oldHypervisor diff --git a/agent/bindir/libvirtqemuhook.in b/agent/bindir/libvirtqemuhook.in index 7bf9634fdf5..3f290c6b81b 100755 --- a/agent/bindir/libvirtqemuhook.in +++ b/agent/bindir/libvirtqemuhook.in @@ -16,6 +16,7 @@ # specific language governing permissions and limitations # under the License. import sys +import re from xml.dom.minidom import parse from cloudutils.configFileOps import configFileOps from cloudutils.networkConfig import networkConfig @@ -24,21 +25,29 @@ def isOldStyleBridge(brName): return True else: return False +def isNewStyleBridge(brName): + if re.match(r"br(\w+)-(\d+)", brName) == None: + return False + else: + return True def getGuestNetworkDevice(): netlib = networkConfig() cfo = configFileOps("/etc/cloudstack/agent/agent.properties") guestDev = cfo.getEntry("guest.network.device") enslavedDev = netlib.getEnslavedDev(guestDev, 1) - return enslavedDev + return enslavedDev.split(".")[0] def handleMigrateBegin(): try: domain = parse(sys.stdin) for interface in domain.getElementsByTagName("interface"): source = interface.getElementsByTagName("source")[0] bridge = source.getAttribute("bridge") - if not isOldStyleBridge(bridge): + if isOldStyleBridge(bridge): + vlanId = bridge.replace("cloudVirBr","") + elif isNewStyleBridge(bridge): + vlanId = re.sub(r"br(\w+)-","",bridge) + else: continue - vlanId = bridge.replace("cloudVirBr","") phyDev = getGuestNetworkDevice() newBrName="br" + phyDev + "-" + vlanId source.setAttribute("bridge", newBrName) diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties index fcd8b5c2995..daad05f3b65 100644 --- a/agent/conf/agent.properties +++ b/agent/conf/agent.properties @@ -133,6 +133,22 @@ hypervisor.type=kvm # Disable memory ballooning on vm guests for overcommit, by default overcommit # feature enables balloon and sets currentMemory to a minimum value. # +# vm.diskactivity.checkenabled=false +# Set to true to check disk activity on VM's disks before starting a VM. This only applies +# to QCOW2 files, and ensures that there is no other running instance accessing +# the file before starting. It works by checking the modify time against the current time, +# so care must be taken to ensure the cluster has time synced, otherwise VMs may fail to start. +# +# vm.diskactivity.checktimeout_s=120 +# Timeout for giving up on waiting for VM's disk files to become inactive. Hitting +# this timeout will result in failure to start VM. +# +# vm.diskactivity.inactivetime_ms=30000 +# This is the length of time that the disk needs to be inactive in order to pass the check. +# This means current time minus mtime of disk file needs to be greater than this number. +# It also has the side effect of setting the minimum threshold between a stop and start of +# a given VM. +# # kvmclock.disable=false # Some newer linux kernels are incapable of reliably migrating vms with kvmclock # This is a workaround for the bug, admin can set this to true per-host diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java index ac2d9ba29cc..e3510c41c32 100644 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -35,9 +35,8 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.managed.context.ManagedContextTimerTask; +import org.apache.log4j.Logger; import com.cloud.agent.api.AgentControlAnswer; import com.cloud.agent.api.AgentControlCommand; @@ -59,6 +58,8 @@ import com.cloud.utils.PropertiesUtil; import com.cloud.utils.backoff.BackoffAlgorithm; import com.cloud.utils.concurrency.NamedThreadFactory; import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.exception.NioConnectionException; +import com.cloud.utils.exception.TaskExecutionException; import com.cloud.utils.nio.HandlerFactory; import com.cloud.utils.nio.Link; import com.cloud.utils.nio.NioClient; @@ -121,11 +122,11 @@ public class Agent implements HandlerFactory, IAgentControl { long _startupWait = _startupWaitDefault; boolean _reconnectAllowed = true; //For time sentitive task, e.g. PingTask - private ThreadPoolExecutor _ugentTaskPool; + private final ThreadPoolExecutor _ugentTaskPool; ExecutorService _executor; // for simulator use only - public Agent(IAgentShell shell) { + public Agent(final IAgentShell shell) { _shell = shell; _link = null; @@ -134,29 +135,29 @@ public class Agent implements HandlerFactory, IAgentControl { Runtime.getRuntime().addShutdownHook(new ShutdownThread(this)); _ugentTaskPool = - new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue(), new NamedThreadFactory( - "UgentTask")); + new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue(), new NamedThreadFactory( + "UgentTask")); _executor = - new ThreadPoolExecutor(_shell.getWorkers(), 5 * _shell.getWorkers(), 1, TimeUnit.DAYS, new LinkedBlockingQueue(), new NamedThreadFactory( - "agentRequest-Handler")); + new ThreadPoolExecutor(_shell.getWorkers(), 5 * _shell.getWorkers(), 1, TimeUnit.DAYS, new LinkedBlockingQueue(), new NamedThreadFactory( + "agentRequest-Handler")); } - public Agent(IAgentShell shell, int localAgentId, ServerResource resource) throws ConfigurationException { + public Agent(final IAgentShell shell, final int localAgentId, final ServerResource resource) throws ConfigurationException { _shell = shell; _resource = resource; _link = null; resource.setAgentControl(this); - String value = _shell.getPersistentProperty(getResourceName(), "id"); + final String value = _shell.getPersistentProperty(getResourceName(), "id"); _id = value != null ? Long.parseLong(value) : null; - s_logger.info("id is " + ((_id != null) ? _id : "")); + s_logger.info("id is " + (_id != null ? _id : "")); final Map params = PropertiesUtil.toMap(_shell.getProperties()); // merge with properties from command line to let resource access command line parameters - for (Map.Entry cmdLineProp : _shell.getCmdLineProperties().entrySet()) { + for (final Map.Entry cmdLineProp : _shell.getCmdLineProperties().entrySet()) { params.put(cmdLineProp.getKey(), cmdLineProp.getValue()); } @@ -172,15 +173,15 @@ public class Agent implements HandlerFactory, IAgentControl { Runtime.getRuntime().addShutdownHook(new ShutdownThread(this)); _ugentTaskPool = - new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue(), new NamedThreadFactory( - "UgentTask")); + new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES, new SynchronousQueue(), new NamedThreadFactory( + "UgentTask")); _executor = - new ThreadPoolExecutor(_shell.getWorkers(), 5 * _shell.getWorkers(), 1, TimeUnit.DAYS, new LinkedBlockingQueue(), new NamedThreadFactory( - "agentRequest-Handler")); + new ThreadPoolExecutor(_shell.getWorkers(), 5 * _shell.getWorkers(), 1, TimeUnit.DAYS, new LinkedBlockingQueue(), new NamedThreadFactory( + "agentRequest-Handler")); s_logger.info("Agent [id = " + (_id != null ? _id : "new") + " : type = " + getResourceName() + " : zone = " + _shell.getZone() + " : pod = " + _shell.getPod() + - " : workers = " + _shell.getWorkers() + " : host = " + _shell.getHost() + " : port = " + _shell.getPort()); + " : workers = " + _shell.getWorkers() + " : host = " + _shell.getHost() + " : port = " + _shell.getPort()); } public String getVersion() { @@ -188,7 +189,7 @@ public class Agent implements HandlerFactory, IAgentControl { } public String getResourceGuid() { - String guid = _shell.getGuid(); + final String guid = _shell.getGuid(); return guid + "-" + getResourceName(); } @@ -222,11 +223,19 @@ public class Agent implements HandlerFactory, IAgentControl { throw new CloudRuntimeException("Unable to start the resource: " + _resource.getName()); } - _connection.start(); + try { + _connection.start(); + } catch (final NioConnectionException e) { + throw new CloudRuntimeException("Unable to start the connection!", e); + } while (!_connection.isStartup()) { _shell.getBackoffAlgorithm().waitBeforeRetry(); _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this); - _connection.start(); + try { + _connection.start(); + } catch (final NioConnectionException e) { + throw new CloudRuntimeException("Unable to start the connection!", e); + } } } @@ -236,12 +245,12 @@ public class Agent implements HandlerFactory, IAgentControl { final ShutdownCommand cmd = new ShutdownCommand(reason, detail); try { if (_link != null) { - Request req = new Request((_id != null ? _id : -1), -1, cmd, false); + final Request req = new Request(_id != null ? _id : -1, -1, cmd, false); _link.send(req.toBytes()); } } catch (final ClosedChannelException e) { s_logger.warn("Unable to send: " + cmd.toString()); - } catch (Exception e) { + } catch (final Exception e) { s_logger.warn("Unable to send: " + cmd.toString() + " due to exception: ", e); } s_logger.debug("Sending shutdown to management server"); @@ -294,13 +303,13 @@ public class Agent implements HandlerFactory, IAgentControl { _watchList.clear(); } } - public synchronized void lockStartupTask(Link link) + public synchronized void lockStartupTask(final Link link) { _startup = new StartupTask(link); _timer.schedule(_startup, _startupWait); } - public void sendStartup(Link link) { + public void sendStartup(final Link link) { final StartupCommand[] startup = _resource.initialize(); if (startup != null) { final Command[] commands = new Command[startup.length]; @@ -323,7 +332,7 @@ public class Agent implements HandlerFactory, IAgentControl { } } - protected void setupStartupCommand(StartupCommand startup) { + protected void setupStartupCommand(final StartupCommand startup) { InetAddress addr; try { addr = InetAddress.getLocalHost(); @@ -349,7 +358,7 @@ public class Agent implements HandlerFactory, IAgentControl { } @Override - public Task create(Task.Type type, Link link, byte[] data) { + public Task create(final Task.Type type, final Link link, final byte[] data) { return new ServerHandler(type, link, data); } @@ -391,19 +400,23 @@ public class Agent implements HandlerFactory, IAgentControl { try { _connection.cleanUp(); - } catch (IOException e) { + } catch (final IOException e) { s_logger.warn("Fail to clean up old connection. " + e); } _connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this); do { s_logger.info("Reconnecting..."); - _connection.start(); + try { + _connection.start(); + } catch (final NioConnectionException e) { + throw new CloudRuntimeException("Unable to start the connection!", e); + } _shell.getBackoffAlgorithm().waitBeforeRetry(); } while (!_connection.isStartup()); s_logger.info("Connected to the server"); } - public void processStartupAnswer(Answer answer, Response response, Link link) { + public void processStartupAnswer(final Answer answer, final Response response, final Link link) { boolean cancelled = false; synchronized (this) { if (_startup != null) { @@ -450,7 +463,7 @@ public class Agent implements HandlerFactory, IAgentControl { if (s_logger.isDebugEnabled()) { if (!requestLogged) // ensures request is logged only once per method call { - String requestMsg = request.toString(); + final String requestMsg = request.toString(); if (requestMsg != null) { s_logger.debug("Request:" + requestMsg); } @@ -464,7 +477,7 @@ public class Agent implements HandlerFactory, IAgentControl { scheduleWatch(link, request, (long)watch.getInterval() * 1000, watch.getInterval() * 1000); answer = new Answer(cmd, true, null); } else if (cmd instanceof ShutdownCommand) { - ShutdownCommand shutdown = (ShutdownCommand)cmd; + final ShutdownCommand shutdown = (ShutdownCommand)cmd; s_logger.debug("Received shutdownCommand, due to: " + shutdown.getReason()); cancelTasks(); _reconnectAllowed = false; @@ -481,7 +494,7 @@ public class Agent implements HandlerFactory, IAgentControl { } else if (cmd instanceof AgentControlCommand) { answer = null; synchronized (_controlListeners) { - for (IAgentControlListener listener : _controlListeners) { + for (final IAgentControlListener listener : _controlListeners) { answer = listener.processControlRequest(request, (AgentControlCommand)cmd); if (answer != null) { break; @@ -527,7 +540,7 @@ public class Agent implements HandlerFactory, IAgentControl { response = new Response(request, answers); } finally { if (s_logger.isDebugEnabled()) { - String responseMsg = response.toString(); + final String responseMsg = response.toString(); if (responseMsg != null) { s_logger.debug(response.toString()); } @@ -553,7 +566,7 @@ public class Agent implements HandlerFactory, IAgentControl { } else if (answer instanceof AgentControlAnswer) { // Notice, we are doing callback while holding a lock! synchronized (_controlListeners) { - for (IAgentControlListener listener : _controlListeners) { + for (final IAgentControlListener listener : _controlListeners) { listener.processControlResponse(response, (AgentControlAnswer)answer); } } @@ -562,7 +575,7 @@ public class Agent implements HandlerFactory, IAgentControl { } } - public void processReadyCommand(Command cmd) { + public void processReadyCommand(final Command cmd) { final ReadyCommand ready = (ReadyCommand)cmd; @@ -574,10 +587,10 @@ public class Agent implements HandlerFactory, IAgentControl { } - public void processOtherTask(Task task) { + public void processOtherTask(final Task task) { final Object obj = task.get(); if (obj instanceof Response) { - if ((System.currentTimeMillis() - _lastPingResponseTime) > _pingInterval * _shell.getPingRetries()) { + if (System.currentTimeMillis() - _lastPingResponseTime > _pingInterval * _shell.getPingRetries()) { s_logger.error("Ping Interval has gone past " + _pingInterval * _shell.getPingRetries() + ". Won't reconnect to mgt server, as connection is still alive"); return; } @@ -633,25 +646,25 @@ public class Agent implements HandlerFactory, IAgentControl { } @Override - public void registerControlListener(IAgentControlListener listener) { + public void registerControlListener(final IAgentControlListener listener) { synchronized (_controlListeners) { _controlListeners.add(listener); } } @Override - public void unregisterControlListener(IAgentControlListener listener) { + public void unregisterControlListener(final IAgentControlListener listener) { synchronized (_controlListeners) { _controlListeners.remove(listener); } } @Override - public AgentControlAnswer sendRequest(AgentControlCommand cmd, int timeoutInMilliseconds) throws AgentControlChannelException { - Request request = new Request(this.getId(), -1, new Command[] {cmd}, true, false); + public AgentControlAnswer sendRequest(final AgentControlCommand cmd, final int timeoutInMilliseconds) throws AgentControlChannelException { + final Request request = new Request(getId(), -1, new Command[] {cmd}, true, false); request.setSequence(getNextSequence()); - AgentControlListener listener = new AgentControlListener(request); + final AgentControlListener listener = new AgentControlListener(request); registerControlListener(listener); try { @@ -659,7 +672,7 @@ public class Agent implements HandlerFactory, IAgentControl { synchronized (listener) { try { listener.wait(timeoutInMilliseconds); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { s_logger.warn("sendRequest is interrupted, exit waiting"); } } @@ -671,13 +684,13 @@ public class Agent implements HandlerFactory, IAgentControl { } @Override - public void postRequest(AgentControlCommand cmd) throws AgentControlChannelException { - Request request = new Request(this.getId(), -1, new Command[] {cmd}, true, false); + public void postRequest(final AgentControlCommand cmd) throws AgentControlChannelException { + final Request request = new Request(getId(), -1, new Command[] {cmd}, true, false); request.setSequence(getNextSequence()); postRequest(request); } - private void postRequest(Request request) throws AgentControlChannelException { + private void postRequest(final Request request) throws AgentControlChannelException { if (_link != null) { try { _link.send(request.toBytes()); @@ -694,7 +707,7 @@ public class Agent implements HandlerFactory, IAgentControl { private AgentControlAnswer _answer; private final Request _request; - public AgentControlListener(Request request) { + public AgentControlListener(final Request request) { _request = request; } @@ -703,12 +716,12 @@ public class Agent implements HandlerFactory, IAgentControl { } @Override - public Answer processControlRequest(Request request, AgentControlCommand cmd) { + public Answer processControlRequest(final Request request, final AgentControlCommand cmd) { return null; } @Override - public void processControlResponse(Response response, AgentControlAnswer answer) { + public void processControlResponse(final Response response, final AgentControlAnswer answer) { if (_request.getSequence() == response.getSequence()) { _answer = answer; synchronized (this) { @@ -797,13 +810,13 @@ public class Agent implements HandlerFactory, IAgentControl { } public class AgentRequestHandler extends Task { - public AgentRequestHandler(Task.Type type, Link link, Request req) { + public AgentRequestHandler(final Task.Type type, final Link link, final Request req) { super(type, link, req); } @Override - protected void doTask(Task task) throws Exception { - Request req = (Request)this.get(); + protected void doTask(final Task task) throws TaskExecutionException { + final Request req = (Request)get(); if (!(req instanceof Response)) { processRequest(req, task.getLink()); } @@ -811,16 +824,16 @@ public class Agent implements HandlerFactory, IAgentControl { } public class ServerHandler extends Task { - public ServerHandler(Task.Type type, Link link, byte[] data) { + public ServerHandler(final Task.Type type, final Link link, final byte[] data) { super(type, link, data); } - public ServerHandler(Task.Type type, Link link, Request req) { + public ServerHandler(final Task.Type type, final Link link, final Request req) { super(type, link, req); } @Override - public void doTask(final Task task) { + public void doTask(final Task task) throws TaskExecutionException { if (task.getType() == Task.Type.CONNECT) { _shell.getBackoffAlgorithm().reset(); setLink(task.getLink()); @@ -835,7 +848,7 @@ public class Agent implements HandlerFactory, IAgentControl { } else { //put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool //processRequest(request, task.getLink()); - _executor.execute(new AgentRequestHandler(this.getType(), this.getLink(), request)); + _executor.submit(new AgentRequestHandler(getType(), getLink(), request)); } } catch (final ClassNotFoundException e) { s_logger.error("Unable to find this request "); diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java index 7f834769883..961c1060176 100644 --- a/agent/src/com/cloud/agent/AgentShell.java +++ b/agent/src/com/cloud/agent/AgentShell.java @@ -464,6 +464,7 @@ public class AgentShell implements IAgentShell, Daemon { while (!_exit) Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] AgentShell was interupted."); } } catch (final ConfigurationException e) { diff --git a/api/src/com/cloud/exception/StorageConflictException.java b/api/src/com/cloud/exception/StorageConflictException.java new file mode 100644 index 00000000000..2006d591621 --- /dev/null +++ b/api/src/com/cloud/exception/StorageConflictException.java @@ -0,0 +1,27 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.exception; + +public class StorageConflictException extends ManagementServerException { + + private static final long serialVersionUID = -294905017911859479L; + + public StorageConflictException(String message) { + super(message); + } + +} diff --git a/api/src/com/cloud/storage/Volume.java b/api/src/com/cloud/storage/Volume.java index 9f5f502b17f..f70ead93718 100644 --- a/api/src/com/cloud/storage/Volume.java +++ b/api/src/com/cloud/storage/Volume.java @@ -39,6 +39,7 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba Ready("The volume is ready to be used."), Migrating("The volume is migrating to other storage pool"), Snapshotting("There is a snapshot created on this volume, not backed up to secondary storage yet"), + RevertSnapshotting("There is a snapshot created on this volume, the volume is being reverting from snapshot"), Resizing("The volume is being resized"), Expunging("The volume is being expunging"), Expunged("The volume has been expunged"), @@ -91,6 +92,9 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba s_fsm.addTransition(new StateMachine2.Transition(Ready, Event.SnapshotRequested, Snapshotting, null)); s_fsm.addTransition(new StateMachine2.Transition(Snapshotting, Event.OperationSucceeded, Ready, null)); s_fsm.addTransition(new StateMachine2.Transition(Snapshotting, Event.OperationFailed, Ready,null)); + s_fsm.addTransition(new StateMachine2.Transition(Ready, Event.RevertSnapshotRequested, RevertSnapshotting, null)); + s_fsm.addTransition(new StateMachine2.Transition(RevertSnapshotting, Event.OperationSucceeded, Ready, null)); + s_fsm.addTransition(new StateMachine2.Transition(RevertSnapshotting, Event.OperationFailed, Ready,null)); s_fsm.addTransition(new StateMachine2.Transition(Allocated, Event.MigrationCopyRequested, Creating, null)); s_fsm.addTransition(new StateMachine2.Transition(Creating, Event.MigrationCopyFailed, Allocated, null)); s_fsm.addTransition(new StateMachine2.Transition(Creating, Event.MigrationCopySucceeded, Ready, Arrays.asList(new StateMachine2.Transition.Impact[]{StateMachine2.Transition.Impact.USAGE}))); @@ -131,6 +135,7 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba MigrationCopySucceeded, MigrationCopyFailed, SnapshotRequested, + RevertSnapshotRequested, DestroyRequested, ExpungingRequested, ResizeRequested, diff --git a/api/src/com/cloud/storage/snapshot/SnapshotApiService.java b/api/src/com/cloud/storage/snapshot/SnapshotApiService.java index a86ef37b452..fb48f477454 100644 --- a/api/src/com/cloud/storage/snapshot/SnapshotApiService.java +++ b/api/src/com/cloud/storage/snapshot/SnapshotApiService.java @@ -106,7 +106,7 @@ public interface SnapshotApiService { */ Long getHostIdForSnapshotOperation(Volume vol); - boolean revertSnapshot(Long snapshotId); + Snapshot revertSnapshot(Long snapshotId); SnapshotPolicy updateSnapshotPolicy(UpdateSnapshotPolicyCmd updateSnapshotPolicyCmd); } diff --git a/api/src/com/cloud/template/TemplateApiService.java b/api/src/com/cloud/template/TemplateApiService.java index 43177fc521e..7348547cee0 100644 --- a/api/src/com/cloud/template/TemplateApiService.java +++ b/api/src/com/cloud/template/TemplateApiService.java @@ -51,7 +51,7 @@ public interface TemplateApiService { VirtualMachineTemplate copyTemplate(CopyTemplateCmd cmd) throws StorageUnavailableException, ResourceAllocationException; - VirtualMachineTemplate prepareTemplate(long templateId, long zoneId); + VirtualMachineTemplate prepareTemplate(long templateId, long zoneId, Long storageId); boolean detachIso(long vmId); diff --git a/api/src/com/cloud/vm/Nic.java b/api/src/com/cloud/vm/Nic.java index 051721955ed..7b8e27fd656 100644 --- a/api/src/com/cloud/vm/Nic.java +++ b/api/src/com/cloud/vm/Nic.java @@ -115,14 +115,8 @@ public interface Nic extends Identity, InternalIdentity { boolean isDefaultNic(); - String getIp4Address(); - String getMacAddress(); - String getNetmask(); - - String getGateway(); - /** * @return network profile id that this */ @@ -145,11 +139,25 @@ public interface Nic extends Identity, InternalIdentity { AddressFormat getAddressFormat(); - String getIp6Gateway(); - - String getIp6Cidr(); - - String getIp6Address(); - boolean getSecondaryIp(); + + // + // IPv4 + // + + String getIPv4Address(); + + String getIPv4Netmask(); + + String getIPv4Gateway(); + + // + // IPv6 + // + + String getIPv6Gateway(); + + String getIPv6Cidr(); + + String getIPv6Address(); } diff --git a/api/src/com/cloud/vm/NicProfile.java b/api/src/com/cloud/vm/NicProfile.java index e9e9dc54ad1..58e05124c89 100644 --- a/api/src/com/cloud/vm/NicProfile.java +++ b/api/src/com/cloud/vm/NicProfile.java @@ -33,214 +33,64 @@ public class NicProfile implements InternalIdentity, Serializable { long id; long networkId; - BroadcastDomainType broadcastType; - Mode mode; long vmId; - String gateway; - AddressFormat format; - TrafficType trafficType; - String ip4Address; - String ip6Address; - String ip6Gateway; - String ip6Cidr; - String macAddress; - URI isolationUri; - String netmask; - URI broadcastUri; - ReservationStrategy strategy; String reservationId; - boolean defaultNic; Integer deviceId; - String dns1; - String dns2; - String ip6Dns1; - String ip6Dns2; - Integer networkRate; - boolean isSecurityGroupEnabled; + String name; - String requestedIpv4; - String requestedIpv6; String uuid; - public String getDns1() { - return dns1; - } + String macAddress; + BroadcastDomainType broadcastType; + Mode mode; + AddressFormat format; + TrafficType trafficType; + URI isolationUri; + URI broadcastUri; + ReservationStrategy strategy; + boolean defaultNic; + Integer networkRate; + boolean isSecurityGroupEnabled; - public String getName() { - return name; - } + // IPv4 + String iPv4Address; + String iPv4Netmask; + String iPv4Gateway; + String iPv4Dns1; + String iPv4Dns2; + String requestedIPv4; - public void setName(String name) { - this.name = name; - } + // IPv6 + String iPv6Address; + String iPv6Gateway; + String iPv6Cidr; + String iPv6Dns1; + String iPv6Dns2; + String requestedIPv6; - public String getDns2() { - return dns2; - } + // + // CONSTRUCTORS + // - public void setDns1(String dns1) { - this.dns1 = dns1; - } - - public void setDns2(String dns2) { - this.dns2 = dns2; - } - - public boolean isDefaultNic() { - return defaultNic; - } - - public String getNetmask() { - return netmask; - } - - public void setNetmask(String netmask) { - this.netmask = netmask; - } - - public void setBroadcastUri(URI broadcastUri) { - this.broadcastUri = broadcastUri; - } - - public URI getBroadCastUri() { - return broadcastUri; - } - - public void setIsolationUri(URI isolationUri) { - this.isolationUri = isolationUri; - } - - public URI getIsolationUri() { - return isolationUri; - } - - public void setStrategy(ReservationStrategy strategy) { - this.strategy = strategy; - } - - public BroadcastDomainType getType() { - return broadcastType; - } - - public void setBroadcastType(BroadcastDomainType broadcastType) { - this.broadcastType = broadcastType; - } - - public void setMode(Mode mode) { - this.mode = mode; - } - - public void setDeviceId(int deviceId) { - this.deviceId = deviceId; - } - - public void setDefaultNic(boolean defaultNic) { - this.defaultNic = defaultNic; - } - - public Integer getDeviceId() { - return deviceId; - } - - public void setGateway(String gateway) { - this.gateway = gateway; - } - - public void setFormat(AddressFormat format) { - this.format = format; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public void setTrafficType(TrafficType trafficType) { - this.trafficType = trafficType; - } - - public void setIp6Address(String ip6Address) { - this.ip6Address = ip6Address; - } - - public Mode getMode() { - return mode; - } - - public long getNetworkId() { - return networkId; - } - - public long getVirtualMachineId() { - return vmId; - } - - @Override - public long getId() { - return id; - } - - public BroadcastDomainType getBroadcastType() { - return broadcastType; - } - - public void setMacAddress(String macAddress) { - this.macAddress = macAddress; - } - - public long getVmId() { - return vmId; - } - - public String getGateway() { - return gateway; - } - - public AddressFormat getFormat() { - return format; - } - - public TrafficType getTrafficType() { - return trafficType; - } - - public String getIp4Address() { - return ip4Address; - } - - public String getIp6Address() { - return ip6Address; - } - - public String getMacAddress() { - return macAddress; - } - - public void setIp4Address(String ip4Address) { - this.ip4Address = ip4Address; - } - - public Integer getNetworkRate() { - return networkRate; - } - - public ReservationStrategy getStrategy() { - return strategy; - } - - public String getUuid() { - return uuid; + public NicProfile() { } public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri, Integer networkRate, boolean isSecurityGroupEnabled, String name) { id = nic.getId(); networkId = network.getId(); - gateway = nic.getGateway(); mode = network.getMode(); broadcastType = network.getBroadcastDomainType(); trafficType = network.getTrafficType(); - ip4Address = nic.getIp4Address(); format = nic.getAddressFormat(); - ip6Address = nic.getIp6Address(); + + iPv4Address = nic.getIPv4Address(); + iPv4Netmask = nic.getIPv4Netmask(); + iPv4Gateway = nic.getIPv4Gateway(); + + iPv6Address = nic.getIPv6Address(); + iPv6Gateway = nic.getIPv6Gateway(); + iPv6Cidr = nic.getIPv6Cidr(); + macAddress = nic.getMacAddress(); reservationId = nic.getReservationId(); strategy = nic.getReservationStrategy(); @@ -248,12 +98,10 @@ public class NicProfile implements InternalIdentity, Serializable { defaultNic = nic.isDefaultNic(); this.broadcastUri = broadcastUri; this.isolationUri = isolationUri; - netmask = nic.getNetmask(); + this.isSecurityGroupEnabled = isSecurityGroupEnabled; vmId = nic.getInstanceId(); this.name = name; - ip6Cidr = nic.getIp6Cidr(); - ip6Gateway = nic.getIp6Gateway(); uuid = nic.getUuid(); if (networkRate != null) { @@ -261,25 +109,47 @@ public class NicProfile implements InternalIdentity, Serializable { } } - public NicProfile(ReservationStrategy strategy, String ip4Address, String macAddress, String gateway, String netmask) { + public NicProfile(String requestedIPv4, String requestedIPv6) { + this.requestedIPv4 = requestedIPv4; + this.requestedIPv6 = requestedIPv6; + } + + public NicProfile(ReservationStrategy strategy, String iPv4Address, String macAddress, String iPv4gateway, String iPv4netmask) { format = AddressFormat.Ip4; - this.ip4Address = ip4Address; + this.iPv4Address = iPv4Address; + this.iPv4Gateway = iPv4gateway; + this.iPv4Netmask = iPv4netmask; this.macAddress = macAddress; - this.gateway = gateway; - this.netmask = netmask; this.strategy = strategy; } - public NicProfile(String requestedIpv4, String requestedIpv6) { - this.requestedIpv4 = requestedIpv4; - this.requestedIpv6 = requestedIpv6; + // + // GET & SET GENERAL + // + + @Override + public long getId() { + return id; } - public NicProfile() { + public void setId(long id) { + this.id = id; } - public ReservationStrategy getReservationStrategy() { - return strategy; + public long getNetworkId() { + return networkId; + } + + public void setNetworId(long networkId){ + this.networkId = networkId; + } + + public long getVirtualMachineId() { + return vmId; + } + + public void setVirtualMachineId(long virtualMachineId) { + this.vmId = virtualMachineId; } public String getReservationId() { @@ -290,6 +160,110 @@ public class NicProfile implements InternalIdentity, Serializable { this.reservationId = reservationId; } + public Integer getDeviceId() { + return deviceId; + } + + public void setDeviceId(int deviceId) { + this.deviceId = deviceId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getMacAddress() { + return macAddress; + } + + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + + public BroadcastDomainType getBroadcastType() { + return broadcastType; + } + + public void setBroadcastType(BroadcastDomainType broadcastType) { + this.broadcastType = broadcastType; + } + + public Mode getMode() { + return mode; + } + + public void setMode(Mode mode) { + this.mode = mode; + } + + public AddressFormat getFormat() { + return format; + } + + public void setFormat(AddressFormat format) { + this.format = format; + } + + public TrafficType getTrafficType() { + return trafficType; + } + + public void setTrafficType(TrafficType trafficType) { + this.trafficType = trafficType; + } + + public URI getIsolationUri() { + return isolationUri; + } + + public void setIsolationUri(URI isolationUri) { + this.isolationUri = isolationUri; + } + + public URI getBroadCastUri() { + return broadcastUri; + } + + public void setBroadcastUri(URI broadcastUri) { + this.broadcastUri = broadcastUri; + } + + public ReservationStrategy getReservationStrategy() { + return strategy; + } + + public void setReservationStrategy(ReservationStrategy strategy) { + this.strategy = strategy; + } + + public boolean isDefaultNic() { + return defaultNic; + } + + public void setDefaultNic(boolean defaultNic) { + this.defaultNic = defaultNic; + } + + public Integer getNetworkRate() { + return networkRate; + } + + public void setNetworkRate(Integer networkRate) { + this.networkRate = networkRate; + } + public boolean isSecurityGroupEnabled() { return isSecurityGroupEnabled; } @@ -298,27 +272,139 @@ public class NicProfile implements InternalIdentity, Serializable { isSecurityGroupEnabled = enabled; } - public String getRequestedIpv4() { - return requestedIpv4; + // + // GET & SET IPv4 + // + + public String getIPv4Address() { + return iPv4Address; } + public void setIPv4Address(String ipv4Address) { + this.iPv4Address = ipv4Address; + } + + public String getIPv4Netmask() { + return iPv4Netmask; + } + + public void setIPv4Netmask(String ipv4Netmask) { + this.iPv4Netmask = ipv4Netmask; + } + + public String getIPv4Gateway() { + return iPv4Gateway; + } + + public void setIPv4Gateway(String ipv4Gateway) { + this.iPv4Gateway = ipv4Gateway; + } + + public String getIPv4Dns1() { + return iPv4Dns1; + } + + public void setIPv4Dns1(String ipv4Dns1) { + this.iPv4Dns1 = ipv4Dns1; + } + + public String getIPv4Dns2() { + return iPv4Dns2; + } + + public void setIPv4Dns2(String ipv4Dns2) { + this.iPv4Dns2 = ipv4Dns2; + } + + public String getRequestedIPv4() { + return requestedIPv4; + } + + public void setRequestedIPv4(String requestedIPv4) { + this.requestedIPv4 = requestedIPv4; + } + + // + // GET & SET IPv6 + // + + public String getIPv6Address() { + return iPv6Address; + } + + public void setIPv6Address(String ipv6Address) { + this.iPv6Address = ipv6Address; + } + + public String getIPv6Gateway() { + return iPv6Gateway; + } + + public void setIPv6Gateway(String ipv6Gateway) { + this.iPv6Gateway = ipv6Gateway; + } + + public String getIPv6Cidr() { + return iPv6Cidr; + } + + public void setIPv6Cidr(String ipv6Cidr) { + this.iPv6Cidr = ipv6Cidr; + } + + public String getIPv6Dns1() { + return iPv6Dns1; + } + + public void setIPv6Dns1(String ipv6Dns1) { + this.iPv6Dns1 = ipv6Dns1; + } + + public String getIPv6Dns2() { + return iPv6Dns2; + } + + public void setIPv6Dns2(String ipv6Dns2) { + this.iPv6Dns2 = ipv6Dns2; + } + + public String getRequestedIPv6() { + return requestedIPv6; + } + + public void setRequestedIPv6(String requestedIPv6) { + this.requestedIPv6 = requestedIPv6; + } + + // + // OTHER METHODS + // + public void deallocate() { - gateway = null; mode = null; format = null; broadcastType = null; trafficType = null; - ip4Address = null; - ip6Address = null; + + iPv4Address = null; + iPv4Netmask = null; + iPv4Gateway = null; + iPv4Dns1 = null; + iPv4Dns2 = null; + + iPv6Address = null; + iPv6Gateway = null; + iPv6Cidr = null; + iPv6Dns1 = null; + iPv6Dns2 = null; + macAddress = null; reservationId = null; strategy = null; deviceId = null; broadcastUri = null; isolationUri = null; - netmask = null; - dns1 = null; - dns2 = null; + } @Override @@ -329,54 +415,9 @@ public class NicProfile implements InternalIdentity, Serializable { .append("-") .append(reservationId) .append("-") - .append(ip4Address) + .append(iPv4Address) .append("-") .append(broadcastUri) .toString(); } - - public String getIp6Gateway() { - return ip6Gateway; - } - - public void setIp6Gateway(String ip6Gateway) { - this.ip6Gateway = ip6Gateway; - } - - public String getIp6Cidr() { - return ip6Cidr; - } - - public void setIp6Cidr(String ip6Cidr) { - this.ip6Cidr = ip6Cidr; - } - - public String getRequestedIpv6() { - return requestedIpv6; - } - - public void setRequestedIpv6(String requestedIpv6) { - this.requestedIpv6 = requestedIpv6; - } - - public String getIp6Dns1() { - return ip6Dns1; - } - - public void setIp6Dns1(String ip6Dns1) { - this.ip6Dns1 = ip6Dns1; - } - - public String getIp6Dns2() { - return ip6Dns2; - } - - public void setIp6Dns2(String ip6Dns2) { - this.ip6Dns2 = ip6Dns2; - } - - public void setNetworId(long networkId){ - this.networkId = networkId; - } - -} +} \ No newline at end of file diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index 0e7ff88d68b..2728bcc6fef 100644 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -271,6 +271,7 @@ public class ApiConstants { public static final String VIRTUAL_MACHINE_ID = "virtualmachineid"; public static final String VIRTUAL_MACHINE_IDS = "virtualmachineids"; public static final String VIRTUAL_MACHINE_ID_IP = "vmidipmap"; + public static final String VIRTUAL_MACHINE_COUNT = "virtualmachinecount"; public static final String USAGE_ID = "usageid"; public static final String VLAN = "vlan"; @@ -627,6 +628,8 @@ public class ApiConstants { public static final String OVM3_CLUSTER = "ovm3cluster"; public static final String OVM3_VIP = "ovm3vip"; + public static final String ADMIN = "admin"; + public enum HostDetails { all, capacity, events, stats, min; } diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java index ec3090fa6a5..b55ce714988 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java @@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.account; import java.util.Collection; import java.util.Map; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; @@ -31,7 +32,6 @@ import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.context.CallContext; -import org.apache.commons.lang.StringUtils; import com.cloud.user.Account; import com.cloud.user.UserAccount; @@ -175,9 +175,7 @@ public class CreateAccountCmd extends BaseCmd { @Override public void execute() { - if (StringUtils.isEmpty(getPassword())) { - throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty passwords are not allowed"); - } + validateParams(); CallContext.current().setEventDetails("Account Name: " + getAccountName() + ", Domain Id:" + getDomainId()); UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), @@ -190,4 +188,13 @@ public class CreateAccountCmd extends BaseCmd { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a user account"); } } + + /** + * TODO: this should be done through a validator. for now replicating the validation logic in create account and user + */ + private void validateParams() { + if(StringUtils.isEmpty(getPassword())) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty passwords are not allowed"); + } + } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java index d4c26966d91..0537c01fd3c 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java @@ -28,6 +28,7 @@ import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ResponseObject.ResponseView; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; @@ -60,6 +61,15 @@ public class PrepareTemplateCmd extends BaseCmd { description = "template ID of the template to be prepared in primary storage(s).") private Long templateId; + @ACL(accessType = AccessType.OperateEntry) + @Parameter(name = ApiConstants.STORAGE_ID, + type = CommandType.UUID, + entityType = StoragePoolResponse.class, + required = false, + description = "storage pool ID of the primary storage pool to which the template should be prepared. If it is not provided the template" + + " is prepared on all the available primary storage pools.") + private Long storageId; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -72,6 +82,10 @@ public class PrepareTemplateCmd extends BaseCmd { return templateId; } + public Long getStorageId() { + return storageId; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -90,7 +104,7 @@ public class PrepareTemplateCmd extends BaseCmd { public void execute() { ListResponse response = new ListResponse(); - VirtualMachineTemplate vmTemplate = _templateService.prepareTemplate(templateId, zoneId); + VirtualMachineTemplate vmTemplate = _templateService.prepareTemplate(templateId, zoneId, storageId); List templateResponses = _responseGenerator.createTemplateResponses(ResponseView.Full, vmTemplate, zoneId, true); response.setResponses(templateResponses); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java index 122fd439d49..71d6a661af3 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java @@ -150,9 +150,7 @@ public class CreateUserCmd extends BaseCmd { @Override public void execute() { - if (StringUtils.isEmpty(getPassword())) { - throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty passwords are not allowed"); - } + validateParams(); CallContext.current().setEventDetails("UserName: " + getUserName() + ", FirstName :" + getFirstName() + ", LastName: " + getLastName()); User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId(), @@ -165,4 +163,13 @@ public class CreateUserCmd extends BaseCmd { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a user"); } } + + /** + * TODO: this should be done through a validator. for now replicating the validation logic in create account and user + */ + private void validateParams() { + if(StringUtils.isEmpty(getPassword())) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty passwords are not allowed"); + } + } } diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java index 4541efa7980..6a2b491f2f4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java @@ -134,7 +134,7 @@ public class CreateAutoScalePolicyCmd extends BaseAsyncCreateCmd { long conditionId = getConditionIds().get(0); Condition condition = _entityMgr.findById(Condition.class, conditionId); if (condition == null) { - // it is an invalid condition, return system acccount, error will be thrown later. + // it is an invalid condition, return system account, error will be thrown later. conditionDomainId = Domain.ROOT_DOMAIN; conditionAccountId = Account.ACCOUNT_ID_SYSTEM; } else { diff --git a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java index e6696e17ff0..24486a3c79b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java @@ -18,11 +18,10 @@ package org.apache.cloudstack.api.command.user.config; import java.util.Map; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.response.CapabilitiesResponse; +import org.apache.log4j.Logger; import com.cloud.user.Account; @@ -57,6 +56,8 @@ public class ListCapabilitiesCmd extends BaseCmd { response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize")); response.setRegionSecondaryEnabled((Boolean)capabilities.get("regionSecondaryEnabled")); response.setKVMSnapshotEnabled((Boolean)capabilities.get("KVMSnapshotEnabled")); + response.setAllowUserViewDestroyedVM((Boolean)capabilities.get("allowUserViewDestroyedVM")); + response.setAllowUserExpungeRecoverVM((Boolean)capabilities.get("allowUserExpungeRecoverVM")); if (capabilities.containsKey("apiLimitInterval")) { response.setApiLimitInterval((Integer)capabilities.get("apiLimitInterval")); } diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java index 0c79f81564d..b8fbb02ad22 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java @@ -29,8 +29,8 @@ import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SnapshotResponse; -import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.context.CallContext; +import org.apache.log4j.Logger; import com.cloud.event.EventTypes; import com.cloud.storage.Snapshot; @@ -39,17 +39,27 @@ import com.cloud.user.Account; @APICommand(name = "revertSnapshot", description = "revert a volume snapshot.", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class RevertSnapshotCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(RevertSnapshotCmd.class.getName()); private static final String s_name = "revertsnapshotresponse"; + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name= ApiConstants.ID, type= BaseCmd.CommandType.UUID, entityType = SnapshotResponse.class, required=true, description="The ID of the snapshot") private Long id; + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// public Long getId() { return id; } + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// @Override public String getCommandName() { return s_name; @@ -88,9 +98,9 @@ public class RevertSnapshotCmd extends BaseAsyncCmd { @Override public void execute() { CallContext.current().setEventDetails("Snapshot Id: " + getId()); - boolean result = _snapshotService.revertSnapshot(getId()); - if (result) { - SuccessResponse response = new SuccessResponse(getCommandName()); + Snapshot snapshot = _snapshotService.revertSnapshot(getId()); + if (snapshot != null) { + SnapshotResponse response = _responseGenerator.createSnapshotResponse(snapshot); response.setResponseName(getCommandName()); setResponseObject(response); } else { diff --git a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java index 7be7e62ee52..c8d6ce338c2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java @@ -20,6 +20,14 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import org.apache.cloudstack.acl.SecurityChecker; +import org.apache.cloudstack.api.response.GuestOSResponse; +import org.apache.cloudstack.api.response.SnapshotResponse; +import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.cloudstack.api.response.ProjectResponse; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; @@ -30,11 +38,6 @@ import org.apache.cloudstack.api.BaseAsyncCreateCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ResponseObject.ResponseView; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.GuestOSResponse; -import org.apache.cloudstack.api.response.SnapshotResponse; -import org.apache.cloudstack.api.response.TemplateResponse; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.cloudstack.context.CallContext; import com.cloud.event.EventTypes; @@ -124,6 +127,9 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd { description = "true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") protected Boolean isDynamicallyScalable; + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "create template for the project") + private Long projectId; + // /////////////////////////////////////////////////// // ///////////////// Accessors /////////////////////// // /////////////////////////////////////////////////// @@ -211,37 +217,43 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd { public long getEntityOwnerId() { Long volumeId = getVolumeId(); Long snapshotId = getSnapshotId(); - Long accountId = null; + Account callingAccount = CallContext.current().getCallingAccount(); if (volumeId != null) { Volume volume = _entityMgr.findById(Volume.class, volumeId); if (volume != null) { - accountId = volume.getAccountId(); + _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, volume); } else { throw new InvalidParameterValueException("Unable to find volume by id=" + volumeId); } } else { Snapshot snapshot = _entityMgr.findById(Snapshot.class, snapshotId); if (snapshot != null) { - accountId = snapshot.getAccountId(); + _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, snapshot); } else { throw new InvalidParameterValueException("Unable to find snapshot by id=" + snapshotId); } } - Account account = _accountService.getAccount(accountId); - //Can create templates for enabled projects/accounts only - if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) { - Project project = _projectService.findByProjectAccountId(accountId); - if (project.getState() != Project.State.Active) { - PermissionDeniedException ex = - new PermissionDeniedException("Can't add resources to the specified project id in state=" + project.getState() + " as it's no longer active"); - ex.addProxyObject(project.getUuid(), "projectId"); + if(projectId != null){ + final Project project = _projectService.getProject(projectId); + if (project != null) { + if (project.getState() == Project.State.Active) { + Account projectAccount= _accountService.getAccount(project.getProjectAccountId()); + _accountService.checkAccess(callingAccount, SecurityChecker.AccessType.UseEntry, false, projectAccount); + return project.getProjectAccountId(); + } else { + final PermissionDeniedException ex = + new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + + " as it's no longer active"); + ex.addProxyObject(project.getUuid(), "projectId"); + throw ex; + } + } else { + throw new InvalidParameterValueException("Unable to find project by id"); } - } else if (account.getState() == Account.State.disabled) { - throw new PermissionDeniedException("The owner of template is disabled: " + account); } - return accountId; + return callingAccount.getId(); } @Override @@ -267,7 +279,7 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd { public void create() throws ResourceAllocationException { VirtualMachineTemplate template = null; //TemplateOwner should be the caller https://issues.citrite.net/browse/CS-17530 - template = _templateService.createPrivateTemplateRecord(this, CallContext.current().getCallingAccount()); + template = _templateService.createPrivateTemplateRecord(this, _accountService.getAccount(getEntityOwnerId())); if (template != null) { setEntityId(template.getId()); setEntityUuid(template.getUuid()); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java index 3de0e4f72d7..f23e03a1437 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java @@ -40,7 +40,7 @@ import com.cloud.user.Account; import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DestroyVMCmd extends BaseAsyncCmd { @@ -59,7 +59,7 @@ public class DestroyVMCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.EXPUNGE, type = CommandType.BOOLEAN, - description = "If true is passed, the vm is expunged immediately. False by default. Parameter can be passed to the call by ROOT/Domain admin only", + description = "If true is passed, the vm is expunged immediately. False by default.", since = "4.2.1") private Boolean expunge; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java index 6954832a9f6..458122d6d7b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java @@ -94,7 +94,7 @@ public class UpdateVMCmd extends BaseCustomIdCmd { private String instanceName; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs.") - protected Map details; + protected Map details; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -136,13 +136,13 @@ public class UpdateVMCmd extends BaseCustomIdCmd { return instanceName; } - public Map getDetails() { + public Map getDetails() { if (this.details == null || this.details.isEmpty()) { return null; } - Collection paramsCollection = this.details.values(); - return (Map) (paramsCollection.toArray())[0]; + Collection paramsCollection = this.details.values(); + return (Map) (paramsCollection.toArray())[0]; } ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java index f7fdb95fb6e..623a0a231f7 100644 --- a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java @@ -16,12 +16,11 @@ // under the License. package org.apache.cloudstack.api.response; -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; @SuppressWarnings("unused") public class CapabilitiesResponse extends BaseResponse { @@ -73,6 +72,14 @@ public class CapabilitiesResponse extends BaseResponse { @Param(description = "Max allowed number of api requests within the specified interval") private Integer apiLimitMax; + @SerializedName("allowuserviewdestroyedvm") + @Param(description = "true if the user is allowed to view destroyed virtualmachines, false otherwise", since = "4.6.0") + private boolean allowUserViewDestroyedVM; + + @SerializedName("allowuserexpungerecovervm") + @Param(description = "true if the user can recover and expunge virtualmachines, false otherwise", since = "4.6.0") + private boolean allowUserExpungeRecoverVM; + public void setSecurityGroupsEnabled(boolean securityGroupsEnabled) { this.securityGroupsEnabled = securityGroupsEnabled; } @@ -121,4 +128,11 @@ public class CapabilitiesResponse extends BaseResponse { this.apiLimitMax = apiLimitMax; } -} + public void setAllowUserViewDestroyedVM(boolean allowUserViewDestroyedVM) { + this.allowUserViewDestroyedVM = allowUserViewDestroyedVM; + } + + public void setAllowUserExpungeRecoverVM(boolean allowUserExpungeRecoverVM) { + this.allowUserExpungeRecoverVM = allowUserExpungeRecoverVM; + } +} \ No newline at end of file diff --git a/api/src/org/apache/cloudstack/api/response/HostResponse.java b/api/src/org/apache/cloudstack/api/response/HostResponse.java index 9cb0fcb0a43..c6697fbe309 100644 --- a/api/src/org/apache/cloudstack/api/response/HostResponse.java +++ b/api/src/org/apache/cloudstack/api/response/HostResponse.java @@ -16,20 +16,19 @@ // under the License. package org.apache.cloudstack.api.response; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import com.google.gson.annotations.SerializedName; - -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; - import com.cloud.host.Host; import com.cloud.host.Status; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @EntityReference(value = Host.class) public class HostResponse extends BaseResponse { @@ -217,6 +216,12 @@ public class HostResponse extends BaseResponse { @Param(description = "Host details in key/value pairs.", since = "4.5") private Map details; + + // Default visibility to support accessing the details from unit tests + Map getDetails() { + return details; + } + @Override public String getObjectId() { return this.getId(); @@ -423,7 +428,21 @@ public class HostResponse extends BaseResponse { } public void setDetails(Map details) { - this.details = details; + + if (details == null) { + return; + } + + final Map detailsCopy = new HashMap(details); + + // Fix for CVE ID 2015-3251 + // Remove sensitive host credential information from + // the details to prevent leakage through API calls + detailsCopy.remove("username"); + detailsCopy.remove("password"); + + this.details = detailsCopy; + } } diff --git a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java index 0be2ee137be..c96421b0a40 100644 --- a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java @@ -19,14 +19,13 @@ package org.apache.cloudstack.api.response; import java.util.LinkedHashSet; import java.util.Set; -import com.google.gson.annotations.SerializedName; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import com.cloud.network.security.SecurityGroup; import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; @SuppressWarnings("unused") @EntityReference(value = SecurityGroup.class) @@ -76,7 +75,16 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledVie @Param(description = "the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) private Set tags; + @SerializedName(ApiConstants.VIRTUAL_MACHINE_COUNT) + @Param(description = "the number of virtualmachines associated with this securitygroup", since = "4.6.0") + private Integer virtualMachineCount; + + @SerializedName(ApiConstants.VIRTUAL_MACHINE_IDS) + @Param(description = "the list of virtualmachine ids associated with this securitygroup", since = "4.6.0") + private Set virtualMachineIds; + public SecurityGroupResponse() { + this.virtualMachineIds = new LinkedHashSet(); this.ingressRules = new LinkedHashSet(); this.egressRules = new LinkedHashSet(); this.tags = new LinkedHashSet(); @@ -176,4 +184,16 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledVie public void addTag(ResourceTagResponse tag) { this.tags.add(tag); } + + public void setVirtualMachineCount(Integer virtualMachineCount) { + this.virtualMachineCount = virtualMachineCount; + } + + public void setVirtualMachineIds(Set virtualMachineIds) { + this.virtualMachineIds = virtualMachineIds; + } + + public void addVirtualMachineId(String virtualMachineId) { + this.virtualMachineIds.add(virtualMachineId); + } } diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java index 0cf05a643f1..1a5ac11b299 100644 --- a/api/src/org/apache/cloudstack/query/QueryService.java +++ b/api/src/org/apache/cloudstack/query/QueryService.java @@ -71,6 +71,7 @@ import org.apache.cloudstack.api.response.UserResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.cloudstack.framework.config.ConfigKey; import com.cloud.exception.PermissionDeniedException; @@ -80,6 +81,10 @@ import com.cloud.exception.PermissionDeniedException; */ public interface QueryService { + // Config keys + static final ConfigKey AllowUserViewDestroyedVM = new ConfigKey("Advanced", Boolean.class, "allow.user.view.destroyed.vm", "false", + "Determines whether users can view their destroyed or expunging vm ", true, ConfigKey.Scope.Account); + ListResponse searchForUsers(ListUsersCmd cmd) throws PermissionDeniedException; ListResponse searchForEvents(ListEventsCmd cmd); diff --git a/api/test/org/apache/cloudstack/api/command/admin/account/CreateAccountCmdTest.java b/api/test/org/apache/cloudstack/api/command/admin/account/CreateAccountCmdTest.java new file mode 100644 index 00000000000..c0a046de435 --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/admin/account/CreateAccountCmdTest.java @@ -0,0 +1,100 @@ +/* + * 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.api.command.admin.account; + +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.context.CallContext; +import org.apache.log4j.Logger; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.springframework.test.util.ReflectionTestUtils; + +import com.cloud.user.Account; +import com.cloud.user.AccountService; +import com.cloud.user.User; + +public class CreateAccountCmdTest { + public static final Logger s_logger = Logger.getLogger(CreateAccountCmdTest.class.getName()); + + @Mock + private AccountService accountService; + + @InjectMocks + private CreateAccountCmd createAccountCmd = new CreateAccountCmd(); + + private short accountType = 1; + private Long domainId = 1L; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + ReflectionTestUtils.setField(createAccountCmd, "domainId", domainId); + ReflectionTestUtils.setField(createAccountCmd, "accountType", accountType); + CallContext.register(Mockito.mock(User.class), Mockito.mock(Account.class)); + } + + @After + public void tearDown() throws Exception { + CallContext.unregister(); + } + + @Test + public void testExecuteWithNotBlankPassword() { + ReflectionTestUtils.setField(createAccountCmd, "password", "Test"); + try { + createAccountCmd.execute(); + } catch (ServerApiException e) { + Assert.assertTrue("Received exception as the mock accountService createUserAccount returns null user", true); + } + Mockito.verify(accountService, Mockito.times(1)).createUserAccount(null, "Test", null, null, null, null, null, accountType, domainId, null, null, null, null); + } + + @Test + public void testExecuteWithNullPassword() { + ReflectionTestUtils.setField(createAccountCmd, "password", null); + try { + createAccountCmd.execute(); + Assert.fail("should throw exception for a null password"); + } catch (ServerApiException e) { + Assert.assertEquals(ApiErrorCode.PARAM_ERROR, e.getErrorCode()); + Assert.assertEquals("Empty passwords are not allowed", e.getMessage()); + } + Mockito.verify(accountService, Mockito.never()).createUserAccount(null, null, null, null, null, null, null, accountType, domainId, null, null, null, null); + } + + @Test + public void testExecuteWithEmptyPassword() { + ReflectionTestUtils.setField(createAccountCmd, "password", ""); + try { + createAccountCmd.execute(); + Assert.fail("should throw exception for a empty password"); + } catch (ServerApiException e) { + Assert.assertEquals(ApiErrorCode.PARAM_ERROR, e.getErrorCode()); + Assert.assertEquals("Empty passwords are not allowed", e.getMessage()); + } + Mockito.verify(accountService, Mockito.never()).createUserAccount(null, null, null, null, null, null, null, accountType, domainId, null, null, null, null); + } +} diff --git a/api/test/org/apache/cloudstack/api/command/admin/user/CreateUserCmdTest.java b/api/test/org/apache/cloudstack/api/command/admin/user/CreateUserCmdTest.java new file mode 100644 index 00000000000..cde3b2da87f --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/admin/user/CreateUserCmdTest.java @@ -0,0 +1,96 @@ +/* + * 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.api.command.admin.user; + +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.context.CallContext; +import org.apache.log4j.Logger; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.springframework.test.util.ReflectionTestUtils; + +import com.cloud.user.Account; +import com.cloud.user.AccountService; +import com.cloud.user.User; + +public class CreateUserCmdTest { + public static final Logger s_logger = Logger.getLogger(CreateUserCmdTest.class.getName()); + + @Mock + private AccountService accountService; + + @InjectMocks + private CreateUserCmd createUserCmd = new CreateUserCmd(); + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + CallContext.register(Mockito.mock(User.class), Mockito.mock(Account.class)); + } + + @After + public void tearDown() throws Exception { + CallContext.unregister(); + } + + @Test + public void testExecuteWithNotBlankPassword() { + ReflectionTestUtils.setField(createUserCmd, "password", "Test"); + try { + createUserCmd.execute(); + } catch (ServerApiException e) { + Assert.assertTrue("Received exception as the mock accountService createUser returns null user", true); + } + Mockito.verify(accountService, Mockito.times(1)).createUser(null, "Test", null, null, null, null, null, null, null); + } + + @Test + public void testExecuteWithNullPassword() { + ReflectionTestUtils.setField(createUserCmd, "password", null); + try { + createUserCmd.execute(); + Assert.fail("should throw exception for a null password"); + } catch (ServerApiException e) { + Assert.assertEquals(ApiErrorCode.PARAM_ERROR,e.getErrorCode()); + Assert.assertEquals("Empty passwords are not allowed", e.getMessage()); + } + Mockito.verify(accountService, Mockito.never()).createUser(null, null, null, null, null, null, null, null, null); + } + + @Test + public void testExecuteWithEmptyPassword() { + ReflectionTestUtils.setField(createUserCmd, "password", ""); + try { + createUserCmd.execute(); + Assert.fail("should throw exception for a empty password"); + } catch (ServerApiException e) { + Assert.assertEquals(ApiErrorCode.PARAM_ERROR,e.getErrorCode()); + Assert.assertEquals("Empty passwords are not allowed", e.getMessage()); + } + Mockito.verify(accountService, Mockito.never()).createUser(null, null, null, null, null, null, null, null, null); + } +} diff --git a/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java index 3755353164f..c8d99a8a245 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java @@ -70,32 +70,6 @@ public class AddVpnUserCmdTest extends TestCase { }; } - /* - * @Test public void testExecuteVpnUserNotFound() { - * - * EntityManager entityManager = Mockito.mock(EntityManager.class); - * - * Mockito.when(entityManager.findById(VpnUser.class, - * Mockito.anyLong())).thenReturn(null); - * - * addVpnUserCmd._entityMgr = entityManager; try { addVpnUserCmd.execute(); - * } catch (Exception e) { } - * - * } - * - * - * @Test public void testExecuteVpnUserFound() { - * - * EntityManager entityManager = Mockito.mock(EntityManager.class); - * addVpnUserCmd._entityMgr = entityManager; - * - * VpnUser vpnUser = Mockito.mock(VpnUser.class); - * Mockito.when(entityManager.findById(VpnUser.class, - * Mockito.anyLong())).thenReturn(vpnUser); addVpnUserCmd.execute(); - * - * } - */ - @Test public void testCreateSuccess() { diff --git a/api/test/org/apache/cloudstack/api/response/HostResponseTest.java b/api/test/org/apache/cloudstack/api/response/HostResponseTest.java new file mode 100644 index 00000000000..523b3de9e3c --- /dev/null +++ b/api/test/org/apache/cloudstack/api/response/HostResponseTest.java @@ -0,0 +1,80 @@ +// 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.api.response; + +import junit.framework.TestCase; +import org.apache.commons.collections.map.HashedMap; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +public final class HostResponseTest extends TestCase { + + private static final String VALID_KEY = "validkey"; + private static final String VALID_VALUE = "validvalue"; + + @Test + public void testSetDetailsNull() { + + final HostResponse hostResponse = new HostResponse(); + hostResponse.setDetails(null); + + assertEquals(null, hostResponse.getDetails()); + + } + + @Test + public void testSetDetailsWithRootCredentials() { + + final HostResponse hostResponse = new HostResponse(); + final Map details = new HashMap<>(); + + details.put(VALID_KEY, VALID_VALUE); + details.put("username", "test"); + details.put("password", "password"); + + final Map expectedDetails = new HashedMap(); + expectedDetails.put(VALID_KEY, VALID_VALUE); + + hostResponse.setDetails(details); + final Map actualDetails = hostResponse.getDetails(); + + assertTrue(details != actualDetails); + assertEquals(expectedDetails, actualDetails); + + } + + @Test + public void testSetDetailsWithoutRootCredentials() { + + final HostResponse hostResponse = new HostResponse(); + final Map details = new HashMap<>(); + + details.put(VALID_KEY, VALID_VALUE); + + final Map expectedDetails = new HashedMap(); + expectedDetails.put(VALID_KEY, VALID_VALUE); + + hostResponse.setDetails(details); + final Map actualDetails = hostResponse.getDetails(); + + assertTrue(details != actualDetails); + assertEquals(expectedDetails, actualDetails); + + } +} diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 701582cb132..4bc96a32010 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -461,6 +461,7 @@ label.cluster.type=Cluster Type label.cluster=Cluster label.clusters=Clusters label.clvm=CLVM +label.custom.disk.offering=Custom Disk Offering label.rbd=RBD label.rbd.monitor=Ceph monitor label.rbd.pool=Ceph pool @@ -492,6 +493,7 @@ label.cpu.mhz=CPU (in MHz) label.cpu.utilized=CPU Utilized label.cpu=CPU label.create.project=Create project +label.create.ssh.key.pair=Create a SSH Key Pair label.create.template=Create template label.create.VPN.connection=Create VPN Connection label.created.by.system=Created by system @@ -615,6 +617,7 @@ label.f5=F5 label.failed=Failed label.featured=Featured label.fetch.latest=Fetch latest +label.fingerprint=FingerPrint label.filterBy=Filter by label.firewall=Firewall label.first.name=First Name @@ -650,6 +653,7 @@ label.hints=Hints label.host.alerts=Host Alerts label.host.MAC=Host MAC label.host.name=Host Name +label.host.tag=Host Tag label.host.tags=Host Tags label.host=Host label.hosts=Hosts @@ -762,6 +766,7 @@ label.local.storage.enabled=Enable local storage for User VMs label.local.storage.enabled.system.vms=Enable local storage for System VMs label.local.storage=Local Storage label.local=Local +label.local.file=Local file label.login=Login label.logout=Logout label.saml.enable=Authorize SAML SSO @@ -891,6 +896,7 @@ label.networking.and.security=Networking and security label.networks=Networks label.new.password=New Password label.new.project=New Project +label.new.ssh.key.pair=New SSH Key Pair label.new.vm=New VM label.new=New label.next=Next @@ -974,6 +980,7 @@ label.private.interface=Private Interface label.private.ip.range=Private IP Range label.private.ip=Private IP Address label.private.ips=Private IP Addresses +label.private.key=Private Key label.private.network=Private network label.private.port=Private Port label.private.zone=Private Zone @@ -991,6 +998,7 @@ label.providers=Providers label.public.interface=Public Interface label.public.ip=Public IP Address label.public.ips=Public IP Addresses +label.public.key=Public Key label.public.network=Public network label.public.port=Public Port label.public.traffic=Public traffic @@ -1018,6 +1026,7 @@ label.remove.pf=Remove port forwarding rule label.remove.project.account=Remove account from project label.remove.region=Remove Region label.remove.rule=Remove rule +label.remove.ssh.key.pair=Remove SSH Key Pair label.remove.static.nat.rule=Remove static NAT rule label.remove.static.route=Remove static route label.remove.tier=Remove tier @@ -1029,6 +1038,8 @@ label.required=Required label.reserved.system.gateway=Reserved system gateway label.reserved.system.ip=Reserved System IP label.reserved.system.netmask=Reserved system netmask +label.reset.ssh.key.pair=Reset SSH Key Pair +label.reset.ssh.key.pair.on.vm=Reset SSH Key Pair on VM label.reset.VPN.connection=Reset VPN connection label.resize.new.offering.id=New Offering label.resize.new.size=New Size (GB) @@ -1092,8 +1103,8 @@ label.service.capabilities=Service Capabilities label.service.offering=Service Offering label.session.expired=Session Expired label.set.up.zone.type=Set up zone type -label.setup.network=Setup Network -label.setup.zone=Setup Zone +label.setup.network=Set up Network +label.setup.zone=Set up Zone label.setup=Setup label.shared=Shared label.SharedMountPoint=SharedMountPoint @@ -1104,8 +1115,8 @@ label.size=Size label.skip.guide=I have used CloudStack before, skip this guide label.snapshot.limits=Snapshot Limits label.snapshot.name=Snapshot Name -label.snapshot.s=Snapshot(s) -label.snapshot.schedule=Setup Recurring Snapshot +label.snapshot.s=Snapshots +label.snapshot.schedule=Set up Recurring Snapshot label.snapshot=Snapshot label.snapshots=Snapshots label.source.nat=Source NAT @@ -1114,6 +1125,8 @@ label.specify.vlan=Specify VLAN label.specify.vxlan=Specify VXLAN label.SR.name=SR Name-Label label.srx=SRX +label.ssh.key.pair=SSH Key Pair +label.ssh.key.pair.details=SSH Key Pair Details label.PA=Palo Alto label.start.IP=Start IP label.start.port=Start Port @@ -1214,7 +1227,11 @@ label.update.project.resources=Update project resources label.update.ssl.cert= SSL Certificate label.update.ssl= SSL Certificate label.updating=Updating +label.upload.from.local=Upload from Local +label.upload.template.from.local=Upload Template from Local label.upload.volume=Upload volume +label.upload.volume.from.local=Upload Volume from Local +label.upload.volume.from.url=Upload volume from URL label.upload=Upload label.url=URL label.usage.interface=Usage Interface @@ -1795,8 +1812,10 @@ message.delete.VPN.gateway=Please confirm that you want to delete this VPN Gatew message.desc.advanced.zone=For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks and providing custom network offerings such as firewall, VPN, or load balancer support. message.desc.basic.zone=Provide a single network where each VM instance is assigned an IP directly from the network. Guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). message.desc.cluster=Each pod must contain one or more clusters, and we will add the first cluster now. A cluster provides a way to group hosts. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared storage. Each cluster consists of one or more hosts and one or more primary storage servers. +message.desc.created.ssh.key.pair=Created a SSH Key Pair. message.desc.host=Each cluster must contain at least one host (computer) for guest VMs to run on, and we will add the first host now. For a host to function in CloudStack, you must install hypervisor software on the host, assign an IP address to the host, and ensure the host is connected to the CloudStack management server.

Give the host\\'s DNS or IP address, the user name (usually root) and password, and any labels you use to categorize hosts. message.desc.primary.storage=Each cluster must contain one or more primary storage servers, and we will add the first one now. Primary storage contains the disk volumes for all the VMs running on hosts in the cluster. Use any standards-compliant protocol that is supported by the underlying hypervisor. +message.desc.reset.ssh.key.pair=Please specify a ssh key pair that you would like to add to this VM. Please note the root password will be changed by this operation if password is enabled. message.desc.secondary.storage=Each zone must have at least one NFS or secondary storage server, and we will add the first one now. Secondary storage stores VM templates, ISO images, and VM disk volume snapshots. This server must be available to all hosts in the zone.

Provide the IP address and exported path. message.desc.zone=A zone is the largest organizational unit in CloudStack, and it typically corresponds to a single datacenter. Zones provide physical isolation and redundancy. A zone consists of one or more pods (each of which contains hosts and primary storage servers) and a secondary storage server which is shared by all pods in the zone. message.detach.disk=Are you sure you want to detach this disk? @@ -1915,7 +1934,7 @@ message.select.template=Please select a template for your new virtual instance. message.setup.physical.network.during.zone.creation.basic=When adding a basic zone, you can set up one physical network, which corresponds to a NIC on the hypervisor. The network carries several types of traffic.

You may also drag and drop other traffic types onto the physical network. message.setup.physical.network.during.zone.creation=When adding an advanced zone, you need to set up one or more physical networks. Each network corresponds to a NIC on the hypervisor. Each physical network can carry one or more types of traffic, with certain restrictions on how they may be combined.

Drag and drop one or more traffic types onto each physical network. message.setup.successful=Cloud setup successful\! -message.snapshot.schedule=You can setup recurring snapshot schedules by selecting from the available options below and applying your policy preference +message.snapshot.schedule=You can set up recurring snapshot schedules by selecting from the available options below and applying your policy preference message.specify.url=Please specify URL message.step.1.continue=Please select a template or ISO to continue message.step.1.desc=Please select a template for your new virtual instance. You can also choose to select a blank template from which an ISO image can be installed onto. @@ -2106,7 +2125,6 @@ label.zone.name=Zone Name label.instances=Instances label.event=Event label.minutes.past.hour=minutes(s) past the hour -label.snapshots=snapshot(s) label.time.colon=Time: label.min.past.the.hr=min past the hr label.timezone.colon=Timezone: @@ -2115,3 +2133,48 @@ label.every=Every label.day=Day label.of.month=of month label.add.private.gateway=Add Private Gateway +label.link.domain.to.ldap=Link Domain to LDAP +message.link.domain.to.ldap=Enable autosync for this domain in LDAP +label.ldap.link.type=Type +label.account.type=Account Type +message.desc.created.ssh.key.pair=Created a SSH Key Pair. +message.please.confirm.remove.ssh.key.pair=Please confirm that you want to remove this SSH Key Pair +message.password.has.been.reset.to=Password has been reset to +message.password.of.the.vm.has.been.reset.to=Password of the VM has been reset to +message.question.are.you.sure.you.want.to.add=Are you sure you want to add +label.domain.details=Domain details +label.account.details=Account details +label.user.details=User details +label.service.offering.details=Service offering details +label.system.service.offering.details=System service offering details +label.disk.offering.details=Disk offering details +label.network.offering.details=Network offering details +label.remove.this.physical.network=Remove this physical network +label.physical.network.name=Physical network name +label.save.changes=Save changes +label.autoscale.configuration.wizard=AutoScale Configuration Wizard +label.health.check.wizard=Health Check Wizard +label.health.check.message.desc=Your load balancer will automatically perform health checks on your cloudstack instances and only route traffic to instances that pass the health check +label.health.check.configurations.options=Configuration Options: +label.health.check.advanced.options=Advanced Options: +label.add.isolated.guest.network.with.sourcenat=Add Isolated Guest Network with SourceNat +message.network.remote.access.vpn.configuration=Remote Access VPN configuration has been generated, but it failed to apply. Please check connectivity of the network element, then re-try. +label.vpc.router.details=VPC Router Details +label.edit.rule=Edit rule +label.advanced.search=Advanced Search +label.internal.lb=Internal LB +label.public.lb=Public LB +label.acl.list.rules=ACL List Rules +label.static.routes=Static Routes +label.network.details=Network Details +label.scaleup.policy=ScaleUp Policy +label.scaledown.policy=ScaleDown Policy +label.configure.sticky.policy=Configure Sticky Policy +label.please.complete.the.following.fields=Please complete the following fields +message.desc.add.new.lb.sticky.rule=Add new LB sticky rule +label.ssh.key.pairs=SSH Key Pairs +message.desc.create.ssh.key.pair=Please fill in the following data to create or register a ssh key pair.

(1) If public key is set, CloudStack will register the public key. You can use it through your private key.

(2) If public key is not set, CloudStack will create a new SSH Key pair. In this case, please copy and save the private key. CloudStack will not keep it.
+message.removed.ssh.key.pair=Removed a SSH Key Pair +message.please.select.ssh.key.pair.use.with.this.vm=Please select a ssh key pair you want this VM to use: +message.configure.firewall.rules.allow.traffic=Configure the rules to allow Traffic +message.configure.firewall.rules.block.traffic=Configure the rules to block Traffic \ No newline at end of file diff --git a/client/WEB-INF/classes/resources/messages_de_DE.properties b/client/WEB-INF/classes/resources/messages_de_DE.properties index 3b820fcb51c..e29d44cace0 100644 --- a/client/WEB-INF/classes/resources/messages_de_DE.properties +++ b/client/WEB-INF/classes/resources/messages_de_DE.properties @@ -38,6 +38,7 @@ label.about=\u00dcber label.accept.project.invitation=Projekteinladung annehmen label.account.and.security.group=Konto, Sicherheitsgruppe label.account=Benutzerkonto +label.account.details=Kontodetails label.account.id=Benutzerkonto-ID label.account.lower=Konto label.account.name=Benutzerkonto-Name @@ -45,6 +46,7 @@ label.accounts=Benutzerkonten label.account.specific=Besonderheiten des Benutzerkontos label.acl=ACL label.acl.id=ACL-Kennung +label.acl.list.rules=ACL-Listenregeln label.acl.name=ACL-Name label.acl.replaced=ACL ersetzt label.acquire.new.ip=Neue IP erwerben @@ -208,6 +210,7 @@ label.action.resource.limits=Grenzen der Ressourcen label.action.restore.instance=Instanz wiederherstellen label.action.restore.instance.processing=Instanz wird wiederhergestellt.... label.action.revert.snapshot=Auf Schnappschuss zur\u00fcckkehren +label.action.revert.snapshot.processing=Es wird auf den Schnappschuss zur\u00fcckgekehrt... label.actions=Aktionen label.action.start.instance=Instanz beginnen label.action.start.instance.processing=Instanz wird gestartet.... @@ -231,6 +234,7 @@ label.action.update.resource.count.processing=Ressourcenanzahl wird aktualisiert label.action.update.resource.count=Ressourcenanzahl aktualisieren label.action.vmsnapshot.create=VM-Schnappschuss machen label.action.vmsnapshot.delete=VM-Schnappschuss l\u00f6schen +label.action.vmsnapshot.revert=Auf VM-Schnappschuss zur\u00fcckkehren label.activate.project=Projekt aktivieren label.active.sessions=Aktive Sitzungen label.add.account=Konto hinzuf\u00fcgen @@ -264,11 +268,13 @@ label.add.ingress.rule=Zutrittsregel hinzuf\u00fcgen label.adding.succeeded=Erfolgreich hinzugef\u00fcgt label.adding.user=Nutzer hinzuf\u00fcgen label.adding.zone=Hinzuf\u00fcgen der Zone +label.add.internal.lb=Interne LB hinzuf\u00fcgen label.add.ip.range=IP-Bereich hinzuf\u00fcgen label.add.isolated.guest.network=Isoliertes Gastnetzwerk hinzuf\u00fcgen label.add.isolated.network=Isoliertes Netzwerk hinzuf\u00fcgen label.additional.networks=Zus\u00e4tzliche Networks label.add.ldap.account=LDAP-Konto hinzuf\u00fcgen +label.add.LDAP.account=LDAP-Konto hinzuf\u00fcgen label.add.list.name=ACL-Listename label.add.load.balancer=Serverlastverteilung hinzuf\u00fcgen label.add.more=Mehr hinzuf\u00fcgen @@ -285,6 +291,7 @@ label.add.pod=Pod hinzuf\u00fcgen label.add.portable.ip.range=Portablen IP-Bereich hinzuf\u00fcgen label.add.port.forwarding.rule=Portweiterleitungsregel hinzuf\u00fcgen label.add.primary.storage=Hauptspeicher hinzuf\u00fcgen +label.add.private.gateway=Privaten Gateway hinzuf\u00fcgen label.add.region=Region hinzuf\u00fcgen label.add.resources=Ressourcen hinzuf\u00fcgen label.add.route=Route hinzuf\u00fcgen @@ -444,6 +451,7 @@ label.delete.ciscoASA1000v=CiscoASA1000v l\u00f6schen label.delete.ciscovnmc.resource=CiscoVNMC-Ressource l\u00f6schen label.delete.events=Ereignisse l\u00f6schen label.delete.F5=F5 l\u00f6schen +label.delete.internal.lb=Interne LB l\u00f6schen label.delete=L\u00f6schen label.delete.PA=Palo Alto l\u00f6schen label.delete.portable.ip.range=Portablen IP-Bereich l\u00f6schen @@ -478,12 +486,20 @@ label.disable.vpn=Fernzugriff-VPN deaktivieren label.disabling.vpn.access=Deaktivierung des VPN Zugangs label.disbale.vnmc.device=VNMC-Ger\u00e4t deaktivieren label.disk.allocated=Zugeordnete Festplatte +label.disk.bytes.read.rate=Festplatten-Leserate (BPS) +label.disk.bytes.write.rate=Festplatten-Schreibrate (BPS) +label.disk.iops.read.rate=Festplatten-Leserate (IOPS) label.disk.iops.total=Gesamte IOPS +label.disk.iops.write.rate=Festplatten-Schreibrate (IOPS) label.disk.offering=Festplatten-Angebot +label.disk.read.bytes=Festplatte Lesen (Bytes) +label.disk.read.io=Festplatte Lesen (EA) label.disk.size=Festplattengr\u00f6\u00dfe label.disk.size.gb=Festplattengr\u00f6\u00dfe (in GB) label.disk.total=Gesamtzahl der Festplatten label.disk.volume=Festplattenvolumen +label.disk.write.bytes=Festplatte Schreiben (Bytes) +label.disk.write.io=Festplatte Schreiben (EA) label.display.name=Anzeigename label.display.text=Anzeigetext label.distributedrouter=Verteilter Router @@ -503,17 +519,21 @@ label.duration.in.sec=Dauer (in Sekunden) label.dynamically.scalable=Dynamisch skalierbar label.edit.acl.rule=ACL-Regel bearbeiten label.edit=Bearbeiten +label.edit.lb.rule=LB-Regel bearbeiten label.edit.network.details=Netzwerkdetails bearbeiten label.edit.project.details=Projektdetails bearbeiten label.edit.region=Region bearbeiten +label.edit.rule=Regel bearbeiten label.edit.secondary.ips=Sekund\u00e4re IPs bearbeiten label.edit.tags=Schlagw\u00f6rter bearbeiten +label.edit.traffic.type=Datenverkehrstyp bearbeiten label.edit.vpc=VPC bearbeiten label.email=E-Mail label.email.lower=E-Mail-Adresse label.enable.autoscale=Automatische Skalierung aktivieren label.enable.host=Host aktivieren label.enable.network.offering=Netzwerkangebot aktivieren +label.enable.provider=Anbieter aktivieren label.enable.swift=Swift aktivieren label.enable.vnmc.device=VNMC-Ger\u00e4t aktivieren label.enable.vnmc.provider=VNMC-Anbieter aktivieren @@ -544,6 +564,7 @@ label.f5=F5 label.failed=Fehlgeschlagen label.featured=Besonderheiten aufweisen label.filterBy=Filtern nach +label.fingerprint=FingerAbdruck label.firewall=Firewall label.firstname.lower=Vorname label.first.name=Vorname @@ -573,6 +594,7 @@ label.gslb.details=GSLB-Details label.gslb.domain.name=GSLB-Dom\u00e4nenname label.gslb=GSLB label.gslb.lb.details=Lastverteilungsdetails +label.gslb.lb.remove=Lastverteilung aus diesem GSLB entfernen label.gslb.lb.rule=Lastverteilungsregel label.gslb.service=GSLB-Dienst label.gslb.service.private.ip=GSLB-Dienst Private IP @@ -589,6 +611,8 @@ label.guest.networks=Gastnetzwerke label.guest.traffic=Gast-Datenverkehr label.guest.type=Gasttyp label.ha.enabled=HA aktiviert +label.health.check.advanced.options=Erweiterte Optionen\: +label.health.check.configurations.options=Konfigurationsoptionen\: label.help=Hilfe label.hide.ingress.rule=Verstecke Regeln, die den Zutritt steuern label.hints=Hinweise @@ -634,6 +658,8 @@ label.instance.name=Name der Instanz label.instances=Instanzen label.internal.dns.1=Interne DNS 1 label.internal.dns.2=Interne DNS 2 +label.internal.lb.details=Interne LB-Details +label.internal.lb=Interne LB label.internal.name=Interner Name label.interval.type=Interval Typ label.introduction.to.cloudstack=Einf\u00fchrung in CloudStack&\#8482 @@ -706,6 +732,8 @@ label.last.name=Nachname label.latest.events=Neueste Ereignisse label.launch=Start label.launch.vm=VM starten +label.launch.zone=Zone starten +label.lb.algorithm.leastconn=Mindestverbindungen label.lb.algorithm.roundrobin=Rundlauf-Verfahren label.lb.algorithm.source=Quelle label.ldap.configuration=LDAP-Konfiguration @@ -715,7 +743,9 @@ label.level=Ebene label.load.balancer=Serverlastverteilung label.load.balancer.type=Lastverteilungstyp label.load.balancing=Lastverteilung +label.load.balancing.policies=Verteilungsrichtlinien laden label.loading=Laden +label.local.file=Lokale Datei label.local=Lokal label.local.storage=Lokaler Speicher label.login=Login @@ -819,11 +849,13 @@ label.network.ACL=Netzwerk-ACL label.network.ACLs=Netzwerk-ACLs label.network.addVM=Netzwerk zur VM hinzuf\u00fcgen label.network.cidr=Netzwerk-CIDR +label.network.details=Netzwerkdetails label.network.device=Netzwerkger\u00e4t label.network.device.type=Netzwerkger\u00e4tetyp label.network.domain=Netzwerk-Domain label.network.domain.text=Netzwerkdom\u00e4ne label.network.id=Netzwerk-ID +label.networking.and.security=Netzwerkbetrieb und Sicherheit label.network.limits=Netzwerkbegrenzungen label.network.name=Netzwerk Name label.network=Netzwerk @@ -836,12 +868,14 @@ label.network.type=Netzwerk-Typ label.new=Neu label.new.password=Neues Passwort label.new.project=Neues Projekt +label.new.ssh.key.pair=Neues SSH-Schl\u00fcsselpaar label.new.vm=Neue VM label.next=Weiter label.nexusVswitch=Nexus 1000v label.nfs=NFS label.nfs.server=NFS Server label.nfs.storage=NFS-Speicher +label.nic.adapter.type=NIC-Adaptertyp label.nicira.nvp.details=Nicira NVP-Details label.nics=NICs label.no.actions=Nicht verf\u00fcgbare Aktionen @@ -874,6 +908,7 @@ label.optional=optional label.order=Reihenfolge label.os.preference=OS Pr\u00e4ferenz label.os.type=OS Typ +label.other=Andere label.override.guest.traffic=Gast-Datenverkehr \u00fcberschreiben label.override.public.traffic=\u00d6ffentlichen Datenverkehr \u00fcberschreiben label.ovs=OVS @@ -887,6 +922,7 @@ label.passive=Passiv label.password.enabled=Passwort aktiviert label.password.lower=Passwort label.password=Passwort +label.password.reset.confirm=Passwort wurde zur\u00fcckgesetzt auf label.path=Pfad label.persistent=Persistent label.physical.network.ID=Physikalisches Netzwerkkennung @@ -899,6 +935,7 @@ label.PING.storage.IP=IP des externen Speichers anpingen label.please.wait=Bitte warten label.pod=Pod label.pods=Pod +label.polling.interval.sec=Abfrageintervall (in Sekunden) label.portable.ip=Portable IP label.portable.ip.range.details=Portable IP-Bereichsdetails label.portable.ip.ranges=Portable IP-Bereiche @@ -920,6 +957,7 @@ label.private.ip=Private IP-Adresse label.private.ip.range=Privater IP-Bereich label.private.ips=Private IP-Adressen label.privatekey=PKCS\#8 Privater Schl\u00fcssel +label.private.key=Privater Schl\u00fcssel label.private.network=Privates Netzwerk label.private.port=Privater Port label.private.zone=Private Zone @@ -938,6 +976,9 @@ label.providers=Anbieter label.public.interface=\u00d6ffentliches Interface label.public.ips=\u00d6ffentliche IP-Adressen label.public.ip=\u00d6ffentliche IP-Adresse +label.public.key=\u00d6ffentlicher Schl\u00fcssel +label.public.lb=\u00d6ffentliche LB +label.public.load.balancer.provider=\u00d6ffentlicher Lastverteileranbieter label.public.network=\u00d6ffentliches Netzwerk label.public.port=\u00d6ffentlicher Port label.public.traffic=\u00d6ffentlicher Datenverkehr @@ -946,6 +987,7 @@ label.public.zone=\u00d6ffentliche Zone label.purpose=Zweck label.Pxe.server.type=PXE Server Type label.quickview=Schnellansicht +label.quiet.time.sec=Ruhezeit (in Sekunden) label.rbd.id=Cephx-Benutzer label.rbd=RBD label.rbd.secret=Cephx-Geheimnis @@ -969,6 +1011,11 @@ label.remove.pf=Portweiterleitungsregel entfernen label.remove.project.account=Konto aus Projekt entfernen label.remove.region=Region entfernen label.remove.rule=Regel entfernen +label.remove.ssh.key.pair=SSH-Schl\u00fcsselpaar entfernen +label.remove.static.nat.rule=Statische NAT-Regel entfernen +label.remove.static.route=Statische Route entfernen +label.remove.this.physical.network=Dieses physikalische Netzwerk entfernen +label.remove.vm.load.balancer=VM aus Lastverteiler entfernen label.remove.vmware.datacenter=VMware-Rechenzentrum entfernen label.remove.vpc.offering=VPC-Angebot entfernen label.remove.vpc=VPC entfernen @@ -980,6 +1027,8 @@ label.required=Erforderlich label.requires.upgrade=Erfordert Aktualisierung label.reserved.ip.range=Reservierter IP-Bereich label.reserved.system.ip=Reservierte System-IP +label.reset.ssh.key.pair.on.vm=SSH-Schl\u00fcsselpaar auf VM zur\u00fccksetzen +label.reset.ssh.key.pair=SSH-Schl\u00fcsselpaar zur\u00fccksetzen label.resetVM=VM zur\u00fccksetzen label.reset.VPN.connection=VPN-Verbindung zur\u00fccksetzen label.resize.new.offering.id=Neues Angebot @@ -1007,8 +1056,10 @@ label.s3.nfs.server=S3 NFS-Server label.s3.secret_key=Secret Key label.s3.socket_timeout=Socket-Zeit\u00fcberschreitung label.s3.use_https=HTTPS verwenden +label.saml.entity=Identit\u00e4tsanbieter label.saturday=Samstag label.save.and.continue=Speichern und fortsetzen +label.save.changes=\u00c4nderungen speichern label.save=Sichern label.saving.processing=Speichern.... label.scope=Geltungsbereich @@ -1058,8 +1109,8 @@ label.smb.username=SMB-Benutzername label.snapshot.limits=Schnappschuss Grenzen label.snapshot.name=Schnappschuss Name label.snapshot=Schnappschuss +label.snapshot.s=Schnappsch\u00fcsse label.snapshots=Schnappsch\u00fcsse -label.snapshot.s=Schnappschuss (Schnappsch\u00fcsse) label.SNMP.port=SNMP-Port label.sockets=CPU-Sockets label.specify.IP.ranges=IP-Bereiche angeben @@ -1067,6 +1118,9 @@ label.specify.vlan=VLAN angeben label.specify.vxlan=VXLAN angeben label.srx.details=SRX-Details label.srx=SRX +label.ssh.key.pair.details=SSH-Schl\u00fcsselpaardetails +label.ssh.key.pair=SSH-Schl\u00fcsselpaar +label.ssh.key.pairs=SSH-Schl\u00fcsselpaare label.standard.us.keyboard=Standard-(US)-Tastatur label.start.IP=Start-IP label.start.lb.vm=LB-VM starten @@ -1075,6 +1129,7 @@ label.start.reserved.system.IP=Reservierte System-IP starten label.start.vxlan=VXLAN starten label.state=Status label.static.nat=Statische NAT +label.static.routes=Statische Routen label.statistics=Statistiken label.status=Status label.step.1=Schritt 1 @@ -1140,6 +1195,7 @@ label.total.cpu=Gesamtanzahl CPU label.total.CPU=Gesamtanzahl CPU label.total.hosts=Gesamtanzahl Hosts label.total.memory=Gesamter Speicher +label.total.of.ip=Gesamtzahl der IP-Adressen label.total.of.vm=Gesamtanzahl VMs label.total.storage=Gesamter Speicher label.total.vms=Gesamtanzahl VMs @@ -1167,6 +1223,7 @@ label.usage.server=Auslastungsserver label.used=Gebraucht label.user=Benutzer label.user.data=Benutzerdaten +label.user.details=Benutzerdetails label.username=Benutzername label.username.lower=Benutzername label.users=Benutzer @@ -1279,6 +1336,7 @@ label.zone.step.4.title=Schritt 4\: F\u00fcgen Sie einen IP-Bereich hinz label.zones=Zonen label.zone.type=Zonentyp label.zone.wide=Zonenweit +label.zoneWizard.trafficType.guest=Gast\: Datenverkehr zwischen den virtuellen Maschinen der Endbenutzer label.zone=Zone message.acquire.public.ip=Bitte w\u00e4hlen Sie eine Zone, von der Sie Ihre neue IP erlangen m\u00f6chten. message.action.cancel.maintenance=Ihr Host ist erfolgreich f\u00fcr die Wartung abgebrochen. Dieser Prozess kann ein paar Minuten dauern. @@ -1292,6 +1350,7 @@ message.action.delete.ingress.rule=Bitte best\u00e4tigen Sie, dass Sie diese Zut message.action.delete.ISO=Bitte best\u00e4tigen Sie, dass Sie diese ISO l\u00f6schen m\u00f6chten. message.action.delete.ISO.for.all.zones=Die ISO gilt f\u00fcr alle Zonen. Bitte best\u00e4tigen Sie, dass Sie diese aus allen Zonen l\u00f6schen m\u00f6chten. message.action.delete.network=Bitte best\u00e4tigen Sie, dass Sie dieses Netzwerk l\u00f6schen m\u00f6chten. +message.action.delete.physical.network=Bitte best\u00e4tigen Sie, dass Sie dieses physikalische Netzwerk l\u00f6schen m\u00f6chten message.action.delete.pod=Bitte best\u00e4tigen Sie, dass Sie dieses pod l\u00f6schen m\u00f6chten. message.action.delete.primary.storage=Bitte best\u00e4tigen Sie, dass Sie diese Hauptspeicher l\u00f6schen m\u00f6chten. message.action.delete.secondary.storage=Bitte best\u00e4tigen Sie, dass Sie diesen Sekund\u00e4rspeicher l\u00f6schen m\u00f6chten. @@ -1305,17 +1364,22 @@ message.action.delete.zone=Bitte best\u00e4tigen Sie, dass Sie diese Zone l\u00f message.action.destroy.instance=Bitte best\u00e4tigen Sie, dass Sie diese Instanz l\u00f6schen m\u00f6chten. message.action.destroy.systemvm=Bitte best\u00e4tigen Sie, dass Sie diese System-VM zerst\u00f6ren m\u00f6chten. message.action.disable.cluster=Bitte best\u00e4tigen Sie, dass Sie diesen Cluster deaktivieren m\u00f6chten. +message.action.disable.physical.network=Bitte best\u00e4tigen Sie, dass Sie dieses physikalische Netzwerk deaktivieren m\u00f6chten. message.action.disable.pod=Bitte best\u00e4tigen Sie, dass Sie diesen Pod deaktivieren m\u00f6chten. message.action.disable.static.NAT=Bitte best\u00e4tigen Sie, dass Sie die statische NAT deaktivieren m\u00f6chten. message.action.disable.zone=Bitte best\u00e4tigen Sie, dass Sie diese Zone deaktivieren m\u00f6chten. message.action.downloading.template=Vorlage wird heruntergeladen. +message.action.download.iso=Bitte best\u00e4tigen Sie, dass Sie dieses ISO herunterladen m\u00f6chten. message.action.enable.cluster=Bitte best\u00e4tigen Sie, dass Sie diesen Cluster aktivieren m\u00f6chten. +message.action.enable.physical.network=Bitte best\u00e4tigen Sie, dass Sie dieses physikalische Netzwerk aktivieren m\u00f6chten. message.action.enable.pod=Bitte best\u00e4tigen Sie, dass Sie diesen Pod aktivieren m\u00f6chten. message.action.enable.zone=Bitte best\u00e4tigen Sie, dass Sie diese Zone aktivieren m\u00f6chten. message.action.instance.reset.password=Bitte best\u00e4tigen Sie, dass Sie das ROOT Passwort f\u00fcr diese virtuelle Maschine \u00e4ndern m\u00f6chten. message.action.manage.cluster=Bitte best\u00e4tigen Sie, dass das Cluster bearbeitet werden soll. message.action.reboot.instance=Bitte best\u00e4tigen Sie, dass Sie diese Instanz neu starten m\u00f6chten. message.action.reboot.systemvm=Bitte best\u00e4tigen Sie, dass Sie diese System-VM neu starten m\u00f6chten. +message.action.release.ip=Bitte best\u00e4tigen Sie, dass Sie diese IP freigeben m\u00f6chten. +message.action.remove.host=Bitte best\u00e4tigen Sie, dass Sie diesen Host entfernen m\u00f6chten. message.action.reset.password.off=Ihre Instanz untersch\u00fctzt derzeitig nicht dieses Feature. message.action.reset.password.warning=Ihre Instanz muss zuerst unterbrochen werden, bevor Sie Ihr derzeitiges Passwort \u00e4ndern k\u00f6nnen. message.action.restore.instance=Bitte best\u00e4tigen Sie, dass Sie diese Instanz wiederherstellen m\u00f6chten. @@ -1325,6 +1389,7 @@ message.action.start.systemvm=Bitte best\u00e4tigen Sie, dass Sie diese System-V message.action.stop.instance=Bitte best\u00e4tigen Sie, dass Sie diese Instanz anhalten m\u00f6chten. message.action.stop.systemvm=Bitte best\u00e4tigen Sie, dass Sie diese System-VM stoppen m\u00f6chten. message.action.unmanage.cluster=Bitte best\u00e4tigen Sie, dass Sie das Cluster vernachl\u00e4ssigen m\u00f6chten. +message.action.vmsnapshot.revert=VM-Schnappschuss zur\u00fccksetzen message.added.vpc.offering=VPC-Angebot hinzugef\u00fcgt message.add.firewall=Eine Firewall zur Zone hinzuf\u00fcgen message.add.host=Bitte spezifizieren Sie die folgenden Parameter, um einen neuen Host hinzuzuf\u00fcgen. @@ -1344,8 +1409,20 @@ message.configuring.guest.traffic=Gast-Datenverkehr wird konfiguriert message.configuring.physical.networks=Physikalische Netzwerke werden konfiguriert message.configuring.public.traffic=\u00d6ffentlicher Datenverkehr wird konfiguriert message.configuring.storage.traffic=Speicherungsdatenverkehr wird konfiguriert +message.confirm.archive.event=Bitte best\u00e4tigen Sie, dass Sie dieses Ereignis archivieren m\u00f6chten. +message.confirm.archive.selected.alerts=Bitte best\u00e4tigen Sie, dass Sie die ausgew\u00e4hlten Alarme archivieren m\u00f6chten message.confirm.create.volume=Sind Sie sicher, dass Sie ein Volumen erstellen m\u00f6chten? +message.confirm.delete.acl.list=Sind Sie sicher, dass Sie diese ACL-Liste l\u00f6schen m\u00f6chten? +message.confirm.delete.alert=Sind Sie sicher, dass Sie diesen Alarm l\u00f6schen m\u00f6chten? +message.confirm.delete.ciscoASA1000v=Bitte best\u00e4tigen Sie, dass Sie CiscoASA1000v l\u00f6schen m\u00f6chten +message.confirm.destroy.router=Bitte best\u00e4tigen Sie, dass Sie diesen Router zerst\u00f6ren m\u00f6chten +message.confirm.disable.host=Bitte best\u00e4tigen Sie, dass Sie den Host deaktivieren m\u00f6chten +message.confirm.enable.host=Bitte best\u00e4tigen Sie, dass Sie den Host aktivieren m\u00f6chten message.confirm.migrate.volume=M\u00f6chten Sie dieses Volumen migrieren? +message.confirm.remove.event=Sind Sie sicher, dass Sie dieses Ereignis entfernen m\u00f6chten? +message.confirm.remove.selected.alerts=Bitte best\u00e4tigen Sie, dass Sie die ausgew\u00e4hlten Alarme entfernen m\u00f6chten +message.confirm.remove.selected.events=Bitte best\u00e4tigen Sie, dass Sie die ausgew\u00e4hlten Ereignisse entfernen m\u00f6chten +message.confirm.replace.acl.new.one=M\u00f6chten Sie die ACL durch die neue ersetzen? message.copy.iso.confirm=Bitte best\u00e4tigen Sie, dass Sie Ihre ISO kopieren m\u00f6chten und zwar nach message.create.template=Sind Sie sicher, dass Sie eine Vorlage erstellen m\u00f6chten? message.create.template.vm=VM aus Vorlage erstellen @@ -1356,16 +1433,23 @@ message.creating.primary.storage=Hauptspeicher wird erstellt message.creating.secondary.storage=Sekund\u00e4rspeicher wird erstellt message.creating.zone=Zone wird erstellt message.delete.account=Bitte best\u00e4tigen Sie, dass Sie dieses Benutzerkonto l\u00f6schen m\u00f6chten. +message.delete.project=Sind Sie sicher, dass Sie dieses Projekt l\u00f6schen m\u00f6chten? +message.delete.user=Bitte best\u00e4tigen Sie, dass Sie diesen Benutzer l\u00f6schen m\u00f6chten. +message.delete.VPN.connection=Bitte best\u00e4tigen Sie, dass Sie die VPN-Verbindung l\u00f6schen m\u00f6chten +message.desc.created.ssh.key.pair=Erstellte ein SSH-Schl\u00fcsselpaar. message.detach.iso.confirm=Bitte best\u00e4tigen Sie, dass Sie die ISO von der virtuellen Instanz trennen m\u00f6chten. message.disable.account=Bitte best\u00e4tigen Sie, dass Sie Ihr Benutzerkonto deaktivieren m\u00f6chten. Kein Nutzer dieses Kontos wird mehr Zugriff auf die Cloud Ressourcen haben. Alle laufenden virtuellen Maschinen werden sofort abgestellt. message.disable.snapshot.policy=Sie haben Ihre derzeitige Schnappschuss Richtlinie erfolgreich deaktiviert. +message.disable.user=Bitte best\u00e4tigen Sie, dass Sie diesen Benutzer deaktivieren m\u00f6chten. message.disable.vpn.access=Bitte best\u00e4tigen Sie, dass Sie den VPN Zugriff deaktivieren m\u00f6chten. +message.disable.vpn=Sind Sie sicher, dass Sie das VPN deaktivieren m\u00f6chten? message.disabling.network.offering=Netzwerkangebot wird deaktiviert message.disabling.vpc.offering=VPC-Angebot wird deaktiviert message.disallowed.characters=Nicht erlaubte Zeichen\: \\<\\,\\> message.download.ISO=Bitte klicken Sie auf 00000, um das ISO herunterzuladen message.download.template=Bitte klicken Sie auf 00000, um die Vorlage herunterzuladen message.download.volume=Bitte klicken Sie auf 00000, um das Volumen herunterzuladen +message.download.volume.confirm=Bitte best\u00e4tigen Sie, dass Sie dieses Volumen herunterladen m\u00f6chten. message.enable.account=Bitte best\u00e4tigen Sie, dass Sie dieses Konto aktivieren m\u00f6chten. message.enabled.vpn=Ihr VPN Zugriff ist zurzeit aktiv und via IP k\u00f6nnen Sie darauf zugreifen message.enable.vpn.access=VPN ist zurzeit nicht f\u00fcr diese IP Addresse aktiviert. M\u00f6chten Sie den VPN Zugriff aktivieren? @@ -1400,11 +1484,14 @@ message.number.clusters=

\# of Cluster

message.number.hosts=

\# of Hosts

message.number.storage=

\# von Hauptspeichervolumina

message.number.zones=

\# of Zonen

+message.password.has.been.reset.to=Passwort wurde zur\u00fcckgesetzt auf +message.password.of.the.vm.has.been.reset.to=Passwort der VM wurde zur\u00fcckgesetzt auf message.pending.projects.1=Sie haben ausstehende Projekteinladungen\: message.please.select.a.configuration.for.your.zone=Bitte w\u00e4hlen Sie eine Konfiguration f\u00fcr Ihre Zone aus. message.please.select.networks=Bitte w\u00e4hlen Sie Netzwerke f\u00fcr Ihre virtuelle Maschine aus. message.recover.vm=Bitte best\u00e4tigen Sie, dass Sie diese VM wiederherstellen m\u00f6chten. message.redirecting.region=Weiterleitung zu Region... +message.removed.ssh.key.pair=Hat ein SSH-Schl\u00fcsselpaar entfernt message.remove.vpn.access=Bitte best\u00e4tigen Sie, dass Sie den VPN-Zugriff vom folgenden Benutzer entfernen m\u00f6chten. message.reset.VPN.connection=Bitte best\u00e4tigen Sie, dass Sie die VPN-Verbindung zur\u00fccksetzen m\u00f6chten message.restart.vpc=Bitte best\u00e4tigen Sie, dass Sie den VPC neu starten m\u00f6chten diff --git a/client/WEB-INF/classes/resources/messages_es.properties b/client/WEB-INF/classes/resources/messages_es.properties index 34535317783..7aa149f06ba 100644 --- a/client/WEB-INF/classes/resources/messages_es.properties +++ b/client/WEB-INF/classes/resources/messages_es.properties @@ -808,7 +808,7 @@ label.skip.guide=He utilizado CloudStack anteriormente, saltar esta gu\u00eda label.snapshot=Instant\u00c3\u00a1nea label.snapshot.limits=instant\u00c3\u00a1neas L\u00c3\u00admites label.snapshot.name=Nombre de instant\u00c3\u00a1neas -label.snapshot.schedule=Lista de instant\u00c3\u00a1neas +label.snapshot.s=instant\u00c3\u00a1neas label.snapshots=instant\u00c3\u00a1neas label.sockets=Sockets label.source.nat=NAT Fuente @@ -1138,7 +1138,6 @@ message.select.iso=Por favor seleccione un ISO para su nueva instancia virtual message.select.item=Por favor, seleccionar un item . message.select.template=Por favor seleccione un template para su nueva instancia virtual message.setup.successful=La configuraci\u00f3n de la cloud finalizo satisfactoriamente. -message.snapshot.schedule=Puede horarios de configuraci\u00c3\u00b3n recurrente instant\u00c3\u00a1neas mediante la selecci\u00c3\u00b3n de las opciones disponibles a continuaci\u00c3\u00b3n y la aplicaci\u00c3\u00b3n de su preferencia pol\u00c3\u00adtica message.specify.url=Por favor especifique la URL message.step.1.continue=Por favor seleccione una plantilla o ISO para continuar message.step.1.desc=Por favor seleccione una plantilla para la instancia virtual. Tambi\u00c3\u00a9n puede optar por seleccionar una plantilla en blanco desde el que puede ser una imagen ISO instalado en. diff --git a/client/WEB-INF/classes/resources/messages_fr_FR.properties b/client/WEB-INF/classes/resources/messages_fr_FR.properties index 8a8efb7f5c5..0dc0f81969a 100644 --- a/client/WEB-INF/classes/resources/messages_fr_FR.properties +++ b/client/WEB-INF/classes/resources/messages_fr_FR.properties @@ -26,7 +26,7 @@ error.login=Votre identifiant / mot de passe ne correspond pas \u00e0 nos enregi error.menu.select=\u00c9chec de l\\'action car il n\\'y a aucun \u00e9l\u00e9ment s\u00e9lectionn\u00e9. error.mgmt.server.inaccessible=Le serveur de gestion est inaccessible. Veuillez essayer plus tard. error.password.not.match=Les champs mot de passe ne correspondent pas -error.please.specify.physical.network.tags=L\\'offre r\u00e9seau ne sera pas disponible tant que des libell\u00e9s n\\'auront pas \u00e9t\u00e9 renseign\u00e9s pour ce r\u00e9seau physique. +error.please.specify.physical.network.tags=L\\'offre de r\u00e9seau ne sera pas disponible tant que des libell\u00e9s n\\'auront pas \u00e9t\u00e9 renseign\u00e9s pour ce r\u00e9seau physique. error.session.expired=Votre session a expir\u00e9e. error.something.went.wrong.please.correct.the.following=Quelque chose s\\'est mal pass\u00e9e ; veuillez corriger le point suivant error.unable.to.reach.management.server=Impossible d\\'attendre le serveur de gestion @@ -51,6 +51,7 @@ label.about=A propos de label.accept.project.invitation=Accepter l\\'invitation au projet label.account.and.security.group=Compte, groupe de s\u00e9curit\u00e9 label.account=Compte +label.account.details=D\u00e9tails compte label.account.id=ID de compte label.account.lower=compte label.account.name=Nom de compte @@ -58,6 +59,7 @@ label.accounts=Comptes label.account.specific=Sp\u00e9cifique au compte label.acl=ACL label.acl.id=ID ACL +label.acl.list.rules=Liste r\u00e8gles ACL label.acl.name=Nom ACL label.acl.replaced=ACL remplac\u00e9e label.acquire.new.ip=Acqu\u00e9rir nouvelle adr. IP @@ -70,8 +72,9 @@ label.action.attach.iso=Rattacher image ISO label.action.cancel.maintenance.mode=Annuler mode maintenance label.action.cancel.maintenance.mode.processing=Annulation du mode maintenance... label.action.change.password=Changer le mot de passe -label.action.change.service=Changer d\\'offre de service -label.action.change.service.processing=Changement de d\\'offre de service... +label.action.change.service=Changer Service +label.action.change.service.processing=Changement service... +label.action.configure.samlauthorization=Configurer Autorisation SAML SSO label.action.copy.ISO=Copier une image ISO label.action.copy.ISO.processing=Copie ISO... label.action.copy.template=Copier mod\u00e8le @@ -88,8 +91,8 @@ label.action.delete.account.processing=Suppression du compte... label.action.delete.account=Supprimer un compte label.action.delete.cluster.processing=Suppression du Cluster... label.action.delete.cluster=Supprimer le Cluster -label.action.delete.disk.offering.processing=Suppression de l\\'offre Disque... -label.action.delete.disk.offering=Supprimer Offre Disque +label.action.delete.disk.offering.processing=Suppression de l\\'offre de disque... +label.action.delete.disk.offering=Supprimer Offre de Disque label.action.delete.domain.processing=Suppression du domaine... label.action.delete.domain=Supprimer le domaine label.action.delete.firewall.processing=Suppression du Pare-feu... @@ -298,8 +301,10 @@ label.add.intermediate.certificate=Ajouter certificat interm\u00e9diaire label.add.internal.lb=Ajouter LB interne label.add.ip.range=Ajouter une plage IP label.add.isolated.guest.network=Ajouter un r\u00e9seau d\\'invit\u00e9 isol\u00e9 +label.add.isolated.guest.network.with.sourcenat=Ajouter un r\u00e9seau d\\'invit\u00e9 isol\u00e9 avec SourceNat label.add.isolated.network=Ajouter un r\u00e9seau isol\u00e9 label.additional.networks=R\u00e9seaux additionnels +label.add.LDAP.account=Ajouter Compte LDAP label.add.ldap.account=Ajouter un compte LDAP label.add.list.name=Nom Liste ACL label.add.load.balancer=Ajouter un r\u00e9partiteur de charge @@ -403,6 +408,7 @@ label.attached.iso=Image ISO attach\u00e9e label.author.email=Email auteur label.author.name=Nom auteur label.autoscale=AutoScale +label.autoscale.configuration.wizard=Assistant de configuration AutoScale label.availability=Disponibilit\u00e9 label.availabilityZone=availabilityZone label.availability.zone=Zone de disponibilit\u00e9 @@ -491,6 +497,7 @@ label.configuration=Configuration label.configure=Configurer label.configure.ldap=Configurer LDAP label.configure.network.ACLs=Configurer les r\u00e8gles d\\'acc\u00e8s r\u00e9seau ACL +label.configure.sticky.policy=Configurer Strat\u00e9gie Sticky label.configure.vpc=Configurer le VPC label.confirmation=Confirmation label.confirm.password=Confirmer le mot de passe @@ -515,10 +522,12 @@ label.created=Cr\u00e9\u00e9 label.create.nfs.secondary.staging.storage=Cr\u00e9er le Stockage Secondaire Interm\u00e9diaire NFS label.create.nfs.secondary.staging.store=Cr\u00e9er le stockage secondaire interm\u00e9diaire NFS label.create.project=Cr\u00e9er un projet +label.create.ssh.key.pair=Cr\u00e9er une bi-cl\u00e9 SSH label.create.template=Cr\u00e9er un mod\u00e8le label.create.VPN.connection=Cr\u00e9er une connexion VPN label.cross.zones=Multi Zones label.custom.disk.iops=IOPS personnalis\u00e9 +label.custom.disk.offering=Offre de disque personnalis\u00e9e label.custom.disk.size=Taille de disque personnalis\u00e9e label.custom=Personnalis\u00e9 label.daily=Quotidien @@ -607,6 +616,7 @@ label.disk.iops.min=IOPS minimum label.disk.iops.read.rate=D\u00e9bit lecture disque (IOPS) label.disk.iops.total=IOPS Total label.disk.iops.write.rate=D\u00e9bit \u00e9criture disque (IOPS) +label.disk.offering.details=D\u00e9tails offre de disque label.diskoffering=diskoffering label.disk.offering=Offre de Disque label.disk.provisioningtype=Type de provisionnement @@ -626,6 +636,7 @@ label.dns.2=DNS 2 label.dns=DNS label.DNS.domain.for.guest.networks=Domaine DNS pour les r\u00e9seaux invit\u00e9s label.domain.admin=Administrateur du domaine +label.domain.details=D\u00e9tails domaine label.domain=Domaine label.domain.id=ID du domaine label.domain.lower=domaine @@ -645,6 +656,7 @@ label.edit=Modifier label.edit.network.details=Modifier les param\u00e8tres r\u00e9seau label.edit.project.details=Modifier les d\u00e9tails du projet label.edit.region=\u00c9diter R\u00e9gion +label.edit.rule=Modifier r\u00e8gle label.edit.secondary.ips=\u00c9diter IPs secondaires label.edit.tags=Modifier les balises label.edit.traffic.type=Modifier le type de trafic @@ -692,7 +704,7 @@ label.every=Tous label.example=Exemple label.expunge=Purger label.external.link=Lien externe -label.extractable.lower=t\u00e9l\u00e9chargeable +label.extractable.lower=T\u00e9l\u00e9chargeable label.extractable=T\u00e9l\u00e9chargeable label.f5.details=D\u00e9tails F5 label.f5=F5 @@ -700,6 +712,7 @@ label.failed=\u00c9chou\u00e9 label.featured=Sponsoris\u00e9 label.fetch.latest=Rafra\u00eechir label.filterBy=Filtre +label.fingerprint=Empreinte label.firewall=Pare-feu label.firstname.lower=pr\u00e9nom label.first.name=Pr\u00e9nom @@ -753,8 +766,12 @@ label.guest.traffic.vswitch.name=Nom Trafic Invit\u00e9 vSwitch label.guest.traffic.vswitch.type=Type Trafic Invit\u00e9 vSwitch label.guest.type=Type d\\'invit\u00e9 label.ha.enabled=Haute disponibilit\u00e9 activ\u00e9e +label.health.check.advanced.options=Options avanc\u00e9es \: +label.health.check.configurations.options=Options de configuration \: label.health.check.interval.in.sec=Fr\u00e9quence de v\u00e9rification d\\'\u00e9tat (sec) +label.health.check.message.desc=Votre r\u00e9partiteur de charge va automatiquement effectuer des v\u00e9rifications d\\'\u00e9tat sur vos instances CloudStack et router seulement le trafic vers les instances ayant pass\u00e9es les v\u00e9rifications avec succ\u00e8s label.health.check=V\u00e9rification statut +label.health.check.wizard=Assistant V\u00e9rification Sant\u00e9 label.healthy.threshold=Seuil d\\'\u00e9tat label.help=Aide label.hide.ingress.rule=Cacher la r\u00e8gle d\\'entr\u00e9e @@ -765,6 +782,7 @@ label.host=H\u00f4te label.host.MAC=Adresse MAC h\u00f4te label.host.name=Nom d\\'h\u00f4te label.hosts=H\u00f4tes +label.host.tag=Etiquette h\u00f4te label.host.tags=\u00c9tiquettes d\\'h\u00f4te label.hourly=Chaque heure label.hvm=HVM @@ -813,6 +831,7 @@ label.intermediate.certificate=Certificat interm\u00e9diaire {0} label.internal.dns.1=DNS interne 1 label.internal.dns.2=DNS interne 2 label.internal.lb.details=D\u00e9tails du LB interne +label.internal.lb=R\u00e9partiteur interne label.internallbvm=InternalLbVm label.internal.name=Nom interne label.interval.type=Type d\\'intervalle @@ -852,7 +871,7 @@ label.is.default=Est par d\u00e9faut label.iso.boot=D\u00e9marrage par ISO label.iso=ISO label.isolated.networks=R\u00e9seaux isol\u00e9s -label.isolation.method=M\u00e9thode Isolation +label.isolation.method=Isolation label.isolation.mode=Mode d\\'isolation label.isolation.uri=URI d\\'isolation label.is.redundant.router=Redondant @@ -904,6 +923,7 @@ label.load.balancer.type=Type R\u00e9partiteur de charge label.load.balancing.policies=R\u00e8gles de r\u00e9partition de charge label.load.balancing=R\u00e9partition de charge label.loading=Chargement en cours +label.local.file=Fichier local label.local=Local label.local.storage.enabled=Activer le stockage local pour les VMs Utilisateurs label.local.storage.enabled.system.vms=Active le stockage local pour les VMs Syst\u00e8mes @@ -977,14 +997,14 @@ label.menu.snapshots=Instantan\u00e9s label.menu.sshkeypair=Bi-cl\u00e9 SSH label.menu.stopped.instances=Instances Arr\u00eat\u00e9es label.menu.storage=Stockage -label.menu.system.service.offerings=Offres Syst\u00e8me +label.menu.system.service.offerings=Offres de Syst\u00e8me label.menu.system=Syst\u00e8me label.menu.system.vms=\ VMs Syst\u00e8mes label.menu.templates=Mod\u00e8les label.menu.virtual.appliances=Appliances Virtuelles label.menu.virtual.resources=Ressources Virtuelles label.menu.volumes=Volumes -label.menu.vpc.offerings=Offres VPC +label.menu.vpc.offerings=Offres de VPC label.migrate.instance.to.host=Migration de l\\'instance sur un autre h\u00f4te label.migrate.instance.to=Migrer l\\'instance vers label.migrate.instance.to.ps=Migration de l\\'instance sur un autre stockage primaire @@ -1025,6 +1045,7 @@ label.network.ACL.total=Total R\u00e8gles d\\'acc\u00e8s r\u00e9seau label.network.addVM=Ajouter r\u00e9seau \u00e0 la VM label.network.cidr=CIDR r\u00e9seau label.network.desc=Description r\u00e9seau +label.network.details=D\u00e9tails r\u00e9seau label.network.device.type=Type d\\'\u00e9quipement r\u00e9seau label.network.device=\u00c9quipement R\u00e9seau label.network.domain=Nom de domaine @@ -1034,6 +1055,7 @@ label.networking.and.security=R\u00e9seau et s\u00e9curit\u00e9 label.network.label.display.for.blank.value=Utiliser la passerelle par d\u00e9faut label.network.limits=Limites r\u00e9seau label.network.name=Nom du r\u00e9seau +label.network.offering.details=D\u00e9tails offre de r\u00e9seau label.network.offering.display.text=Texte affich\u00e9 Offre R\u00e9seau label.network.offering.id=ID Offre R\u00e9seau label.network.offering.name=Nom Offre R\u00e9seau @@ -1049,6 +1071,7 @@ label.network.write=\u00c9criture r\u00e9seau label.new=Nouveau label.new.password=Nouveau mot de passe label.new.project=Nouveau projet +label.new.ssh.key.pair=Nouvelle bi-cl\u00e9 SSH label.new.vm=Nouvelle VM label.next=Suivant label.nexusVswitch=Nexus 1000v @@ -1121,6 +1144,7 @@ label.PA.threat.profile=Profil menace Palo Alto label.perfect.forward.secrecy=Confidentialit\u00e9 persistante label.persistent=Persistant label.physical.network.ID=Identifiant du r\u00e9seau physique +label.physical.network.name=Nom r\u00e9seau physique label.physical.network=R\u00e9seau physique label.PING.CIFS.password=Mot de passe CIFS PING label.PING.CIFS.username=Identifiant CIFS PING @@ -1128,6 +1152,7 @@ label.PING.dir=R\u00e9pertoire PING label.ping.path=Chemin Ping label.PING.storage.IP=IP stockage PING label.planner.mode=Mode planification +label.please.complete.the.following.fields=Veuillez remplir les champs suivants label.please.specify.netscaler.info=Renseigner les informations sur le Netscaler label.please.wait=Patientez s\\'il vous plait label.plugin.details=D\u00e9tails extension @@ -1159,6 +1184,7 @@ label.private.interface=Interface priv\u00e9e label.private.ip=Adresse IP Priv\u00e9e label.private.ip.range=Plage d\\'adresses IP Priv\u00e9es label.private.ips=Adresses IP Priv\u00e9es +label.private.key=Cl\u00e9 priv\u00e9e label.privatekey=Cl\u00e9 priv\u00e9e PKCS\#8 label.private.network=R\u00e9seau priv\u00e9 label.private.port=Port priv\u00e9 @@ -1178,6 +1204,8 @@ label.providers=Fournisseurs label.public.interface=Interface publique label.public.ip=Adresse IP publique label.public.ips=Adresses IP publiques +label.public.key=Cl\u00e9 publique +label.public.lb=R\u00e9partiteur public label.public.load.balancer.provider=Fournisseur r\u00e9partition de charge public label.public.network=R\u00e9seau public label.public.port=Port public @@ -1230,8 +1258,10 @@ label.remove.pf=Supprimer la r\u00e8gle de transfert de port label.remove.project.account=Supprimer le compte projet label.remove.region=Supprimer r\u00e9gion label.remove.rule=Supprimer la r\u00e8gle +label.remove.ssh.key.pair=Supprimer bi-cl\u00e9 SSH label.remove.static.nat.rule=Supprimer le NAT statique label.remove.static.route=Supprimer une route statique +label.remove.this.physical.network=Supprimer ce r\u00e9seau physique label.remove.tier=Supprimer le tiers label.remove.vm.from.lb=Supprimer la VM de la r\u00e8gle de r\u00e9partition de charge label.remove.vm.load.balancer=Supprimer VM du r\u00e9partiteur de charge @@ -1249,6 +1279,8 @@ label.reserved.ip.range=Plage IP r\u00e9serv\u00e9e label.reserved.system.gateway=Passerelle r\u00e9serv\u00e9e Syst\u00e8me label.reserved.system.ip=Adresse IP Syst\u00e8me r\u00e9serv\u00e9e label.reserved.system.netmask=Masque de sous-r\u00e9seau r\u00e9serv\u00e9 Syst\u00e8me +label.reset.ssh.key.pair.on.vm=R\u00e9-initialiser bi-cl\u00e9 sur la VM +label.reset.ssh.key.pair=R\u00e9-initialiser bi-cl\u00e9 SSH label.resetVM=R\u00e9-initialiser VM label.reset.VPN.connection=R\u00e9-initialiser la connexion VPN label.resize.new.offering.id=Nouvelle Offre @@ -1289,11 +1321,16 @@ label.s3.nfs.server=Serveur NFS S3 label.s3.secret_key=Cl\u00e9 Priv\u00e9e label.s3.socket_timeout=D\u00e9lai d\\'expiration de la socket label.s3.use_https=Utiliser HTTPS +label.saml.enable=Autoriser SAML SSO +label.saml.entity=Fournisseur d\\'identit\u00e9 label.saturday=Samedi label.save.and.continue=Enregistrer et continuer +label.save.changes=Sauver changements label.save=Sauvegarder label.saving.processing=Sauvegarde en cours... +label.scaledown.policy=Strat\u00e9gie ScaleDown label.scale.up.policy=POLITIQUE D\\'AGRANDISSEMENT +label.scaleup.policy=Strat\u00e9gie ScaleUp label.scope=Port\u00e9e label.search=Rechercher label.secondary.ips=IPs secondaires @@ -1327,6 +1364,7 @@ label.select.vm.for.static.nat=S\u00e9lectionner une VM pour le NAT statique label.sent=Envoy\u00e9 label.server=Serveur label.service.capabilities=Fonctions disponibles +label.service.offering.details=D\u00e9tails offre de service label.service.offering=Offre de Service label.services=Services label.service.state=\u00c9tat du service @@ -1334,8 +1372,8 @@ label.session.expired=Session expir\u00e9e label.set.default.NIC=D\u00e9finir NIC par d\u00e9faut label.settings=Param\u00e8tres label.setup=Configuration -label.setup.network=Configurer le r\u00e9seau -label.setup.zone=Configurer la zone +label.setup.network=Configurer R\u00e9seau +label.setup.zone=Configurer Zone label.set.up.zone.type=Configurer le type de zone label.shared=En partage label.SharedMountPoint=Point de montage partag\u00e9 @@ -1353,7 +1391,7 @@ label.snapshot=Instantan\u00e9 label.snapshot.limits=Limites d\\'instantan\u00e9s label.snapshot.name=Nom Instantan\u00e9 label.snapshot.schedule=Configurer un instantan\u00e9 r\u00e9current -label.snapshot.s=Instantan\u00e9(s) +label.snapshot.s=Instantan\u00e9s label.snapshots=Instantan\u00e9s label.SNMP.community=Communaut\u00e9 SNMP label.SNMP.port=Port SNMP @@ -1368,6 +1406,9 @@ label.specify.vxlan=Pr\u00e9ciser le VXLAN label.SR.name=Nom du point de montage label.srx.details=D\u00e9tails SRX label.srx=SRX +label.ssh.key.pair=Bi-cl\u00e9 SSH +label.ssh.key.pair.details=D\u00e9tails bi-cl\u00e9 SSH +label.ssh.key.pairs=Bi-cl\u00e9s SSH label.standard.us.keyboard=Clavier standard (US) label.start.IP=IP d\u00e9but plage label.start.lb.vm=D\u00e9marrer LB VM @@ -1380,6 +1421,7 @@ label.static.nat.enabled=NAT statique activ\u00e9 label.static.nat=NAT Statique label.static.nat.to=NAT Statique vers label.static.nat.vm.details=D\u00e9tails des NAT statique VM +label.static.routes=Routes statiques label.statistics=Statistiques label.status=Statut label.step.1.title=\u00c9tape 1 \: S\u00e9lectionnez un mod\u00e8le @@ -1427,8 +1469,9 @@ label.supportsstrechedl2subnet=Sous-r\u00e9seau Streched L2 support\u00e9 label.suspend.project=Suspendre projet label.switch.type=Type commutateur label.system.capacity=Capacit\u00e9 syst\u00e8me -label.system.offering.for.router=Offre Syst\u00e8me pour Routeur -label.system.offering=Offre de syst\u00e8me +label.system.offering.for.router=Offre de Syst\u00e8me pour Routeur +label.system.offering=Offre de Syst\u00e8me +label.system.service.offering.details=D\u00e9tails offre de service syst\u00e8me label.system.service.offering=Offre de Service Syst\u00e8me label.system.vm.details=D\u00e9tails VM Syst\u00e8me label.system.vm.scaled.up=VM Syst\u00e8me agrandie @@ -1490,14 +1533,19 @@ label.update.ssl= Certificat SSL label.updating=Mise \u00e0 jour label.upgrade.required=Une mise \u00e0 jour est n\u00e9cessaire label.upgrade.router.newer.template=Mette \u00e0 jour le routeur pour utiliser le mod\u00e8le le plus r\u00e9cent -label.upload=Charger -label.upload.volume=Charger un volume +label.upload.from.local=T\u00e9l\u00e9verser depuis Local +label.upload.template.from.local=T\u00e9l\u00e9verser Mod\u00e8le depuis Local +label.upload=T\u00e9l\u00e9verser +label.upload.volume.from.local=T\u00e9l\u00e9verser Volume depuis Local +label.upload.volume.from.url=T\u00e9l\u00e9verser volume depuis URL +label.upload.volume=T\u00e9l\u00e9verser un volume label.url=URL label.usage.interface=Interface Utilisation label.usage.sanity.result=R\u00e9sultat de sant\u00e9 Usage label.usage.server=Serveur d\\'Usage label.used=Utilis\u00e9 label.user.data=Donn\u00e9es utilisateur +label.user.details=D\u00e9tails utilisateur label.username=Identifiant label.username.lower=identifiant label.users=Utilisateurs @@ -1589,7 +1637,8 @@ label.vpc.distributedvpcrouter=Routeur VPC Distribu\u00e9 label.vpc.id=ID VPC label.VPC.limits=Limites VPC label.vpc.offering.details=D\u00e9tails offre VPC -label.vpc.offering=Offre VPC +label.vpc.offering=Offre de VPC +label.vpc.router.details=D\u00e9tails Routeur VPC label.VPC.router.details=D\u00e9tails routeur VPC label.vpc.supportsregionlevelvpc=VPC niveau R\u00e9gion support\u00e9 label.vpc.virtual.router=Routeur virtuel VPC @@ -1718,7 +1767,7 @@ message.add.cluster.zone=Ajouter un cluster d\\'hyperviseurs g\u00e9r\u00e9 pour message.add.disk.offering=Renseignez les param\u00e8tres suivants pour ajouter un offre de service de disques message.add.domain=Sp\u00e9cifier le sous domaine que vous souhaitez cr\u00e9er sous ce domaine message.added.new.nuage.vsp.controller=Ajout d\\'un nouveau contr\u00f4leur Nuage Vsp -message.added.vpc.offering=Ajout d\\'une offre VPC +message.added.vpc.offering=Offre de VPC ajout\u00e9e message.add.firewall=Ajouter un pare-feu \u00e0 cette zone message.add.guest.network=Confirmer l\\'ajout du r\u00e9seau invit\u00e9 message.add.host=Renseignez les param\u00e8tres suivants pour ajouter une h\u00f4te @@ -1740,7 +1789,7 @@ message.add.primary.storage=Ajouter un nouveau stockage primaire \u00e0 la zone message.add.region=Renseigner les informations suivantes pour ajouter une nouvelle r\u00e9gion. message.add.secondary.storage=Ajouter un nouveau stockage pour la zone message.add.service.offering=Renseigner les informations suivantes pour ajouter une nouvelle offre de service de calcul. -message.add.system.service.offering=Ajouter les informations suivantes pour cr\u00e9er une nouvelle offre syst\u00e8me. +message.add.system.service.offering=Ajouter les informations suivantes pour cr\u00e9er une nouvelle offre de syst\u00e8me. message.add.template=Renseignez les informations suivantes pour cr\u00e9er votre nouveau mod\u00e8le message.add.volume=Renseignez les informations suivantes pour ajouter un nouveau volume message.add.VPN.gateway=Confirmer l\\'ajout d\\'une passerelle VPN @@ -1857,11 +1906,15 @@ message.delete.user=\u00cates-vous s\u00fbr que vous voulez supprimer cet utilis message.delete.VPN.connection=\u00cates-vous s\u00fbr que vous voulez supprimer la connexion VPN message.delete.VPN.customer.gateway=\u00cates-vous s\u00fbr que vous voulez supprimer cette passerelle VPN client message.delete.VPN.gateway=\u00cates-vous s\u00fbr que vous voulez supprimer cette passerelle VPN +message.desc.add.new.lb.sticky.rule=Ajouter nouvelle r\u00e8gle LB sticky message.desc.advanced.zone=Pour des topologies de r\u00e9seau plus sophistiqu\u00e9es. Ce mod\u00e8le de r\u00e9seau permet plus de flexibilit\u00e9 dans la d\u00e9finition des r\u00e9seaux d\\'invit\u00e9s et propose des offres personnalis\u00e9es telles que le support de pare-feu, VPN ou d\\'\u00e9quilibrage de charge. message.desc.basic.zone=Fournit un r\u00e9seau unique o\u00f9 chaque instance de machine virtuelle se voit attribuer une adresse IP directement depuis le r\u00e9seau. L\\'isolation des invit\u00e9s peut \u00eatre assur\u00e9 au niveau de la couche r\u00e9seau-3 tels que les groupes de s\u00e9curit\u00e9 (filtrage d\\'adresse IP source). message.desc.cluster=Chaque pod doit contenir un ou plusieurs clusters, et le premier cluster sera ajout\u00e9 tout de suite. Un cluster est un regroupement pour h\u00f4tes. Les h\u00f4tes d\\'un cluster ont tous un mat\u00e9riel identique, ex\u00e9cutent le m\u00eame hyperviseur, sont dans le m\u00eame sous-r\u00e9seau, et acc\u00e8dent au m\u00eame stockage partag\u00e9. Chaque cluster comprend une ou plusieurs h\u00f4tes et un ou plusieurs serveurs de stockage primaire. +message.desc.created.ssh.key.pair=Bi-cl\u00e9 SSH cr\u00e9\u00e9e +message.desc.create.ssh.key.pair=Veuillez remplir les champs suivants pour cr\u00e9er ou enregistrer une bi-cl\u00e9 SSH.

(1) Si la cl\u00e9 publique est d\u00e9finie, CloudStack va enregistrer cette cl\u00e9. Vous pouvez ensuite l\\'utiliser avec sa cl\u00e9 priv\u00e9e.

(2) Si la cl\u00e9 publique n\\'est pas d\u00e9finie, CloudStack va cr\u00e9er une nouvelle bi-cl\u00e9 SSH. Dans ce cas, veuillez copier et sauvegarder la cl\u00e9 priv\u00e9e. CloudStack ne va pas la conserver.
message.desc.host=Chaque cluster doit contenir au moins un h\u00f4te (machine) pour ex\u00e9ctuer des machines virtuelles invit\u00e9es, et le premier h\u00f4te sera ajout\u00e9e maintenant. Pour un h\u00f4te fonctionnant dans CloudStack, vous devez installer un logiciel hyperviseur sur l\\'h\u00f4te, attribuer une adresse IP \u00e0 l\\'h\u00f4te, et s\\'assurer que l\\'h\u00f4te est connect\u00e9 au serveur d\\'administration CloudStack.

Indiquer le nom de l\\'h\u00f4te ou son adresse IP, l\\'identifiant de connexion (g\u00e9n\u00e9ralement root) et le mot de passe ainsi que toutes les \u00e9tiquettes permettant de classer les h\u00f4tes. message.desc.primary.storage=Chaque cluster doit contenir un ou plusieurs serveurs de stockage primaire, et le premier sera ajout\u00e9 tout de suite. Le stockage principal contient les volumes de disque pour les machines virtuelles s\\'ex\u00e9cutant sur les h\u00f4tes dans le cluster. Utiliser les protocoles standards pris en charge par l\\'hyperviseur sous-jacent. +message.desc.reset.ssh.key.pair=Veuillez sp\u00e9cifier une bi-cl\u00e9 SSH que vous souhaitez ajouter \u00e0 cette VM. Noter que le mot de passe root sera chang\u00e9 durant cette op\u00e9ration si l\\'option mot de passe est activ\u00e9e. message.desc.secondary.storage=Chaque zone doit avoir au moins un serveur NFS ou un serveur de stockage secondaire, et sera ajout\u00e9 en premier tout de suite. Le stockage secondaire entrepose les mod\u00e8les de machines virtuelles, les images ISO et les images disques des volumes des machines virtuelles. Ce serveur doit \u00eatre accessible pour toutes les machines h\u00f4tes dans la zone.

Saisir l\\'adresse IP et le chemin d\\'export. message.desc.zone=Une zone est la plus grande unit\u00e9 organisationnelle dans CloudStack, et correspond typiquement \u00e0 un centre de donn\u00e9es. Les zones fournissent un isolement physique et de la redondance. Une zone est constitu\u00e9e d\\'un ou plusieurs pods (dont chacun contient les h\u00f4tes et les serveurs de stockage primaire) et un serveur de stockage secondaire qui est partag\u00e9e par tous les pods dans la zone. message.detach.disk=Voulez-vous d\u00e9tacher ce disque ? @@ -1953,6 +2006,7 @@ message.migrate.systemvm.confirm=Confirmer la migration de la VM syst\u00e8me ve message.migrate.volume=Confirmer la migration du volume vers un autre stockage primaire. message.network.addVM.desc=Veuillez sp\u00e9cifier le r\u00e9seau que vous souhaitez ajouter \u00e0 cette VM. Une nouvelle interface NIC sera ajout\u00e9e pour ce r\u00e9seau. message.network.addVMNIC=Confirmer l\\'ajout d\\'une nouvelle NIC VM pour ce r\u00e9seau. +message.network.remote.access.vpn.configuration=La configuration VPN Acc\u00e9s Distant a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9e mais elle n\\'a pas pu \u00eatre appliqu\u00e9e. Veuillez v\u00e9rifier la connectivit\u00e9 des \u00e9l\u00e9ments r\u00e9seau, et r\u00e9-essayez. message.new.user=Renseigner les informations suivantes pour ajouter un nouveau compte utilisateur message.no.affinity.groups=Vous n\\'avez pas de groupes d\\'affinit\u00e9. Continuer vers la prochaine \u00e9tape. message.no.host.available=Aucun h\u00f4te n\\'est disponible pour la migration @@ -1965,23 +2019,29 @@ message.number.hosts=

\# d\\' H\u00f4tes

message.number.pods=

\# de Pods

message.number.storage=

\# de Volumes de Stockage Primaire

message.number.zones=

\# de Zones

+message.password.has.been.reset.to=Le mot de passe a \u00e9t\u00e9 r\u00e9-initialiser en +message.password.of.the.vm.has.been.reset.to=Le mot de passe de la VM a \u00e9t\u00e9 r\u00e9-initialis\u00e9 en message.pending.projects.1=Vous avez des invitations projet en attente \: message.pending.projects.2=Pour les visualiser, aller dans la section projets, puis s\u00e9lectionner invitation dans la liste d\u00e9roulante. message.please.add.at.lease.one.traffic.range=Ajouter au moins une plage r\u00e9seau +message.please.confirm.remove.ssh.key.pair=Confirmer la suppression de cette bi-cl\u00e9 SSH message.please.proceed=Continuer vers la prochaine \u00e9tape. message.please.select.a.configuration.for.your.zone=S\u00e9lectionner une configuration pour la zone. message.please.select.a.different.public.and.management.network.before.removing=S\u00e9lectionner un r\u00e9seau public et d\\'administration diff\u00e9rent avant de supprimer message.please.select.networks=S\u00e9lectionner les r\u00e9seaux pour votre machine virtuelle. +message.please.select.ssh.key.pair.use.with.this.vm=Veuillez s\u00e9lectionner la bi-cl\u00e9 SSH que vous souhaitez utiliser avec cette VM \: message.please.wait.while.zone.is.being.created=Patienter pendant la cr\u00e9ation de la zone, cela peut prendre du temps... message.pod.dedication.released=Lib\u00e9ration du pod d\u00e9di\u00e9 message.portable.ip.delete.confirm=Supprimer la plage IP portable ? message.project.invite.sent=Invitation envoy\u00e9e ; les utilisateurs seront ajout\u00e9s apr\u00e8s acceptation de l\\'invitation message.public.traffic.in.advanced.zone=Le trafic public est g\u00e9n\u00e9r\u00e9 lorsque les machines virtuelles dans le nuage acc\u00e8dent \u00e0 Internet. Des adresses IP publiquement accessibles doivent \u00eatre pr\u00e9vues \u00e0 cet effet. Les utilisateurs peuvent utiliser l\\'interface d\\'administration de CloudStack pour acqu\u00e9rir ces adresses IP qui impl\u00e9menteront une translation d\\'adresse NAT entre le r\u00e9seau d\\'invit\u00e9 et le r\u00e9seau public.

Fournir au moins une plage d\\'adresses IP pour le trafic Internet. message.public.traffic.in.basic.zone=Le trafic public est g\u00e9n\u00e9r\u00e9 lorsque les machines virtuelles dans le nuage acc\u00e8dent \u00e0 Internet ou fournissent des services \u00e0 des utilisateurs sur Internet. Des adresses IP publiquement accessibles doivent \u00eatre pr\u00e9vus \u00e0 cet effet. Quand une instance est cr\u00e9\u00e9e, une adresse IP publique depuis un ensemble d\\'adresses IP publiques sera allou\u00e9e \u00e0 l\\'instance, en plus de l\\'adresse IP de l\\'invit\u00e9. La translation d\\'adresses statique NAT 1-1 sera mises en place automatiquement entre l\\'adresse IP publique et l\\'adresse IP de l\\'invit\u00e9. Les utilisateurs peuvent \u00e9galement utiliser l\\'interface d\\'administration CloudStack pour acqu\u00e9rir des adresses IP suppl\u00e9mentaires pour ajouter une translation d\\'adresse statique NAT entre leurs instances et le r\u00e9seau d\\'adresses IP publiques. +message.question.are.you.sure.you.want.to.add=\u00cates-vous certain de vouloir ajouter message.read.admin.guide.scaling.up=Veuillez lire le paragraphe "dynamic scaling" dans le guide d\\'administration avant d\\'op\u00e9rer un dimensionnement dynamique. message.recover.vm=Confirmer la restauration de cette VM. message.redirecting.region=Redirection vers r\u00e9gion... message.reinstall.vm=NOTE\: Proc\u00e9dez avec prudence. Cela entra\u00eenera la r\u00e9-installation de la VM \u00e0 partir du mod\u00e8le; les donn\u00e9es sur le disque ROOT seront perdues. Les volumes de donn\u00e9es suppl\u00e9mentaires, le cas \u00e9ch\u00e9ant, ne seront pas touch\u00e9s. +message.removed.ssh.key.pair=Bi-cl\u00e9 SSH supprim\u00e9e message.remove.ldap=Voulez-vous supprimer la configuration LDAP ? message.remove.region=Voulez-vous supprimer cette r\u00e9gion depuis ce serveur d\\'administration ? message.remove.vpc=Confirmer la suppression du VPC @@ -2009,7 +2069,7 @@ message.set.default.NIC.manual=Veuillez mettre \u00e0 jour manuellement la NIC p message.setup.physical.network.during.zone.creation.basic=Quand vous ajoutez une zone basique, vous pouvez param\u00e9trer un seul r\u00e9seau physique, correspondant \u00e0 une carte r\u00e9seau sur l\\'hyperviseur. Ce r\u00e9seau comportera plusieurs types de trafic.

Vous pouvez \u00e9galement glisser et d\u00e9poser d\\'autres types de trafic sur le r\u00e9seau physique. message.setup.physical.network.during.zone.creation=Lorsque vous ajoutez une zone avanc\u00e9e, vous avez besoin de d\u00e9finir un ou plusieurs r\u00e9seaux physiques. Chaque r\u00e9seau correspond \u00e0 une carte r\u00e9seau sur l\\'hyperviseur. Chaque r\u00e9seau physique peut supporter un ou plusieurs types de trafic, avec certaines restrictions sur la fa\u00e7on dont ils peuvent \u00eatre combin\u00e9s.

Glisser et d\u00e9poser un ou plusieurs types de trafic sur chaque r\u00e9seau physique. message.setup.successful=Installation du Cloud r\u00e9ussie \! -message.snapshot.schedule=Vous pouvez mettre en place les politiques de g\u00e9n\u00e9ration d\\'instantan\u00e9s en s\u00e9lectionnant les options disponibles ci-dessous et en appliquant votre politique. +message.snapshot.schedule=Vous pouvez configurer des plannings d\\'instantan\u00e9s r\u00e9currents en s\u00e9lectionnant les options disponibles ci-dessous et en appliquant votre politique pr\u00e9f\u00e9r\u00e9e. message.specifiy.tag.key.value=Sp\u00e9cifier une cl\u00e9 et valeur de tag message.specify.url=Renseigner l\\'URL message.step.1.continue=S\u00e9lectionnez un mod\u00e8le ou une image ISO pour continuer @@ -2103,6 +2163,6 @@ state.Starting=D\u00e9marrage en cours state.Stopped=Arr\u00eat\u00e9e state.Stopping=Arr\u00eat en cours state.Suspended=Suspendu -title.upload.volume=Charger Volume +title.upload.volume=T\u00e9l\u00e9verser Volume ui.listView.filters.all=Tous ui.listView.filters.mine=Les miennes diff --git a/client/WEB-INF/classes/resources/messages_hu.properties b/client/WEB-INF/classes/resources/messages_hu.properties index 6482c9ca4ed..ec41c450c9e 100644 --- a/client/WEB-INF/classes/resources/messages_hu.properties +++ b/client/WEB-INF/classes/resources/messages_hu.properties @@ -43,17 +43,17 @@ hint.type.part.host.tag=\u00cdrd be egy kiszolg\u00e1l\u00f3 c\u00edmke r\u00e9s hint.type.part.storage.tag=\u00cdrd be egy t\u00e1r c\u00edmke r\u00e9sz\u00e9t ICMP.code=ICMP k\u00f3d ICMP.type=ICMP t\u00edpus -image.directory=Image Directory +image.directory=Image K\u00f6nyvt\u00e1r inline=Inline instances.actions.reboot.label=P\u00e9ld\u00e1ny \u00fajraind\u00edt\u00e1sa label.about.app=A CloudStack-r\u0151l label.about=N\u00e9vjegy label.accept.project.invitation=Project-megh\u00edv\u00f3 elfogad\u00e1sa -label.account.and.security.group=Account, Security group +label.account.and.security.group=Sz\u00e1mla, biztons\u00e1gi csoport label.account.id=Sz\u00e1mla azonos\u00edt\u00f3 label.account.lower=sz\u00e1mla label.account.name=Sz\u00e1mla n\u00e9v -label.account.specific=Account-Specific +label.account.specific=Sz\u00e1mla-specifikus label.accounts=Sz\u00e1ml\u00e1k label.account=Sz\u00e1mla label.acl=ACL @@ -301,6 +301,7 @@ label.add.isolated.guest.network=Izol\u00e1lt vend\u00e9g h\u00e1l\u00f3zat felv label.add.isolated.network=Izol\u00e1lt h\u00e1l\u00f3zat felv\u00e9tele label.additional.networks=Tov\u00e1bbi h\u00e1l\u00f3zatok label.add.ldap.account=LDAP hozz\u00e1f\u00e9r\u00e9s felv\u00e9tele +label.add.LDAP.account=LDAP sz\u00e1mla felv\u00e9tele label.add.list.name=ACL lista n\u00e9v label.add.load.balancer=Terhel\u00e9seloszt\u00f3 felv\u00e9tele label.add.more=Tov\u00e1bbi felv\u00e9tele @@ -340,7 +341,7 @@ label.add.static.route=Statikus \u00fatvonal felv\u00e9tele label.add.system.service.offering=Add System Service Offering label.add.template=Sablon felv\u00e9tele label.add.to.group=Felv\u00e9tel a csoportba -label.add.ucs.manager=Add UCS Manager +label.add.ucs.manager=UCS Manager felv\u00e9tele label.add.userdata=Felhaszn\u00e1l\u00f3 adat label.add.user=Felhaszn\u00e1l\u00f3 felv\u00e9tele label.add.vlan=VLAN felv\u00e9tele @@ -369,7 +370,7 @@ label.affinity.group=Affin\u00edt\u00e1si csoport label.affinity.groups=Affin\u00edt\u00e1si csoportok label.agent.password=\u00dcgyn\u00f6k jelsz\u00f3 label.agent.port=\u00dcgyn\u00f6k port -label.agent.state=Agent State +label.agent.state=\u00dcgyn\u00f6k \u00e1llapot label.agent.username=\u00dcgyn\u00f6k felhaszn\u00e1l\u00f3n\u00e9v label.agree=Elfogadom label.alert.archived=Riaszt\u00e1s archiv\u00e1lva @@ -392,7 +393,7 @@ label.archive=Archive label.archive.events=Esem\u00e9nyek archiv\u00e1l\u00e1sa label.assigned.vms=Hozz\u00e1rendelt VM-ek label.assign=Hozz\u00e1rendel\u00e9s -label.assign.instance.another=Assign Instance to Another Account +label.assign.instance.another=P\u00e9ld\u00e1ny hozz\u00e1rendel\u00e9se m\u00e1sik sz\u00e1ml\u00e1hoz label.assign.to.load.balancer=P\u00e9ld\u00e1ny hozz\u00e1rendel\u00e9se terhel\u00e9seloszt\u00f3hoz label.assign.vms=VM-ek hozz\u00e1rendel\u00e9se label.associated.network.id=Kapcsolt h\u00e1l\u00f3zat ID @@ -429,8 +430,8 @@ label.broadcast.domain.type=Broadcast Domain Type label.broadcast.uri=Broadcast URI label.broadcasturi=broadcasturi label.broadcat.uri=Broadcast URI -label.brocade.vcs.address=Vcs Switch Address -label.brocade.vcs.details=Brocade Vcs Switch details +label.brocade.vcs.address=Vcs Switch c\u00edm +label.brocade.vcs.details=Brocade Vcs Switch r\u00e9szletek label.by.account=By Account label.by.alert.type=Riaszt\u00e1s t\u00edpus szerint label.by.availability=By Availability @@ -497,7 +498,7 @@ label.confirm.password=Jelsz\u00f3 meger\u0151s\u00edt\u00e9s label.congratulations=Gratul\u00e1ci\u00f3\! label.conserve.mode=Conserve mode label.console.proxy=Konzol proxy -label.console.proxy.vm=Console Proxy VM +label.console.proxy.vm=Konzol Proxy VM label.continue.basic.install=Folytat\u00e1s alaptelep\u00edt\u00e9ssel label.continue=Tov\u00e1bb label.copying.iso=ISO m\u00e1sol\u00e1sa @@ -515,10 +516,12 @@ label.created=L\u00e9trehoz\u00e1s d\u00e1tuma label.create.nfs.secondary.staging.storage=Create NFS Secondary Staging Store label.create.nfs.secondary.staging.store=NFS m\u00e1sodlagos t\u00e1r l\u00e9trehoz\u00e1sa label.create.project=Projekt l\u00e9trehoz\u00e1sa +label.create.ssh.key.pair=SSH kulcsp\u00e1r l\u00e9trehoz\u00e1sa label.create.template=Sablon l\u00e9trehoz\u00e1sa label.create.VPN.connection=VPN kapcsolat l\u00e9trehoz\u00e1sa label.cross.zones=Cross Zones label.custom.disk.iops=Egyedi IOPS +label.custom.disk.offering=Egyedi t\u00e1r aj\u00e1nlat label.custom.disk.size=Egyedi merevlemez m\u00e9ret label.custom=Egyedi label.daily=Napi @@ -565,7 +568,7 @@ label.delete.project=Projekt t\u00f6rl\u00e9se label.delete.secondary.staging.store=Delete Secondary Staging Store label.delete.SRX=SRX t\u00f6rl\u00e9se label.delete=T\u00f6rl\u00e9s -label.delete.ucs.manager=Delete UCS Manager +label.delete.ucs.manager=UCS Manager t\u00f6rl\u00e9se label.delete.VPN.connection=VPN kapcsolat t\u00f6rl\u00e9se label.delete.VPN.customer.gateway=VPN \u00fcgyf\u00e9l kapu t\u00f6rl\u00e9se label.delete.VPN.gateway=VPN kapu t\u00f6rl\u00e9se @@ -597,7 +600,7 @@ label.disable.vnmc.provider=VNMC szolg\u00e1ltat\u00f3 kikapcsol\u00e1sa label.disable.vpc.offering=VPC aj\u00e1nlat kikapcsol\u00e1sa label.disable.vpn=T\u00e1voli VPN hozz\u00e1f\u00e9r\u00e9s kikapcsol\u00e1sa label.disabling.vpn.access=VPN hozz\u00e1f\u00e9r\u00e9s kikapcsol\u00e1sa -label.disassociate.profile.blade=Disassociate Profile from Blade +label.disassociate.profile.blade=Profil elv\u00e1laszt\u00e1sa a blade-t\u0151l label.disbale.vnmc.device=VNMC eszk\u00f6sz kikapcsol\u00e1sa label.disk.allocated=Merevlemez lefoglalva label.disk.bytes.read.rate=Olvas\u00e1si r\u00e1ta (BPS) @@ -642,7 +645,8 @@ label.edit.affinity.group=Affin\u00edt\u00e1si csoport szerkeszt\u00e9se label.edit.lb.rule=LB szab\u00e1ly m\u00f3dos\u00edt\u00e1sa label.edit.network.details=H\u00e1l\u00f3zat r\u00e9szleteinek szerkeszt\u00e9se label.edit.project.details=Projekt r\u00e9szletek szerkeszt\u00e9se -label.edit.region=Edit Region +label.edit.region=R\u00e9gi\u00f3 szerkeszt\u00e9se +label.edit.rule=Szab\u00e1ly m\u00f3dos\u00edt\u00e1sa label.edit.secondary.ips=M\u00e1sodlagos IP c\u00edmek m\u00f3dos\u00edt\u00e1sa label.edit=Szerkeszt\u00e9s label.edit.tags=Cimk\u00e9k szerkeszt\u00e9se @@ -699,6 +703,7 @@ label.failed=Hiba label.featured=Kiemelt label.fetch.latest=Legfrissebb let\u00f6lt\u00e9se label.filterBy=Sz\u0171r\u00e9s +label.fingerprint=\u00dajlenyomat label.firewall=T\u0171zfal label.first.name=Keresztn\u00e9v label.firstname.lower=keresztn\u00e9v @@ -718,9 +723,9 @@ label.go.step.3=3. l\u00e9p\u00e9sre label.go.step.4=4. l\u00e9p\u00e9sre label.go.step.5=5. l\u00e9psre label.gpu=CPU -label.group.by.account=Group by account -label.group.by.cluster=Group by cluster -label.group.by.pod=Group by pod +label.group.by.account=Sz\u00e1ml\u00e1nk\u00e9nt csoportos\u00edtva +label.group.by.cluster=F\u00fcrt\u00f6nk\u00e9nt csoportos\u00edtva +label.group.by.pod=Pod-onk\u00e9nt csoportos\u00edtva label.group.by.zone=Z\u00f3n\u00e1nk\u00e9nt csoportos\u00edtva label.group=Csoport label.group.optional=Csoport (opcion\u00e1lis) @@ -731,7 +736,7 @@ label.gslb.details=GSLB r\u00e9szletek label.gslb.domain.name=GSLB dom\u00e9n n\u00e9v label.gslb=GSLB label.gslb.lb.details=Terhel\u00e9seloszt\u00f3 r\u00e9szletek -label.gslb.lb.remove=Remove load balancing from this GSLB +label.gslb.lb.remove=Terhel\u00e9seloszt\u00e1s t\u00f6rl\u00e9se ebb\u0151l a GSLB-b\u0151l label.gslb.lb.rule=Terhel\u00e9seloszt\u00f3 szab\u00e1ly label.gslb.service=GSLB szolg\u00e1ltat\u00e1s label.gslb.service.private.ip=GSLB szolg\u00e1ltat\u00e1s priv\u00e1t IP @@ -747,11 +752,13 @@ label.guest.network.details=Vend\u00e9g h\u00e1l\u00f3zat r\u00e9szletek label.guest.networks=Vend\u00e9g h\u00e1l\u00f3zatok label.guest.start.ip=Kezd\u0151 vend\u00e9g IP label.guest.traffic=Vend\u00e9g forgalom -label.guest.traffic.vswitch.name=Guest Traffic vSwitch Name -label.guest.traffic.vswitch.type=Guest Traffic vSwitch Type +label.guest.traffic.vswitch.name=Vend\u00e9g forgalom vSwitch n\u00e9v +label.guest.traffic.vswitch.type=Vend\u00e9g forgalom vSwitch t\u00edpus label.guest.type=Vend\u00e9g t\u00edpus label.guest=Vend\u00e9g label.ha.enabled=HA bekapcsolva +label.health.check.advanced.options=Halad\u00f3 be\u00e1ll\u00edt\u00e1sok\: +label.health.check.configurations.options=Beall\u00edt\u00e1sok\: label.health.check=Ellen\u0151rz\u00e9s label.health.check.interval.in.sec=Ellen\u0151rz\u00e9s id\u0151k\u00f6z (mp) label.healthy.threshold=Eg\u00e9szs\u00e9ges k\u00fcsz\u00f6b @@ -779,7 +786,7 @@ label.IKE.DH=IKE DH label.IKE.encryption=IKE titkos\u00edt\u00e1s label.IKE.hash=IKE Hash label.IKE.lifetime=IKE \u00e9lettartam (mp) -label.IKE.policy=IKE policy +label.IKE.policy=IKE szab\u00e1lyzat label.info=Inf\u00f3 label.info.upper=INFO label.ingress.rule=Ingress szab\u00e1ly @@ -893,7 +900,7 @@ label.lb.algorithm.roundrobin=K\u00f6rbe forg\u00f3 label.lb.algorithm.source=Forr\u00e1s label.LB.isolation=Terhel\u00e9seloszt\u00f3 izol\u00e1ci\u00f3 label.ldap.configuration=LDAP konfigur\u00e1ci\u00f3 -label.ldap.group.name=LDAP Group +label.ldap.group.name=LDAP csoport label.ldap.port=LDAP port label.level=Szint label.linklocal.ip=Link Local IP Address @@ -902,14 +909,17 @@ label.load.balancer.type=Terhel\u00e9seloszt\u00f3 t\u00edpus label.load.balancing.policies=Terhel\u00e9seloszt\u00f3 szab\u00e1lyok label.load.balancing=Terhel\u00e9seloszt\u00e1s label.loading=Bet\u00f6lt\u00e9s +label.local.file=Helyi file label.local=Helyi +label.local.storage.enabled=Helyi t\u00e1r bekapcsol\u00e1sa felhaszn\u00e1l\u00f3i VM-ek r\u00e9sz\u00e9re +label.local.storage.enabled.system.vms=Helyi t\u00e1r bekapcsol\u00e1sa a rendszer VM sz\u00e1m\u00e1ra label.local.storage=Helyi t\u00e1r label.login=Bejelentkez\u00e9s label.logout=Kijelentkez\u00e9s label.lun=LUN label.LUN.number=LUN \# label.lxc.traffic.label=LXC Traffic Label -label.make.project.owner=Make account project owner +label.make.project.owner=Sz\u00e1mla projekt-tulajdonoss\u00e1 t\u00e9tele label.make.redundant=Redund\u00e1nss\u00e1 t\u00e9tel label.managed=Vez\u00e9relt label.management.ips=Vez\u00e9rl\u0151 IP c\u00edm @@ -1018,7 +1028,7 @@ label.netScaler=NetScaler label.network.ACL=H\u00e1l\u00f3zati ACL label.network.ACLs=H\u00e1l\u00f3zati ACL-ek label.network.ACL.total=H\u00e1l\u00f3zati ACL \u00f6sszesen -label.network.addVM=Add network to VM +label.network.addVM=H\u00e1l\u00f3zat felv\u00e9tele a VM-hez label.network.cidr=H\u00e1l\u00f3zat CIDR label.network.desc=H\u00e1l\u00f3zat le\u00edr\u00e1s label.network.device=H\u00e1l\u00f3zati eszk\u00f6z @@ -1044,6 +1054,7 @@ label.network.type=H\u00e1l\u00f3zat t\u00edpus label.network.write=H\u00e1l\u00f3zat \u00edr\u00e1s label.new.password=\u00daj jelsz\u00f3 label.new.project=\u00daj projekt +label.new.ssh.key.pair=\u00daj SSH kulcsp\u00e1r label.new=\u00daj label.new.vm=\u00daj VM label.next=K\u00f6vetkez\u0151 @@ -1092,13 +1103,13 @@ label.order=Sorrend label.os.preference=OS preferencia label.os.type=OS t\u00edpus label.other=M\u00e1s -label.override.guest.traffic=Override Guest-Traffic +label.override.guest.traffic=Vend\u00e9g forgalom fel\u00fclb\u00edr\u00e1l\u00e1sa label.override.public.traffic=Publikus forgalom fel\u00fclb\u00edr\u00e1l\u00e1sa label.ovm3.cluster=Nat\u00edv f\u00fcrt\u00f6z\u00e9s label.ovm.traffic.label=OVM traffic label label.ovs=OVS -label.owned.public.ips=Owned Public IP Addresses -label.owner.account=Owner Account +label.owned.public.ips=Birtokolt publikus IP c\u00edmek +label.owner.account=Tulajdonos sz\u00e1mla label.owner.domain=Owner Domain label.palo.alto.details=Palo Alto r\u00e9szletek label.PA.log.profile=Palo Alto log profil @@ -1115,6 +1126,7 @@ label.perfect.forward.secrecy=Perfect Forward Secrecy label.persistent=Perzisztens label.physical.network=Fizikai h\u00e1l\u00f3zat label.physical.network.ID=Fizikai h\u00e1l\u00f3zat ID +label.physical.network.name=A fizikai h\u00e1l\u00f3zat neve label.PING.CIFS.password=PING CIFS jelsz\u00f3 label.PING.CIFS.username=PING CIFS felhaszn\u00e1l\u00f3 label.PING.dir=PING Directory @@ -1145,7 +1157,7 @@ label.primary.allocated=Els\u0151dleges t\u00e1r elk\u00fcl\u00f6n\u00edtve label.primary.network=Els\u0151dleges h\u00e1l\u00f3zat label.primary.storage.count=Primary Storage Pools label.primary.storage=Els\u0151dleges t\u00e1r -label.primary.storage.limits=Primary Storage limits (GiB) +label.primary.storage.limits=Els\u0151dleges t\u00e1r korl\u00e1tok (GiB) label.primary.used=Haszn\u00e1lt els\u0151dleges t\u00e1r label.private.Gateway=Priv\u00e1t \u00e1tj\u00e1r\u00f3 label.private.interface=Private Interface @@ -1153,6 +1165,7 @@ label.private.ip=Priv\u00e1t IP c\u00edm label.private.ip.range=Priv\u00e1t IP tartom\u00e1ny label.private.ips=Priv\u00e1t IP c\u00edmek label.privatekey=PKCS\#8 priv\u00e1t kulcs +label.private.key=Priv\u00e1t kulcs label.private.network=Priv\u00e1t h\u00e1l\u00f3zat label.private.port=Priv\u00e1t port label.private.zone=Priv\u00e1t z\u00f3na @@ -1171,20 +1184,21 @@ label.provider=Szolg\u00e1ltat\u00f3 label.public.interface=Public Interface label.public.ip=Publikus IP c\u00edm label.public.ips=Publikus IP c\u00edmek +label.public.key=Publikus kulcs label.public.load.balancer.provider=Publikus terhel\u00e9seloszt\u00f3 szolg\u00e1ltat\u00f3 label.public.network=Publikus h\u00e1l\u00f3zat label.public.port=Publikus port label.public=Publikus label.public.traffic=Publikus forgalom label.public.traffic.vswitch.name=Publikus forgalom vSwitch n\u00e9v -label.public.traffic.vswitch.type=Public Traffic vSwitch Type +label.public.traffic.vswitch.type=Publikus forgalom vSwitch t\u00edpus label.public.zone=Publikus z\u00f3na label.purpose=Rendeltet\u00e9s label.Pxe.server.type=Pxe szerver t\u00edpus label.qos.type=QoS t\u00edpus label.quickview=Gyorsn\u00e9zet label.quiesce.vm=VM felf\u00fcggeszt\u00e9se -label.quiet.time.sec=Quiet Time (in sec) +label.quiet.time.sec=V\u00e1rakoz\u00e1s (mp) label.rbd.id=Cephx felhaszn\u00e1l\u00f3 label.rbd.monitor=Ceph monitor label.rbd.pool=Ceph pool @@ -1206,7 +1220,7 @@ label.reinstall.vm=VM \u00fajratelep\u00edt\u00e9se label.related=Kapcsol\u00f3d\u00f3 label.release.account.lowercase=Release from account label.release.account=Release from Account -label.release.dedicated.cluster=Release Dedicated Cluster +label.release.dedicated.cluster=Dedik\u00e1lt f\u00fcrt elenged\u00e9se label.release.dedicated.host=Dedik\u00e1lt kiszolg\u00e1l\u00f3 elenged\u00e9se label.release.dedicated.pod=Dedik\u00e1lt pod elenged\u00e9se label.release.dedicated.vlan.range=Dedik\u00e1lt VLAN tartom\u00e1ny elenged\u00e9se @@ -1223,13 +1237,15 @@ label.remove.pf=Port tov\u00e1bb\u00edt\u00f3 szab\u00e1ly elt\u00e1vol\u00edt\u label.remove.project.account=Sz\u00e1mla elt\u00e1vol\u00edt\u00e1sa a projektb\u0151l label.remove.region=R\u00e9gi\u00f3 elt\u00e1vol\u00edt\u00e1sa label.remove.rule=Szab\u00e1ly elt\u00e1vol\u00edt\u00e1sa +label.remove.ssh.key.pair=SSH kulcsp\u00e1r elt\u00e1vol\u00edt\u00e1sa label.remove.static.nat.rule=Statikus NAT szab\u00e1ly elt\u00e1vol\u00edt\u00e1sa label.remove.static.route=Remove static route +label.remove.this.physical.network=A fizikai h\u00e1l\u00f3zat elt\u00e1vol\u00edt\u00e1sa label.remove.tier=R\u00e9teg elt\u00e1vol\u00edt\u00e1sa label.remove.vm.from.lb=VM elt\u00e1vol\u00edt\u00e1sa terhel\u00e9seloszt\u00f3 szab\u00e1lyb\u00f3l label.remove.vm.load.balancer=VM elt\u00e1vol\u00edt\u00e1sa a terhel\u00e9seloszt\u00f3b\u00f3l label.remove.vmware.datacenter=VMware adatk\u00f6zpont elt\u00e1vol\u00edt\u00e1sa -label.remove.vpc.offering=Remove VPC offering +label.remove.vpc.offering=VPC aj\u00e1nlat t\u00f6rl\u00e9se label.remove.vpc=VPC elt\u00e1vol\u00edt\u00e1sa label.removing=T\u00f6rl\u00e9s label.removing.user=Felhaszn\u00e1l\u00f3 elt\u00e1vol\u00edt\u00e1sa @@ -1242,13 +1258,15 @@ label.reserved.ip.range=Elk\u00fcl\u00f6n\u00edtett IP c\u00edmtartom\u00e1ny label.reserved.system.gateway=Reserved system gateway label.reserved.system.ip=Elk\u00fcl\u00f6n\u00edtett rendszer IP label.reserved.system.netmask=Elk\u00fcl\u00f6n\u00edtett rendszer h\u00e1l\u00f3zati maszk -label.resetVM=Reset VM +label.reset.ssh.key.pair.on.vm=SSH kulcsp\u00e1r \u00fajrabe\u00e1ll\u00edt\u00e1sa a VM-en +label.reset.ssh.key.pair=SSH kulcsp\u00e1r \u00fajrabe\u00e1ll\u00edt\u00e1sa +label.resetVM=VM \u00fajraind\u00edt\u00e1sa label.reset.VPN.connection=VPN kapcsolat \u00fajraind\u00edt\u00e1sa label.resize.new.offering.id=\u00daj aj\u00e1nlat label.resize.new.size=\u00daj m\u00e9ret (GB) label.resize.shrink.ok=Cs\u00f6kkent\u00e9s OK label.resource=Er\u0151forr\u00e1s -label.resource.limit.exceeded=Resource Limit Exceeded +label.resource.limit.exceeded=Er\u0151forr\u00e1s-korl\u00e1t t\u00fall\u00e9p\u00e9s label.resource.limits=Er\u0151forr\u00e1s korl\u00e1tok label.resource.name=Er\u0151forr\u00e1s n\u00e9v label.resources=Er\u0151forr\u00e1sok @@ -1267,9 +1285,9 @@ label.root.disk.controller=Root disk controller label.root.disk.offering=Root Disk Offering label.root.disk.size=Root merevlemez m\u00e9ret label.router.vm.scaled.up=Router VM Scaled Up -label.routing.host=Routing Host +label.routing.host=Routing kiszolg\u00e1l\u00f3 label.routing=\u00datvonalv\u00e1laszt\u00e1s -label.rule.number=Rule Number +label.rule.number=Szab\u00e1ly sz\u00e1m label.rules=Szab\u00e1lyok label.running.vms=Fut\u00f3 VM-ek label.s3.access_key=Hozz\u00e1f\u00e9r\u00e9si kulcs @@ -1284,6 +1302,7 @@ label.s3.socket_timeout=Kapcsolat id\u0151t\u00fall\u00e9p\u00e9s label.s3.use_https=HTTPS haszn\u00e1lata label.saturday=Szombat label.save.and.continue=Ment\u00e9s \u00e9s folytat\u00e1s +label.save.changes=V\u00e1ltoz\u00e1sok ment\u00e9se label.save=Ment\u00e9s label.saving.processing=Ment\u00e9s... label.scale.up.policy=SCALE UP POLICY @@ -1294,7 +1313,7 @@ label.secondary.isolated.vlan.id=M\u00e1sodlagos izol\u00e1lt VLAN ID label.secondary.staging.store.details=Secondary Staging Store details label.secondary.staging.store=Secondary Staging Store label.secondary.storage.count=Secondary Storage Pools -label.secondary.storage.details=Secondary storage details +label.secondary.storage.details=M\u00e1sodlagos t\u00e1r r\u00e9szletek label.secondary.storage.limits=Secondary Storage limits (GiB) label.secondary.storage=M\u00e1sodlagos t\u00e1r label.secondary.storage.vm=Secondary storage VM @@ -1315,7 +1334,7 @@ label.select.project=V\u00e1lassz projektet\! label.select.region=R\u00e9gi\u00f3 kiv\u00e1laszt\u00e1sa label.select.template=Sablon kiv\u00e1laszt\u00e1sa label.select.tier=V\u00e1lassz r\u00e9teget\! -label.select-view=Select view +label.select-view=N\u00e9zet label.select.vm.for.static.nat=V\u00e1lassz VM-et a statikus NAT-hoz label.sent=Elk\u00fcld\u00f6tt label.server=Szerver @@ -1324,7 +1343,7 @@ label.service.offering=Szolg\u00e1ltat\u00e1s aj\u00e1nlat label.services=Szolg\u00e1ltat\u00e1sok label.service.state=Szolg\u00e1ltat\u00e1s \u00e1llapot label.session.expired=A munkamenet lej\u00e1rt -label.set.default.NIC=Set default NIC +label.set.default.NIC=Alap\u00e9rtelmezett NIC be\u00e1ll\u00edt\u00e1sa label.settings=Be\u00e1ll\u00edt\u00e1sok label.setup=Be\u00e1ll\u00edt\u00e1sok label.setup.network=H\u00e1l\u00f3zat be\u00e1ll\u00edt\u00e1sa @@ -1345,8 +1364,7 @@ label.smb.username=SMB felhaszn\u00e1l\u00f3n\u00e9v label.snapshot.limits=Pillanatfelv\u00e9tel korl\u00e1tok label.snapshot.name=Pillanatfelv\u00e9tel n\u00e9v label.snapshot=Pillanatfelv\u00e9tel -label.snapshot.schedule=Ism\u00e9tl\u0151d\u0151 pillanatfelv\u00e9telek be\u00e1ll\u00edt\u00e1sa -label.snapshot.s=Pillanatfelv\u00e9tel(ek) +label.snapshot.s=Pillanatfelv\u00e9telek label.snapshots=Pillanatfelv\u00e9telek label.SNMP.community=SNMP Community label.SNMP.port=SNMP Port @@ -1361,6 +1379,9 @@ label.specify.vxlan=VXLAN megad\u00e1sa label.SR.name=SR Name-Label label.srx.details=SRX r\u00e9szletek label.srx=SRX +label.ssh.key.pair.details=SSH kucsp\u00e1r r\u00e9szletei +label.ssh.key.pair=SSH kulcsp\u00e1r +label.ssh.key.pairs=SSH kulcsp\u00e1rok label.standard.us.keyboard=Amerikai (USA) szabv\u00e1nyos billenty\u0171zet label.start.IP=Kezd\u0151 IP label.start.lb.vm=Terhel\u00e9seloszt\u00f3 VM ind\u00edt\u00e1sa @@ -1387,7 +1408,7 @@ label.step.5=5. l\u00e9p\u00e9s label.step.5.title=5. l\u00e9p\u00e9s\: Ellen\u0151rz\u00e9s label.stickiness.method=Stickiness method label.stickiness=Stickiness -label.sticky.cookie-name=Cookie name +label.sticky.cookie-name=Cookie n\u00e9v label.sticky.domain=Dom\u00e9n label.sticky.expire=Lej\u00e1rat label.sticky.holdtime=Hold time @@ -1397,11 +1418,11 @@ label.sticky.mode=M\u00f3d label.sticky.name=Sticky Name label.sticky.nocache=Nincs gyors\u00edt\u00f3t\u00e1r label.sticky.postonly=Post only -label.sticky.prefix=Prefix +label.sticky.prefix=El\u0151tag label.sticky.request-learn=Request learn label.sticky.tablesize=T\u00e1bla m\u00e9ret label.stop.lb.vm=Terhel\u00e9seloszt\u00f3 VM le\u00e1ll\u00edt\u00e1sa -label.stopped.vms=Stopped VMs +label.stopped.vms=Le\u00e1ll\u00edtott VM-ek label.stop=\u00c1lj label.storage.pool=Storage Pool label.storage.tags=T\u00e1r c\u00edmk\u00e9k @@ -1410,12 +1431,12 @@ label.storage=T\u00e1r label.storage.type=T\u00e1r t\u00edpus label.subdomain.access=Subdomain Access label.submit=Elk\u00fcld\u00e9s -label.submitted.by=[Submitted by\: ] +label.submitted.by=[Bek\u00fcld\u0151\: ] label.succeeded=Siker\u00fclt label.sunday=Vas\u00e1rnap label.super.cidr.for.guest.networks=Super CIDR for Guest Networks label.supported.services=T\u00e1mogatott szolg\u00e1ltat\u00e1sok -label.supported.source.NAT.type=Supported Source NAT type +label.supported.source.NAT.type=T\u00e1mogatott forr\u00e1s NAT t\u00edpus label.supportsstrechedl2subnet=Supports Streched L2 Subnet label.suspend.project=Projekt felf\u00fcggeszt\u00e9se label.switch.type=Switch t\u00edpus @@ -1425,12 +1446,12 @@ label.system.offering=Rendszer aj\u00e1nlat label.system.service.offering=Rendszer szolg\u00e1ltat\u00e1s aj\u00e1nlat label.system.vm.details=Rendszer VM r\u00e9szletek label.system.vm=Rendszer VM -label.system.vm.scaled.up=System VM Scaled Up +label.system.vm.scaled.up=Rendszer VM felm\u00e9retezve label.system.vms=Rendszer VM-ek label.system.vm.type=Rendszer VM t\u00edpus label.system.wide.capacity=Rendszer-szint\u0171 kapac\u00edt\u00e1s label.tagged=Cimk\u00e9zve -label.tag.key=Tag Key +label.tag.key=C\u00edmke kulcs label.tags=Cimk\u00e9k label.tag.value=C\u00edmke \u00e9rt\u00e9k label.target.iqn=C\u00e9l IQN @@ -1464,9 +1485,9 @@ label.total.storage=\u00d6sszes t\u00e1r label.total.virtual.routers=Total of Virtual Routers label.total.virtual.routers.upgrade=Total of Virtual Routers that require upgrade label.total.vms=\u00d6sszes VM -label.traffic.label=Traffic label -label.traffic.types=Traffic Types -label.traffic.type=Traffic Type +label.traffic.label=Forgalom c\u00edmke +label.traffic.type=Forgalom t\u00edpus +label.traffic.types=Forgalom t\u00edpusok label.tuesday=Kedd label.type.id=T\u00edpus ID label.type.lower=t\u00edpus @@ -1484,6 +1505,10 @@ label.updating=Updating label.upgrade.required=Frissit\u00e9sre van sz\u00fcks\u00e9g label.upgrade.router.newer.template=Upgrade Router to Use Newer Template label.upload=Felt\u00f6lt\u00e9s +label.upload.from.local=Felt\u00f6lt\u00e9s +label.upload.template.from.local=Sablon felt\u00f6lt\u00e9se +label.upload.volume.from.local=K\u00f6tet felt\u00f6lt\u00e9se +label.upload.volume.from.url=K\u00f6tet felt\u00f6lt\u00e9se URL-r\u0151l label.upload.volume=K\u00f6tet felt\u00f6lt\u00e9se label.url=URL label.usage.interface=Usage Interface @@ -1497,7 +1522,7 @@ label.username.lower=felhaszn\u00e1l\u00f3n\u00e9v label.users=Felhaszn\u00e1l\u00f3k label.user.vm=Felhaszn\u00e1l\u00f3i VM label.use.vm.ips=VM IP c\u00edmek haszn\u00e1lata -label.use.vm.ip=Use VM IP\: +label.use.vm.ip=VM IP c\u00edm haszn\u00e1lata\: label.value=\u00c9rt\u00e9k label.vcdcname=vCenter DC n\u00e9v label.vcenter.cluster=vCenter f\u00fcrt @@ -1563,7 +1588,7 @@ label.vm.state=VM \u00e1llapot label.vm.stop=\u00c1lj label.vms=VM-ek label.vmware.datacenter.id=VMware adatk\u00f6zpont ID -label.vmware.datacenter.name=VMware datacenter Name +label.vmware.datacenter.name=VMware adatk\u00f6zpont n\u00e9v label.vmware.datacenter.vcenter=VMware datacenter vcenter label.vmware.traffic.label=VMware traffic label label.vnet.id=VLAN/VNI ID @@ -1578,13 +1603,13 @@ label.volume.limits=K\u00f6teg korl\u00e1tok label.volume.migrated=K\u00f6tet \u00e1tk\u00f6lt\u00f6ztetve label.volume.name=K\u00f6tet n\u00e9v label.volumes=K\u00f6tetek -label.vpc.distributedvpcrouter=Distributed VPC Router +label.vpc.distributedvpcrouter=Elosztott VPC Router label.vpc.id=VPC ID label.VPC.limits=VPC korl\u00e1tok label.vpc.offering.details=VPC aj\u00e1nlat r\u00e9szletei label.vpc.offering=VPC aj\u00e1nlat -label.VPC.router.details=VPC router details -label.vpc.supportsregionlevelvpc=Supports Region Level VPC +label.VPC.router.details=VPC router r\u00e9szletek +label.vpc.supportsregionlevelvpc=R\u00e9gi\u00f3-szint\u0171 VPC-t t\u00e1mogat label.vpc.virtual.router=VPC virtu\u00e1lis router label.vpc=VPC label.VPN.connection=VPN kapcsolat @@ -1626,10 +1651,10 @@ label.zone.step.4.title=4. l\u00e9p\u00e9s\: IP c\u00edmtartom\u00e1ny f label.zones=Z\u00f3n\u00e1k label.zone.type=Z\u00f3na t\u00edpus label.zone.wide=Eg\u00e9sz z\u00f3n\u00e1ra kiterjed\u0151 -label.zoneWizard.trafficType.guest=Guest\: Traffic between end-user virtual machines -label.zoneWizard.trafficType.management=Management\: Traffic between CloudStack\\\\'s internal resources, including any components that communicate with the Management Server, such as hosts and CloudStack system VMs -label.zoneWizard.trafficType.public=Public\: Traffic between the internet and virtual machines in the cloud. -label.zoneWizard.trafficType.storage=Storage\: Traffic between primary and secondary storage servers, such as VM templates and snapshots +label.zoneWizard.trafficType.guest=Vend\u00e9g\: forgalom v\u00e9gfelhaszn\u00e1l\u00f3i virtu\u00e1lis g\u00e9pek k\u00f6z\u00f6tt +label.zoneWizard.trafficType.management=Vez\u00e9rl\u00e9s\: forgalom a CloudStack felh\u0151 er\u0151forr\u00e1sai k\u00f6z\u00f6tt, bele\u00e9rtve azokat a komponenseket, amelyek a vez\u00e9rl\u0151 szerverrel kommunik\u00e1lnak, mint a kiszolg\u00e1l\u00f3k \u00e9s a rendszer VM-ek +label.zoneWizard.trafficType.public=Publikus\: forgalom az internet \u00e9s a felh\u0151 virtu\u00e1lis g\u00e9pei k\u00f6z\u00f6tt +label.zoneWizard.trafficType.storage=T\u00e1r\: forgalom az els\u0151dleges \u00e9s m\u00e1sodlagos t\u00e1r szerverek k\u00f6z\u00f6tt, p\u00e9ld\u00e1ul VM sablonok \u00e9s pillanatfelv\u00e9telek label.zone=Z\u00f3na managed.state=Managed State message.acquire.ip.nic=Er\u0151s\u00edtsd meg, hogy \u00faj m\u00e1sodlagos IP c\u00edmet k\u00e9rsz ehhez a NIC-hez\!
Megjegyz\u00e9s\: manu\u00e1lisan kell be\u00e1ll\u00edtanod a frissen beszerzett m\u00e1sodlagos IP c\u00edmet a virtu\u00e1lis g\u00e9pben. @@ -1702,7 +1727,7 @@ message.action.stop.instance=Er\u0151s\u00edtsd meg, hogy le akarod \u00e1ll\u00 message.action.stop.router=Minden ezzel a routerrel kapcsolatos szolg\u00e1ltat\u00e1s megszakad. Er\u0151s\u00edtsd meg, hogy le akarod \u00e1ll\u00edtani ezt a routert\! message.action.stop.systemvm=Er\u0151s\u00edtsd meg, hogy le akarod \u00e1ll\u00edtani ezt a rendszer VM-et\! message.action.take.snapshot=Er\u0151s\u00edtsd meg, hogy pillanatfelv\u00e9telt k\u00e9rsz err\u0151l a k\u00f6tetr\u0151l\! -message.action.unmanage.cluster=Please confirm that you want to unmanage the cluster. +message.action.unmanage.cluster=Er\u0151s\u00edtsd meg, hogy megszak\u00edtod a f\u00fcrt vez\u00e9rl\u00e9s\u00e9t\! message.action.vmsnapshot.delete=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod ezt a VM pillanatfelv\u00e9telt\! message.action.vmsnapshot.revert=Revert VM snapshot message.activate.project=Biztosan aktiv\u00e1lni szeretn\u00e9d ezt a projektet? @@ -1713,38 +1738,39 @@ message.add.domain=Please specify the subdomain you want to create under this do message.added.new.nuage.vsp.controller=\u00daj Nicira Vsp vez\u00e9rl\u0151 felv\u00e9ve message.added.vpc.offering=VPC aj\u00e1nlat felv\u00e9ve message.add.firewall=T\u0171zfal felv\u00e9tele a z\u00f3n\u00e1ba -message.add.guest.network=Please confirm that you would like to add a guest network +message.add.guest.network=Er\u0151s\u00edtsd meg, hogy vend\u00e9g h\u00e1l\u00f3zatot szeretn\u00e9l felvenni\! message.add.host=Add meg a k\u00f6vetkez\u0151 adatokat az \u00faj kiszolg\u00e1l\u00f3 felv\u00e9tel\u00e9hez message.adding.host=Kiszolg\u00e1l\u00f3 felv\u00e9tele message.adding.Netscaler.device=Netscaler eszk\u00f6z felv\u00e9tele message.adding.Netscaler.provider=Netscaler szolg\u00e1ltat\u00f3 felv\u00e9tele -message.add.ip.range=Add an IP range to public network in zone message.add.ip.range.direct.network=Add an IP range to direct network in zone -message.add.ip.range.to.pod=

Add an IP range to pod\:

+message.add.ip.range=IP tartom\u00e1ny felv\u00e9tele a z\u00f3na publikus h\u00e1l\u00f3zat\u00e1hoz +message.add.ip.range.to.pod=

IP tartom\u00e1ny felv\u00e9tele a pod-hoz

message.additional.networks.desc=V\u00e1laszd ki a tov\u00e1bbi h\u00e1l\u00f3zatokat, amelyhez a p\u00e9ld\u00e1ny csatlakozni fog\! message.add.load.balancer=Terhel\u00e9seloszt\u00f3 felv\u00e9tele a z\u00f3n\u00e1ba message.add.load.balancer.under.ip=The load balancer rule has been added under IP\: -message.add.network=Add a new network for zone\: +message.add.network=H\u00e1l\u00f3zat felv\u00e9tele a z\u00f3n\u00e1ban message.add.new.gateway.to.vpc=Please specify the information to add a new gateway to this VPC. -message.add.pod=Add a new pod for zone +message.add.pod.during.zone.creation=Minden z\u00f3n\u00e1nak egy vagy t\u00f6bb pod-ot kell tartalmaznia. Vegy\u00fck fel az els\u0151 pod-ot\! A pod tartalmaz kiszolg\u00e1l\u00f3kat \u00e9s els\u0151dleges t\u00e1r szervereket, amelyeket a k\u00f6vetkez\u0151 l\u00e9p\u00e9sekben vesz\u00fcnk majd fel. El\u0151sz\u00f6r \u00e1ll\u00edts be egy elk\u00fcl\u00f6n\u00edtett IP c\u00edmtartom\u00e1nyt a CloudStack bels\u0151 forgalm\u00e1nak. A c\u00edmtartom\u00e1nynak egyedinek kell lennie a felh\u0151ben. +message.add.pod=\u00daj pod felv\u00e9tele a z\u00f3n\u00e1ban message.add.primary=Please specify the following parameters to add a new primary storage -message.add.primary.storage=Add a new Primary Storage for zone , pod -message.add.region=Please specify the required information to add a new region. -message.add.secondary.storage=Add a new storage for zone +message.add.primary.storage=\u00daj els\u0151dleges t\u00e1r felv\u00e9tele a z\u00f3n\u00e1ban a pod-hoz +message.add.region=Add meg az inform\u00e1ci\u00f3kat az \u00faj r\u00e9gi\u00f3 felv\u00e9tel\u00e9hez\! +message.add.secondary.storage=\u00daj t\u00e1r felv\u00e9tele a z\u00f3n\u00e1hoz message.add.service.offering=T\u00f6ltsd ki a k\u00f6vetkez\u0151 adatokat \u00faj sz\u00e1m\u00edt\u00e1si aj\u00e1nlat felv\u00e9tel\u00e9hez message.add.system.service.offering=T\u00f6ltsd ki a k\u00f6vetkez\u0151 adatokat \u00faj rendszer szolg\u00e1ltat\u00e1s aj\u00e1nlat felv\u00e9tel\u00e9hez message.add.template=Add meg a k\u00f6vetkez\u0151 adatokat \u00faj sablon l\u00e9trehoz\u00e1s\u00e1hoz message.add.volume=T\u00f6ltsd ki a k\u00f6vetkez\u0151 adatokat \u00faj k\u00f6tet l\u00e9trehoz\u00e1s\u00e1hoz message.add.VPN.gateway=Er\u0151s\u00edtsd meg, hogy \u00faj VPN \u00e1tj\u00e1r\u00f3t akarsz felvenni\! -message.admin.guide.read=For VMware-based VMs, please read the dynamic scaling section in the admin guide before scaling. Would you like to continue?\\, +message.admin.guide.read=VMware-alap\u00fa VM-ek eset\u00e9ben k\u00e9rlek olvasd el a dinakikus sk\u00e1l\u00e1z\u00e1sr\u00f3l sz\u00f3l\u00f3 fejezetet\! Szeretn\u00e9d folytatni?\\, message.advanced.mode.desc=Akkor v\u00e1laszd ezt a h\u00e1l\u00f3zat modellt, ha szeretn\u00e9d haszn\u00e1lni a VLAN t\u00e1mogat\u00e1st. Ez a h\u00e1l\u00f3zat modell biztos\u00edtja a legnagyobb rugalmass\u00e1got \u00e9s lehet\u0151v\u00e9 teszi, hogy a rendszergazd\u00e1k olyan aj\u00e1nlatokat biztos\u00edtsanak, mint a t\u0171zfalak, VPN vagy terhel\u00e9seloszt\u00f3k valamint a direkt \u00e9s virtu\u00e1lis h\u00e1l\u00f3zatok. message.advanced.security.group=V\u00e1laszd ezt, ha biztons\u00e1gi csoportokat akarsz haszn\u00e1lni a vend\u00e9g VM izol\u00e1ci\u00f3hoz\! -message.advanced.virtual=Choose this if you wish to use zone-wide VLANs to provide guest VM isolation. -message.after.enable.s3=S3-backed Secondary Storage configured. Note\: When you leave this page, you will not be able to re-configure S3 again. -message.after.enable.swift=Swift configured. Note\: When you leave this page, you will not be able to re-configure Swift again. +message.advanced.virtual=V\u00e1laszd ezt, ha z\u00f3na-szint\u0171 VLAN-okat szeretn\u00e9l haszn\u00e1lni a vend\u00e9g VM-ek izol\u00e1ci\u00f3j\u00e1ra\! +message.after.enable.s3=Az S3-alap\u00fa m\u00e1sodlagos t\u00e1r konfigur\u00e1ci\u00f3ja k\u00e9sz. Megjegyz\u00e9s\: miut\u00e1n elhagytad ezt az oldalt, nem tudod majd az S3-at ism\u00e9t konfigur\u00e1lni. +message.after.enable.swift=A Swift konfigur\u00e1ci\u00f3ja k\u00e9sz. Megjegyz\u00e9s\: miut\u00e1n elhagytad ezt az oldalt, nem tudod majd \u00fajrakonfigur\u00e1lni a Swift-et\! message.alert.state.detected=Alert state detected message.allow.vpn.access=Add meg a VPN felhaszn\u00e1l\u00f3 nev\u00e9t \u00e9s jelszav\u00e1t -message.apply.snapshot.policy=You have successfully updated your current snapshot policy. +message.apply.snapshot.policy=Sikeresen m\u00f3dos\u00edtottad a jelenlegi pillanatfelv\u00e9tel szab\u00e1lyzatodat\! message.attach.iso.confirm=Er\u0151s\u00edtsd meg, hogy az ISO-t ehhez a virtu\u00e1lis g\u00e9phez akarod csatolni\! message.attach.volume=T\u00f6ltsd ki a k\u00f6vetkez\u0151 adatokat a k\u00f6tet csatlakoztat\u00e1s\u00e1hoz\! Ha Windows-alap\u00fa virtu\u00e1lis g\u00e9phez csatlakoztatsz merevlemezt, akkor \u00fajra kell ind\u00edtanod a p\u00e9ld\u00e1nyt ahhoz, hogy l\u00e1sd a merevlemezt. message.basic.mode.desc=Akkor v\u00e1laszd ezt a h\u00e1l\u00f3zati modellt, ha *nem* akarsz VLAN t\u00e1mogat\u00e1st bekapcsolni. Ezen a h\u00e1l\u00f3zaton minden p\u00e9ld\u00e1ny k\u00f6zvetlen\u00fcl a h\u00e1l\u00f3zatt\u00f3l kap IP c\u00edmet \u00e9s a biztons\u00e1gi csoportok szolg\u00e1ltatnak biztons\u00e1got \u00e9s szegreg\u00e1ci\u00f3t. @@ -1753,13 +1779,13 @@ message.change.password=V\u00e1ltoztass jelsz\u00f3t\! message.cluster.dedicated=F\u00fcrt dedik\u00e1lva message.cluster.dedication.released=F\u00fcrt dedik\u00e1l\u00e1s elengedve message.configure.all.traffic.types=T\u00f6bb fizikai h\u00e1l\u00f3zatod van. Kattints a \\'Szerkeszt\u00e9s\\' gombra \u00e9s \u00e1ll\u00edts be c\u00edmk\u00e9ket minden egyes forgalom t\u00edpushoz\! -message.configure.ldap=Please confirm you would like to configure LDAP. +message.configure.ldap=Er\u0151s\u00edtsd meg, hogy szeretn\u00e9l LDAP-t konfigur\u00e1lni\! message.configuring.guest.traffic=Vend\u00e9g forgalom konfigur\u00e1l\u00e1sa message.configuring.physical.networks=Fizikai h\u00e1l\u00f3zatok konfigur\u00e1l\u00e1sa message.configuring.public.traffic=Publikus forgalom konfigur\u00e1l\u00e1sa message.configuring.storage.traffic=T\u00e1r forgalom konfigur\u00e1l\u00e1sa message.confirm.action.force.reconnect=Er\u0151s\u00edtsd meg, hogy \u00fajrakapcsol\u00f3dni akarsz a kiszolg\u00e1l\u00f3hoz\! -message.confirm.add.vnmc.provider=Please confirm you would like to add the VNMC provider. +message.confirm.add.vnmc.provider=Er\u0151s\u00edtsd meg, hogy fel szeretn\u00e9d venni a VNMC szolg\u00e1ltat\u00f3t. message.confirm.archive.alert=Er\u0151s\u00edtsd meg, hogy archiv\u00e1lni akarod ezt a riaszt\u00e1st\! message.confirm.archive.event=Er\u0151s\u00edtsd meg, hogy archiv\u00e1lni szeretn\u00e9d az esem\u00e9nyt\! message.confirm.archive.selected.alerts=Er\u0151s\u00edtsd meg, hogy le akarod archiv\u00e1lni a kiv\u00e1lasztott riaszt\u00e1sokat\! @@ -1777,7 +1803,7 @@ message.confirm.delete.baremetal.rack.configuration=Er\u0151s\u00edtsd meg, hogy message.confirm.delete.BigSwitchBcf=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni szeretn\u00e9d ezt a BigSwitch BCF vez\u00e9rl\u0151t\! message.confirm.delete.BrocadeVcs=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni szeretn\u00e9d a Brocade Vcs Switch-et message.confirm.delete.ciscoASA1000v=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod a CiscoASA1000v-t -message.confirm.delete.ciscovnmc.resource=Please confirm you want to delete CiscoVNMC resource +message.confirm.delete.ciscovnmc.resource=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod a CiscoVNMC er\u0151forr\u00e1st\! message.confirm.delete.F5=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni szeretn\u00e9d az F5-\u00f6t message.confirm.delete.internal.lb=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod ezt a bels\u0151 LB-t\! message.confirm.delete.NetScaler=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni szeretn\u00e9d a NetScaler-t @@ -1790,12 +1816,12 @@ message.confirm.destroy.router=Er\u0151s\u00edtsd meg, hogy el akarod puszt\u00e message.confirm.disable.host=Er\u0151s\u00edtsd meg, hogy ki akarod kapcsolni a kiszolg\u00e1l\u00f3t message.confirm.disable.network.offering=Biztos vagy abban, hogy ki akarod kapcsolni ezt a h\u00e1l\u00f3zat aj\u00e1nlatot? message.confirm.disable.provider=Er\u0151s\u00edtsd meg, hogy ki akarod kapcsolni ezt a szolg\u00e1ltat\u00f3t -message.confirm.disable.vnmc.provider=Please confirm you would like to disable the VNMC provider. +message.confirm.disable.vnmc.provider=Er\u0151s\u00edtsd meg, hogy ki szeretn\u00e9d kapcsolni a VNMC szolg\u00e1ltat\u00f3t\! message.confirm.disable.vpc.offering=Biztos vagy abban, hogy ki akarod kapcsolni ezt a VPC aj\u00e1nlatot? message.confirm.enable.host=Er\u0151s\u00edtsd meg, hogy be akarod kapcsolni a kiszolg\u00e1l\u00f3t message.confirm.enable.network.offering=Biztos vagy abban, hogy be akarod kapcsolni ezt a h\u00e1l\u00f3zati aj\u00e1nlatot? message.confirm.enable.provider=Er\u0151s\u00edtsd meg, hogy be szeretn\u00e9d kapcsolni ezt a szolg\u00e1ltat\u00f3t -message.confirm.enable.vnmc.provider=Please confirm you would like to enable the VNMC provider. +message.confirm.enable.vnmc.provider=Er\u0151s\u00edtsd meg, hogy be szeretn\u00e9d kapcsolni a VNMC szolg\u00e1ltat\u00f3t\! message.confirm.enable.vpc.offering=Biztos vagy abban, hogy be akarod kapcsolni ezt a VPC aj\u00e1nlatot? message.confirm.join.project=Er\u0151s\u00edtsd meg, hogy csatlakozni szeretn\u00e9l a projekthez message.confirm.migrate.volume=El akarod k\u00f6lt\u00f6ztetni ezt a k\u00f6tetet? @@ -1804,7 +1830,7 @@ message.confirm.release.dedicated.cluster=El akarod engedni ezt a dedik\u00e1lt message.confirm.release.dedicated.host=El akarod engedni ezt a dedik\u00e1lt kiszolg\u00e1l\u00f3t? message.confirm.release.dedicated.pod=El akarod engedni ezt a dedik\u00e1lt pod-ot? message.confirm.release.dedicated.zone=El akarod engedni ezt a dedik\u00e1lt z\u00f3n\u00e1t? -message.confirm.release.dedicate.vlan.range=Please confirm you want to release dedicated VLAN range +message.confirm.release.dedicate.vlan.range=Er\u0151s\u00edtsd meg, hogy elengeded a dedik\u00e1lt VLAN tartom\u00e1nyt\! message.confirm.remove.event=Biztosan t\u00f6r\u00f6lni szeretn\u00e9d ezt az esem\u00e9nyt? message.confirm.remove.IP.range=Er\u0151s\u00edtsd meg, hogy el akarod t\u00e1vol\u00edtani ezt az IP tartom\u00e1nyt message.confirm.remove.load.balancer=Er\u0151s\u00edtsd meg, hogy el akarod t\u00e1vol\u00edtani a VM-et a terhel\u00e9seloszt\u00f3r\u00f3l\! @@ -1819,10 +1845,10 @@ message.confirm.scale.up.system.vm=Biztosan fel akarod m\u00e9retezni a rendszer message.confirm.shutdown.provider=Er\u0151s\u00edtsd meg, hogy le akarod \u00e1ll\u00edtani ezt a szolg\u00e1ltat\u00f3t message.confirm.start.lb.vm=Er\u0151s\u00edtsd meg, hogy el akarod ind\u00edtani az LB VM-et\! message.confirm.stop.lb.vm=Er\u0151s\u00edtsd meg, hogy le akarod \u00e1ll\u00edtani az LB VM-et\! -message.confirm.upgrade.router.newer.template=Please confirm that you want to upgrade router to use newer template +message.confirm.upgrade.router.newer.template=Er\u0151s\u00edtsd meg, hogy a routert \u00faj sablonnal akarod friss\u00edteni\! message.confirm.upgrade.routers.account.newtemplate=Er\u0151s\u00edtsd meg, hogy minden a sz\u00e1mla minden router\u00e9t friss\u00edteni akarod az \u00faj sablonnal\! message.confirm.upgrade.routers.cluster.newtemplate=Please confirm that you want to upgrade all routers in this cluster to use newer template -message.confirm.upgrade.routers.newtemplate=Please confirm that you want to upgrade all routers in this zone to use newer template +message.confirm.upgrade.routers.newtemplate=Er\u0151s\u00edtsd meg, hogy a z\u00f3na minden router\u00e9t friss\u00edteni akarod \u00faj sablonnal\! message.confirm.upgrade.routers.pod.newtemplate=Please confirm that you want to upgrade all routers in this pod to use newer template message.copy.iso.confirm=Er\u0151s\u00edtsd meg, hogy az ISO-t m\u00e1solni akarod\: message.copy.template=A XXX sablon m\u00e1sol\u00e1sa a z\u00f3n\u00e1b\u00f3l a @@ -1852,8 +1878,11 @@ message.delete.VPN.gateway=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod message.desc.advanced.zone=\u00d6sszetettebb h\u00e1l\u00f3zati topol\u00f3gi\u00e1khoz. Ez a h\u00e1l\u00f3zat modell biztos\u00edtja a legnagyobb rugalmass\u00e1got a vend\u00e9g h\u00e1l\u00f3zatok fel\u00e9p\u00edt\u00e9s\u00e9ben \u00e9s olyan h\u00e1l\u00f3zati aj\u00e1nlatokat tesz lehet\u0151v\u00e9, mint a t\u0171zfalak, VPN vagy terhel\u00e9seloszt\u00f3k. message.desc.basic.zone=Adj meg egy h\u00e1l\u00f3zatot, amelyen minden egyes VM p\u00e9ld\u00e1ny k\u00f6zvetlen\u00fcl a h\u00e1l\u00f3zatt\u00f3l kap IP c\u00edmet. A vend\u00e9g rendszerek izol\u00e1ci\u00f3j\u00e1t 3. r\u00e9teg-b\u00e9li megold\u00e1sokkal, mint p\u00e9ld\u00e1ul biztons\u00e1gi csoportokkal (IP c\u00edm filterez\u00e9s) oldhat\u00f3 meg. message.desc.cluster=Minden pod-nak tartalmaznia kell egy vagy t\u00f6bb f\u00fcrt\u00f6t \u00e9s most l\u00e9trehozzuk az els\u0151 f\u00fcrt\u00f6t. A f\u00fcrt csoportos\u00edtja a kiszolg\u00e1l\u00f3kat. Egy f\u00fcrtben tal\u00e1lhat\u00f3 kiszolg\u00e1l\u00f3k ugyanolyan hardverrel rendelkeznek, ugyanolyan hipervizort futtatnak \u00e9s ugyanahhoz az els\u0151dleges t\u00e1rol\u00f3hoz f\u00e9rnek hozz\u00e1. Minden f\u00fcrt egy vagy t\u00f6bb kiszolg\u00e1l\u00f3t \u00e9s els\u0151dleges t\u00e1r szervert tartalmaz. +message.desc.created.ssh.key.pair=Az SSH kulcsp\u00e1r l\u00e9trej\u00f6tt. +message.desc.create.ssh.key.pair=Add meg a k\u00f6vetkez\u0151 adatokat az ssh kulcs bejegyz\u00e9s\u00e9hez\!

(1) Ha publikus kulcsot adsz meg, a CloudStack elt\u00e1rolja \u00e9s a priv\u00e1t kulcsoddal haszn\u00e1lhatod.

(2) Ha nem adsz meg publikus kulcsot, a CloudStack k\u00e9sz\u00edt neked egyet. M\u00e1sold le \u00e9s mentsd el a priv\u00e1t kulcsot, a CloudStack nem tartja meg.
message.desc.host=Minden f\u00fcrtnek legal\u00e1bb egy kiszolg\u00e1l\u00f3t kell tartalmaznia, amelyen a VM-ek futhatnak. Most vegy\u00fck fel az els\u0151 kiszolg\u00e1l\u00f3t\! Hogy a kiszolg\u00e1l\u00f3 m\u0171k\u00f6dhessen, hipervizor szoftvert kell r\u00e1 telep\u00edteni, IP c\u00edmet rendelni hozz\u00e1 \u00e9s biztos\u00edtani a kapcsolatot a CloudStack vez\u00e9rl\u0151 szerverrel.

Add meg a kiszolg\u00e1l\u00f3 DNS vagy IP c\u00edm\u00e9t, a felhaszn\u00e1l\u00f3 nev\u00e9t (\u00e1ltal\u00e1ban root) \u00e9s jelszav\u00e1t, valamint a kiszolg\u00e1l\u00f3 kategoriz\u00e1l\u00e1s\u00e1ra szolg\u00e1l\u00f3 c\u00edmk\u00e9ket. message.desc.primary.storage=Minden f\u00fcrt tartalmaz egy vagy t\u00f6bb els\u0151dleges t\u00e1r szervert \u00e9s most l\u00e9trehozzuk az els\u0151t. Az els\u0151dleges t\u00e1r tartalmazza a f\u00fcrt kiszolg\u00e1l\u00f3in fut\u00f3 \u00f6sszes VM virtu\u00e1lis merevlemezeit. +message.desc.reset.ssh.key.pair=Adj meg egy ssh kulcsp\u00e1rt, amelyet fel szeretn\u00e9l venni ehhez a VM-hez\! A root jelsz\u00f3 megv\u00e1ltozik, ha a jelsz\u00f3 enged\u00e9lyezett. message.desc.secondary.storage=Minden z\u00f3n\u00e1nak rendelkeznie kell legal\u00e1bb egy NFS vagy m\u00e1sodlagos t\u00e1r szervert \u00e9s most l\u00e9trehozzuk az els\u0151t. A m\u00e1sodlagos t\u00e1r t\u00e1rolja a VM sablonok, ISO f\u00e1jlok \u00e9s pillanatfelv\u00e9telek adatait. Ennek a szervernek minden kiszolg\u00e1l\u00f3 sz\u00e1m\u00e1ra hozz\u00e1f\u00e9rhet\u0151nek kell lennie.

Add meg az IP c\u00edmet \u00e9s az \u00fatvonalat\! message.desc.zone=A z\u00f3na a CloudStack legnagyobb egys\u00e9ge \u00e9s \u00e1ltal\u00e1ban egy adatk\u00f6zpontnak felel meg. A z\u00f3n\u00e1k fizikai izol\u00e1ci\u00f3t adnak. Egy z\u00f3na egy vagy t\u00f6bb pod-b\u00f3l \u00e1ll (amelyek kiszolg\u00e1l\u00f3kat \u00e9s els\u0151dleges t\u00e1rol\u00f3kat tartalmaznak) \u00e9s egy m\u00e1sodlagos t\u00e1rb\u00f3l, amelyet az \u00f6sszes pod haszn\u00e1l. message.detach.disk=Biztosan la akarod v\u00e1lasztani a merevlemezt? @@ -1878,8 +1907,8 @@ message.enable.account=Er\u0151s\u00edtsd meg, hogy be akarod kapcsolni ezt a sz message.enabled.vpn=A t\u00e1voli hozz\u00e1f\u00e9r\u00e9s\u0171 VPN jelenleg be van kapcsolva \u00e9s hozz\u00e1f\u00e9rhet\u0151 az IP c\u00edmmel message.enabled.vpn.ip.sec=Your IPSec pre-shared key is message.enable.user=Er\u0151s\u00edtsd meg, hogy be akarod kapcsolni ezt a felhaszn\u00e1l\u00f3t\! -message.enable.vpn.access=VPN is currently disabled for this IP Address. Would you like to enable VPN access? -message.enable.vpn=Please confirm that you want Remote Access VPN enabled for this IP address. +message.enable.vpn.access=A VPN jelenleg ki van kapcsolva erre az IP c\u00edmre. Szeretn\u00e9d bekapcsolni a VPN hozz\u00e1f\u00e9r\u00e9st? +message.enable.vpn=Er\u0151s\u00edtsd meg, hogy be szeretn\u00e9d kapcsolni a t\u00e1voli hozz\u00e1f\u00e9r\u00e9s\u0171 VPN-t ehhez az IP c\u00edmhez\! message.enabling.network.offering=H\u00e1l\u00f3zat aj\u00e1nlat bekapcsol\u00e1sa message.enabling.security.group.provider=Biztons\u00e1gi csoport szolg\u00e1ltat\u00f3 bekapcsol\u00e1sa message.enabling.vpc.offering=VPC aj\u00e1nlat bekapcsol\u00e1sa @@ -1930,21 +1959,21 @@ message.installWizard.tooltip.configureGuestTraffic.guestStartIp=The range of IP message.installWizard.tooltip.configureGuestTraffic.name=A h\u00e1l\u00f3zat neve message.instance.scaled.up.confirm=T\u00e9nyleg nagyobbra akarod m\u00e9retezni a p\u00e9ld\u00e1nyt? message.instanceWizard.noTemplates=You do not have any templates available; please add a compatible template, and re-launch the instance wizard. -message.ip.address.changed=Your IP addresses may have changed; would you like to refresh the listing? Note that in this case the details pane will close. -message.iso.desc=Disc image containing data or bootable media for OS -message.join.project=You have now joined a project. Please switch to Project view to see the project. -message.launch.vm.on.private.network=Do you wish to launch your instance on your own private dedicated network? +message.ip.address.changed=Az IP c\u00edmid megv\u00e1ltzhattak, szeretn\u00e9d friss\u00edteni a list\u00e1t? Ebben az esetben a r\u00e9szletek f\u00fcl be fog z\u00e1rulni. +message.iso.desc=A merevlemez k\u00e9p, amely az ind\u00edthat\u00f3 oper\u00e1ci\u00f3s rendszert tartalmazza +message.join.project=Csatlakozt\u00e1l egy projekthez. V\u00e1lts a projekt n\u00e9zetre\! +message.launch.vm.on.private.network=Szeretn\u00e9d a saj\u00e1t dedik\u00e1lt h\u00e1l\u00f3zatodon ind\u00edtani a p\u00e9ld\u00e1nyt? message.launch.zone=A z\u00f3na k\u00e9szen \u00e1ll az ind\u00edt\u00e1sra, folytasd a k\u00f6vetkez\u0151 l\u00e9p\u00e9ssel message.listView.subselect.multi=(Ctrl/Cmd-kattint\u00e1s) -message.lock.account=Please confirm that you want to lock this account. By locking the account, all users for this account will no longer be able to manage their cloud resources. Existing resources can still be accessed. +message.lock.account=Er\u0151s\u00edtsd meg, hogy z\u00e1rolni akarod ezt a sz\u00e1ml\u00e1t. A sz\u00e1mla z\u00e1rol\u00e1s\u00e1val a sz\u00e1mla felhaszn\u00e1l\u00f3i nem lesznek k\u00e9pesek a felh\u0151 er\u0151forr\u00e1saikat vez\u00e9relni. A l\u00e9tez\u0151 er\u0151forr\u00e1sok tov\u00e1bbra is hozz\u00e1f\u00e9rhet\u0151ek lesznek. message.migrate.instance.confirm=Er\u0151s\u00edtsd meg a kiszolg\u00e1l\u00f3 v\u00e1laszt\u00e1st, ahova a virtu\u00e1lis g\u00e9pet mozgatn\u00e1d\! message.migrate.instance.to.host=Er\u0151s\u00edtsd meg, hogy m\u00e1sik kiszolg\u00e1l\u00f3ra akarod mozgatni a p\u00e9ld\u00e1nyt\! -message.migrate.instance.to.ps=Please confirm that you want to migrate instance to another primary storage. -message.migrate.router.confirm=Please confirm the host you wish to migrate the router to\: -message.migrate.systemvm.confirm=Please confirm the host you wish to migrate the system VM to\: +message.migrate.instance.to.ps=Er\u0151s\u00edtsd meg, hogy a p\u00e9ld\u00e1nyt m\u00e1sik els\u0151dleges t\u00e1rra szeretn\u00e9d mozgatni\! +message.migrate.router.confirm=Er\u0151s\u00edtsd meg, hogy a routert mozgatni szeretn\u00e9d a k\u00f6vetkez\u0151 c\u00e9lpontra\: +message.migrate.systemvm.confirm=Er\u0151s\u00edtsd meg, hogy a rendszer VM-et a k\u00f6vetkez\u0151 c\u00e9lpontra szeretn\u00e9d mozgatni\: message.migrate.volume=Er\u0151s\u00edtsd meg, hogy m\u00e1sik els\u0151dleges t\u00e1rra akarod mozgatni a k\u00f6tetet message.network.addVM.desc=Please specify the network that you would like to add this VM to. A new NIC will be added for this network. -message.network.addVMNIC=Please confirm that you would like to add a new VM NIC for this network. +message.network.addVMNIC=Er\u0151s\u00edtsd meg, hogy szeretn\u00e9l egy \u00faj VM NIC-et ehhez a h\u00e1l\u00f3zathoz\! message.new.user=A k\u00f6vetkez\u0151ket adja meg \u00faj sz\u00e1mla l\u00e9trehoz\u00e1s\u00e1hoz message.no.affinity.groups=Nincsenek affin\u00edt\u00e1si csoportaid. K\u00e9rlek folytasd a k\u00f6vetkez\u0151 l\u00e9p\u00e9ssel\! message.no.host.available=Nincs el\u00e9rhet\u0151 kiszolg\u00e1l\u00f3 az \u00e1tk\u00f6lt\u00f6ztet\u00e9shez @@ -1957,50 +1986,53 @@ message.number.hosts=

Kiszolg\u00e1l\u00f3k sz\u00e1ma

message.number.pods=

Pods-ok sz\u00e1ma

message.number.storage=

Els\u0151dleges t\u00e1r k\u00f6teteksz\u00e1ma

message.number.zones=

Z\u00f3n\u00e1k sz\u00e1ma

+message.password.has.been.reset.to=A jelsz\u00f3 \u00fajrabe\u00e1ll\u00edtva\: +message.password.of.the.vm.has.been.reset.to=A VM jelszava \u00fajrabe\u00e1ll\u00edtva\: message.pending.projects.1=Projekt megh\u00edv\u00f3k v\u00e1rnak r\u00e1d\: message.pending.projects.2=A megtekint\u00e9shez menj a projektek szekci\u00f3hoz \u00e9s v\u00e1laszd a megh\u00edv\u00f3kat a leg\u00f6rd\u00fcl\u0151 men\u00fcb\u0151l\! -message.please.add.at.lease.one.traffic.range=Please add at least one traffic range. -message.please.proceed=Please proceed to the next step. -message.please.select.a.configuration.for.your.zone=Please select a configuration for your zone. +message.please.add.at.lease.one.traffic.range=Adj meg legal\u00e1bb egy forgalom tartom\u00e1nyt\! +message.please.confirm.remove.ssh.key.pair=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod ezt az SSH kulcsp\u00e1rt\! +message.please.proceed=Menj tov\u00e1bb a k\u00f6vetkez\u0151 l\u00e9p\u00e9shez\! +message.please.select.a.configuration.for.your.zone=V\u00e1lassz konfigur\u00e1ci\u00f3t a z\u00f3n\u00e1dnak\! message.please.select.a.different.public.and.management.network.before.removing=Please select a different public and management network before removing -message.please.select.networks=Please select networks for your virtual machine. -message.please.wait.while.zone.is.being.created=Please wait while your zone is being created; this may take a while... +message.please.select.networks=V\u00e1lassz h\u00e1l\u00f3zatokat a virtu\u00e1lis g\u00e9pedhez\! +message.please.wait.while.zone.is.being.created=K\u00e9rlek v\u00e1rj, am\u00edg a z\u00f3n\u00e1d l\u00e9trej\u00f6n. Ez eltarthat egy ideig... message.pod.dedication.released=Pod dedik\u00e1ci\u00f3 elengedve -message.portable.ip.delete.confirm=Please confirm you want to delete Portable IP Range -message.project.invite.sent=Invite sent to user; they will be added to the project once they accept the invitation +message.portable.ip.delete.confirm=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod a hordozhat\u00f3 IP tartom\u00e1nyt\! +message.project.invite.sent=Megh\u00edv\u00f3 elk\u00fcldve a felhaszn\u00e1l\u00f3nak. A felhaszn\u00e1l\u00f3 akkor ker\u00fcl a projektbe, amikor elfogadja a megh\u00edv\u00f3t. message.public.traffic.in.advanced.zone=Public traffic is generated when VMs in the cloud access the internet. Publicly-accessible IPs must be allocated for this purpose. End users can use the CloudStack UI to acquire these IPs to implement NAT between their guest network and their public network.

Provide at least one range of IP addresses for internet traffic. -message.public.traffic.in.basic.zone=Public traffic is generated when VMs in the cloud access the Internet or provide services to clients over the Internet. Publicly accessible IPs must be allocated for this purpose. When a instance is created, an IP from this set of Public IPs will be allocated to the instance in addition to the guest IP address. Static 1-1 NAT will be set up automatically between the public IP and the guest IP. End users can also use the CloudStack UI to acquire additional IPs to implement static NAT between their instances and the public IP. -message.read.admin.guide.scaling.up=Please read the dynamic scaling section in the admin guide before scaling up. +message.public.traffic.in.basic.zone=A publikus forgalom akkor keletkezik, amikor a felh\u0151 virtu\u00e1lis g\u00e9pei hozz\u00e1f\u00e9rnek az internethez vagy az interneten szolg\u00e1ltat\u00e1sokat biztos\u00edtanak. Publikusan el\u00e9rhet\u0151 IP c\u00edmeket kell erre a c\u00e9lra elk\u00fcl\u00f6n\u00edteni. Amikor l\u00e9trej\u00f6n egy p\u00e9ld\u00e1ny, ezekb\u0151l a publikus IP c\u00edmekb\u0151l kap egyet a p\u00e9ld\u00e1ny a vend\u00e9g IP c\u00edmen k\u00edv\u00fcl. Statikus 1-1 NAT lesz be\u00e1ll\u0167va a publikus \u00e9s a vend\u00e9g IP c\u00edmek k\u00f6z\u00f6tt. V\u00e9gfelhaszn\u00e1l\u00f3k haszn\u00e1lhatj\u00e1k a CloudStack fel\u00fcletet is \u00faj IP c\u00edmek beszerz\u00e9s\u00e9hez \u00e9s statikus NAT be\u00e1ll\u00edt\u00e1s\u00e1hoz. +message.read.admin.guide.scaling.up=Olvasd el az adminisztr\u00e1torok \u00fatmutat\u00f3j\u00e1ban a dinamikus m\u00e9retez\u00e9sre vonatkoz\u00f3 r\u00e9szt miel\u0151tt folytatod\! message.recover.vm=Er\u0151s\u00edtsd meg, hogy helyre akarod \u00e1ll\u00edtani a VM-et. -message.redirecting.region=Redirecting to region... +message.redirecting.region=\u00c1tir\u00e1ny\u00edt\u00e1s r\u00e9gi\u00f3ba... message.reinstall.vm=Figyelmeztet\u00e9s\: \u00d3vatosan\! Ha folytatod, a VM \u00fajra lesz telep\u00edtve a sablon alapj\u00e1n, a f\u0151 lemez\u00e9n tal\u00e1lhat\u00f3 adat elveszik. Amennyiben vannak tov\u00e1bbi merevlemezek, azok \u00e9rintetlenek maradnak. message.remove.ldap=Biztosan t\u00f6r\u00f6lni akarod az LDAP konfigur\u00e1ci\u00f3t? -message.remove.region=Are you sure you want to remove this region from this management server? -message.remove.vpc=Please confirm that you want to remove the VPC -message.remove.vpn.access=Please confirm that you want to remove VPN access from the following user. +message.remove.region=Biztosan t\u00f6r\u00f6lni akarod ezt a r\u00e9gi\u00f3t err\u0151l a vez\u00e9rl\u0151 szerverr\u0151l? +message.remove.vpc=Er\u0151s\u00edtsd meg, hoy el akarod t\u00e1vol\u00edtani ezt a VPC-t\! +message.remove.vpn.access=Er\u0151s\u00edtsd meg, hogy t\u00f6r\u00f6lni akarod a k\u00f6vetkez\u0151 felhaszn\u00e1l\u00f3 VPN hozz\u00e1f\u00e9r\u00e9s\u00e9t\! message.reset.password.warning.notPasswordEnabled=A p\u00e9ld\u00e1ny sablonja jelsz\u00f3 bekapcsol\u00e1sa n\u00e9lk\u00fcl lett l\u00e9trehozva message.reset.password.warning.notStopped=A p\u00e9ld\u00e1nyt le kell \u00e1ll\u00edtanod, miel\u0151tt megpr\u00f3b\u00e1ln\u00e1l jelsz\u00f3t be\u00e1ll\u00edtani. -message.reset.VPN.connection=Please confirm that you want to reset VPN connection -message.restart.mgmt.server=Please restart your management server(s) for your new settings to take effect. +message.reset.VPN.connection=Er\u0151s\u00edtsd meg, hogy alaphelyzetbe akarod \u00e1ll\u00edtani a VPN kapcsolatot\! +message.restart.mgmt.server=Ind\u00edtsd \u00fajra a vez\u00e9rl\u0151 szervert (szervereket) ahhoz, hogy az \u00faj be\u00e1ll\u00edt\u00e1s hat\u00e1lyba l\u00e9pjen\! message.restart.mgmt.usage.server=Please restart your management server(s) and usage server(s) for your new settings to take effect. -message.restart.network=All services provided by this network will be interrupted. Please confirm that you want to restart this network. -message.restart.vpc=Please confirm that you want to restart the VPC +message.restart.network=Megszakad minden szolg\u00e1ltat\u00e1s, amit a h\u00e1l\u00f3zat biztos\u00edt. Er\u0151s\u00edtsd meg, hogy \u00fajra akarod ind\u00edtani a h\u00e1l\u00f3zatot\! +message.restart.vpc=Er\u0151s\u00edtsd meg, hogy \u00fajra akarod ind\u00edtani a VPC-t\! +message.restart.vpc.remark=Er\u0151s\u00edtsd meg, hogy \u00fajra akarod ind\u00edtani a VPC-t\!

Megjegyz\u00e9s\: egy nem redund\u00e1ns VPC redund\u00e1nss\u00e1 t\u00e9tele takar\u00edt\u00e1st tesz sz\u00fcks\u00e9gess\u00e9. A h\u00e1l\u00f3zatok nem lesznek el\u00e9rhet\u0151ek egy p\u00e1r percig..

message.restoreVM=Helyre akarod \u00e1ll\u00edtani a VM-et? message.security.group.usage=(A Ctrl-kattint\u00e1s haszn\u00e1lat\u00e1val tudod az \u00f6sszes alkalmazhat\u00f3 biztons\u00e1gi csoportot kiv\u00e1lasztani) message.select.affinity.groups=V\u00e1lasszd ki azokat az affinit\u00e1si csoportokat, amelyekhez a VM tartozzon\: -message.select.a.zone=A zone typically corresponds to a single datacenter. Multiple zones help make the cloud more reliable by providing physical isolation and redundancy. -message.select.instance=Please select an instance. -message.select.iso=Please select an ISO for your new virtual instance. -message.select.item=Please select an item. +message.select.a.zone=Egy z\u00f3na tipikusan egy adatk\u00f6zpontnak felel meg. T\u00f6bb z\u00f3na seg\u00edthet a felh\u0151t megb\u00edzhat\u00f3bb\u00e1 tenni fizikai izol\u00e1ci\u00f3val \u00e9s redundanci\u00e1val. +message.select.instance=V\u00e1lassz egy p\u00e9ld\u00e1nyt\! +message.select.iso=V\u00e1lassz egy ISO-t az \u00faj virtu\u00e1lis p\u00e9ld\u00e1nynak\! +message.select.item=V\u00e1lassz egy elemet\! message.select.security.groups=V\u00e1lassz biztons\u00e1gi csoportokat az \u00faj VM-hez\! -message.select.template=Please select a template for your new virtual instance. +message.select.template=V\u00e1lassz egy sablont az \u00faj virtu\u00e1lis p\u00e9ld\u00e1nynak\! message.select.tier=V\u00e1lassz egy r\u00e9teget\! -message.set.default.NIC.manual=Please manually update the default NIC on the VM now. -message.set.default.NIC=Please confirm that you would like to make this NIC the default for this VM. -message.setup.physical.network.during.zone.creation.basic=When adding a basic zone, you can set up one physical network, which corresponds to a NIC on the hypervisor. The network carries several types of traffic.

You may also drag and drop other traffic types onto the physical network. -message.setup.physical.network.during.zone.creation=When adding an advanced zone, you need to set up one or more physical networks. Each network corresponds to a NIC on the hypervisor. Each physical network can carry one or more types of traffic, with certain restrictions on how they may be combined.

Drag and drop one or more traffic types onto each physical network. +message.set.default.NIC=Er\u0151s\u00edtsd meg, hogy alap\u00e9rtelmezett\u00e9 szeretn\u00e9d tenni ezt a NIC-et a VM-ben\! +message.set.default.NIC.manual=Most manu\u00e1lisan m\u00f3dos\u00edtsd apal\u00e9rtelmezett NIC-et a VM-ben\! +message.setup.physical.network.during.zone.creation.basic=Alap z\u00f3na l\u00e9trehoz\u00e1sakor egy fizikai h\u00e1l\u00f3zatot hozhatsz l\u00e9tre amely hiperv\u00edzor h\u00e1l\u00f3zati k\u00e1rty\u00e1j\u00e1nak felel meg.

M\u00e1s forgalom-t\u00edpusokat is r\u00e1h\u00fazhatsz a fizikai h\u00e1l\u00f3zatra. +message.setup.physical.network.during.zone.creation=Halad\u00f3 z\u00f3na l\u00e9trehoz\u00e1sakor egy vagy t\u00f6bb fizikai h\u00e1l\u00f3zatot kell konfigur\u00e1lnod. Minden h\u00e1l\u00f3zat egy h\u00e1l\u00f3zati k\u00e1rty\u00e1nak felel meg a hiperv\u00edzoron. Minden fizikai h\u00e1l\u00f3zat egy vagy t\u00f6bb t\u00edpus\u00fa forgalmat bonyol\u00edthat, bizonyos megk\u00f6t\u00e9sekkel arra, hogy azokat hogyan lehet kombin\u00e1lni.

H\u00fazz egy vagy t\u00f6bb forgalom t\u00edpust minden fizikai h\u00e1l\u00f3zatra. message.setup.successful=A felh\u0151 be\u00e1ll\u00edt\u00e1sa sikeres\! -message.snapshot.schedule=Az ism\u00e9tl\u0151d\u0151 pillanatfelv\u00e9teleket az al\u00e1bbi opci\u00f3k kiv\u00e1laszt\u00e1s\u00e1val tudod be\u00e1ll\u00edtani message.specifiy.tag.key.value=Please specify a tag key and value message.specify.url=K\u00e9rlek adj meg egy URL-t\! message.step.1.continue=V\u00e1lassz egy sablont vagy ISO-t a folytat\u00e1shoz @@ -2013,7 +2045,7 @@ message.storage.traffic=Traffic between CloudStack\\'s internal resources, inclu message.suspend.project=Biztosan fel akarod f\u00fcggeszteni ezt a projektet? message.systems.vms.ready=A rendszer VM-ek elk\u00e9sz\u00fcltek. message.template.copying=A sablon m\u00e1sol\u00e1s alatt \u00e1ll. -message.template.desc=OS image that can be used to boot VMs +message.template.desc=Oper\u00e1ci\u00f3s rendszer k\u00e9p, amelyet a virtu\u00e1lis g\u00e9pek el tudnak ind\u00edtani message.tier.required=A r\u00e9teg k\u00f6telez\u0151. message.tooltip.dns.1=Name of a DNS server for use by VMs in the zone. The public IP addresses for the zone must have a route to this server. message.tooltip.dns.2=A second DNS server name for use by VMs in the zone. The public IP addresses for the zone must have a route to this server. @@ -2025,7 +2057,7 @@ message.tooltip.reserved.system.gateway=Az \u00e1tj\u00e1r\u00f3 a pod kiszolg\u message.tooltip.reserved.system.netmask=The network prefix that defines the pod subnet. Uses CIDR notation. message.tooltip.zone.name=N\u00e9v a z\u00f3n\u00e1nak. message.update.os.preference=Hat\u00e1rozz meg egy OS preferenci\u00e1t a kiszolg\u00e1l\u00f3hoz. Minden p\u00e9ld\u00e1ny, aminek hasonl\u00f3 preferenci\u00e1i vannak el\u0151sz\u00f6r ezen a kiszolg\u00e1l\u00f3n indul el. -message.update.resource.count=Please confirm that you want to update resource counts for this account. +message.update.resource.count=Er\u0151s\u00edtsd meg, hogy m\u00f3dos\u00edtani akarod a sz\u00e1mla er\u0151forr\u00e1sainak sz\u00e1m\u00e1t\! message.update.ssl.failed=Nem siker\u00fclt az SSL tan\u00fas\u00edtv\u00e1nyt m\u00f3dos\u00edtani message.update.ssl=Please submit a new X.509 compliant SSL certificate chain to be updated to each console proxy and secondary storage virtual instance\: message.update.ssl.succeeded=Az SSL tan\u00fas\u00edtv\u00e1nyok m\u00f3dos\u00edt\u00e1sa sikeres @@ -2038,7 +2070,7 @@ message.validate.email.address=Adj meg egy \u00e9rv\u00e9nyes e-mail c\u00edmet\ message.validate.equalto=\u00cdrd be ugyanazt az \u00e9rt\u00e9ket \u00fajra\! message.validate.fieldrequired=Ez a mez\u0151 k\u00f6telez\u0151. message.validate.fixfield=Jav\u00edtsd ki ez a mez\u0151t\! -message.validate.instance.name=Instance name can not be longer than 63 characters. Only ASCII letters a~z, A~Z, digits 0~9, hyphen are allowed. Must start with a letter and end with a letter or a digit. +message.validate.instance.name=A p\u00e9ld\u00e1ny neve nem lehet hosszabb 63 karaktern\u00e9l. Csak ASCII karakterek a-z \u00e9s A-Z, sz\u00e1mok 0-9 \u00e9s k\u00f6t\u0151jelek enged\u00e9lyezettek. Bet\u0171vel kell kezd\u0151dnie \u00e9s bet\u0171vel vagy sz\u00e1mmal kell v\u00e9gz\u0151dnie[ message.validate.invalid.characters=\u00c9rv\u00e9nytelen karakter; k\u00e9rlek jav\u00edtsd\! message.validate.max=Adj meg egy \u00e9rt\u00e9ket, ami legfeljebb {0}\! message.validate.maxlength=Legfeljebb {0} karaktert adj meg\! @@ -2050,8 +2082,8 @@ message.validate.URL=Adj meg egy \u00e9rv\u00e9nyes URL-t\! message.virtual.network.desc=A dedicated virtualized network for your account. The broadcast domain is contained within a VLAN and all public network access is routed out by a virtual router. message.vm.create.template.confirm=Sablon l\u00e9trehoz\u00e1sa automatikusan \u00fajraind\u00edtja a VM-et\! message.vm.review.launch=Please review the following information and confirm that your virtual instance is correct before launch. -message.vnmc.available.list=VNMC is not available from provider list. -message.vnmc.not.available.list=VNMC is not available from provider list. +message.vnmc.available.list=VNMC nem el\u00e9rhet\u0151 a szolg\u00e1ltat\u00f3 list\u00e1r\u00f3l. +message.vnmc.not.available.list=VNMC nem el\u00e9rhet\u0151 a szolg\u00e1ltat\u00f3 list\u00e1r\u00f3l. message.volume.create.template.confirm=Please confirm that you wish to create a template for this disk volume. Creation of the template can range from several minutes to longer depending on the size of the volume. message.waiting.for.builtin.templates.to.load=V\u00e1rakoz\u00e1s a be\u00e9p\u00edtett sablonk bet\u00f6lt\u00e9s\u00e9re... message.XSTools61plus.update.failed=Failed to update Original XS Version is 6.1\\+ field. Error\: @@ -2059,11 +2091,11 @@ message.you.must.have.at.least.one.physical.network=Sz\u00fcks\u00e9ged van lega message.your.cloudstack.is.ready=A CloudStack k\u00e9szen \u00e1ll\! message.Zone.creation.complete=A z\u00f3na l\u00e9trehoz\u00e1sa befejez\u0151d\u00f6tt message.zone.creation.complete.would.you.like.to.enable.this.zone=A z\u00f3na l\u00e9trehoz\u00e1sa befejez\u0151d\u00f6tt. Szeretn\u00e9d bekapcsolni a z\u00f3n\u00e1t? -message.zone.no.network.selection=The zone you selected does not have any choices for network selection. -message.zone.step.1.desc=Please select a network model for your zone. -message.zone.step.2.desc=Please enter the following info to add a new zone -message.zone.step.3.desc=Please enter the following info to add a new pod -message.zoneWizard.enable.local.storage=WARNING\: If you enable local storage for this zone, you must do the following, depending on where you would like your system VMs to launch\:

1. If system VMs need to be launched in shared primary storage, shared primary storage needs to be added to the zone after creation. You must also start the zone in a disabled state.

2. If system VMs need to be launched in local primary storage, system.vm.use.local.storage needs to be set to true before you enable the zone.


Would you like to continue? +message.zone.no.network.selection=A kiv\u00e1lasztott z\u00f3n\u00e1ban nem v\u00e1laszthat\u00f3 ki h\u00e1l\u00f3zat. +message.zone.step.1.desc=V\u00e1lassz h\u00e1l\u00f3zat modellt a z\u00f3n\u00e1dnak\! +message.zone.step.2.desc=Add meg a k\u00f6vetkez\u0151 inform\u00e1ci\u00f3kat az \u00faj z\u00f3n\u00e1hoz +message.zone.step.3.desc=Add meg a k\u00f6vetkez\u0151 inform\u00e1ci\u00f3kat az \u00faj pod-hoz +message.zoneWizard.enable.local.storage=Figyelmeztet\u00e9s\: Ha bekapcsolod a helyi t\u00e1rat ebben a z\u00f3n\u00e1ban, akkor a k\u00f6vetkez\u0151t kell tenned att\u00f3l f\u00fcgg\u0151en, hogy hol szeretn\u00e9d elind\u00edtani a rendszer VM-eket\:

1. Ha a rendszer VM-eknek osztott els\u0151dleges t\u00e1ron kell futnia, akkor egy elosztott t\u00e1rat kell l\u00e9trehoznod a z\u00f3na l\u00e9trej\u00f6tte ut\u00e1n. A z\u00f3n\u00e1t kikapcsolt \u00e1llapotban kell elind\u00edtanod.

2. Ha a rendszer VM-eknek helyi els\u0151dleges t\u00e1ron kell futni, akkor a system.vm.use.local.storage \u00e9rt\u00e9k\u00e9t true-ra kell \u00e1ll\u00edtani miel\u00f6tt a z\u00f3n\u00e1t bekapcsolod.


Szeretn\u00e9d folytatni? messgae.validate.min=Adj meg egy \u00e9rt\u00e9ket, ami legal\u00e1bb {0}\! mode=M\u00f3d network.rate=H\u00e1l\u00f3zati r\u00e1ta diff --git a/client/WEB-INF/classes/resources/messages_it_IT.properties b/client/WEB-INF/classes/resources/messages_it_IT.properties index d423d31981a..554ac841d75 100644 --- a/client/WEB-INF/classes/resources/messages_it_IT.properties +++ b/client/WEB-INF/classes/resources/messages_it_IT.properties @@ -542,8 +542,6 @@ label.select-view=Selezionare la vista label.select.vm.for.static.nat=Selezionare una VM per il NAT statico label.service.capabilities=Capacit\u00e0 di Servizio label.setup=Installazione -label.setup.network=Configurazione Rete -label.setup.zone=Configurazione Zona label.set.up.zone.type=Configurazione del tipo di Zona label.shutdown.provider=Arresto del provider label.site.to.site.VPN=Site-to-site VPN diff --git a/client/WEB-INF/classes/resources/messages_ja_JP.properties b/client/WEB-INF/classes/resources/messages_ja_JP.properties index 0ca114f50b8..8035e1cc622 100644 --- a/client/WEB-INF/classes/resources/messages_ja_JP.properties +++ b/client/WEB-INF/classes/resources/messages_ja_JP.properties @@ -14,64 +14,8 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -label.add.ldap.account=LDAP \u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 -label.vm.ip=VM IP \u30a2\u30c9\u30ec\u30b9 -message.listView.subselect.multi=(Ctrl/Cmd \u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30af\u30ea\u30c3\u30af) -label.use.vm.ips=\u6b21\u306e VM IP \u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u7528 -label.reinstall.vm=VM \u306e\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb -message.reinstall.vm=\u6ce8: \u6ce8\u610f\u3057\u3066\u7d9a\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a VM \u304c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u30c7\u30fc\u30bf\u306f\u5931\u308f\u308c\u307e\u3059\u3002\u8ffd\u52a0\u306e\u30c7\u30fc\u30bf \u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u5f71\u97ff\u306f\u3042\u308a\u307e\u305b\u3093\u3002 -label.recover.vm=VM \u306e\u5fa9\u5143 -message.recover.vm=\u3053\u306e VM \u3092\u5fa9\u5143\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -label.port=\u30dd\u30fc\u30c8 -label.remove.ldap=LDAP \u306e\u524a\u9664 -label.configure.ldap=LDAP \u306e\u69cb\u6210 -label.ldap.configuration=LDAP \u69cb\u6210 -label.ldap.port=LDAP \u30dd\u30fc\u30c8 -label.create.nfs.secondary.staging.store=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u4f5c\u6210\u3059\u308b -label.volatile=\u63ee\u767a\u6027 -label.planner.mode=\u30d7\u30e9\u30f3\u30ca\u30fc \u30e2\u30fc\u30c9 -label.deployment.planner=\u5c55\u958b\u30d7\u30e9\u30f3\u30ca\u30fc -label.quiesce.vm=VM \u3092\u4f11\u6b62\u3059\u308b -label.smb.username=SMB \u30e6\u30fc\u30b6\u30fc\u540d -label.smb.password=SMB \u30d1\u30b9\u30ef\u30fc\u30c9 -label.smb.domain=SMB \u30c9\u30e1\u30a4\u30f3 -label.hypervisors=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc -label.home=\u30db\u30fc\u30e0 -label.sockets=CPU \u30bd\u30b1\u30c3\u30c8 -label.root.disk.size=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba -label.s3.nfs.server=S3 NFS \u30b5\u30fc\u30d0\u30fc -label.s3.nfs.path=S3 NFS \u30d1\u30b9 -label.delete.events=\u30a4\u30d9\u30f3\u30c8\u306e\u524a\u9664 -label.delete.alerts=\u30a2\u30e9\u30fc\u30c8\u306e\u524a\u9664 -label.archive.alerts=\u30a2\u30e9\u30fc\u30c8\u306e\u30a2\u30fc\u30ab\u30a4\u30d6 -label.archive.events=\u30a4\u30d9\u30f3\u30c8\u306e\u30a2\u30fc\u30ab\u30a4\u30d6 -label.by.alert.type=\u30a2\u30e9\u30fc\u30c8\u306e\u7a2e\u985e -label.by.event.type=\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e -label.by.date.start=\u65e5\u4ed8 (\u958b\u59cb) -label.by.date.end=\u65e5\u4ed8 (\u7d42\u4e86) -label.switch.type=\u30b9\u30a4\u30c3\u30c1\u306e\u7a2e\u985e -label.service.state=\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b -label.egress.default.policy=\u9001\u4fe1\u306e\u30c7\u30d5\u30a9\u30eb\u30c8 \u30dd\u30ea\u30b7\u30fc -label.routing=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 -label.hvm=HVM -label.about=\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831 -label.app.name=CloudStack -label.about.app=CloudStack \u306b\u3064\u3044\u3066 -label.custom.disk.iops=\u30ab\u30b9\u30bf\u30e0 IOPS -label.disk.iops.min=\u6700\u5c0f IOPS -label.disk.iops.max=\u6700\u5927 IOPS -label.disk.iops.total=IOPS \u5408\u8a08 -label.hypervisor.snapshot.reserve=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u4e88\u7d04 -label.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9 -label.edit.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306e\u7de8\u96c6 -label.view.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306e\u8868\u793a -message.validate.invalid.characters=\u7121\u52b9\u306a\u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002\u4fee\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.acquire.ip.nic=\u3053\u306e NIC \u306e\u305f\u3081\u306b\u65b0\u3057\u3044\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?
\u6ce8: \u65b0\u3057\u304f\u53d6\u5f97\u3057\u305f\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306f\u4eee\u60f3\u30de\u30b7\u30f3\u5185\u3067\u624b\u52d5\u3067\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -message.select.affinity.groups=\u3053\u306e VM \u3092\u8ffd\u52a0\u3059\u308b\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.no.affinity.groups=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u6b21\u306e\u624b\u9806\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 -label.action.delete.nic=NIC \u306e\u524a\u9664 -message.action.delete.nic=\u3053\u306e NIC \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? \u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3082 VM \u304b\u3089\u524a\u9664\u3055\u308c\u307e\u3059\u3002 -changed.item.properties=\u5909\u66f4\u3055\u308c\u305f\u9805\u76ee\u306e\u30d7\u30ed\u30d1\u30c6\u30a3 + +changed.item.properties=\u9805\u76ee\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5909\u66f4 confirm.enable.s3=S3 \u30d9\u30fc\u30b9\u306e\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 confirm.enable.swift=Swift \u306e\u30b5\u30dd\u30fc\u30c8\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 error.could.not.change.your.password.because.ldap.is.enabled=\u30a8\u30e9\u30fc\u3002LDAP \u304c\u6709\u52b9\u306a\u305f\u3081\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3002 @@ -87,39 +31,49 @@ error.session.expired=\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u6709\u52b9\u671f\u96 error.something.went.wrong.please.correct.the.following=\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u6b21\u306e\u5185\u5bb9\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044 error.unable.to.reach.management.server=\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3068\u901a\u4fe1\u3067\u304d\u307e\u305b\u3093 error.unresolved.internet.name=\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u540d\u3092\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093\u3002 -label.extractable=\u62bd\u51fa\u53ef\u80fd force.delete.domain.warning=\u8b66\u544a\: \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u3059\u3079\u3066\u306e\u5b50\u30c9\u30e1\u30a4\u30f3\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u3059\u3079\u3066\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u305d\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u524a\u9664\u3055\u308c\u307e\u3059\u3002 force.delete=\u5f37\u5236\u7684\u306b\u524a\u9664\u3059\u308b force.remove.host.warning=\u8b66\u544a\: \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u5b9f\u884c\u4e2d\u306e\u3059\u3079\u3066\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u304c\u5f37\u5236\u7684\u306b\u505c\u6b62\u3055\u308c\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u304b\u3089\u3053\u306e\u30db\u30b9\u30c8\u304c\u5f37\u5236\u7684\u306b\u89e3\u9664\u3055\u308c\u307e\u3059\u3002 -force.remove=\u5f37\u5236\u7684\u306b\u524a\u9664\u3059\u308b +force.remove=\u5f37\u5236\u7684\u306b\u89e3\u9664\u3059\u308b force.stop.instance.warning=\u8b66\u544a\: \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5f37\u5236\u505c\u6b62\u306f\u3001\u6700\u7d42\u624b\u6bb5\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c7\u30fc\u30bf\u3092\u640d\u5931\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u52d5\u4f5c\u304c\u4e00\u8cab\u3057\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 force.stop=\u5f37\u5236\u7684\u306b\u505c\u6b62\u3059\u308b +hint.no.host.tags=\u30db\u30b9\u30c8\u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 +hint.no.storage.tags=\u30b9\u30c8\u30ec\u30fc\u30b8\u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 +hint.type.part.host.tag=\u30db\u30b9\u30c8\u30bf\u30b0\u306e\u7a2e\u985e +hint.type.part.storage.tag=\u30b9\u30c8\u30ec\u30fc\u30b8\u30bf\u30b0\u306e\u7a2e\u985e ICMP.code=ICMP \u30b3\u30fc\u30c9 ICMP.type=ICMP \u306e\u7a2e\u985e image.directory=\u753b\u50cf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea inline=\u76f4\u5217 instances.actions.reboot.label=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u518d\u8d77\u52d5 +label.about.app=CloudStack \u306b\u3064\u3044\u3066 +label.about=\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831 label.accept.project.invitation=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u62db\u5f85\u306e\u627f\u8afe label.account.and.security.group=\u30a2\u30ab\u30a6\u30f3\u30c8\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.account.id=\u30a2\u30ab\u30a6\u30f3\u30c8 ID +label.account.lower=\u30a2\u30ab\u30a6\u30f3\u30c8 label.account.name=\u30a2\u30ab\u30a6\u30f3\u30c8\u540d label.account.specific=\u30a2\u30ab\u30a6\u30f3\u30c8\u56fa\u6709 -label.account=\u30a2\u30ab\u30a6\u30f3\u30c8 label.accounts=\u30a2\u30ab\u30a6\u30f3\u30c8 +label.account=\u30a2\u30ab\u30a6\u30f3\u30c8 +label.acl=ACL +label.acl.id=ACL ID +label.acl.name=ACL \u540d +label.acl.replaced=ACL \u304c\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f label.acquire.new.ip=\u65b0\u3057\u3044 IP \u30a2\u30c9\u30ec\u30b9\u306e\u53d6\u5f97 -label.acquire.new.secondary.ip=\u65b0\u3057\u3044\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306e\u53d6\u5f97 +label.acquire.new.secondary.ip=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306e\u53d6\u5f97 label.action.attach.disk.processing=\u30c7\u30a3\u30b9\u30af\u3092\u30a2\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.attach.disk=\u30c7\u30a3\u30b9\u30af\u306e\u30a2\u30bf\u30c3\u30c1 -label.action.attach.iso.processing=ISO \u3092\u30a2\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.attach.iso=ISO \u306e\u30a2\u30bf\u30c3\u30c1 +label.action.attach.iso.processing=ISO \u3092\u30a2\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.cancel.maintenance.mode.processing=\u4fdd\u5b88\u30e2\u30fc\u30c9\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u3066\u3044\u307e\u3059... label.action.cancel.maintenance.mode=\u4fdd\u5b88\u30e2\u30fc\u30c9\u306e\u30ad\u30e3\u30f3\u30bb\u30eb label.action.change.password=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4 label.action.change.service.processing=\u30b5\u30fc\u30d3\u30b9\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059... label.action.change.service=\u30b5\u30fc\u30d3\u30b9\u306e\u5909\u66f4 -label.action.copy.ISO.processing=ISO \u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059... label.action.copy.ISO=ISO \u306e\u30b3\u30d4\u30fc -label.action.copy.template.processing=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059... +label.action.copy.ISO.processing=ISO \u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059.... +label.action.copy.template.processing=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059.... label.action.copy.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30b3\u30d4\u30fc label.action.create.template.from.vm=VM \u304b\u3089\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u4f5c\u6210 label.action.create.template.from.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u304b\u3089\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u4f5c\u6210 @@ -141,15 +95,16 @@ label.action.delete.firewall.processing=\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30 label.action.delete.firewall=\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u898f\u5247\u306e\u524a\u9664 label.action.delete.ingress.rule.processing=\u53d7\u4fe1\u898f\u5247\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.ingress.rule=\u53d7\u4fe1\u898f\u5247\u306e\u524a\u9664 -label.action.delete.IP.range.processing=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.IP.range=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u524a\u9664 -label.action.delete.ISO.processing=ISO \u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... +label.action.delete.IP.range.processing=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.ISO=ISO \u306e\u524a\u9664 +label.action.delete.ISO.processing=ISO \u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.load.balancer.processing=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u898f\u5247\u306e\u524a\u9664 label.action.delete.network.processing=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u524a\u9664 label.action.delete.nexusVswitch=Nexus 1000V \u306e\u524a\u9664 +label.action.delete.nic=NIC \u306e\u524a\u9664 label.action.delete.physical.network=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u524a\u9664 label.action.delete.pod.processing=\u30dd\u30c3\u30c9\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.delete.pod=\u30dd\u30c3\u30c9\u306e\u524a\u9664 @@ -178,8 +133,8 @@ label.action.destroy.systemvm.processing=\u30b7\u30b9\u30c6\u30e0 VM \u3092\u783 label.action.destroy.systemvm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u7834\u68c4 label.action.detach.disk.processing=\u30c7\u30a3\u30b9\u30af\u3092\u30c7\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.detach.disk=\u30c7\u30a3\u30b9\u30af\u306e\u30c7\u30bf\u30c3\u30c1 -label.action.detach.iso.processing=ISO \u3092\u30c7\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.detach.iso=ISO \u306e\u30c7\u30bf\u30c3\u30c1 +label.action.detach.iso.processing=ISO \u3092\u30c7\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059... label.action.disable.account.processing=\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059... label.action.disable.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u7121\u52b9\u5316 label.action.disable.cluster.processing=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059... @@ -231,8 +186,8 @@ label.action.enable.user.processing=\u30e6\u30fc\u30b6\u30fc\u3092\u6709\u52b9\u label.action.enable.user=\u30e6\u30fc\u30b6\u30fc\u306e\u6709\u52b9\u5316 label.action.enable.zone.processing=\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059... label.action.enable.zone=\u30be\u30fc\u30f3\u306e\u6709\u52b9\u5316 -label.action.expunge.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u62b9\u6d88 label.action.expunge.instance.processing=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u62b9\u6d88\u3057\u3066\u3044\u307e\u3059... +label.action.expunge.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u62b9\u6d88 label.action.force.reconnect.processing=\u518d\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059... label.action.force.reconnect=\u5f37\u5236\u518d\u63a5\u7d9a label.action.generate.keys.processing=\u30ad\u30fc\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059... @@ -256,9 +211,8 @@ label.action.reboot.systemvm.processing=\u30b7\u30b9\u30c6\u30e0 VM \u3092\u518d label.action.reboot.systemvm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u518d\u8d77\u52d5 label.action.recurring.snapshot=\u5b9a\u671f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 label.action.register.iso=ISO \u306e\u767b\u9332 -label.action.register.template=URL \u304b\u3089\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u767b\u9332 -label.action.release.ip.processing=IP \u30a2\u30c9\u30ec\u30b9\u3092\u89e3\u653e\u3057\u3066\u3044\u307e\u3059... label.action.release.ip=IP \u30a2\u30c9\u30ec\u30b9\u306e\u89e3\u653e +label.action.release.ip.processing=IP \u30a2\u30c9\u30ec\u30b9\u3092\u89e3\u653e\u3057\u3066\u3044\u307e\u3059... label.action.remove.host.processing=\u30db\u30b9\u30c8\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059... label.action.remove.host=\u30db\u30b9\u30c8\u306e\u524a\u9664 label.action.reset.password.processing=\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059... @@ -268,6 +222,8 @@ label.action.resize.volume=\u30dc\u30ea\u30e5\u30fc\u30e0 \u30b5\u30a4\u30ba\u30 label.action.resource.limits=\u30ea\u30bd\u30fc\u30b9\u5236\u9650 label.action.restore.instance.processing=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5fa9\u5143\u3057\u3066\u3044\u307e\u3059... label.action.restore.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5fa9\u5143 +label.action.revert.snapshot.processing=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3057\u3066\u3044\u307e\u3059... +label.action.revert.snapshot=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3059 label.action.start.instance.processing=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059... label.action.start.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u8d77\u52d5 label.action.start.router.processing=\u30eb\u30fc\u30bf\u30fc\u3092\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059... @@ -280,49 +236,74 @@ label.action.stop.router.processing=\u30eb\u30fc\u30bf\u30fc\u3092\u505c\u6b62\u label.action.stop.router=\u30eb\u30fc\u30bf\u30fc\u306e\u505c\u6b62 label.action.stop.systemvm.processing=\u30b7\u30b9\u30c6\u30e0 VM \u3092\u505c\u6b62\u3057\u3066\u3044\u307e\u3059... label.action.stop.systemvm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u505c\u6b62 +label.actions=\u64cd\u4f5c label.action.take.snapshot.processing=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059.... label.action.take.snapshot=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u4f5c\u6210 -label.action.revert.snapshot.processing=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3057\u3066\u3044\u307e\u3059... -label.action.revert.snapshot=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3059 -label.action.unmanage.cluster.processing=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u7ba1\u7406\u5bfe\u8c61\u304b\u3089\u9664\u5916\u3057\u3066\u3044\u307e\u3059... -label.action.unmanage.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u7ba1\u7406\u5bfe\u8c61\u304b\u3089\u306e\u9664\u5916 -label.action.update.OS.preference.processing=OS \u57fa\u672c\u8a2d\u5b9a\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059... +label.action=\u64cd\u4f5c +label.action.unmanage.cluster.processing=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u975e\u7ba1\u7406\u5bfe\u8c61\u306b\u3057\u3066\u3044\u307e\u3059... +label.action.unmanage.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u975e\u7ba1\u7406\u5bfe\u8c61\u5316 label.action.update.OS.preference=OS \u57fa\u672c\u8a2d\u5b9a\u306e\u66f4\u65b0 +label.action.update.OS.preference.processing=OS \u57fa\u672c\u8a2d\u5b9a\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059... label.action.update.resource.count.processing=\u30ea\u30bd\u30fc\u30b9\u6570\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059... label.action.update.resource.count=\u30ea\u30bd\u30fc\u30b9\u6570\u306e\u66f4\u65b0 label.action.vmsnapshot.create=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u4f5c\u6210 label.action.vmsnapshot.delete=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u524a\u9664 label.action.vmsnapshot.revert=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3059 -label.actions=\u64cd\u4f5c label.activate.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u5316 label.active.sessions=\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30bb\u30c3\u30b7\u30e7\u30f3 -label.add.account.to.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 -label.add.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 label.add.accounts.to=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0\u5148\: label.add.accounts=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 +label.add.account.to.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 +label.add.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 label.add.ACL=ACL \u306e\u8ffd\u52a0 +label.add.acl.list=ACL \u4e00\u89a7\u306e\u8ffd\u52a0 label.add.affinity.group=\u65b0\u3057\u3044\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306e\u8ffd\u52a0 -label.add.BigSwitchBcf.device=Big Switch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8ffd\u52a0 +label.add.baremetal.dhcp.device=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 +label.add.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb\u30e9\u30c3\u30af\u8a2d\u5b9a\u306e\u8ffd\u52a0 +label.add.BigSwitchBcf.device=BigSwitch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8ffd\u52a0 +label.add.BrocadeVcs.device=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u8ffd\u52a0 label.add.by.cidr=CIDR \u3067\u8ffd\u52a0 label.add.by.group=\u30b0\u30eb\u30fc\u30d7\u3067\u8ffd\u52a0 label.add.by=\u8ffd\u52a0\u5358\u4f4d +label.add.ciscoASA1000v=Cisco ASA 1000V \u30ea\u30bd\u30fc\u30b9\u306e\u8ffd\u52a0 label.add.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u8ffd\u52a0 label.add.compute.offering=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 label.add.direct.iprange=\u76f4\u63a5 IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8ffd\u52a0 label.add.disk.offering=\u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 label.add.domain=\u30c9\u30e1\u30a4\u30f3\u306e\u8ffd\u52a0 +label.added.brocade.vcs.switch=\u65b0\u3057\u3044 Brocade VCS \u30b9\u30a4\u30c3\u30c1\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f +label.added.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f +label.added.new.bigswitch.bcf.controller=\u65b0\u3057\u3044 BigSwitch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f +label.added.nicira.nvp.controller=\u65b0\u3057\u3044 Nicira NVP Controller \u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f label.add.egress.rule=\u9001\u4fe1\u898f\u5247\u306e\u8ffd\u52a0 +label.addes.new.f5=\u65b0\u3057\u3044 F5 \u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f label.add.F5.device=F5 \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 label.add.firewall=\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u898f\u5247\u306e\u8ffd\u52a0 +label.add.globo.dns=GloboDNS \u306e\u8ffd\u52a0 +label.add.gslb=GSLB \u306e\u8ffd\u52a0 label.add.guest.network=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 -label.add.isolated.guest.network=\u5206\u96e2\u3055\u308c\u305f\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 label.add.host=\u30db\u30b9\u30c8\u306e\u8ffd\u52a0 +label.adding.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +label.adding.failed=\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f +label.adding.pod=\u30dd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +label.adding.processing=\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059... label.add.ingress.rule=\u53d7\u4fe1\u898f\u5247\u306e\u8ffd\u52a0 +label.adding.succeeded=\u8ffd\u52a0\u3057\u307e\u3057\u305f +label.adding=\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +label.adding.user=\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +label.adding.zone=\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 label.add.intermediate.certificate=\u4e2d\u9593\u8a3c\u660e\u66f8\u306e\u8ffd\u52a0 +label.add.internal.lb=\u5185\u90e8 LB \u306e\u8ffd\u52a0 label.add.ip.range=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8ffd\u52a0 +label.add.isolated.guest.network=\u5206\u96e2\u30b2\u30b9\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 +label.add.isolated.network=\u5206\u96e2\u3055\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 +label.additional.networks=\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af +label.add.ldap.account=LDAP \u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8ffd\u52a0 +label.add.list.name=ACL \u4e00\u89a7\u540d label.add.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u8ffd\u52a0 label.add.more=\u305d\u306e\u307b\u304b\u306e\u9805\u76ee\u306e\u8ffd\u52a0 label.add.netScaler.device=NetScaler \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 +label.add.network.acl.list=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u4e00\u89a7\u306e\u8ffd\u52a0 label.add.network.ACL=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u306e\u8ffd\u52a0 label.add.network.device=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 label.add.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 @@ -330,17 +311,21 @@ label.add.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 label.add.new.F5=\u65b0\u3057\u3044 F5 \u306e\u8ffd\u52a0 label.add.new.gateway=\u65b0\u3057\u3044\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u8ffd\u52a0 label.add.new.NetScaler=\u65b0\u3057\u3044 NetScaler \u306e\u8ffd\u52a0 -label.add.new.SRX=\u65b0\u3057\u3044 SRX \u306e\u8ffd\u52a0 label.add.new.PA=\u65b0\u3057\u3044 Palo Alto \u306e\u8ffd\u52a0 +label.add.new.SRX=\u65b0\u3057\u3044 SRX \u306e\u8ffd\u52a0 label.add.new.tier=\u65b0\u3057\u3044\u968e\u5c64\u306e\u8ffd\u52a0 +label.add.nfs.secondary.staging.store=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u8ffd\u52a0 label.add.NiciraNvp.device=NVP Controller \u306e\u8ffd\u52a0 label.add.NuageVsp.device=Nuage Virtualized Services Directory (VSD) \u306e\u8ffd\u52a0 -label.add.BrocadeVcs.device=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u8ffd\u52a0 +label.add.OpenDaylight.device=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8ffd\u52a0 +label.add.PA.device=Palo Alto \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 label.add.physical.network=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 label.add.pod=\u30dd\u30c3\u30c9\u306e\u8ffd\u52a0 +label.add.portable.ip.range=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8ffd\u52a0 label.add.port.forwarding.rule=\u30dd\u30fc\u30c8\u8ee2\u9001\u898f\u5247\u306e\u8ffd\u52a0 label.add.primary.storage=\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u8ffd\u52a0 -label.add.region=\u9818\u57df\u306e\u8ffd\u52a0 +label.add.private.gateway=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u8ffd\u52a0 +label.add.region=\u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u8ffd\u52a0 label.add.resources=\u30ea\u30bd\u30fc\u30b9\u306e\u8ffd\u52a0 label.add.route=\u30eb\u30fc\u30c8\u306e\u8ffd\u52a0 label.add.rule=\u898f\u5247\u306e\u8ffd\u52a0 @@ -348,206 +333,281 @@ label.add.secondary.storage=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u3 label.add.security.group=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306e\u8ffd\u52a0 label.add.service.offering=\u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 label.add.SRX.device=SRX \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 -label.add.PA.device=Palo Alto \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 label.add.static.nat.rule=\u9759\u7684 NAT \u898f\u5247\u306e\u8ffd\u52a0 label.add.static.route=\u9759\u7684\u30eb\u30fc\u30c8\u306e\u8ffd\u52a0 label.add.system.service.offering=\u30b7\u30b9\u30c6\u30e0 \u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 label.add.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u8ffd\u52a0 label.add.to.group=\u8ffd\u52a0\u5148\u30b0\u30eb\u30fc\u30d7 +label.add=\u8ffd\u52a0 +label.add.ucs.manager=UCS Manager \u306e\u8ffd\u52a0 +label.add.userdata=\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf label.add.user=\u30e6\u30fc\u30b6\u30fc\u306e\u8ffd\u52a0 -label.add.userdata=\u30e6\u30fc\u30b6\u30fc \u30c7\u30fc\u30bf label.add.vlan=VLAN \u306e\u8ffd\u52a0 -label.add.vxlan=VXLAN \u306e\u8ffd\u52a0 -label.add.VM.to.tier=\u968e\u5c64\u3078\u306e VM \u306e\u8ffd\u52a0 -label.add.vm=VM \u306e\u8ffd\u52a0 label.add.vms.to.lb=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u898f\u5247\u3078\u306e VM \u306e\u8ffd\u52a0 label.add.vms=VM \u306e\u8ffd\u52a0 +label.add.VM.to.tier=\u968e\u5c64\u3078\u306e VM \u306e\u8ffd\u52a0 +label.add.vm=VM \u306e\u8ffd\u52a0 +label.add.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u8ffd\u52a0 +label.add.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 +label.add.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u8ffd\u52a0 label.add.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u8ffd\u52a0 +label.add.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 label.add.vpc=VPC \u306e\u8ffd\u52a0 label.add.vpn.customer.gateway=VPN \u30ab\u30b9\u30bf\u30de\u30fc \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u8ffd\u52a0 label.add.VPN.gateway=VPN \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u8ffd\u52a0 label.add.vpn.user=VPN \u30e6\u30fc\u30b6\u30fc\u306e\u8ffd\u52a0 +label.add.vxlan=VXLAN \u306e\u8ffd\u52a0 label.add.zone=\u30be\u30fc\u30f3\u306e\u8ffd\u52a0 -label.add=\u8ffd\u52a0 -label.adding.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -label.adding.failed=\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f -label.adding.pod=\u30dd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -label.adding.processing=\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059... -label.adding.succeeded=\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.adding.user=\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -label.adding.zone=\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -label.adding=\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -label.additional.networks=\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.admin.accounts=\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8 label.admin=\u7ba1\u7406\u8005 label.advanced.mode=\u62e1\u5f35\u30e2\u30fc\u30c9 label.advanced.search=\u9ad8\u5ea6\u306a\u691c\u7d22 label.advanced=\u62e1\u5f35 -label.affinity.group=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.affinity.groups=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 +label.affinity.group=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.affinity=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 label.agent.password=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8 \u30d1\u30b9\u30ef\u30fc\u30c9 -label.agent.port=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8 \u30dd\u30fc\u30c8 +label.agent.port=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30dd\u30fc\u30c8 +label.agent.state=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u72b6\u614b label.agent.username=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8 \u30e6\u30fc\u30b6\u30fc\u540d label.agree=\u540c\u610f\u3059\u308b +label.alert.archived=\u30a2\u30e9\u30fc\u30c8\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\u3055\u308c\u307e\u3057\u305f +label.alert.deleted=\u30a2\u30e9\u30fc\u30c8\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f +label.alert.details=\u30a2\u30e9\u30fc\u30c8\u306e\u8a73\u7d30 label.alert=\u30a2\u30e9\u30fc\u30c8 label.algorithm=\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 label.allocated=\u5272\u308a\u5f53\u3066\u6e08\u307f label.allocation.state=\u5272\u308a\u5f53\u3066\u72b6\u614b -label.anti.affinity.group=\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 +label.allow=\u8a31\u53ef label.anti.affinity.groups=\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 +label.anti.affinity.group=\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.anti.affinity=\u30a2\u30f3\u30c1\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 label.api.key=API \u30ad\u30fc label.api.version=API \u30d0\u30fc\u30b8\u30e7\u30f3 label.apply=\u9069\u7528 +label.app.name=CloudStack +label.archive.alerts=\u30a2\u30e9\u30fc\u30c8\u306e\u30a2\u30fc\u30ab\u30a4\u30d6 +label.archive.events=\u30a4\u30d9\u30f3\u30c8\u306e\u30a2\u30fc\u30ab\u30a4\u30d6 +label.archive=\u30a2\u30fc\u30ab\u30a4\u30d6 +label.assigned.vms=\u5272\u308a\u5f53\u3066\u6e08\u307f VM +label.assign.instance.another=\u307b\u304b\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3078\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5272\u308a\u5f53\u3066 label.assign.to.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5272\u308a\u5f53\u3066\u3066\u3044\u307e\u3059 label.assign=\u5272\u308a\u5f53\u3066 +label.assign.vms=\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u5272\u308a\u5f53\u3066 label.associated.network.id=\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ID label.associated.network=\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af +label.associated.profile=\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb +label.associate.public.ip=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u306e\u95a2\u9023\u4ed8\u3051 label.attached.iso=\u30a2\u30bf\u30c3\u30c1\u3055\u308c\u305f ISO label.author.email=\u4f5c\u6210\u8005\u306e\u96fb\u5b50\u30e1\u30fc\u30eb label.author.name=\u4f5c\u6210\u8005\u306e\u540d\u524d -label.availability.zone=\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3 \u30be\u30fc\u30f3 +label.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a label.availability=\u53ef\u7528\u6027 +label.availability.zone=\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3 \u30be\u30fc\u30f3 +label.availabilityZone=\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3\u30be\u30fc\u30f3 label.available.public.ips=\u4f7f\u7528\u3067\u304d\u308b\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 label.available=\u4f7f\u7528\u53ef\u80fd label.back=\u623b\u308b label.bandwidth=\u5e2f\u57df\u5e45 +label.baremetal.dhcp.devices=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30c7\u30d0\u30a4\u30b9 +label.baremetal.dhcp.provider=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc +label.baremetal.pxe.devices=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30c7\u30d0\u30a4\u30b9 +label.baremetal.pxe.device=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 +label.baremetal.pxe.provider=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc +label.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb\u30e9\u30c3\u30af\u8a2d\u5b9a label.basic.mode=\u57fa\u672c\u30e2\u30fc\u30c9 label.basic=\u57fa\u672c -label.bigswitch.controller.address=Big Switch VNS \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc \u30a2\u30c9\u30ec\u30b9 +label.bigswitch.bcf.details=BigSwitch BCF \u306e\u8a73\u7d30 +label.bigswitch.bcf.nat=BigSwitch BCF \u306e NAT \u3092\u6709\u52b9\u5316\u3057\u307e\u3057\u305f +label.bigswitch.controller.address=BigSwitch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u30a2\u30c9\u30ec\u30b9 +label.blade.id=\u30d6\u30ec\u30fc\u30c9 ID +label.blades=\u30d6\u30ec\u30fc\u30c9 label.bootable=\u8d77\u52d5\u53ef\u80fd label.broadcast.domain.range=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 \u30c9\u30e1\u30a4\u30f3\u306e\u7bc4\u56f2 label.broadcast.domain.type=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 \u30c9\u30e1\u30a4\u30f3\u306e\u7a2e\u985e label.broadcast.uri=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 URI +label.broadcasturi=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 URI +label.broadcat.uri=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 URI +label.brocade.vcs.address=VCS \u30b9\u30a4\u30c3\u30c1 \u30a2\u30c9\u30ec\u30b9 +label.brocade.vcs.details=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u8a73\u7d30 label.by.account=\u30a2\u30ab\u30a6\u30f3\u30c8 +label.by.alert.type=\u30a2\u30e9\u30fc\u30c8\u306e\u7a2e\u985e label.by.availability=\u53ef\u7528\u6027 +label.by.date.end=\u65e5\u4ed8 (\u7d42\u4e86) +label.by.date.start=\u65e5\u4ed8 (\u958b\u59cb) label.by.domain=\u30c9\u30e1\u30a4\u30f3 label.by.end.date=\u7d42\u4e86\u65e5 +label.by.event.type=\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e label.by.level=\u30ec\u30d9\u30eb label.by.pod=\u30dd\u30c3\u30c9 label.by.role=\u5f79\u5272 label.by.start.date=\u958b\u59cb\u65e5 label.by.state=\u72b6\u614b +label.bytes.received=\u53d7\u4fe1\u30d0\u30a4\u30c8 +label.bytes.sent=\u9001\u4fe1\u30d0\u30a4\u30c8 label.by.traffic.type=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e label.by.type.id=\u7a2e\u985e ID label.by.type=\u7a2e\u985e label.by.zone=\u30be\u30fc\u30f3 -label.bytes.received=\u53d7\u4fe1\u30d0\u30a4\u30c8 -label.bytes.sent=\u9001\u4fe1\u30d0\u30a4\u30c8 +label.cache.mode=\u66f8\u304d\u8fbc\u307f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7a2e\u985e label.cancel=\u30ad\u30e3\u30f3\u30bb\u30eb -label.capacity=\u51e6\u7406\u80fd\u529b label.capacity.bytes=\u51e6\u7406\u80fd\u529b (\u30d0\u30a4\u30c8) label.capacity.iops=\u51e6\u7406\u80fd\u529b (IOPS) +label.capacity=\u51e6\u7406\u80fd\u529b label.certificate=\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8 +label.change.affinity=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3\u306e\u5909\u66f4 label.change.service.offering=\u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u5909\u66f4 label.change.value=\u5024\u306e\u5909\u66f4 label.character=\u6587\u5b57 -label.md5.checksum=MD5 \u30c1\u30a7\u30c3\u30af\u30b5\u30e0 +label.chassis=\u30b7\u30e3\u30fc\u30b7 +label.checksum=\u30c1\u30a7\u30c3\u30af\u30b5\u30e0 label.cidr.account=CIDR \u307e\u305f\u306f\u30a2\u30ab\u30a6\u30f3\u30c8/\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 +label.cidr=CIDR label.CIDR.list=CIDR \u4e00\u89a7 label.cidr.list=\u9001\u4fe1\u5143 CIDR label.CIDR.of.destination.network=\u5b9b\u5148\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e CIDR -label.cidr=CIDR +label.cisco.nexus1000v.ip.address=Nexus 1000V \u306e IP \u30a2\u30c9\u30ec\u30b9 +label.cisco.nexus1000v.password=Nexus 1000V \u306e\u30d1\u30b9\u30ef\u30fc\u30c9 +label.cisco.nexus1000v.username=Nexus 1000V \u306e\u30e6\u30fc\u30b6\u30fc\u540d +label.ciscovnmc.resource.details=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u306e\u8a73\u7d30 label.clean.up=\u30af\u30ea\u30fc\u30f3 \u30a2\u30c3\u30d7\u3059\u308b -label.make.redundant=\u5197\u9577\u5316\u3059\u308b label.clear.list=\u4e00\u89a7\u306e\u6d88\u53bb label.close=\u9589\u3058\u308b label.cloud.console=\u30af\u30e9\u30a6\u30c9\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb label.cloud.managed=Cloud.com \u306b\u3088\u308b\u7ba1\u7406 label.cluster.name=\u30af\u30e9\u30b9\u30bf\u30fc\u540d +label.clusters=\u30af\u30e9\u30b9\u30bf\u30fc label.cluster.type=\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u7a2e\u985e label.cluster=\u30af\u30e9\u30b9\u30bf\u30fc -label.clusters=\u30af\u30e9\u30b9\u30bf\u30fc label.clvm=CLVM -label.rbd=RBD -label.rbd.monitor=Ceph \u30e2\u30cb\u30bf\u30fc -label.rbd.pool=Ceph \u30d7\u30fc\u30eb -label.rbd.id=Cephx \u30e6\u30fc\u30b6\u30fc -label.rbd.secret=Cephx \u30b7\u30fc\u30af\u30ec\u30c3\u30c8 label.code=\u30b3\u30fc\u30c9 label.community=\u30b3\u30df\u30e5\u30cb\u30c6\u30a3 label.compute.and.storage=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u30b9\u30c8\u30ec\u30fc\u30b8 -label.compute.offering=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.compute.offerings=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 +label.compute.offering=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.compute=\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 label.configuration=\u69cb\u6210 +label.configure.ldap=LDAP \u306e\u69cb\u6210 label.configure.network.ACLs=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u306e\u69cb\u6210 -label.configure.vpc=VPC \u306e\u69cb\u6210 label.configure=\u69cb\u6210 -label.confirm.password=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d\u5165\u529b +label.configure.vpc=VPC \u306e\u69cb\u6210 label.confirmation=\u78ba\u8a8d +label.confirm.password=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d\u5165\u529b label.congratulations=\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u3053\u308c\u3067\u5b8c\u4e86\u3067\u3059\u3002 label.conserve.mode=\u7bc0\u7d04\u30e2\u30fc\u30c9 label.console.proxy=\u30b3\u30f3\u30bd\u30fc\u30eb \u30d7\u30ed\u30ad\u30b7 +label.console.proxy.vm=\u30b3\u30f3\u30bd\u30fc\u30eb \u30d7\u30ed\u30ad\u30b7 VM label.continue.basic.install=\u57fa\u672c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u7d9a\u884c\u3059\u308b label.continue=\u7d9a\u884c -label.corrections.saved=\u4fee\u6574\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f +label.copying.iso=ISO \u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059 +label.corrections.saved=\u63a5\u7d9a\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f +label.counter=\u30ab\u30a6\u30f3\u30bf\u30fc label.cpu.allocated.for.VMs=VM \u306b\u5272\u308a\u5f53\u3066\u6e08\u307f\u306e CPU label.cpu.allocated=\u5272\u308a\u5f53\u3066\u6e08\u307f\u306e CPU label.CPU.cap=CPU \u30ad\u30e3\u30c3\u30d7 +label.cpu=CPU label.cpu.limits=CPU \u5236\u9650 label.cpu.mhz=CPU (MHz) label.cpu.utilized=CPU \u4f7f\u7528\u7387 -label.cpu=CPU +label.created.by.system=\u30b7\u30b9\u30c6\u30e0\u4f5c\u6210 +label.created=\u4f5c\u6210\u65e5\u6642 +label.create.nfs.secondary.staging.storage=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u4f5c\u6210\u3059\u308b +label.create.nfs.secondary.staging.store=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u4f5c\u6210\u3059\u308b label.create.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210 label.create.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4f5c\u6210 label.create.VPN.connection=VPN \u63a5\u7d9a\u306e\u4f5c\u6210 -label.created.by.system=\u30b7\u30b9\u30c6\u30e0\u4f5c\u6210 -label.created=\u4f5c\u6210\u65e5\u6642 label.cross.zones=\u30af\u30ed\u30b9 \u30be\u30fc\u30f3 +label.custom.disk.iops=\u30ab\u30b9\u30bf\u30e0 IOPS label.custom.disk.size=\u30ab\u30b9\u30bf\u30e0 \u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba +label.custom=\u30ab\u30b9\u30bf\u30e0 label.daily=\u6bce\u65e5 label.data.disk.offering=\u30c7\u30fc\u30bf \u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.date=\u65e5\u6642 label.day.of.month=\u6bce\u6708\u6307\u5b9a\u65e5 label.day.of.week=\u6bce\u9031\u6307\u5b9a\u65e5 +label.day=\u65e5 +label.dc.name=DC \u540d label.dead.peer.detection=\u505c\u6b62\u30d4\u30a2\u3092\u691c\u51fa\u3059\u308b label.decline.invitation=\u62db\u5f85\u306e\u8f9e\u9000 +label.dedicate.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u5c02\u7528\u306b\u8a2d\u5b9a label.dedicated=\u5c02\u7528 +label.dedicated.vlan.vni.ranges=\u5c02\u7528 VLAN/VNI \u306e\u7bc4\u56f2 +label.dedicate.host=\u30db\u30b9\u30c8\u3092\u5c02\u7528\u306b\u8a2d\u5b9a +label.dedicate.pod=\u30dd\u30c3\u30c9\u3092\u5c02\u7528\u306b\u8a2d\u5b9a +label.dedicate=\u5c02\u7528\u306b\u8a2d\u5b9a +label.dedicate.vlan.vni.range=VLAN/VNI \u306e\u7bc4\u56f2\u3092\u5c02\u7528\u306b\u8a2d\u5b9a +label.dedicate.zone=\u30be\u30fc\u30f3\u3092\u5c02\u7528\u306b\u8a2d\u5b9a +label.default.egress.policy=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u9001\u4fe1\u30dd\u30ea\u30b7\u30fc +label.default=\u30c7\u30d5\u30a9\u30eb\u30c8 label.default.use=\u30c7\u30d5\u30a9\u30eb\u30c8\u4f7f\u7528 label.default.view=\u30c7\u30d5\u30a9\u30eb\u30c8 \u30d3\u30e5\u30fc -label.default=\u30c7\u30d5\u30a9\u30eb\u30c8 +label.delete.acl.list=ACL \u4e00\u89a7\u306e\u524a\u9664 label.delete.affinity.group=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306e\u524a\u9664 -label.delete.BigSwitchBcf=Big Switch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u524a\u9664 +label.delete.alerts=\u30a2\u30e9\u30fc\u30c8\u306e\u524a\u9664 +label.delete.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb\u30e9\u30c3\u30af\u8a2d\u5b9a\u306e\u524a\u9664 +label.delete.BigSwitchBcf=BigSwitch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u524a\u9664 +label.delete.BrocadeVcs=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u524a\u9664 +label.delete.ciscoASA1000v=Cisco ASA 1000V \u30ea\u30bd\u30fc\u30b9\u306e\u524a\u9664 +label.delete.ciscovnmc.resource=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u306e\u524a\u9664 +label.delete.events=\u30a4\u30d9\u30f3\u30c8\u306e\u524a\u9664 label.delete.F5=F5 \u306e\u524a\u9664 label.delete.gateway=\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u524a\u9664 +label.delete.internal.lb=\u5185\u90e8 LB \u306e\u524a\u9664 label.delete.NetScaler=NetScaler \u306e\u524a\u9664 label.delete.NiciraNvp=NVP Controller \u306e\u524a\u9664 label.delete.NuageVsp=Nuage VSD \u306e\u524a\u9664 -label.delete.BrocadeVcs=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u524a\u9664 -label.delete.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u524a\u9664 -label.delete.SRX=SRX \u306e\u524a\u9664 +label.delete.OpenDaylight.device=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u524a\u9664 label.delete.PA=Palo Alto \u306e\u524a\u9664 +label.delete.portable.ip.range=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u524a\u9664 +label.delete.profile=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u524a\u9664 +label.delete.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u524a\u9664 +label.delete.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u524a\u9664 +label.delete.SRX=SRX \u306e\u524a\u9664 +label.delete=\u524a\u9664 +label.delete.ucs.manager=UCS Manager \u306e\u524a\u9664 label.delete.VPN.connection=VPN \u63a5\u7d9a\u306e\u524a\u9664 label.delete.VPN.customer.gateway=VPN \u30ab\u30b9\u30bf\u30de\u30fc \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u524a\u9664 label.delete.VPN.gateway=VPN \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u524a\u9664 label.delete.vpn.user=VPN \u30e6\u30fc\u30b6\u30fc\u306e\u524a\u9664 -label.delete=\u524a\u9664 label.deleting.failed=\u524a\u9664\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f label.deleting.processing=\u524a\u9664\u3057\u3066\u3044\u307e\u3059... +label.deny=\u62d2\u5426 +label.deployment.planner=\u5c55\u958b\u30d7\u30e9\u30f3\u30ca\u30fc label.description=\u8aac\u660e label.destination.physical.network.id=\u30d6\u30ea\u30c3\u30b8\u5148\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ID label.destination.zone=\u30b3\u30d4\u30fc\u5148\u30be\u30fc\u30f3 label.destroy.router=\u30eb\u30fc\u30bf\u30fc\u306e\u7834\u68c4 label.destroy=\u7834\u68c4 +label.destroy.vm.graceperiod=VM \u7834\u68c4\u306e\u7336\u4e88\u671f\u9593 label.detaching.disk=\u30c7\u30a3\u30b9\u30af\u3092\u30c7\u30bf\u30c3\u30c1\u3057\u3066\u3044\u307e\u3059 label.details=\u8a73\u7d30 label.device.id=\u30c7\u30d0\u30a4\u30b9 ID label.devices=\u30c7\u30d0\u30a4\u30b9 -label.DHCP.server.type=DHCP \u30b5\u30fc\u30d0\u30fc\u306e\u7a2e\u985e label.dhcp=DHCP +label.DHCP.server.type=DHCP \u30b5\u30fc\u30d0\u30fc\u306e\u7a2e\u985e +label.direct.attached.public.ip=\u76f4\u63a5\u30a2\u30bf\u30c3\u30c1\u3055\u308c\u3066\u3044\u308b\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 label.direct.ips=\u5171\u6709\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e IP \u30a2\u30c9\u30ec\u30b9 -label.disable.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u7121\u52b9\u5316 -label.disable.vpn=\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u306e\u7121\u52b9\u5316 +label.disable.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a\u306e\u7121\u52b9\u5316 label.disabled=\u7121\u52b9 +label.disable.host=\u30db\u30b9\u30c8\u306e\u7121\u52b9\u5316 +label.disable.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u7121\u52b9\u5316 +label.disable.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u7121\u52b9\u5316 +label.disable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u7121\u52b9\u5316 +label.disable.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u7121\u52b9\u5316 +label.disable.vpn=\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u306e\u7121\u52b9\u5316 label.disabling.vpn.access=VPN \u30a2\u30af\u30bb\u30b9\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +label.disassociate.profile.blade=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u30d6\u30ec\u30fc\u30c9\u306e\u95a2\u9023\u4ed8\u3051\u306e\u89e3\u9664 +label.disbale.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u7121\u52b9\u5316 label.disk.allocated=\u5272\u308a\u5f53\u3066\u6e08\u307f\u306e\u30c7\u30a3\u30b9\u30af label.disk.bytes.read.rate=\u30c7\u30a3\u30b9\u30af\u8aad\u307f\u53d6\u308a\u901f\u5ea6 (BPS) label.disk.bytes.write.rate=\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f\u901f\u5ea6 (BPS) +label.disk.iops.max=\u6700\u5927 IOPS +label.disk.iops.min=\u6700\u5c0f IOPS label.disk.iops.read.rate=\u30c7\u30a3\u30b9\u30af\u8aad\u307f\u53d6\u308a\u901f\u5ea6 (IOPS) +label.disk.iops.total=IOPS \u5408\u8a08 label.disk.iops.write.rate=\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f\u901f\u5ea6 (IOPS) label.disk.offering=\u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 +label.diskoffering=\u30c7\u30a3\u30b9\u30af\u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.disk.provisioningtype=\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u306e\u7a2e\u985e label.disk.read.bytes=\u30c7\u30a3\u30b9\u30af\u8aad\u307f\u53d6\u308a (\u30d0\u30a4\u30c8) label.disk.read.io=\u30c7\u30a3\u30b9\u30af\u8aad\u307f\u53d6\u308a (IO) @@ -557,13 +617,16 @@ label.disk.total=\u30c7\u30a3\u30b9\u30af\u5408\u8a08 label.disk.volume=\u30c7\u30a3\u30b9\u30af \u30dc\u30ea\u30e5\u30fc\u30e0 label.disk.write.bytes=\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f (\u30d0\u30a4\u30c8) label.disk.write.io=\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f (IO) +label.display.name=\u8868\u793a\u540d label.display.text=\u8868\u793a\u30c6\u30ad\u30b9\u30c8 +label.distributedrouter=\u5206\u6563\u30eb\u30fc\u30bf\u30fc label.dns.1=DNS 1 label.dns.2=DNS 2 -label.DNS.domain.for.guest.networks=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e DNS \u30c9\u30e1\u30a4\u30f3 label.dns=DNS +label.DNS.domain.for.guest.networks=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e DNS \u30c9\u30e1\u30a4\u30f3 label.domain.admin=\u30c9\u30e1\u30a4\u30f3\u7ba1\u7406\u8005 label.domain.id=\u30c9\u30e1\u30a4\u30f3 ID +label.domain.lower=\u30c9\u30e1\u30a4\u30f3 label.domain.name=\u30c9\u30e1\u30a4\u30f3\u540d label.domain.router=\u30c9\u30e1\u30a4\u30f3 \u30eb\u30fc\u30bf\u30fc label.domain.suffix=DNS \u30c9\u30e1\u30a4\u30f3 \u30b5\u30d5\u30a3\u30c3\u30af\u30b9 (\u4f8b\: xyz.com) @@ -572,91 +635,145 @@ label.done=\u5b8c\u4e86 label.double.quotes.are.not.allowed=\u4e8c\u91cd\u5f15\u7528\u7b26\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093 label.download.progress=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306e\u9032\u6357\u72b6\u6cc1 label.drag.new.position=\u65b0\u3057\u3044\u4f4d\u7f6e\u306b\u30c9\u30e9\u30c3\u30b0 +label.duration.in.sec=\u6301\u7d9a\u6642\u9593(\u79d2) +label.dynamically.scalable=\u52d5\u7684\u306b\u30b5\u30a4\u30ba\u8a2d\u5b9a\u3059\u308b +label.edit.acl.rule=ACL \u898f\u5247\u306e\u7de8\u96c6 label.edit.affinity.group=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306e\u7de8\u96c6 label.edit.lb.rule=LB \u898f\u5247\u306e\u7de8\u96c6 label.edit.network.details=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a73\u7d30\u306e\u7de8\u96c6 label.edit.project.details=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a73\u7d30\u306e\u7de8\u96c6 +label.edit.region=\u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u7de8\u96c6 +label.edit.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u306e\u7de8\u96c6 label.edit.tags=\u30bf\u30b0\u306e\u7de8\u96c6 label.edit.traffic.type=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e\u306e\u7de8\u96c6 -label.edit.vpc=VPC \u306e\u7de8\u96c6 label.edit=\u7de8\u96c6 -label.egress.rule=\u9001\u4fe1\u898f\u5247 +label.edit.vpc=VPC \u306e\u7de8\u96c6 +label.egress.default.policy=\u9001\u4fe1\u306e\u30c7\u30d5\u30a9\u30eb\u30c8 \u30dd\u30ea\u30b7\u30fc label.egress.rules=\u9001\u4fe1\u898f\u5247 +label.egress.rule=\u9001\u4fe1\u898f\u5247 label.elastic.IP=\u30a8\u30e9\u30b9\u30c6\u30a3\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 label.elastic.LB=\u30a8\u30e9\u30b9\u30c6\u30a3\u30c3\u30af LB label.elastic=\u30a8\u30e9\u30b9\u30c6\u30a3\u30c3\u30af +label.email.lower=\u96fb\u5b50\u30e1\u30fc\u30eb label.email=\u96fb\u5b50\u30e1\u30fc\u30eb +label.enable.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a\u306e\u6709\u52b9\u5316 +label.enable.host=\u30db\u30b9\u30c8\u306e\u6709\u52b9\u5316 +label.enable.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u6709\u52b9\u5316 label.enable.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u6709\u52b9\u5316 label.enable.s3=S3 \u30d9\u30fc\u30b9\u306e\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u6709\u52b9\u5316 label.enable.swift=Swift \u306e\u6709\u52b9\u5316 +label.enable.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u6709\u52b9\u5316 +label.enable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u6709\u52b9\u5316 +label.enable.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u6709\u52b9\u5316 label.enable.vpn=\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u306e\u6709\u52b9\u5316 label.enabling.vpn.access=VPN \u30a2\u30af\u30bb\u30b9\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 label.enabling.vpn=VPN \u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 label.end.IP=\u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 +label.endpoint.or.operation=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u307e\u305f\u306f\u64cd\u4f5c +label.endpoint=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 label.end.port=\u7d42\u4e86\u30dd\u30fc\u30c8 label.end.reserved.system.IP=\u4e88\u7d04\u6e08\u307f\u7d42\u4e86\u30b7\u30b9\u30c6\u30e0 IP \u30a2\u30c9\u30ec\u30b9 label.end.vlan=\u7d42\u4e86 VLAN label.end.vxlan=\u7d42\u4e86 VXLAN -label.endpoint.or.operation=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u307e\u305f\u306f\u64cd\u4f5c -label.endpoint=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 label.enter.token=\u30c8\u30fc\u30af\u30f3\u306e\u5165\u529b label.error.code=\u30a8\u30e9\u30fc \u30b3\u30fc\u30c9 label.error=\u30a8\u30e9\u30fc +label.error.upper=\u30a8\u30e9\u30fc label.ESP.encryption=ESP \u6697\u53f7\u5316 label.ESP.hash=ESP \u30cf\u30c3\u30b7\u30e5 label.ESP.lifetime=ESP \u6709\u52b9\u671f\u9593 (\u79d2) label.ESP.policy=ESP \u30dd\u30ea\u30b7\u30fc label.esx.host=ESX/ESXi \u30db\u30b9\u30c8 +label.event.archived=\u30a4\u30d9\u30f3\u30c8\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\u3055\u308c\u307e\u3057\u305f +label.event.deleted=\u30a4\u30d9\u30f3\u30c8\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f +label.event=\u30a4\u30d9\u30f3\u30c8 +label.every=\u6bce label.example=\u4f8b -label.expunge=\u62b9\u6d88\u3059\u308b +label.expunge=\u62b9\u6d88 label.external.link=\u5916\u90e8\u30ea\u30f3\u30af +label.extractable.lower=\u5c55\u958b +label.extractable=\u62bd\u51fa\u53ef\u80fd +label.f5.details=F5 \u306e\u8a73\u7d30 label.f5=F5 label.failed=\u5931\u6557 label.featured=\u304a\u3059\u3059\u3081 label.fetch.latest=\u6700\u65b0\u60c5\u5831\u306e\u53d6\u5f97 label.filterBy=\u30d5\u30a3\u30eb\u30bf\u30fc label.firewall=\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb +label.firstname.lower=\u540d label.first.name=\u540d -label.format=\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 +label.format.lower=\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 +label.format=\u5f62\u5f0f label.friday=\u91d1\u66dc\u65e5 label.full.path=\u30d5\u30eb \u30d1\u30b9 label.full=\u5b8c\u5168 label.gateway=\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.general.alerts=\u4e00\u822c\u30a2\u30e9\u30fc\u30c8 label.generating.url=URL \u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059 +label.globo.dns.configuration=GloboDNS \u306e\u8a2d\u5b9a +label.globo.dns=GloboDNS label.gluster.volume=\u30dc\u30ea\u30e5\u30fc\u30e0 label.go.step.2=\u624b\u9806 2 \u306b\u9032\u3080 label.go.step.3=\u624b\u9806 3 \u306b\u9032\u3080 label.go.step.4=\u624b\u9806 4 \u306b\u9032\u3080 label.go.step.5=\u624b\u9806 5 \u306b\u9032\u3080 +label.gpu=GPU +label.group.by.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u5225\u30b0\u30eb\u30fc\u30d7 +label.group.by.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u5225\u30b0\u30eb\u30fc\u30d7 +label.group.by.pod=\u30dd\u30c3\u30c9\u5225\u30b0\u30eb\u30fc\u30d7 +label.group.by.zone=\u30be\u30fc\u30f3\u5225\u30b0\u30eb\u30fc\u30d7 label.group.optional=\u30b0\u30eb\u30fc\u30d7 (\u30aa\u30d7\u30b7\u30e7\u30f3) label.group=\u30b0\u30eb\u30fc\u30d7 +label.gslb.assigned.lb.more=\u8ca0\u8377\u5206\u6563\u306e\u8ffd\u52a0\u5272\u308a\u5f53\u3066 +label.gslb.assigned.lb=\u5272\u308a\u5f53\u3066\u6e08\u307f\u8ca0\u8377\u5206\u6563 +label.gslb.delete=GSLB \u306e\u524a\u9664 +label.gslb.details=GSLB \u306e\u8a73\u7d30 +label.gslb.domain.name=GSLB \u30c9\u30e1\u30a4\u30f3\u540d +label.gslb=GSLB +label.gslb.lb.details=\u8ca0\u8377\u5206\u6563\u306e\u8a73\u7d30 +label.gslb.lb.remove=\u3053\u306e GSLB \u304b\u3089\u8ca0\u8377\u5206\u6563\u3092\u524a\u9664 +label.gslb.lb.rule=\u8ca0\u8377\u5206\u6563\u898f\u5247 +label.gslb.service=GSLB \u30b5\u30fc\u30d3\u30b9 +label.gslb.service.private.ip=GSLB \u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9 +label.gslb.service.public.ip=GSLB \u30b5\u30fc\u30d3\u30b9\u306e\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 +label.gslb.servicetype=\u30b5\u30fc\u30d3\u30b9\u306e\u7a2e\u985e label.guest.cidr=\u30b2\u30b9\u30c8 CIDR label.guest.end.ip=\u30b2\u30b9\u30c8\u306e\u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 label.guest.gateway=\u30b2\u30b9\u30c8 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.guest.ip.range=\u30b2\u30b9\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 label.guest.ip=\u30b2\u30b9\u30c8 IP \u30a2\u30c9\u30ec\u30b9 label.guest.netmask=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30de\u30b9\u30af +label.guest.network.details=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a73\u7d30 label.guest.networks=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.guest.start.ip=\u30b2\u30b9\u30c8\u306e\u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 label.guest.traffic=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af +label.guest.traffic.vswitch.name=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u540d +label.guest.traffic.vswitch.type=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u306e\u7a2e\u985e label.guest.type=\u30b2\u30b9\u30c8\u306e\u7a2e\u985e label.guest=\u30b2\u30b9\u30c8 -label.ha.enabled=\u9ad8\u53ef\u7528\u6027\u3092\u6709\u52b9\u306b\u3059\u308b +label.ha.enabled=\u9ad8\u53ef\u7528\u6027\u6709\u52b9 +label.health.check.interval.in.sec=\u30d8\u30eb\u30b9 \u30c1\u30a7\u30c3\u30af\u9593\u9694 (\u79d2) +label.health.check=\u30d8\u30eb\u30b9 \u30c1\u30a7\u30c3\u30af +label.healthy.threshold=\u6b63\u5e38\u3057\u304d\u3044\u5024 label.help=\u30d8\u30eb\u30d7 label.hide.ingress.rule=\u53d7\u4fe1\u898f\u5247\u3092\u96a0\u3059 label.hints=\u30d2\u30f3\u30c8 +label.home=\u30db\u30fc\u30e0 label.host.alerts=\u30db\u30b9\u30c8 \u30a2\u30e9\u30fc\u30c8 label.host.MAC=\u30db\u30b9\u30c8\u306e MAC label.host.name=\u30db\u30b9\u30c8\u540d +label.hosts=\u30db\u30b9\u30c8 label.host.tags=\u30db\u30b9\u30c8 \u30bf\u30b0 label.host=\u30db\u30b9\u30c8 -label.hosts=\u30db\u30b9\u30c8 label.hourly=\u6bce\u6642 +label.hvm=HVM label.hypervisor.capabilities=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306e\u6a5f\u80fd +label.hypervisor.snapshot.reserve=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u4e88\u7d04 +label.hypervisors=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc label.hypervisor.type=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306e\u7a2e\u985e -label.hypervisor.version=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 label.hypervisor=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc +label.hypervisor.version=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 +label.hyperv.traffic.label=Hyper-V \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb label.id=ID label.IKE.DH=IKE DH label.IKE.encryption=IKE \u6697\u53f7\u5316 @@ -664,8 +781,10 @@ label.IKE.hash=IKE \u30cf\u30c3\u30b7\u30e5 label.IKE.lifetime=IKE \u6709\u52b9\u671f\u9593 (\u79d2) label.IKE.policy=IKE \u30dd\u30ea\u30b7\u30fc label.info=\u60c5\u5831 +label.info.upper=\u60c5\u5831 label.ingress.rule=\u53d7\u4fe1\u898f\u5247 label.initiated.by=\u958b\u59cb\u30e6\u30fc\u30b6\u30fc +label.inside.port.profile=\u5185\u90e8\u30dd\u30fc\u30c8 \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb label.installWizard.addClusterIntro.subtitle=\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u3064\u3044\u3066 label.installWizard.addClusterIntro.title=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046 label.installWizard.addHostIntro.subtitle=\u30db\u30b9\u30c8\u306b\u3064\u3044\u3066 @@ -676,53 +795,75 @@ label.installWizard.addPrimaryStorageIntro.subtitle=\u30d7\u30e9\u30a4\u30de\u30 label.installWizard.addPrimaryStorageIntro.title=\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046 label.installWizard.addSecondaryStorageIntro.subtitle=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u3064\u3044\u3066 label.installWizard.addSecondaryStorageIntro.title=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046 -label.installWizard.addZone.title=\u30be\u30fc\u30f3\u306e\u8ffd\u52a0 label.installWizard.addZoneIntro.subtitle=\u30be\u30fc\u30f3\u306b\u3064\u3044\u3066 label.installWizard.addZoneIntro.title=\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046 +label.installWizard.addZone.title=\u30be\u30fc\u30f3\u306e\u8ffd\u52a0 label.installWizard.click.launch=[\u8d77\u52d5] \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -label.installWizard.subtitle=\u3053\u306e\u30ac\u30a4\u30c9 \u30c4\u30a2\u30fc\u306f CloudStack&\#8482 \u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u5f79\u7acb\u3061\u307e\u3059 -label.installWizard.title=CloudStack&\#8482 \u3078\u3088\u3046\u3053\u305d +label.installWizard.subtitle=\u3053\u306e\u30ac\u30a4\u30c9 \u30c4\u30a2\u30fc\u306f CloudStack&\#8482; \u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u5f79\u7acb\u3061\u307e\u3059 +label.installWizard.title=CloudStack&\#8482; \u3078\u3088\u3046\u3053\u305d label.instance.limits=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5236\u9650 label.instance.name=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d -label.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 +label.instance.port=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 \u30dd\u30fc\u30c8 +label.instance.scaled.up=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u9078\u629e\u3057\u305f\u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306b\u30b9\u30b1\u30fc\u30eb\u3059\u308b label.instances=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 +label.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 +label.instanciate.template.associate.profile.blade=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\u304a\u3088\u3073\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u30d6\u30ec\u30fc\u30c9\u306e\u95a2\u9023\u4ed8\u3051 label.intermediate.certificate=\u4e2d\u9593\u8a3c\u660e\u66f8 {0} label.internal.dns.1=\u5185\u90e8 DNS 1 label.internal.dns.2=\u5185\u90e8 DNS 2 +label.internal.lb.details=\u5185\u90e8 LB \u306e\u8a73\u7d30 +label.internallbvm=InternalLbVm label.internal.name=\u5185\u90e8\u540d label.interval.type=\u9593\u9694\u306e\u7a2e\u985e -label.introduction.to.cloudstack=CloudStack&\#8482 \u306e\u7d39\u4ecb +label.introduction.to.cloudstack=CloudStack&\#8482; \u306e\u7d39\u4ecb label.invalid.integer=\u7121\u52b9\u306a\u6574\u6570 label.invalid.number=\u7121\u52b9\u306a\u6570 label.invitations=\u62db\u5f85\u72b6 +label.invited.accounts=\u62db\u5f85\u6e08\u307f\u30a2\u30ab\u30a6\u30f3\u30c8 label.invite.to=\u62db\u5f85\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\: label.invite=\u62db\u5f85 -label.invited.accounts=\u62db\u5f85\u6e08\u307f\u30a2\u30ab\u30a6\u30f3\u30c8 label.ip.address=IP \u30a2\u30c9\u30ec\u30b9 +label.ipaddress=IP \u30a2\u30c9\u30ec\u30b9 label.ip.allocations=IP \u30a2\u30c9\u30ec\u30b9\u306e\u5272\u308a\u5f53\u3066 -label.ip.limits=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u5236\u9650 +label.ip=IP +label.ip.limits=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u306e\u5236\u9650 label.ip.or.fqdn=IP \u30a2\u30c9\u30ec\u30b9\u307e\u305f\u306f FQDN label.ip.range=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 label.ip.ranges=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 -label.ip=IP -label.ipaddress=IP \u30a2\u30c9\u30ec\u30b9 -label.ips=IP \u30a2\u30c9\u30ec\u30b9 label.IPsec.preshared.key=IPsec \u4e8b\u524d\u5171\u6709\u30ad\u30fc -label.is.default=\u30c7\u30d5\u30a9\u30eb\u30c8 -label.is.redundant.router=\u5197\u9577 -label.is.shared=\u5171\u6709 -label.is.system=\u30b7\u30b9\u30c6\u30e0 +label.ips=IP \u30a2\u30c9\u30ec\u30b9 +label.ipv4.cidr=IPv4 CIDR +label.ipv4.dns1=IPv4 DNS1 +label.ipv4.dns2=IPv4 DNS2 +label.ipv4.end.ip=IPv4 \u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 +label.ipv4.gateway=IPv4 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 +label.ipv4.netmask=IPv4 \u30cd\u30c3\u30c8\u30de\u30b9\u30af +label.ipv4.start.ip=IPv4 \u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 +label.ipv6.address=IPv6 IP \u30a2\u30c9\u30ec\u30b9 +label.ipv6.CIDR=IPv6 CIDR +label.ipv6.dns1=IPv6 DNS 1 +label.ipv6.dns2=IPv6 DNS 2 +label.ipv6.end.ip=IPv6 \u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 +label.ipv6.gateway=IPv6 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 +label.ipv6.start.ip=IPv6 \u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 label.iscsi=iSCSI +label.is.default=\u30c7\u30d5\u30a9\u30eb\u30c8 label.iso.boot=ISO \u8d77\u52d5 label.iso=ISO label.isolated.networks=\u5206\u96e2\u3055\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.isolation.method=\u5206\u96e2\u65b9\u6cd5 label.isolation.mode=\u5206\u96e2\u30e2\u30fc\u30c9 label.isolation.uri=\u5206\u96e2 URI +label.is.redundant.router=\u5197\u9577 +label.is.shared=\u5171\u6709 +label.is.system=\u30b7\u30b9\u30c6\u30e0 label.item.listing=\u9805\u76ee\u4e00\u89a7 -label.keep=\u4fdd\u6301\u6570 -label.key=\u30ad\u30fc +label.japanese.keyboard=\u65e5\u672c\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9 +label.keep.colon=\u4fdd\u6301\: +label.keep=\u4fdd\u6301 +label.keyboard.language=\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u8a00\u8a9e label.keyboard.type=\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u7a2e\u985e +label.key=\u30ad\u30fc label.kvm.traffic.label=KVM \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb label.label=\u30e9\u30d9\u30eb label.lang.arabic=\u30a2\u30e9\u30d3\u30a2\u8a9e @@ -740,41 +881,46 @@ label.lang.norwegian=\u30ce\u30eb\u30a6\u30a7\u30fc\u8a9e label.lang.polish=\u30dd\u30fc\u30e9\u30f3\u30c9\u8a9e label.lang.russian=\u30ed\u30b7\u30a2\u8a9e label.lang.spanish=\u30b9\u30da\u30a4\u30f3\u8a9e -label.lang.hungarian=\u30cf\u30f3\u30ac\u30ea\u30fc\u8a9e label.last.disconnected=\u6700\u7d42\u5207\u65ad\u65e5\u6642 +label.lastname.lower=\u59d3 label.last.name=\u59d3 label.latest.events=\u6700\u65b0\u30a4\u30d9\u30f3\u30c8 +label.launch=\u8d77\u52d5 label.launch.vm=VM \u306e\u8d77\u52d5 label.launch.zone=\u30be\u30fc\u30f3\u306e\u8d77\u52d5 -label.launch=\u8d77\u52d5 label.lb.algorithm.leastconn=\u6700\u5c0f\u63a5\u7d9a label.lb.algorithm.roundrobin=\u30e9\u30a6\u30f3\u30c9\u30ed\u30d3\u30f3 label.lb.algorithm.source=\u9001\u4fe1\u5143 label.LB.isolation=LB \u5206\u96e2 +label.ldap.configuration=LDAP \u69cb\u6210 +label.ldap.group.name=LDAP \u30b0\u30eb\u30fc\u30d7 +label.ldap.port=LDAP \u30dd\u30fc\u30c8 label.level=\u30ec\u30d9\u30eb label.linklocal.ip=\u30ea\u30f3\u30af \u30ed\u30fc\u30ab\u30eb IP \u30a2\u30c9\u30ec\u30b9 +label.load.balancer.type=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u7a2e\u985e label.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc label.load.balancing.policies=\u8ca0\u8377\u5206\u6563\u30dd\u30ea\u30b7\u30fc label.load.balancing=\u8ca0\u8377\u5206\u6563 label.loading=\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059 -label.local.storage.enabled=\u30e6\u30fc\u30b6\u30fc VM \u306e\u30ed\u30fc\u30ab\u30eb \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u6709\u52b9\u306b\u3059\u308b -label.local.storage.enabled.system.vms=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u30ed\u30fc\u30ab\u30eb \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u6709\u52b9\u306b\u3059\u308b label.local.storage=\u30ed\u30fc\u30ab\u30eb \u30b9\u30c8\u30ec\u30fc\u30b8 label.local=\u30ed\u30fc\u30ab\u30eb label.login=\u30ed\u30b0\u30aa\u30f3 label.logout=\u30ed\u30b0\u30aa\u30d5 -label.saml.login=SAML \u30ed\u30b0\u30aa\u30f3 -label.LUN.number=LUN \u756a\u53f7 label.lun=LUN -label.make.project.owner=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u6240\u6709\u8005\u3078\u306e\u5909\u66f4 -label.manage.resources=\u30ea\u30bd\u30fc\u30b9\u306e\u7ba1\u7406 -label.management.server=\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc -label.manage=\u7ba1\u7406 +label.LUN.number=LUN \u756a\u53f7 +label.lxc.traffic.label=LXC \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb +label.make.project.owner=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u6240\u6709\u8005\u5316 +label.make.redundant=\u5197\u9577\u5316\u69cb\u6210\u3092\u3068\u308b label.managed=\u7ba1\u7406\u5bfe\u8c61 label.management.ips=\u7ba1\u7406 IP \u30a2\u30c9\u30ec\u30b9 +label.management.server=\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc label.management=\u7ba1\u7406 +label.manage.resources=\u30ea\u30bd\u30fc\u30b9\u306e\u7ba1\u7406 +label.manage=\u7ba1\u7406 label.max.cpus=\u6700\u5927 CPU \u30b3\u30a2\u6570 label.max.guest.limit=\u6700\u5927\u30b2\u30b9\u30c8\u5236\u9650 +label.maximum=\u6700\u5927 +label.max.instances=\u6700\u5927\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570 label.max.memory=\u6700\u5927\u30e1\u30e2\u30ea (MiB) label.max.networks=\u6700\u5927\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6570 label.max.primary.storage=\u6700\u5927\u30d7\u30e9\u30a4\u30de\u30ea (GiB) @@ -785,14 +931,14 @@ label.max.templates=\u6700\u5927\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u6570 label.max.vms=\u6700\u5927\u30e6\u30fc\u30b6\u30fc VM \u6570 label.max.volumes=\u6700\u5927\u30dc\u30ea\u30e5\u30fc\u30e0\u6570 label.max.vpcs=\u6700\u5927 VPC \u6570 -label.maximum=\u6700\u5927 label.may.continue=\u7d9a\u884c\u3067\u304d\u307e\u3059\u3002 +label.md5.checksum=MD5 \u30c1\u30a7\u30c3\u30af\u30b5\u30e0 label.memory.allocated=\u5272\u308a\u5f53\u3066\u6e08\u307f\u306e\u30e1\u30e2\u30ea label.memory.limits=\u30e1\u30e2\u30ea\u5236\u9650 (MiB) label.memory.mb=\u30e1\u30e2\u30ea (MB) label.memory.total=\u30e1\u30e2\u30ea\u5408\u8a08 -label.memory.used=\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf label.memory=\u30e1\u30e2\u30ea +label.memory.used=\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf label.menu.accounts=\u30a2\u30ab\u30a6\u30f3\u30c8 label.menu.alerts=\u30a2\u30e9\u30fc\u30c8 label.menu.all.accounts=\u3059\u3079\u3066\u306e\u30a2\u30ab\u30a6\u30f3\u30c8 @@ -819,24 +965,26 @@ label.menu.my.templates=\u30de\u30a4 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 label.menu.network.offerings=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.menu.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.menu.physical.resources=\u7269\u7406\u30ea\u30bd\u30fc\u30b9 -label.menu.regions=\u9818\u57df +label.menu.regions=\u30ea\u30fc\u30b8\u30e7\u30f3 label.menu.running.instances=\u5b9f\u884c\u4e2d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 label.menu.security.groups=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.menu.service.offerings=\u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.menu.snapshots=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 +label.menu.sshkeypair=SSH \u30ad\u30fc\u30da\u30a2 label.menu.stopped.instances=\u505c\u6b62\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 label.menu.storage=\u30b9\u30c8\u30ec\u30fc\u30b8 label.menu.system.service.offerings=\u30b7\u30b9\u30c6\u30e0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -label.menu.system.vms=\u30b7\u30b9\u30c6\u30e0 VM label.menu.system=\u30b7\u30b9\u30c6\u30e0 +label.menu.system.vms=\u30b7\u30b9\u30c6\u30e0 VM label.menu.templates=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 label.menu.virtual.appliances=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9 label.menu.virtual.resources=\u4eee\u60f3\u30ea\u30bd\u30fc\u30b9 label.menu.volumes=\u30dc\u30ea\u30e5\u30fc\u30e0 -label.menu.sshkeypair=SSH \u30ad\u30fc \u30da\u30a2 +label.menu.vpc.offerings=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.migrate.instance.to.host=\u5225\u306e\u30db\u30b9\u30c8\u3078\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u79fb\u884c label.migrate.instance.to.ps=\u5225\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u79fb\u884c label.migrate.instance.to=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u79fb\u884c\u5148\: +label.migrate.lb.vm=LB VM \u306e\u79fb\u884c label.migrate.router.to=\u30eb\u30fc\u30bf\u30fc\u306e\u79fb\u884c\u5148\: label.migrate.systemvm.to=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u79fb\u884c\u5148\: label.migrate.to.host=\u30db\u30b9\u30c8\u3078\u79fb\u884c @@ -844,7 +992,11 @@ label.migrate.to.storage=\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u79fb\u884c label.migrate.volume.to.primary.storage=\u5225\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u79fb\u884c label.migrate.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u79fb\u884c label.minimum=\u6700\u5c0f -label.minute.past.hour=\u5206 (\u6bce\u6642) +label.min.instances=\u6700\u5c0f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570 +label.min.past.the.hr=\u5206(\u6bce\u6642) +label.minute.past.hour=\u5206(\u6bce\u6642) +label.minutes.past.hour=\u5206(\u6bce\u6642) +label.mode=\u30e2\u30fc\u30c9 label.monday=\u6708\u66dc\u65e5 label.monthly=\u6bce\u6708 label.more.templates=\u305d\u306e\u307b\u304b\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 @@ -855,21 +1007,26 @@ label.move.up.row=1 \u884c\u4e0a\u306b\u79fb\u52d5 label.my.account=\u30de\u30a4 \u30a2\u30ab\u30a6\u30f3\u30c8 label.my.network=\u30de\u30a4 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.my.templates=\u30de\u30a4 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 -label.na=\u8a72\u5f53\u306a\u3057 +label.name.lower=\u540d\u524d label.name.optional=\u540d\u524d (\u30aa\u30d7\u30b7\u30e7\u30f3) label.name=\u540d\u524d label.nat.port.range=NAT \u30dd\u30fc\u30c8\u306e\u7bc4\u56f2 +label.na=\u5229\u7528\u4e0d\u53ef label.netmask=\u30cd\u30c3\u30c8\u30de\u30b9\u30af +label.netscaler.details=NetScaler \u306e\u8a73\u7d30 label.netScaler=NetScaler +label.network.ACLs=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL label.network.ACL.total=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u5408\u8a08 label.network.ACL=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL -label.network.ACLs=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL +label.network.addVM=VM \u3078\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 +label.network.cidr=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af CIDR label.network.desc=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8aac\u660e label.network.device.type=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c7\u30d0\u30a4\u30b9\u306e\u7a2e\u985e label.network.device=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c7\u30d0\u30a4\u30b9 label.network.domain.text=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c9\u30e1\u30a4\u30f3 label.network.domain=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c9\u30e1\u30a4\u30f3 label.network.id=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ID +label.networking.and.security=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 label.network.label.display.for.blank.value=\u30c7\u30d5\u30a9\u30eb\u30c8 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u4f7f\u7528 label.network.limits=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5236\u9650 label.network.name=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u540d @@ -881,85 +1038,112 @@ label.network.rate.megabytes=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901f\u5ea6 (M label.network.rate=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901f\u5ea6 (MB/\u79d2) label.network.read=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8aad\u307f\u53d6\u308a label.network.service.providers=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30b5\u30fc\u30d3\u30b9 \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc -label.network.type=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u7a2e\u985e -label.network.write=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u66f8\u304d\u8fbc\u307f -label.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af -label.networking.and.security=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 label.networks=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af +label.network.type=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u7a2e\u985e +label.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af +label.network.write=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u66f8\u304d\u8fbc\u307f label.new.password=\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9 label.new.project=\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 -label.new.vm=\u65b0\u3057\u3044 VM label.new=\u65b0\u898f +label.new.vm=\u65b0\u3057\u3044 VM label.next=\u6b21\u3078 label.nexusVswitch=Nexus 1000V +label.nfs=NFS label.nfs.server=NFS \u30b5\u30fc\u30d0\u30fc label.nfs.storage=NFS \u30b9\u30c8\u30ec\u30fc\u30b8 -label.nfs=NFS label.nic.adapter.type=NIC \u30a2\u30c0\u30d7\u30bf\u30fc\u306e\u7a2e\u985e label.nicira.controller.address=\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc \u30a2\u30c9\u30ec\u30b9 label.nicira.l3gatewayserviceuuid=L3 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 \u30b5\u30fc\u30d3\u30b9\u306e UUID +label.nicira.nvp.details=Nicira NVP \u306e\u8a73\u7d30 label.nicira.transportzoneuuid=\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8 \u30be\u30fc\u30f3\u306e UUID -label.brocade.vcs.address=VCS \u30b9\u30a4\u30c3\u30c1 \u30a2\u30c9\u30ec\u30b9 label.nics=NIC label.no.actions=\u5b9f\u884c\u3067\u304d\u308b\u64cd\u4f5c\u306f\u3042\u308a\u307e\u305b\u3093 label.no.alerts=\u6700\u8fd1\u306e\u30a2\u30e9\u30fc\u30c8\u306f\u3042\u308a\u307e\u305b\u3093 label.no.data=\u8868\u793a\u3059\u308b\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093 label.no.errors=\u6700\u8fd1\u306e\u30a8\u30e9\u30fc\u306f\u3042\u308a\u307e\u305b\u3093 +label.no.grouping=(\u30b0\u30eb\u30fc\u30d7\u306a\u3057) label.no.isos=\u4f7f\u7528\u3067\u304d\u308b ISO \u306f\u3042\u308a\u307e\u305b\u3093 label.no.items=\u4f7f\u7528\u3067\u304d\u308b\u9805\u76ee\u306f\u3042\u308a\u307e\u305b\u3093 -label.no.security.groups=\u4f7f\u7528\u3067\u304d\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306f\u3042\u308a\u307e\u305b\u3093 -label.no.thanks=\u8a2d\u5b9a\u3057\u306a\u3044 -label.no=\u3044\u3044\u3048 label.none=\u306a\u3057 +label.no.security.groups=\u4f7f\u7528\u3067\u304d\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u306f\u3042\u308a\u307e\u305b\u3093 label.not.found=\u898b\u3064\u304b\u308a\u307e\u305b\u3093 +label.no.thanks=\u8a2d\u5b9a\u3057\u306a\u3044 label.notifications=\u901a\u77e5 -label.num.cpu.cores=CPU \u30b3\u30a2\u6570 +label.no=\u3044\u3044\u3048 label.number.of.clusters=\u30af\u30e9\u30b9\u30bf\u30fc\u6570 +label.number.of.cpu.sockets=CPU \u30bd\u30b1\u30c3\u30c8\u6570 label.number.of.hosts=\u30db\u30b9\u30c8\u6570 label.number.of.pods=\u30dd\u30c3\u30c9\u6570 label.number.of.system.vms=\u30b7\u30b9\u30c6\u30e0 VM \u6570 label.number.of.virtual.routers=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u6570 label.number.of.zones=\u30be\u30fc\u30f3\u6570 +label.num.cpu.cores=CPU \u30b3\u30a2\u6570 label.numretries=\u518d\u8a66\u884c\u56de\u6570 label.ocfs2=OCFS2 label.offer.ha=\u9ad8\u53ef\u7528\u6027\u3092\u63d0\u4f9b\u3059\u308b +label.of.month=\u6708\u6bce label.ok=OK +label.opendaylight.controllerdetail=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8a73\u7d30 +label.opendaylight.controller=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc +label.opendaylight.controllers=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc +label.openDaylight=OpenDaylight +label.operator=\u6f14\u7b97\u5b50 label.optional=\u30aa\u30d7\u30b7\u30e7\u30f3 label.order=\u9806\u5e8f label.os.preference=OS \u57fa\u672c\u8a2d\u5b9a label.os.type=OS \u306e\u7a2e\u985e -label.ovm3.vip=\u30de\u30b9\u30bf\u30fc VIP IP \u30a2\u30c9\u30ec\u30b9 -label.ovm3.pool=\u30cd\u30a4\u30c6\u30a3\u30d6 \u30d7\u30fc\u30ea\u30f3\u30b0 -label.ovm3.cluster=\u30cd\u30a4\u30c6\u30a3\u30d6 \u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0 +label.other=\u305d\u306e\u307b\u304b +label.override.guest.traffic=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b +label.override.public.traffic=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b +label.ovm3.cluster=\u30cd\u30a4\u30c6\u30a3\u30d6\u30af\u30e9\u30b9\u30bf\u30fc +label.ovm3.pool=\u30cd\u30a4\u30c6\u30a3\u30d6\u30d7\u30fc\u30eb +label.ovm3.vip=\u30de\u30b9\u30bf\u30fc VIP IP +label.ovm.traffic.label=OVM \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb +label.ovs=OVS label.owned.public.ips=\u6240\u6709\u3059\u308b\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 label.owner.account=\u6240\u6709\u8005\u30a2\u30ab\u30a6\u30f3\u30c8 label.owner.domain=\u6240\u6709\u8005\u30c9\u30e1\u30a4\u30f3 +label.palo.alto.details=Palo Alto \u306e\u8a73\u7d30 label.PA.log.profile=Palo Alto \u30ed\u30b0 \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb -label.PA.threat.profile=Palo Alto \u8105\u5a01\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb +label.PA=Palo Alto label.parent.domain=\u89aa\u30c9\u30e1\u30a4\u30f3 -label.password.enabled=\u30d1\u30b9\u30ef\u30fc\u30c9\u7ba1\u7406\u3092\u6709\u52b9\u306b\u3059\u308b +label.passive=\u30d1\u30c3\u30b7\u30d6 +label.password.enabled=\u30d1\u30b9\u30ef\u30fc\u30c9\u7ba1\u7406\u6709\u52b9 +label.password.lower=\u30d1\u30b9\u30ef\u30fc\u30c9 +label.password.reset.confirm=\u6b21\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3057\u305f\: label.password=\u30d1\u30b9\u30ef\u30fc\u30c9 +label.PA.threat.profile=Palo Alto \u8105\u5a01\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb label.path=\u30d1\u30b9 label.perfect.forward.secrecy=Perfect Forward Secrecy +label.persistent=\u6c38\u7d9a label.physical.network.ID=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ID label.physical.network=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.PING.CIFS.password=PING CIFS \u30d1\u30b9\u30ef\u30fc\u30c9 label.PING.CIFS.username=PING CIFS \u30e6\u30fc\u30b6\u30fc\u540d label.PING.dir=PING \u30c7\u30a3\u30ec\u30af\u30c8\u30ea +label.ping.path=Ping \u30d1\u30b9 label.PING.storage.IP=PING \u5bfe\u8c61\u306e\u30b9\u30c8\u30ec\u30fc\u30b8 IP \u30a2\u30c9\u30ec\u30b9 +label.planner.mode=\u30d7\u30e9\u30f3\u30ca\u30fc \u30e2\u30fc\u30c9 label.please.specify.netscaler.info=NetScaler \u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044 label.please.wait=\u304a\u5f85\u3061\u304f\u3060\u3055\u3044 label.plugin.details=\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a73\u7d30 label.plugins=\u30d7\u30e9\u30b0\u30a4\u30f3 +label.pod.dedicated=\u30dd\u30c3\u30c9\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f label.pod.name=\u30dd\u30c3\u30c9\u540d -label.pod=\u30dd\u30c3\u30c9 label.pods=\u30dd\u30c3\u30c9 +label.pod=\u30dd\u30c3\u30c9 +label.polling.interval.sec=\u30dd\u30fc\u30ea\u30f3\u30b0\u9593\u9694 (\u79d2) +label.portable.ip.range.details=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8a73\u7d30 +label.portable.ip.ranges=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 +label.portable.ips=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9 +label.portable.ip=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9 label.port.forwarding.policies=\u30dd\u30fc\u30c8\u8ee2\u9001\u30dd\u30ea\u30b7\u30fc label.port.forwarding=\u30dd\u30fc\u30c8\u8ee2\u9001 label.port.range=\u30dd\u30fc\u30c8\u306e\u7bc4\u56f2 +label.port=\u30dd\u30fc\u30c8 label.PreSetup=PreSetup -label.prev=\u623b\u308b label.previous=\u623b\u308b +label.prev=\u623b\u308b label.primary.allocated=\u5272\u308a\u5f53\u3066\u6e08\u307f\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 label.primary.network=\u30d7\u30e9\u30a4\u30de\u30ea \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.primary.storage.count=\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 \u30d7\u30fc\u30eb @@ -969,75 +1153,113 @@ label.primary.used=\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 label.private.Gateway=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.private.interface=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9 label.private.ip.range=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 -label.private.ip=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9 label.private.ips=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9 +label.private.ip=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9 +label.privatekey=PKCS\#8 \u79d8\u5bc6\u30ad\u30fc label.private.network=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.private.port=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30dd\u30fc\u30c8 label.private.zone=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30be\u30fc\u30f3 -label.privatekey=PKCS\#8 \u79d8\u5bc6\u30ad\u30fc +label.profile=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb label.project.dashboard=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9 label.project.id=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 ID label.project.invite=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u62db\u5f85 label.project.name=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d -label.project.view=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30d3\u30e5\u30fc -label.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 label.projects=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 +label.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 +label.project.view=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30d3\u30e5\u30fc +label.protocol.number=\u30d7\u30ed\u30c8\u30b3\u30eb\u756a\u53f7 label.protocol=\u30d7\u30ed\u30c8\u30b3\u30eb -label.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc label.providers=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc +label.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc label.public.interface=\u30d1\u30d6\u30ea\u30c3\u30af \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9 -label.public.ip=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 label.public.ips=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 +label.public.ip=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 +label.public.load.balancer.provider=\u30d1\u30d6\u30ea\u30c3\u30af \u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc label.public.network=\u30d1\u30d6\u30ea\u30c3\u30af \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.public.port=\u30d1\u30d6\u30ea\u30c3\u30af \u30dd\u30fc\u30c8 label.public.traffic=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af -label.public.zone=\u30d1\u30d6\u30ea\u30c3\u30af \u30be\u30fc\u30f3 +label.public.traffic.vswitch.name=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u540d +label.public.traffic.vswitch.type=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u306e\u7a2e\u985e label.public=\u30d1\u30d6\u30ea\u30c3\u30af +label.public.zone=\u30d1\u30d6\u30ea\u30c3\u30af \u30be\u30fc\u30f3 label.purpose=\u76ee\u7684 label.Pxe.server.type=PXE \u30b5\u30fc\u30d0\u30fc\u306e\u7a2e\u985e +label.qos.type=QoS \u306e\u7a2e\u985e label.quickview=\u30af\u30a4\u30c3\u30af\u30d3\u30e5\u30fc +label.quiesce.vm=VM \u3092\u4f11\u6b62\u3059\u308b +label.quiet.time.sec=\u5f85\u3061\u6642\u9593 (\u79d2) +label.rbd.id=Cephx \u30e6\u30fc\u30b6\u30fc +label.rbd.monitor=Ceph \u30e2\u30cb\u30bf\u30fc +label.rbd.pool=Ceph \u30d7\u30fc\u30eb +label.rbd=RBD +label.rbd.secret=Cephx \u30b7\u30fc\u30af\u30ec\u30c3\u30c8 label.reboot=\u518d\u8d77\u52d5 label.recent.errors=\u6700\u8fd1\u306e\u30a8\u30e9\u30fc +label.recover.vm=VM \u306e\u5fa9\u5143 label.redundant.router.capability=\u5197\u9577\u30eb\u30fc\u30bf\u30fc\u6a5f\u80fd label.redundant.router=\u5197\u9577\u30eb\u30fc\u30bf\u30fc -label.redundant.vpc=\u5197\u9577 VPC label.redundant.state=\u5197\u9577\u72b6\u614b +label.redundant.vpc=\u5197\u9577 VPC +label.refresh.blades=\u30d6\u30ec\u30fc\u30c9\u306e\u66f4\u65b0 label.refresh=\u66f4\u65b0 -label.region=\u9818\u57df +label.region.details=\u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u8a73\u7d30 +label.regionlevelvpc=\u30ea\u30fc\u30b8\u30e7\u30f3\u30ec\u30d9\u30eb\u306e VPC +label.region=\u30ea\u30fc\u30b8\u30e7\u30f3 +label.reinstall.vm=VM \u306e\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb label.related=\u95a2\u9023 +label.release.account.lowercase=\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u89e3\u653e +label.release.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u89e3\u653e +label.release.dedicated.cluster=\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u89e3\u653e +label.release.dedicated.host=\u5c02\u7528\u30db\u30b9\u30c8\u306e\u89e3\u653e +label.release.dedicated.pod=\u5c02\u7528\u30dd\u30c3\u30c9\u306e\u89e3\u653e +label.release.dedicated.vlan.range=\u5c02\u7528 VLAN \u306e\u7bc4\u56f2\u306e\u89e3\u653e +label.release.dedicated.zone=\u5c02\u7528\u30be\u30fc\u30f3\u306e\u89e3\u653e label.remind.later=\u30a2\u30e9\u30fc\u30e0\u3092\u8868\u793a\u3059\u308b label.remove.ACL=ACL \u306e\u524a\u9664 label.remove.egress.rule=\u9001\u4fe1\u898f\u5247\u306e\u524a\u9664 label.remove.from.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 label.remove.ingress.rule=\u53d7\u4fe1\u898f\u5247\u306e\u524a\u9664 label.remove.ip.range=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u524a\u9664 +label.remove.ldap=LDAP \u306e\u524a\u9664 +label.remove.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u524a\u9664 label.remove.pf=\u30dd\u30fc\u30c8\u8ee2\u9001\u898f\u5247\u306e\u524a\u9664 label.remove.project.account=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u524a\u9664 -label.remove.region=\u9818\u57df\u306e\u524a\u9664 +label.remove.region=\u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u524a\u9664 label.remove.rule=\u898f\u5247\u306e\u524a\u9664 label.remove.static.nat.rule=\u9759\u7684 NAT \u898f\u5247\u306e\u524a\u9664 label.remove.static.route=\u9759\u7684\u30eb\u30fc\u30c8\u306e\u524a\u9664 label.remove.tier=\u968e\u5c64\u306e\u524a\u9664 label.remove.vm.from.lb=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u898f\u5247\u304b\u3089\u306e VM \u306e\u524a\u9664 +label.remove.vm.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u304b\u3089\u306e VM \u306e\u524a\u9664 +label.remove.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u524a\u9664 +label.remove.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u524a\u9664 label.remove.vpc=VPC \u306e\u524a\u9664 -label.removing.user=\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 label.removing=\u524a\u9664\u3057\u3066\u3044\u307e\u3059 +label.removing.user=\u30e6\u30fc\u30b6\u30fc\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 +label.reource.id=\u30ea\u30bd\u30fc\u30b9 ID +label.replace.acl=ACL \u306e\u7f6e\u304d\u63db\u3048 +label.replace.acl.list=ACL \u4e00\u89a7\u306e\u7f6e\u304d\u63db\u3048 label.required=\u5fc5\u9808\u3067\u3059 +label.requires.upgrade=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981 +label.reserved.ip.range=\u4e88\u7d04\u6e08\u307f IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 label.reserved.system.gateway=\u4e88\u7d04\u6e08\u307f\u30b7\u30b9\u30c6\u30e0 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.reserved.system.ip=\u4e88\u7d04\u6e08\u307f\u30b7\u30b9\u30c6\u30e0 IP \u30a2\u30c9\u30ec\u30b9 label.reserved.system.netmask=\u4e88\u7d04\u6e08\u307f\u30b7\u30b9\u30c6\u30e0 \u30cd\u30c3\u30c8\u30de\u30b9\u30af +label.resetVM=VM \u306e\u30ea\u30bb\u30c3\u30c8 label.reset.VPN.connection=VPN \u63a5\u7d9a\u306e\u30ea\u30bb\u30c3\u30c8 label.resize.new.offering.id=\u65b0\u3057\u3044\u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -label.resize.new.size=\u65b0\u3057\u3044\u30b5\u30a4\u30ba (GB) +label.resize.new.size=\u65b0\u3057\u3044\u30b5\u30a4\u30ba(GB) label.resize.shrink.ok=\u7e2e\u5c0f\u53ef\u80fd\u306b\u3059\u308b +label.resource.limit.exceeded=\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u3092\u8d85\u904e\u3057\u307e\u3057\u305f label.resource.limits=\u30ea\u30bd\u30fc\u30b9\u5236\u9650 +label.resource.name=\u30ea\u30bd\u30fc\u30b9\u540d label.resource.state=\u30ea\u30bd\u30fc\u30b9\u306e\u72b6\u614b -label.resource=\u30ea\u30bd\u30fc\u30b9 label.resources=\u30ea\u30bd\u30fc\u30b9 +label.resource=\u30ea\u30bd\u30fc\u30b9 +label.response.timeout.in.sec=\u5fdc\u7b54\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 (\u79d2) label.restart.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u518d\u8d77\u52d5 label.restart.required=\u518d\u8d77\u52d5\u304c\u5fc5\u8981 label.restart.vpc=VPC \u306e\u518d\u8d77\u52d5 -message.restart.vpc.remark=VPC \u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?

\u6ce8: \u975e\u5197\u9577 VPC \u3092\u5197\u9577\u5316\u3059\u308b\u3068 \u5f37\u5236\u7684\u306b\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u6570\u5206\u9593\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002

label.restore=\u5fa9\u5143 label.retry.interval=\u518d\u8a66\u884c\u9593\u9694 label.review=\u78ba\u8a8d @@ -1046,6 +1268,11 @@ label.role=\u5f79\u5272 label.root.certificate=\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8 label.root.disk.controller=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc label.root.disk.offering=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 +label.root.disk.size=\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba +label.router.vm.scaled.up=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f +label.routing.host=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30db\u30b9\u30c8 +label.routing=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 +label.rule.number=\u898f\u5247\u756a\u53f7 label.rules=\u898f\u5247 label.running.vms=\u5b9f\u884c\u4e2d\u306e VM label.s3.access_key=\u30a2\u30af\u30bb\u30b9 \u30ad\u30fc @@ -1053,6 +1280,8 @@ label.s3.bucket=\u30d0\u30b1\u30c3\u30c8 label.s3.connection_timeout=\u63a5\u7d9a\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 label.s3.endpoint=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 label.s3.max_error_retry=\u6700\u5927\u30a8\u30e9\u30fc\u518d\u8a66\u884c\u6570 +label.s3.nfs.path=S3 NFS \u30d1\u30b9 +label.s3.nfs.server=S3 NFS \u30b5\u30fc\u30d0\u30fc label.s3.secret_key=\u79d8\u5bc6\u30ad\u30fc label.s3.socket_timeout=\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 label.s3.use_https=HTTPS \u3092\u4f7f\u7528\u3059\u308b @@ -1060,19 +1289,24 @@ label.saturday=\u571f\u66dc\u65e5 label.save.and.continue=\u4fdd\u5b58\u3057\u3066\u7d9a\u884c label.save=\u4fdd\u5b58 label.saving.processing=\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059... +label.scale.up.policy=\u30b5\u30a4\u30ba\u62e1\u5927\u30dd\u30ea\u30b7\u30fc label.scope=\u30b9\u30b3\u30fc\u30d7 label.search=\u691c\u7d22 +label.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP +label.secondary.isolated.vlan.id=\u5206\u96e2\u3055\u308c\u305f\u30bb\u30ab\u30f3\u30c0\u30ea VLAN ID +label.secondary.staging.store.details=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u8a73\u7d30 +label.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2 label.secondary.storage.count=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 \u30d7\u30fc\u30eb +label.secondary.storage.details=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u8a73\u7d30 label.secondary.storage.limits=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u5236\u9650 (GiB) -label.secondary.storage.vm=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 VM label.secondary.storage=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 +label.secondary.storage.vm=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 VM label.secondary.used=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u4f7f\u7528\u91cf label.secret.key=\u79d8\u5bc6\u30ad\u30fc label.security.group.name=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u540d -label.security.group=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.security.groups.enabled=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u6709\u52b9 label.security.groups=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 -label.select-view=\u30d3\u30e5\u30fc\u306e\u9078\u629e +label.security.group=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 label.select.a.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9078\u629e label.select.a.zone=\u30be\u30fc\u30f3\u306e\u9078\u629e label.select.instance.to.attach.volume.to=\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u30a2\u30bf\u30c3\u30c1\u3059\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044 @@ -1080,39 +1314,56 @@ label.select.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u9078\u629e label.select.iso.or.template=ISO \u307e\u305f\u306f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9078\u629e label.select.offering=\u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u9078\u629e label.select.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u9078\u629e +label.select.region=\u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u9078\u629e +label.select.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9078\u629e label.select.tier=\u968e\u5c64\u306e\u9078\u629e -label.select.vm.for.static.nat=\u9759\u7684 NAT \u7528 VM \u306e\u9078\u629e label.select=\u9078\u629e +label.select-view=\u30d3\u30e5\u30fc\u306e\u9078\u629e +label.select.vm.for.static.nat=\u9759\u7684 NAT \u7528 VM \u306e\u9078\u629e label.sent=\u9001\u4fe1\u6e08\u307f label.server=\u30b5\u30fc\u30d0\u30fc label.service.capabilities=\u30b5\u30fc\u30d3\u30b9\u306e\u6a5f\u80fd label.service.offering=\u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 +label.service.state=\u30b5\u30fc\u30d3\u30b9\u306e\u72b6\u614b +label.services=\u30b5\u30fc\u30d3\u30b9 label.session.expired=\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u6709\u52b9\u671f\u9650\u304c\u5207\u308c\u307e\u3057\u305f -label.set.up.zone.type=\u30be\u30fc\u30f3\u306e\u7a2e\u985e\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 -label.setup.network=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 -label.setup.zone=\u30be\u30fc\u30f3\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 +label.set.default.NIC=\u30c7\u30d5\u30a9\u30eb\u30c8 NIC \u306e\u8a2d\u5b9a +label.settings=\u8a2d\u5b9a label.setup=\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 -label.shared=\u5171\u6709 +label.set.up.zone.type=\u30be\u30fc\u30f3\u306e\u7a2e\u985e\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 label.SharedMountPoint=SharedMountPoint +label.shared=\u5171\u6709 +label.show.advanced.settings=\u8a73\u7d30\u8a2d\u5b9a\u306e\u8868\u793a label.show.ingress.rule=\u53d7\u4fe1\u898f\u5247\u306e\u8868\u793a label.shutdown.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3 +label.simplified.chinese.keyboard=\u7c21\u6613\u4e2d\u56fd\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9 label.site.to.site.VPN=\u30b5\u30a4\u30c8\u9593 VPN label.size=\u30b5\u30a4\u30ba label.skip.guide=CloudStack \u3092\u4f7f\u7528\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3092\u30b9\u30ad\u30c3\u30d7\u3059\u308b +label.smb.domain=SMB \u30c9\u30e1\u30a4\u30f3 +label.smb.password=SMB \u30d1\u30b9\u30ef\u30fc\u30c9 +label.smb.username=SMB \u30e6\u30fc\u30b6\u30fc\u540d label.snapshot.limits=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u5236\u9650 label.snapshot.name=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u540d label.snapshot.s=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 -label.snapshot.schedule=\u5b9a\u671f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 -label.snapshot=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 label.snapshots=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 +label.snapshot=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 +label.SNMP.community=SNMP \u30b3\u30df\u30e5\u30cb\u30c6\u30a3 +label.SNMP.port=SNMP \u30dd\u30fc\u30c8 +label.sockets=CPU \u30bd\u30b1\u30c3\u30c8 +label.source.ip.address=\u9001\u4fe1\u5143 IP \u30a2\u30c9\u30ec\u30b9 +label.source.nat.supported=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u9001\u4fe1\u5143 NAT label.source.nat=\u9001\u4fe1\u5143 NAT +label.source.port=\u9001\u4fe1\u5143\u30dd\u30fc\u30c8 label.specify.IP.ranges=IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u6307\u5b9a label.specify.vlan=VLAN \u3092\u6307\u5b9a\u3059\u308b label.specify.vxlan=VXLAN \u3092\u6307\u5b9a\u3059\u308b label.SR.name=SR \u540d\u30e9\u30d9\u30eb +label.srx.details=SRX \u306e\u8a73\u7d30 label.srx=SRX -label.PA=Palo Alto +label.standard.us.keyboard=\u6a19\u6e96(US) \u30ad\u30fc\u30dc\u30fc\u30c9 label.start.IP=\u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 +label.start.lb.vm=LB VM \u306e\u8d77\u52d5 label.start.port=\u958b\u59cb\u30dd\u30fc\u30c8 label.start.reserved.system.IP=\u4e88\u7d04\u6e08\u307f\u958b\u59cb\u30b7\u30b9\u30c6\u30e0 IP \u30a2\u30c9\u30ec\u30b9 label.start.vlan=\u958b\u59cb VLAN @@ -1120,8 +1371,8 @@ label.start.vxlan=\u958b\u59cb VXLAN label.state=\u72b6\u614b label.static.nat.enabled=\u9759\u7684 NAT \u6709\u52b9 label.static.nat.to=\u9759\u7684 NAT \u306e\u8a2d\u5b9a\u5148\: -label.static.nat.vm.details=\u9759\u7684 NAT VM \u306e\u8a73\u7d30 label.static.nat=\u9759\u7684 NAT +label.static.nat.vm.details=\u9759\u7684 NAT VM \u306e\u8a73\u7d30 label.statistics=\u7d71\u8a08 label.status=\u72b6\u6cc1 label.step.1.title=\u624b\u9806 1\: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9078\u629e @@ -1134,6 +1385,7 @@ label.step.4.title=\u624b\u9806 4\: \u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.step.4=\u624b\u9806 4 label.step.5.title=\u624b\u9806 5\: \u78ba\u8a8d label.step.5=\u624b\u9806 5 +label.stickiness.method=\u6301\u7d9a\u6027\u65b9\u6cd5 label.stickiness=\u6301\u7d9a\u6027 label.sticky.cookie-name=Cookie \u540d label.sticky.domain=\u30c9\u30e1\u30a4\u30f3 @@ -1142,84 +1394,110 @@ label.sticky.holdtime=\u4fdd\u6301\u6642\u9593 label.sticky.indirect=\u9593\u63a5 label.sticky.length=\u9577\u3055 label.sticky.mode=\u30e2\u30fc\u30c9 +label.sticky.name=\u30b9\u30c6\u30a3\u30c3\u30ad\u30fc\u540d label.sticky.nocache=\u30ad\u30e3\u30c3\u30b7\u30e5\u306a\u3057 label.sticky.postonly=\u30dd\u30b9\u30c8\u306e\u307f label.sticky.prefix=\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9 label.sticky.request-learn=\u30e9\u30fc\u30cb\u30f3\u30b0\u306e\u8981\u6c42 label.sticky.tablesize=\u30c6\u30fc\u30d6\u30eb \u30b5\u30a4\u30ba -label.stop=\u505c\u6b62 +label.stop.lb.vm=LB VM \u306e\u505c\u6b62 label.stopped.vms=\u505c\u6b62\u4e2d\u306e VM +label.stop=\u505c\u6b62 +label.storage.pool=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30d7\u30fc\u30eb label.storage.tags=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30bf\u30b0 label.storage.traffic=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af label.storage.type=\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u7a2e\u985e -label.qos.type=QoS \u306e\u7a2e\u985e -label.cache.mode=\u66f8\u304d\u8fbc\u307f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7a2e\u985e label.storage=\u30b9\u30c8\u30ec\u30fc\u30b8 label.subdomain.access=\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3 \u30a2\u30af\u30bb\u30b9 -label.submit=\u9001\u4fe1 label.submitted.by=[\u9001\u4fe1\u30e6\u30fc\u30b6\u30fc\: ] +label.submit=\u9001\u4fe1 label.succeeded=\u6210\u529f label.sunday=\u65e5\u66dc\u65e5 label.super.cidr.for.guest.networks=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30b9\u30fc\u30d1\u30fc CIDR label.supported.services=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30b5\u30fc\u30d3\u30b9 label.supported.source.NAT.type=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u9001\u4fe1\u5143 NAT \u306e\u7a2e\u985e +label.supportsstrechedl2subnet=\u30b9\u30c8\u30ec\u30c3\u30c1 L2 \u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b label.suspend.project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4e00\u6642\u505c\u6b62 +label.switch.type=\u30b9\u30a4\u30c3\u30c1\u306e\u7a2e\u985e label.system.capacity=\u30b7\u30b9\u30c6\u30e0\u306e\u51e6\u7406\u80fd\u529b +label.system.offering.for.router=\u30eb\u30fc\u30bf\u30fc\u7528\u30b7\u30b9\u30c6\u30e0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.system.offering=\u30b7\u30b9\u30c6\u30e0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.system.service.offering=\u30b7\u30b9\u30c6\u30e0 \u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 +label.system.vm.details=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u8a73\u7d30 +label.system.vm.scaled.up=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f +label.system.vms=\u30b7\u30b9\u30c6\u30e0 VM label.system.vm.type=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u7a2e\u985e label.system.vm=\u30b7\u30b9\u30c6\u30e0 VM -label.system.vms=\u30b7\u30b9\u30c6\u30e0 VM label.system.wide.capacity=\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u51e6\u7406\u80fd\u529b label.tagged=\u30bf\u30b0\u3042\u308a +label.tag.key=\u30bf\u30b0 \u30ad\u30fc label.tags=\u30bf\u30b0 +label.tag.value=\u30bf\u30b0\u5024 label.target.iqn=\u30bf\u30fc\u30b2\u30c3\u30c8 IQN label.task.completed=\u30bf\u30b9\u30af\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f label.template.limits=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5236\u9650 label.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 label.TFTP.dir=TFTP \u30c7\u30a3\u30ec\u30af\u30c8\u30ea +label.tftp.root.directory=TFTP \u30eb\u30fc\u30c8 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea label.theme.default=\u30c7\u30d5\u30a9\u30eb\u30c8 \u30c6\u30fc\u30de label.theme.grey=\u30ab\u30b9\u30bf\u30e0 - \u30b0\u30ec\u30fc label.theme.lightblue=\u30ab\u30b9\u30bf\u30e0 - \u30e9\u30a4\u30c8 \u30d6\u30eb\u30fc +label.threshold=\u3057\u304d\u3044\u5024 label.thursday=\u6728\u66dc\u65e5 label.tier.details=\u968e\u5c64\u306e\u8a73\u7d30 label.tier=\u968e\u5c64 -label.time.zone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3 -label.time=\u6642\u523b -label.timeout.in.second = \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 (\u79d2) +label.time.colon=\u6642\u9593\: +label.timeout.in.second = \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u5024(\u79d2) label.timeout=\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 +label.time=\u6642\u9593 +label.timezone.colon=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\: +label.time.zone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3 label.timezone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3 label.token=\u30c8\u30fc\u30af\u30f3 -label.total.CPU=CPU \u5408\u8a08 label.total.cpu=CPU \u5408\u8a08 +label.total.CPU=CPU \u5408\u8a08 label.total.hosts=\u30db\u30b9\u30c8\u5408\u8a08 label.total.memory=\u30e1\u30e2\u30ea\u5408\u8a08 -label.total.of.ip=IP \u30a2\u30c9\u30ec\u30b9\u5408\u8a08 +label.total.of.ip=\u5168 IP \u30a2\u30c9\u30ec\u30b9\u6570 label.total.of.vm=VM \u5408\u8a08 label.total.storage=\u30b9\u30c8\u30ec\u30fc\u30b8\u5408\u8a08 +label.total.virtual.routers=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u5408\u8a08 +label.total.virtual.routers.upgrade=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981\u306a\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u5408\u8a08 label.total.vms=VM \u5408\u8a08 label.traffic.label=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb -label.traffic.type=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e label.traffic.types=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e +label.traffic.type=\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e label.tuesday=\u706b\u66dc\u65e5 label.type.id=\u7a2e\u985e ID +label.type.lower=\u7a2e\u985e label.type=\u7a2e\u985e +label.ucs=UCS +label.uk.keyboard=UK \u30ad\u30fc\u30dc\u30fc\u30c9 label.unavailable=\u4f7f\u7528\u4e0d\u80fd +label.unhealthy.threshold=\u7570\u5e38\u3057\u304d\u3044\u5024 label.unlimited=\u7121\u5236\u9650 label.untagged=\u30bf\u30b0\u306a\u3057 label.update.project.resources=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30ea\u30bd\u30fc\u30b9\u306e\u66f4\u65b0 label.update.ssl.cert= SSL \u8a3c\u660e\u66f8 label.update.ssl= SSL \u8a3c\u660e\u66f8 label.updating=\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059 -label.upload.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 +label.upgrade.required=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3059 +label.upgrade.router.newer.template=\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b label.upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 +label.upload.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 label.url=URL label.usage.interface=\u4f7f\u7528\u72b6\u6cc1\u6e2c\u5b9a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9 -label.use.vm.ip=\u6b21\u306e VM IP \u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u7528\: +label.usage.sanity.result=\u4f7f\u7528\u72b6\u6cc1\u30b5\u30cb\u30c6\u30a3\u7d50\u679c +label.usage.server=\u4f7f\u7528\u72b6\u6cc1\u6e2c\u5b9a\u30b5\u30fc\u30d0\u30fc label.used=\u4f7f\u7528\u4e2d -label.user=\u30e6\u30fc\u30b6\u30fc +label.user.data=\u30e6\u30fc\u30b6\u30fc \u30c7\u30fc\u30bf +label.username.lower=\u30e6\u30fc\u30b6\u30fc\u540d label.username=\u30e6\u30fc\u30b6\u30fc\u540d label.users=\u30e6\u30fc\u30b6\u30fc +label.user=\u30e6\u30fc\u30b6\u30fc +label.user.vm=\u30e6\u30fc\u30b6\u30fc VM +label.use.vm.ips=\u6b21\u306e VM IP \u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u7528 +label.use.vm.ip=\u6b21\u306e VM IP \u30a2\u30c9\u30ec\u30b9\u3092\u4f7f\u7528\: label.value=\u5024 label.vcdcname=vCenter DC \u540d label.vcenter.cluster=vCenter \u30af\u30e9\u30b9\u30bf\u30fc @@ -1228,396 +1506,135 @@ label.vcenter.datastore=vCenter \u30c7\u30fc\u30bf\u30b9\u30c8\u30a2 label.vcenter.host=vCenter \u30db\u30b9\u30c8 label.vcenter.password=vCenter \u30d1\u30b9\u30ef\u30fc\u30c9 label.vcenter.username=vCenter \u30e6\u30fc\u30b6\u30fc\u540d +label.vcenter=vCenter label.vcipaddress=vCenter IP \u30a2\u30c9\u30ec\u30b9 label.version=\u30d0\u30fc\u30b8\u30e7\u30f3 +label.vgpu.max.resolution=\u6700\u5927\u89e3\u50cf\u5ea6 +label.vgpu.max.vgpu.per.gpu=GPU \u3042\u305f\u308a\u306e vGPU \u6570 +label.vgpu.remaining.capacity=\u6b8b\u5b58\u51e6\u7406\u80fd\u529b +label.vgpu.type=vGPU \u306e\u7a2e\u985e +label.vgpu=VGPU +label.vgpu.video.ram=\u30d3\u30c7\u30aa RAM label.view.all=\u3059\u3079\u3066\u8868\u793a label.view.console=\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u8868\u793a -label.view.more=\u8a73\u7d30\u8868\u793a -label.view=\u8868\u793a - label.viewing=\u8868\u793a\u9805\u76ee\: -label.virtual.appliance=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9 +label.view.more=\u8a73\u7d30\u8868\u793a +label.view.secondary.ips=\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306e\u8868\u793a +label.view=\u8868\u793a - +label.virtual.appliance.details=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9\u306e\u8a73\u7d30 label.virtual.appliances=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9 +label.virtual.appliance=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9 label.virtual.machines=\u4eee\u60f3\u30de\u30b7\u30f3 label.virtual.machine=\u4eee\u60f3\u30de\u30b7\u30f3 +label.virtual.networking=\u4eee\u60f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af label.virtual.network=\u4eee\u60f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af -label.virtual.router=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc +label.virtual.routers.group.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 +label.virtual.routers.group.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 +label.virtual.routers.group.pod=\u30dd\u30c3\u30c9\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 +label.virtual.routers.group.zone=\u30be\u30fc\u30f3\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 label.virtual.routers=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc +label.virtual.router=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc label.vlan.id=VLAN/VNI ID +label.vlan.only=VLAN +label.vlan.range.details=VLAN \u306e\u7bc4\u56f2\u306e\u8a73\u7d30 +label.vlan.ranges=VLAN \u306e\u7bc4\u56f2 label.vlan.range=VLAN/VNI \u306e\u7bc4\u56f2 -label.vlan=VLAN/VNI -label.vnet=VLAN/VNI -label.vnet.id=VLAN/VNI ID -label.vxlan.id=VXLAN ID -label.vxlan.range=VXLAN \u306e\u7bc4\u56f2 -label.vxlan=VXLAN +label.vlan=VLAN +label.vlan.vni.ranges=VLAN/VNI \u306e\u7bc4\u56f2 +label.vlan.vni.range=VLAN/VNI \u306e\u7bc4\u56f2 label.vm.add=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u8ffd\u52a0 label.vm.destroy=\u7834\u68c4 label.vm.display.name=VM \u8868\u793a\u540d -label.vm.name=VM \u540d -label.vm.reboot=\u518d\u8d77\u52d5 -label.vm.start=\u8d77\u52d5 -label.vm.state=VM \u306e\u72b6\u614b -label.vm.stop=\u505c\u6b62 label.VMFS.datastore=VMFS \u30c7\u30fc\u30bf\u30b9\u30c8\u30a2 label.vmfs=VMFS +label.vm.id=VM ID +label.vm.ip=VM IP \u30a2\u30c9\u30ec\u30b9 +label.vm.name=VM \u540d +label.vm.password=VM \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\: +label.vm.reboot=\u518d\u8d77\u52d5 label.VMs.in.tier=\u968e\u5c64\u5185\u306e VM -label.vms=VM label.vmsnapshot.current=\u4f7f\u7528\u4e2d label.vmsnapshot.memory=\u30e1\u30e2\u30ea\u3082\u542b\u3081\u308b label.vmsnapshot.parentname=\u89aa label.vmsnapshot.type=\u7a2e\u985e label.vmsnapshot=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 +label.vm.start=\u8d77\u52d5 +label.vm.state=VM \u306e\u72b6\u614b +label.vm.stop=\u505c\u6b62 +label.vms=VM +label.vmware.datacenter.id=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc ID +label.vmware.datacenter.name=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u540d +label.vmware.datacenter.vcenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e vCenter label.vmware.traffic.label=VMware \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb +label.vnet.id=VLAN/VNI ID +label.vnet=VLAN/VNI +label.vnmc.devices=VNMC \u30c7\u30d0\u30a4\u30b9 +label.vnmc=VNMC +label.volatile=\u63ee\u767a\u6027 label.volgroup=\u30dc\u30ea\u30e5\u30fc\u30e0 \u30b0\u30eb\u30fc\u30d7 +label.volume.details=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u8a73\u7d30 label.volume.limits=\u30dc\u30ea\u30e5\u30fc\u30e0\u5236\u9650 +label.volume.migrated=\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u79fb\u884c\u3055\u308c\u307e\u3057\u305f label.volume.name=\u30dc\u30ea\u30e5\u30fc\u30e0\u540d -label.volume=\u30dc\u30ea\u30e5\u30fc\u30e0 label.volumes=\u30dc\u30ea\u30e5\u30fc\u30e0 +label.volume=\u30dc\u30ea\u30e5\u30fc\u30e0 +label.vpc.distributedvpcrouter=\u5206\u6563 VPC \u30eb\u30fc\u30bf\u30fc label.vpc.id=VPC ID +label.VPC.limits=VPC \u5236\u9650 +label.vpc.offering.details=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8a73\u7d30 +label.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 label.VPC.router.details=VPC \u30eb\u30fc\u30bf\u30fc\u306e\u8a73\u7d30 +label.vpc.supportsregionlevelvpc=\u30ea\u30fc\u30b8\u30e7\u30f3\u30ec\u30d9\u30eb\u306e VPC \u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b +label.vpc.virtual.router=VPC \u4eee\u60f3\u30eb\u30fc\u30bf\u30fc label.vpc=VPC label.VPN.connection=VPN \u63a5\u7d9a -label.VPN.customer.gateway=VPN \u30ab\u30b9\u30bf\u30de\u30fc \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.vpn.customer.gateway=VPN \u30ab\u30b9\u30bf\u30de\u30fc \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 +label.VPN.customer.gateway=VPN \u30ab\u30b9\u30bf\u30de\u30fc \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.VPN.gateway=VPN \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 label.vpn=VPN label.vsmctrlvlanid=\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb VLAN ID label.vsmpktvlanid=\u30d1\u30b1\u30c3\u30c8 VLAN ID label.vsmstoragevlanid=\u30b9\u30c8\u30ec\u30fc\u30b8 VLAN ID label.vsphere.managed=vSphere \u306b\u3088\u308b\u7ba1\u7406 +label.vswitch.name=vSwitch \u540d +label.vSwitch.type=vSwitch \u306e\u7a2e\u985e +label.vxlan.id=VXLAN ID +label.vxlan.range=VXLAN \u306e\u7bc4\u56f2 +label.vxlan=VXLAN label.waiting=\u5f85\u6a5f\u3057\u3066\u3044\u307e\u3059 +label.warning=\u6ce8\u610f label.warn=\u8b66\u544a -label.warning=\u8b66\u544a +label.warn.upper=\u8b66\u544a label.wednesday=\u6c34\u66dc\u65e5 label.weekly=\u6bce\u9031 label.welcome.cloud.console=\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb\u3078\u3088\u3046\u3053\u305d label.welcome=\u3088\u3046\u3053\u305d -label.what.is.cloudstack=CloudStack&\#8482 \u306b\u3064\u3044\u3066 +label.what.is.cloudstack=CloudStack&\#8482; \u306b\u3064\u3044\u3066 +label.xenserver.tools.version.61.plus=\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d +label.Xenserver.Tools.Version61plus=\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d label.xenserver.traffic.label=XenServer \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb label.yes=\u306f\u3044 +label.zone.dedicated=\u5c02\u7528\u30be\u30fc\u30f3 label.zone.details=\u30be\u30fc\u30f3\u306e\u8a73\u7d30 label.zone.id=\u30be\u30fc\u30f3 ID +label.zone.lower=\u30be\u30fc\u30f3 +label.zone.name=\u30be\u30fc\u30f3\u540d label.zone.step.1.title=\u624b\u9806 1\: \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u9078\u629e label.zone.step.2.title=\u624b\u9806 2\: \u30be\u30fc\u30f3\u306e\u8ffd\u52a0 label.zone.step.3.title=\u624b\u9806 3\: \u30dd\u30c3\u30c9\u306e\u8ffd\u52a0 label.zone.step.4.title=\u624b\u9806 4\: IP \u30a2\u30c9\u30ec\u30b9\u7bc4\u56f2\u306e\u8ffd\u52a0 -label.zone.type=\u30be\u30fc\u30f3\u306e\u7a2e\u985e -label.zone.wide=\u30be\u30fc\u30f3\u5168\u4f53 -label.zone=\u30be\u30fc\u30f3 label.zones=\u30be\u30fc\u30f3 +label.zone.type=\u30be\u30fc\u30f3\u306e\u7a2e\u985e +label.zone=\u30be\u30fc\u30f3 +label.zone.wide=\u30be\u30fc\u30f3\u5168\u4f53 label.zoneWizard.trafficType.guest=\u30b2\u30b9\u30c8\: \u30a8\u30f3\u30c9 \u30e6\u30fc\u30b6\u30fc\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u9593\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3067\u3059\u3002 label.zoneWizard.trafficType.management=\u7ba1\u7406\: \u30db\u30b9\u30c8\u3084 CloudStack \u30b7\u30b9\u30c6\u30e0 VM \u306a\u3069\u3001\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3068\u901a\u4fe1\u3059\u308b CloudStack \u306e\u5185\u90e8\u30ea\u30bd\u30fc\u30b9\u9593\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3067\u3059\u3002 label.zoneWizard.trafficType.public=\u30d1\u30d6\u30ea\u30c3\u30af\: \u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3068\u30af\u30e9\u30a6\u30c9\u5185\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u9593\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3067\u3059\u3002 label.zoneWizard.trafficType.storage=\u30b9\u30c8\u30ec\u30fc\u30b8\: VM \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3084\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306a\u3069\u3001\u30d7\u30e9\u30a4\u30de\u30ea\u304a\u3088\u3073\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 \u30b5\u30fc\u30d0\u30fc\u9593\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3067\u3059\u3002 -label.ldap.group.name=LDAP \u30b0\u30eb\u30fc\u30d7 -label.password.reset.confirm=\u6b21\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3057\u305f\: -label.provider=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc -label.resetVM=VM \u306e\u30ea\u30bb\u30c3\u30c8 -label.openDaylight=OpenDaylight -label.assign.instance.another=\u307b\u304b\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3078\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5272\u308a\u5f53\u3066 -label.network.addVM=VM \u3078\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 -label.set.default.NIC=\u30c7\u30d5\u30a9\u30eb\u30c8 NIC \u306e\u8a2d\u5b9a -label.Xenserver.Tools.Version61plus=\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d -label.supportsstrechedl2subnet=\u30b9\u30c8\u30ec\u30c3\u30c1 L2 \u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b -label.menu.vpc.offerings=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -label.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -label.regionlevelvpc=\u9818\u57df\u30ec\u30d9\u30eb\u306e VPC -label.add.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8ffd\u52a0 -label.distributedrouter=\u5206\u6563\u30eb\u30fc\u30bf\u30fc -label.vpc.offering.details=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u8a73\u7d30 -label.disable.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u7121\u52b9\u5316 -label.enable.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u6709\u52b9\u5316 -label.remove.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u524a\u9664 -label.vpc.distributedvpcrouter=\u5206\u6563 VPC \u30eb\u30fc\u30bf\u30fc -label.vpc.supportsregionlevelvpc=\u9818\u57df\u30ec\u30d9\u30eb\u306e VPC \u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b -label.dynamically.scalable=\u52d5\u7684\u306b\u30b5\u30a4\u30ba\u8a2d\u5b9a\u3059\u308b -label.instance.scaled.up=\u8981\u6c42\u3055\u308c\u305f\u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u307e\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f -label.tag.key=\u30bf\u30b0 \u30ad\u30fc -label.tag.value=\u30bf\u30b0\u5024 -label.ipv6.address=IPv6 IP \u30a2\u30c9\u30ec\u30b9 -label.ipv6.gateway=IPv6 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 -label.ipv6.CIDR=IPv6 CIDR -label.VPC.limits=VPC \u5236\u9650 -label.edit.region=\u9818\u57df\u306e\u7de8\u96c6 -label.gslb.domain.name=GSLB \u30c9\u30e1\u30a4\u30f3\u540d -label.add.gslb=GSLB \u306e\u8ffd\u52a0 -label.gslb.servicetype=\u30b5\u30fc\u30d3\u30b9\u306e\u7a2e\u985e -label.gslb.details=GSLB \u306e\u8a73\u7d30 -label.gslb.delete=GSLB \u306e\u524a\u9664 -label.opendaylight.controller=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc -label.opendaylight.controllers=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc -label.portable.ip.ranges=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 -label.add.portable.ip.range=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8ffd\u52a0 -label.delete.portable.ip.range=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u524a\u9664 -label.opendaylight.controllerdetail=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8a73\u7d30 -label.portable.ip.range.details=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306e\u8a73\u7d30 -label.portable.ips=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9 -label.gslb.assigned.lb=\u5272\u308a\u5f53\u3066\u6e08\u307f\u8ca0\u8377\u5206\u6563 -label.gslb.assigned.lb.more=\u8ca0\u8377\u5206\u6563\u306e\u8ffd\u52a0\u5272\u308a\u5f53\u3066 -label.gslb.lb.rule=\u8ca0\u8377\u5206\u6563\u898f\u5247 -label.gslb.lb.details=\u8ca0\u8377\u5206\u6563\u306e\u8a73\u7d30 -label.gslb.lb.remove=\u3053\u306e GSLB \u304b\u3089\u8ca0\u8377\u5206\u6563\u3092\u524a\u9664 -label.enable.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a\u306e\u6709\u52b9\u5316 -label.disable.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a\u306e\u7121\u52b9\u5316 -label.min.instances=\u6700\u5c0f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570 -label.max.instances=\u6700\u5927\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u6570 -label.add.OpenDaylight.device=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8ffd\u52a0 -label.show.advanced.settings=\u8a73\u7d30\u8a2d\u5b9a\u306e\u8868\u793a -label.delete.OpenDaylight.device=OpenDaylight \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u524a\u9664 -label.polling.interval.sec=\u30dd\u30fc\u30ea\u30f3\u30b0\u9593\u9694 (\u79d2) -label.quiet.time.sec=\u5f85\u3061\u6642\u9593 (\u79d2) -label.destroy.vm.graceperiod=VM \u7834\u68c4\u306e\u7336\u4e88\u671f\u9593 -label.SNMP.community=SNMP \u30b3\u30df\u30e5\u30cb\u30c6\u30a3 -label.SNMP.port=SNMP \u30dd\u30fc\u30c8 -label.add.ucs.manager=UCS Manager \u306e\u8ffd\u52a0 -label.ovm.traffic.label=OVM \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb -label.lxc.traffic.label=LXC \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb -label.hyperv.traffic.label=Hyper-V \u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb -label.resource.name=\u30ea\u30bd\u30fc\u30b9\u540d -label.reource.id=\u30ea\u30bd\u30fc\u30b9 ID -label.vnmc.devices=VNMC \u30c7\u30d0\u30a4\u30b9 -label.add.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u8ffd\u52a0 -label.enable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u6709\u52b9\u5316 -label.add.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 -label.ciscovnmc.resource.details=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u306e\u8a73\u7d30 -label.delete.ciscovnmc.resource=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u306e\u524a\u9664 -label.enable.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u6709\u52b9\u5316 -label.disbale.vnmc.device=VNMC \u30c7\u30d0\u30a4\u30b9\u306e\u7121\u52b9\u5316 -label.disable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u7121\u52b9\u5316 -label.services=\u30b5\u30fc\u30d3\u30b9 -label.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2 -label.release.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u89e3\u653e -label.release.account.lowercase=\u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u89e3\u653e -label.vlan.vni.ranges=VLAN/VNI \u306e\u7bc4\u56f2 -label.dedicated.vlan.vni.ranges=\u5c02\u7528 VLAN/VNI \u306e\u7bc4\u56f2 -label.dedicate.vlan.vni.range=VLAN/VNI \u306e\u7bc4\u56f2\u3092\u5c02\u7528\u306b\u8a2d\u5b9a -label.vlan.vni.range=VLAN/VNI \u306e\u7bc4\u56f2 -label.vlan.range.details=VLAN \u306e\u7bc4\u56f2\u306e\u8a73\u7d30 -label.release.dedicated.vlan.range=\u5c02\u7528 VLAN \u306e\u7bc4\u56f2\u306e\u89e3\u653e -label.broadcat.uri=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 URI -label.ipv4.cidr=IPv4 CIDR -label.guest.network.details=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a73\u7d30 -label.ipv4.gateway=IPv4 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 -label.release.dedicated.vlan.range=\u5c02\u7528 VLAN \u306e\u7bc4\u56f2\u306e\u89e3\u653e -label.vlan.ranges=VLAN \u306e\u7bc4\u56f2 -label.virtual.appliance.details=\u4eee\u60f3\u30a2\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9\u306e\u8a73\u7d30 -label.start.lb.vm=LB VM \u306e\u8d77\u52d5 -label.stop.lb.vm=LB VM \u306e\u505c\u6b62 -label.migrate.lb.vm=LB VM \u306e\u79fb\u884c -label.vpc.virtual.router=VPC \u4eee\u60f3\u30eb\u30fc\u30bf\u30fc -label.ovs=OVS -label.gslb.service=GSLB \u30b5\u30fc\u30d3\u30b9 -label.gslb.service.public.ip=GSLB \u30b5\u30fc\u30d3\u30b9\u306e\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 -label.gslb.service.private.ip=GSLB \u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9 -label.baremetal.dhcp.provider=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc -label.add.baremetal.dhcp.device=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 -label.baremetal.pxe.provider=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc -label.baremetal.pxe.device=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30c7\u30d0\u30a4\u30b9\u306e\u8ffd\u52a0 -label.tftp.root.directory=TFTP \u30eb\u30fc\u30c8 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea -label.add.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u8ffd\u52a0 -label.remove.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e\u524a\u9664 -label.dc.name=DC \u540d -label.vcenter=vCenter -label.dedicate.zone=\u30be\u30fc\u30f3\u3092\u5c02\u7528\u306b\u8a2d\u5b9a -label.zone.dedicated=\u30be\u30fc\u30f3\u306e\u5c02\u7528\u8a2d\u5b9a -label.release.dedicated.zone=\u5c02\u7528\u30be\u30fc\u30f3\u306e\u89e3\u653e -label.ipv6.dns1=IPv6 DNS 1 -label.ipv6.dns2=IPv6 DNS 2 -label.vmware.datacenter.name=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u540d -label.vmware.datacenter.vcenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306e vCenter -label.vmware.datacenter.id=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc ID -label.system.vm.details=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u8a73\u7d30 -label.system.vm.scaled.up=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f -label.console.proxy.vm=\u30b3\u30f3\u30bd\u30fc\u30eb \u30d7\u30ed\u30ad\u30b7 VM -label.settings=\u8a2d\u5b9a -label.requires.upgrade=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981 -label.upgrade.router.newer.template=\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b -label.router.vm.scaled.up=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u304c\u62e1\u5927\u3055\u308c\u307e\u3057\u305f -label.total.virtual.routers=\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u5408\u8a08 -label.upgrade.required=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981 -label.virtual.routers.group.zone=\u30be\u30fc\u30f3\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 -label.total.virtual.routers.upgrade=\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u304c\u5fc5\u8981\u306a\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u5408\u8a08 -label.virtual.routers.group.pod=\u30dd\u30c3\u30c9\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 -label.virtual.routers.group.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 -label.zone.lower=\u30be\u30fc\u30f3 -label.virtual.routers.group.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u5225\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc \u30b0\u30eb\u30fc\u30d7 -label.netscaler.details=NetScaler \u306e\u8a73\u7d30 -label.baremetal.dhcp.devices=\u30d9\u30a2\u30e1\u30bf\u30eb DHCP \u30c7\u30d0\u30a4\u30b9 -label.baremetal.pxe.devices=\u30d9\u30a2\u30e1\u30bf\u30eb PXE \u30c7\u30d0\u30a4\u30b9 -label.addes.new.f5=\u65b0\u3057\u3044 F5 \u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.f5.details=F5 \u306e\u8a73\u7d30 -label.srx.details=SRX \u306e\u8a73\u7d30 -label.palo.alto.details=Palo Alto \u306e\u8a73\u7d30 -label.added.nicira.nvp.controller=\u65b0\u3057\u3044 Nicira NVP Controller \u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.nicira.nvp.details=Nicira NVP \u306e\u8a73\u7d30 -label.added.brocade.vcs.switch=\u65b0\u3057\u3044 Brocade VCS \u30b9\u30a4\u30c3\u30c1\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.brocade.vcs.details=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u306e\u8a73\u7d30 -label.added.new.bigswitch.bcf.controller=\u65b0\u3057\u3044 Big Switch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.bigswitch.bcf.details=Big Switch BCF \u306e\u8a73\u7d30 -label.bigswitch.bcf.nat=Big Switch BCF NAT \u6709\u52b9 -label.dedicate=\u5c02\u7528\u306b\u8a2d\u5b9a -label.dedicate.pod=\u30dd\u30c3\u30c9\u3092\u5c02\u7528\u306b\u8a2d\u5b9a -label.pod.dedicated=\u30dd\u30c3\u30c9\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f -label.release.dedicated.pod=\u5c02\u7528\u30dd\u30c3\u30c9\u306e\u89e3\u653e -label.override.public.traffic=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b -label.public.traffic.vswitch.type=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u306e\u7a2e\u985e -label.public.traffic.vswitch.name=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u540d -label.override.guest.traffic=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b -label.guest.traffic.vswitch.type=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u306e\u7a2e\u985e -label.guest.traffic.vswitch.name=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e vSwitch \u540d -label.cisco.nexus1000v.ip.address=Nexus 1000V \u306e IP \u30a2\u30c9\u30ec\u30b9 -label.cisco.nexus1000v.username=Nexus 1000V \u306e\u30e6\u30fc\u30b6\u30fc\u540d -label.cisco.nexus1000v.password=Nexus 1000V \u306e\u30d1\u30b9\u30ef\u30fc\u30c9 -label.dedicate.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u5c02\u7528\u306b\u8a2d\u5b9a -label.release.dedicated.cluster=\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u89e3\u653e -label.dedicate.host=\u30db\u30b9\u30c8\u3092\u5c02\u7528\u306b\u8a2d\u5b9a -label.release.dedicated.host=\u5c02\u7528\u30db\u30b9\u30c8\u306e\u89e3\u653e -label.number.of.cpu.sockets=CPU \u30bd\u30b1\u30c3\u30c8\u6570 -label.delete.ucs.manager=UCS Manager \u306e\u524a\u9664 -label.blades=\u30d6\u30ec\u30fc\u30c9 -label.chassis=\u30b7\u30e3\u30fc\u30b7 -label.blade.id=\u30d6\u30ec\u30fc\u30c9 ID -label.associated.profile=\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb -label.refresh.blades=\u30d6\u30ec\u30fc\u30c9\u306e\u66f4\u65b0 -label.instanciate.template.associate.profile.blade=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\u304a\u3088\u3073\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u30d6\u30ec\u30fc\u30c9\u306e\u95a2\u9023\u4ed8\u3051 -label.select.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u9078\u629e -label.profile=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb -label.delete.profile=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u524a\u9664 -label.disassociate.profile.blade=\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3068\u30d6\u30ec\u30fc\u30c9\u306e\u95a2\u9023\u4ed8\u3051\u306e\u89e3\u9664 -label.secondary.storage.details=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u8a73\u7d30 -label.secondary.staging.store.details=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u8a73\u7d30 -label.add.nfs.secondary.staging.store=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u8ffd\u52a0 -label.delete.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u306e\u524a\u9664 -label.ipv4.start.ip=IPv4 \u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 -label.ipv4.end.ip=IPv4 \u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 -label.ipv6.start.ip=IPv6 \u958b\u59cb IP \u30a2\u30c9\u30ec\u30b9 -label.ipv6.end.ip=IPv6 \u7d42\u4e86 IP \u30a2\u30c9\u30ec\u30b9 -label.vm.password=VM \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\: -label.group.by.zone=\u30be\u30fc\u30f3\u5225\u30b0\u30eb\u30fc\u30d7 -label.group.by.pod=\u30dd\u30c3\u30c9\u5225\u30b0\u30eb\u30fc\u30d7 -label.group.by.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u5225\u30b0\u30eb\u30fc\u30d7 -label.group.by.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u5225\u30b0\u30eb\u30fc\u30d7 -label.no.grouping=(\u30b0\u30eb\u30fc\u30d7\u306a\u3057) -label.create.nfs.secondary.staging.storage=NFS \u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u4f5c\u6210\u3059\u308b -label.username.lower=\u30e6\u30fc\u30b6\u30fc\u540d -label.password.lower=\u30d1\u30b9\u30ef\u30fc\u30c9 -label.email.lower=\u96fb\u5b50\u30e1\u30fc\u30eb -label.firstname.lower=\u540d -label.lastname.lower=\u59d3 -label.domain.lower=\u30c9\u30e1\u30a4\u30f3 -label.account.lower=\u30a2\u30ab\u30a6\u30f3\u30c8 -label.type.lower=\u7a2e\u985e -label.rule.number=\u898f\u5247\u756a\u53f7 -label.action=\u64cd\u4f5c -label.name.lower=\u540d\u524d -label.ucs=UCS -label.change.affinity=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3\u306e\u5909\u66f4 -label.persistent=\u6c38\u7d9a -label.broadcasturi=\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 URI -label.network.cidr=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af CIDR -label.reserved.ip.range=\u4e88\u7d04\u6e08\u307f IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2 -label.autoscale=\u81ea\u52d5\u30b5\u30a4\u30ba\u8a2d\u5b9a -label.health.check=\u30d8\u30eb\u30b9 \u30c1\u30a7\u30c3\u30af -label.public.load.balancer.provider=\u30d1\u30d6\u30ea\u30c3\u30af \u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc -label.add.isolated.network=\u5206\u96e2\u3055\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 -label.add.isolated.guest.network=\u5206\u96e2\u3055\u308c\u305f\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8ffd\u52a0 -label.vlan.only=VLAN -label.secondary.isolated.vlan.id=\u5206\u96e2\u3055\u308c\u305f\u30bb\u30ab\u30f3\u30c0\u30ea VLAN ID -label.ipv4.netmask=IPv4 \u30cd\u30c3\u30c8\u30de\u30b9\u30af -label.custom=\u30ab\u30b9\u30bf\u30e0 -label.disable.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u7121\u52b9\u5316 -label.enable.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u6709\u52b9\u5316 -label.remove.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u306e\u524a\u9664 -label.system.offering.for.router=\u30eb\u30fc\u30bf\u30fc\u7528\u30b7\u30b9\u30c6\u30e0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -label.mode=\u30e2\u30fc\u30c9 -label.associate.public.ip=\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u306e\u95a2\u9023\u4ed8\u3051 -label.acl=ACL -label.user.data=\u30e6\u30fc\u30b6\u30fc \u30c7\u30fc\u30bf -label.virtual.networking=\u4eee\u60f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af -label.allow=\u8a31\u53ef -label.deny=\u62d2\u5426 -label.default.egress.policy=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u9001\u4fe1\u30dd\u30ea\u30b7\u30fc -label.xenserver.tools.version.61.plus=\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d -label.gpu=GPU -label.vgpu.type=vGPU \u306e\u7a2e\u985e -label.vgpu.video.ram=\u30d3\u30c7\u30aa RAM -label.vgpu.max.resolution=\u6700\u5927\u89e3\u50cf\u5ea6 -label.vgpu.max.vgpu.per.gpu=GPU \u3042\u305f\u308a\u306e vGPU \u6570 -label.vgpu.remaining.capacity=\u6b8b\u5b58\u51e6\u7406\u80fd\u529b -label.routing.host=\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30db\u30b9\u30c8 -label.usage.server=\u4f7f\u7528\u72b6\u6cc1\u6e2c\u5b9a\u30b5\u30fc\u30d0\u30fc -label.user.vm=\u30e6\u30fc\u30b6\u30fc VM -label.resource.limit.exceeded=\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u3092\u8d85\u904e\u3057\u307e\u3057\u305f -label.direct.attached.public.ip=\u76f4\u63a5\u30a2\u30bf\u30c3\u30c1\u3055\u308c\u3066\u3044\u308b\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9 -label.usage.sanity.result=\u4f7f\u7528\u72b6\u6cc1\u30b5\u30cb\u30c6\u30a3\u7d50\u679c -label.select.region=\u9818\u57df\u306e\u9078\u629e -label.info.upper=\u60c5\u5831 -label.warn.upper=\u8b66\u544a -label.error.upper=\u30a8\u30e9\u30fc -label.event.deleted=\u30a4\u30d9\u30f3\u30c8\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f -label.add.ciscoASA1000v=Cisco ASA 1000V \u30ea\u30bd\u30fc\u30b9\u306e\u8ffd\u52a0 -label.delete.ciscoASA1000v=Cisco ASA 1000V \u30ea\u30bd\u30fc\u30b9\u306e\u524a\u9664 -label.inside.port.profile=\u5185\u90e8\u30dd\u30fc\u30c8 \u30d7\u30ed\u30d5\u30a1\u30a4\u30eb -label.archive=\u30a2\u30fc\u30ab\u30a4\u30d6 -label.event.archived=\u30a4\u30d9\u30f3\u30c8\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\u3055\u308c\u307e\u3057\u305f -label.alert.details=\u30a2\u30e9\u30fc\u30c8\u306e\u8a73\u7d30 -label.alert.deleted=\u30a2\u30e9\u30fc\u30c8\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f -label.alert.archived=\u30a2\u30e9\u30fc\u30c8\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\u3055\u308c\u307e\u3057\u305f -label.volume.details=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u8a73\u7d30 -label.volume.migrated=\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u79fb\u884c\u3055\u308c\u307e\u3057\u305f -label.storage.pool=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30d7\u30fc\u30eb -label.enable.host=\u30db\u30b9\u30c8\u306e\u6709\u52b9\u5316 -label.disable.host=\u30db\u30b9\u30c8\u306e\u7121\u52b9\u5316 -label.copying.iso=ISO \u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059 -label.add.internal.lb=\u5185\u90e8 LB \u306e\u8ffd\u52a0 -label.internal.lb.details=\u5185\u90e8 LB \u306e\u8a73\u7d30 -label.delete.internal.lb=\u5185\u90e8 LB \u306e\u524a\u9664 -label.remove.vm.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u304b\u3089\u306e VM \u306e\u524a\u9664 -label.add.acl.list=ACL \u4e00\u89a7\u306e\u8ffd\u52a0 -label.add.list.name=ACL \u4e00\u89a7\u540d -label.add.network.acl.list=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u4e00\u89a7\u306e\u8ffd\u52a0 -label.delete.acl.list=ACL \u4e00\u89a7\u306e\u524a\u9664 -label.acl.replaced=ACL \u304c\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f -label.ipv4.dns1=IPv4 DNS 1 -label.ipv4.dns2=IPv4 DNS 2 -label.protocol.number=\u30d7\u30ed\u30c8\u30b3\u30eb\u756a\u53f7 -label.edit.acl.rule=ACL \u898f\u5247\u306e\u7de8\u96c6 -label.source.ip.address=\u9001\u4fe1\u5143 IP \u30a2\u30c9\u30ec\u30b9 -label.source.port=\u9001\u4fe1\u5143\u30dd\u30fc\u30c8 -label.instance.port=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 \u30dd\u30fc\u30c8 -label.assigned.vms=\u5272\u308a\u5f53\u3066\u6e08\u307f VM -label.replace.acl=ACL \u306e\u7f6e\u304d\u63db\u3048 -label.source.nat.supported=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u9001\u4fe1\u5143 NAT -label.acl.name=ACL \u540d -label.acl.id=ACL ID -label.passive=\u30d1\u30c3\u30b7\u30d6 -label.replace.acl.list=ACL \u4e00\u89a7\u306e\u7f6e\u304d\u63db\u3048 -label.vswitch.name=vSwitch \u540d -label.vSwitch.type=vSwitch \u306e\u7a2e\u985e -label.ping.path=Ping \u30d1\u30b9 -label.response.timeout.in.sec=\u5fdc\u7b54\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8 (\u79d2) -label.health.check.interval.in.sec=\u30d8\u30eb\u30b9 \u30c1\u30a7\u30c3\u30af\u9593\u9694 (\u79d2) -label.healthy.threshold=\u6b63\u5e38\u3057\u304d\u3044\u5024 -label.unhealthy.threshold=\u7570\u5e38\u3057\u304d\u3044\u5024 -label.other=\u305d\u306e\u307b\u304b -label.vm.id=VM ID -label.vnmc=VNMC -label.scale.up.policy=\u30b5\u30a4\u30ba\u62e1\u5927\u30dd\u30ea\u30b7\u30fc -label.counter=\u30ab\u30a6\u30f3\u30bf\u30fc -label.operator=\u6f14\u7b97\u5b50 -label.threshold=\u3057\u304d\u3044\u5024 -label.load.balancer.type=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u7a2e\u985e -label.vgpu=VGPU -label.sticky.name=\u30b9\u30c6\u30a3\u30c3\u30ad\u30fc\u540d -label.stickiness.method=\u6301\u7d9a\u6027\u65b9\u6cd5 -label.gslb=GSLB -label.portable.ip=\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9 -label.internallbvm=InternalLbVm -label.agent.state=\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306e\u72b6\u614b -label.duration.in.sec=\u671f\u9593 (\u79d2) managed.state=\u7ba1\u7406\u5bfe\u8c61\u72b6\u614b -message.acquire.new.ip.vpc=\u3053\u306e VPC \u306e\u65b0\u3057\u3044 IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.acquire.ip.nic=\u3053\u306e NIC \u306e\u305f\u3081\u306b\u65b0\u3057\u3044\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?
\u6ce8\: \u65b0\u3057\u304f\u53d6\u5f97\u3057\u305f\u30bb\u30ab\u30f3\u30c0\u30ea IP \u30a2\u30c9\u30ec\u30b9\u306f\u4eee\u60f3\u30de\u30b7\u30f3\u5185\u3067\u624b\u52d5\u3067\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.acquire.new.ip=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u65b0\u3057\u3044 IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.acquire.new.ip.vpc=\u3053\u306e VPC \u306e\u65b0\u3057\u3044 IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.acquire.public.ip=\u65b0\u3057\u3044 IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u30be\u30fc\u30f3\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.action.cancel.maintenance.mode=\u3053\u306e\u4fdd\u5b88\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.cancel.maintenance=\u30db\u30b9\u30c8\u306e\u4fdd\u5b88\u306f\u6b63\u5e38\u306b\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u51e6\u7406\u306b\u306f\u6570\u5206\u304b\u304b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 @@ -1633,6 +1650,7 @@ message.action.delete.ISO.for.all.zones=\u305d\u306e ISO \u306f\u3059\u3079\u306 message.action.delete.ISO=\u3053\u306e ISO \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.delete.network=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.delete.nexusVswitch=\u3053\u306e Nexus 1000V \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.action.delete.nic=\u3053\u306e NIC \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? \u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3082 VM \u304b\u3089\u524a\u9664\u3055\u308c\u307e\u3059\u3002 message.action.delete.physical.network=\u3053\u306e\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.delete.pod=\u3053\u306e\u30dd\u30c3\u30c9\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.delete.primary.storage=\u3053\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1653,6 +1671,7 @@ message.action.disable.physical.network=\u3053\u306e\u7269\u7406\u30cd\u30c3\u30 message.action.disable.pod=\u3053\u306e\u30dd\u30c3\u30c9\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.disable.static.NAT=\u9759\u7684 NAT \u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.disable.zone=\u3053\u306e\u30be\u30fc\u30f3\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.action.downloading.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u3002 message.action.download.iso=\u3053\u306e ISO \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.download.template=\u3053\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.enable.cluster=\u3053\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1675,6 +1694,7 @@ message.action.remove.host=\u3053\u306e\u30db\u30b9\u30c8\u3092\u524a\u9664\u305 message.action.reset.password.off=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u73fe\u5728\u3053\u306e\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002 message.action.reset.password.warning=\u73fe\u5728\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u524d\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u505c\u6b62\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.action.restore.instance=\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5fa9\u5143\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.action.revert.snapshot=\u6240\u6709\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u3053\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.start.instance=\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.start.router=\u3053\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.start.systemvm=\u3053\u306e\u30b7\u30b9\u30c6\u30e0 VM \u3092\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1682,40 +1702,42 @@ message.action.stop.instance=\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3 message.action.stop.router=\u3053\u306e\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u3067\u63d0\u4f9b\u3059\u308b\u3059\u3079\u3066\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u505c\u6b62\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.stop.systemvm=\u3053\u306e\u30b7\u30b9\u30c6\u30e0 VM \u3092\u505c\u6b62\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.take.snapshot=\u3053\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.action.revert.snapshot=\u6240\u6709\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u3053\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.action.unmanage.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u7ba1\u7406\u5bfe\u8c61\u304b\u3089\u9664\u5916\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.action.unmanage.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u975e\u7ba1\u7406\u5bfe\u8c61\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.action.vmsnapshot.delete=\u3053\u306e VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.action.vmsnapshot.revert=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u623b\u3059 +message.action.vmsnapshot.revert=VM \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u5143\u306b\u623b\u3059 message.activate.project=\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.add.cluster.zone=\u30be\u30fc\u30f3 \u306b\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3067\u7ba1\u7406\u3055\u308c\u308b\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.cluster=\u30be\u30fc\u30f3 \u306e\u30dd\u30c3\u30c9 \u306b\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3067\u7ba1\u7406\u3055\u308c\u308b\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059 +message.add.cluster.zone=\u30be\u30fc\u30f3 \u306b\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3067\u7ba1\u7406\u3055\u308c\u308b\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.disk.offering=\u65b0\u3057\u3044\u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.domain=\u3053\u306e\u30c9\u30e1\u30a4\u30f3\u306b\u4f5c\u6210\u3059\u308b\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.added.new.nuage.vsp.controller=\u65b0\u3057\u3044 Nuage VSP \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f +message.added.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f message.add.firewall=\u30be\u30fc\u30f3\u306b\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.guest.network=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.add.host=\u65b0\u3057\u3044\u30db\u30b9\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.adding.host=\u30db\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +message.adding.Netscaler.device=NetScaler \u30c7\u30d0\u30a4\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +message.adding.Netscaler.provider=NetScaler \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 message.add.ip.range.direct.network=\u30be\u30fc\u30f3 \u306e\u76f4\u63a5\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u306b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.ip.range.to.pod=

\u30dd\u30c3\u30c9 \u306b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u8ffd\u52a0\u3057\u307e\u3059

message.add.ip.range=\u30be\u30fc\u30f3\u306e\u30d1\u30d6\u30ea\u30c3\u30af \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u8ffd\u52a0\u3057\u307e\u3059 -message.add.load.balancer.under.ip=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u898f\u5247\u304c\u6b21\u306e IP \u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\: +message.additional.networks.desc=\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u63a5\u7d9a\u3059\u308b\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.load.balancer=\u30be\u30fc\u30f3\u306b\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059 +message.add.load.balancer.under.ip=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u898f\u5247\u304c\u6b21\u306e IP \u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\: message.add.network=\u30be\u30fc\u30f3 \u306b\u65b0\u3057\u3044\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.new.gateway.to.vpc=\u3053\u306e VPC \u306b\u65b0\u3057\u3044\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.pod.during.zone.creation=\u5404\u30be\u30fc\u30f3\u306b\u306f 1 \u3064\u4ee5\u4e0a\u306e\u30dd\u30c3\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002\u4eca\u3053\u3053\u3067\u6700\u521d\u306e\u30dd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u30dd\u30c3\u30c9\u306f\u30db\u30b9\u30c8\u3068\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 \u30b5\u30fc\u30d0\u30fc\u304b\u3089\u69cb\u6210\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u3089\u306f\u5f8c\u306e\u624b\u9806\u3067\u8ffd\u52a0\u3057\u307e\u3059\u3002\u6700\u521d\u306b\u3001CloudStack \u306e\u5185\u90e8\u7ba1\u7406\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u305f\u3081\u306b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u4e88\u7d04\u3057\u307e\u3059\u3002IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u306f\u3001\u30af\u30e9\u30a6\u30c9\u5185\u306e\u5404\u30be\u30fc\u30f3\u3067\u91cd\u8907\u3057\u306a\u3044\u3088\u3046\u306b\u4e88\u7d04\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.add.pod=\u30be\u30fc\u30f3 \u306b\u65b0\u3057\u3044\u30dd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.primary.storage=\u30be\u30fc\u30f3 \u306e\u30dd\u30c3\u30c9 \u306b\u65b0\u3057\u3044\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.primary=\u65b0\u3057\u3044\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.add.region=\u65b0\u3057\u3044\u9818\u57df\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.add.region=\u65b0\u3057\u3044\u30ea\u30fc\u30b8\u30e7\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.secondary.storage=\u30be\u30fc\u30f3 \u306b\u65b0\u3057\u3044\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u307e\u3059 message.add.service.offering=\u65b0\u3057\u3044\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.system.service.offering=\u65b0\u3057\u3044\u30b7\u30b9\u30c6\u30e0 \u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.template=\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.volume=\u65b0\u3057\u3044\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.add.VPN.gateway=VPN \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.adding.host=\u30db\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -message.adding.Netscaler.device=NetScaler \u30c7\u30d0\u30a4\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -message.adding.Netscaler.provider=NetScaler \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 -message.additional.networks.desc=\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u63a5\u7d9a\u3059\u308b\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.admin.guide.read=VMware \u30d9\u30fc\u30b9\u306e VM \u306b\u3064\u3044\u3066\u306f\u3001\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u524d\u306b\u7ba1\u7406\u8005\u30ac\u30a4\u30c9\u306e\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002\u7d9a\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?\\, message.advanced.mode.desc=VLAN \u30b5\u30dd\u30fc\u30c8\u3092\u6709\u52b9\u306b\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30e2\u30c7\u30eb\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30e2\u30c7\u30eb\u3067\u306f\u6700\u3082\u67d4\u8edf\u306b\u30ab\u30b9\u30bf\u30e0 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u63d0\u4f9b\u3067\u304d\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3001VPN\u3001\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u306e\u30b5\u30dd\u30fc\u30c8\u306e\u307b\u304b\u306b\u3001\u76f4\u63a5\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u4eee\u60f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3082\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 message.advanced.security.group=\u30b2\u30b9\u30c8 VM \u3092\u5206\u96e2\u3059\u308b\u305f\u3081\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.advanced.virtual=\u30b2\u30b9\u30c8 VM \u3092\u5206\u96e2\u3059\u308b\u305f\u3081\u306b\u30be\u30fc\u30f3\u5168\u4f53\u306e VLAN \u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 @@ -1729,57 +1751,96 @@ message.attach.volume=\u65b0\u3057\u3044\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u30 message.basic.mode.desc=VLAN \u30b5\u30dd\u30fc\u30c8\u304c\u4e0d\u8981\u3067\u3042\u308b\u5834\u5408\u306f\u3001\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30e2\u30c7\u30eb\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30e2\u30c7\u30eb\u3067\u4f5c\u6210\u3055\u308c\u308b\u3059\u3079\u3066\u306e\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304b\u3089\u76f4\u63a5 IP \u30a2\u30c9\u30ec\u30b9\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u5206\u96e2\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002 message.change.offering.confirm=\u3053\u306e\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b5\u30fc\u30d3\u30b9 \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u5909\u66f4\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.change.password=\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.cluster.dedicated=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f +message.cluster.dedication.released=\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f message.configure.all.traffic.types=\u8907\u6570\u306e\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u3042\u308a\u307e\u3059\u3002[\u7de8\u96c6] \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e\u3054\u3068\u306b\u30e9\u30d9\u30eb\u3092\u69cb\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.configure.ldap=LDAP \u3092\u69cb\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.configuring.guest.traffic=\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u69cb\u6210\u3057\u3066\u3044\u307e\u3059 message.configuring.physical.networks=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u69cb\u6210\u3057\u3066\u3044\u307e\u3059 message.configuring.public.traffic=\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u69cb\u6210\u3057\u3066\u3044\u307e\u3059 message.configuring.storage.traffic=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u69cb\u6210\u3057\u3066\u3044\u307e\u3059 message.confirm.action.force.reconnect=\u3053\u306e\u30db\u30b9\u30c8\u3092\u5f37\u5236\u518d\u63a5\u7d9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.F5=F5 \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.BigSwitchBcf=\u3053\u306e Big Switch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.BrocadeVcs=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.NetScaler=NetScaler \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.NuageVsp=Nuage Virtualized Services Directory \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.SRX=SRX \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.PA=Palo Alto \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.destroy.router=\u3053\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u7834\u68c4\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.disable.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.enable.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.join.project=\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53c2\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.IP.range=\u3053\u306e IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.shutdown.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.current.guest.CIDR.unchanged=\u73fe\u5728\u306e\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e CIDR \u3092\u5909\u66f4\u305b\u305a\u306b\u7dad\u6301\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.ciscoASA1000v=Cisco ASA 1000V \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.selected.events=\u9078\u629e\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.archive.selected.events=\u9078\u629e\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.event=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.archive.event=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.selected.alerts=\u9078\u629e\u3057\u305f\u30a2\u30e9\u30fc\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.archive.selected.alerts=\u9078\u629e\u3057\u305f\u30a2\u30e9\u30fc\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.alert=\u3053\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.add.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.confirm.archive.alert=\u3053\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.migrate.volume=\u3053\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u79fb\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.archive.event=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.archive.selected.alerts=\u9078\u629e\u3057\u305f\u30a2\u30e9\u30fc\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.archive.selected.events=\u9078\u629e\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u3092\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.confirm.attach.disk=\u30c7\u30a3\u30b9\u30af\u3092\u30a2\u30bf\u30c3\u30c1\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.confirm.create.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u4f5c\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.enable.host=\u30db\u30b9\u30c8\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.disable.host=\u30db\u30b9\u30c8\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.internal.lb=\u5185\u90e8 LB \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u304b\u3089 VM \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.current.guest.CIDR.unchanged=\u73fe\u5728\u306e\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e CIDR \u3092\u5909\u66f4\u305b\u305a\u306b\u7dad\u6301\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.dedicate.cluster.domain.account=\u3053\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.dedicate.host.domain.account=\u3053\u306e\u30db\u30b9\u30c8\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.dedicate.pod.domain.account=\u3053\u306e\u30dd\u30c3\u30c9\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.dedicate.zone=\u3053\u306e\u30be\u30fc\u30f3\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.confirm.delete.acl.list=\u3053\u306e ACL \u4e00\u89a7\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.alert=\u3053\u306e\u30a2\u30e9\u30fc\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb\u30e9\u30c3\u30af\u8a2d\u5b9a\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.BigSwitchBcf=\u3053\u306e BigSwitch BCF \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.BrocadeVcs=Brocade VCS \u30b9\u30a4\u30c3\u30c1\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.ciscoASA1000v=Cisco ASA 1000V \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.ciscovnmc.resource=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.F5=F5 \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.internal.lb=\u5185\u90e8 LB \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.NetScaler=NetScaler \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.NuageVsp=Nuage Virtualized Services Directory \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.PA=Palo Alto \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.SRX=SRX \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.delete.ucs.manager=UCS Manager \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.destroy.router=\u3053\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u7834\u68c4\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.disable.host=\u30db\u30b9\u30c8\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.disable.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.disable.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.disable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.disable.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.enable.host=\u30db\u30b9\u30c8\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.enable.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.enable.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.enable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.enable.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.join.project=\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53c2\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.migrate.volume=\u3053\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u79fb\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.refresh.blades=\u30d6\u30ec\u30fc\u30c9\u3092\u66f4\u65b0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.release.dedicated.cluster=\u3053\u306e\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.release.dedicated.host=\u3053\u306e\u5c02\u7528\u30db\u30b9\u30c8\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.release.dedicated.pod=\u3053\u306e\u5c02\u7528\u30dd\u30c3\u30c9\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.release.dedicated.zone=\u3053\u306e\u5c02\u7528\u30be\u30fc\u30f3\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.release.dedicate.vlan.range=\u5c02\u7528 VLAN \u306e\u7bc4\u56f2\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.event=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.IP.range=\u3053\u306e IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.load.balancer=\u30ed\u30fc\u30c9 \u30d0\u30e9\u30f3\u30b5\u30fc\u304b\u3089 VM \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.selected.alerts=\u9078\u629e\u3057\u305f\u30a2\u30e9\u30fc\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.selected.events=\u9078\u629e\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.remove.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.confirm.replace.acl.new.one=ACL \u3092\u65b0\u3057\u3044\u3082\u306e\u3068\u7f6e\u304d\u63db\u3048\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.scale.up.router.vm=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.scale.up.system.vm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.shutdown.provider=\u3053\u306e\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.start.lb.vm=LB VM \u3092\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.stop.lb.vm=LB VM \u3092\u505c\u6b62\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.upgrade.router.newer.template=\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.upgrade.routers.account.newtemplate=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.upgrade.routers.cluster.newtemplate=\u3053\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.upgrade.routers.newtemplate=\u3053\u306e\u30be\u30fc\u30f3\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.confirm.upgrade.routers.pod.newtemplate=\u3053\u306e\u30dd\u30c3\u30c9\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.copy.iso.confirm=ISO \u3092\u6b21\u306e\u5834\u6240\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.copy.template.confirm=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.copy.template=\u30be\u30fc\u30f3 \u304b\u3089\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 XXX \u3092\u6b21\u306e\u5834\u6240\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\: +message.create.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.create.template.vm=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u304b\u3089 VM \u3092\u4f5c\u6210\u3057\u307e\u3059 message.create.template.volume=\u30c7\u30a3\u30b9\u30af \u30dc\u30ea\u30e5\u30fc\u30e0 \u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u3001\u6b21\u306e\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30dc\u30ea\u30e5\u30fc\u30e0 \u30b5\u30a4\u30ba\u306b\u3088\u3063\u3066\u306f\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u304b\u304b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 -message.create.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.creating.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.creating.guest.network=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.creating.physical.networks=\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.creating.pod=\u30dd\u30c3\u30c9\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.creating.primary.storage=\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.creating.secondary.storage=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 +message.creating.systemVM=\u30b7\u30b9\u30c6\u30e0 VM \u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 (\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044) message.creating.zone=\u30be\u30fc\u30f3\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 message.decline.invitation=\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u62db\u5f85\u3092\u8f9e\u9000\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.dedicated.zone.released=\u5c02\u7528\u30be\u30fc\u30f3\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f message.dedicate.zone=\u30be\u30fc\u30f3\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 message.delete.account=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.delete.affinity.group=\u3053\u306e\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1803,6 +1864,9 @@ message.disable.snapshot.policy=\u73fe\u5728\u306e\u30b9\u30ca\u30c3\u30d7\u30b7 message.disable.user=\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.disable.vpn.access=\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.disable.vpn=VPN \u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.disabling.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +message.disabling.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +message.disallowed.characters=\u8a31\u53ef\u3055\u308c\u306a\u3044\u6587\u5b57\: <,> message.download.ISO=ISO \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f 00000 \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059 message.download.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f 00000 \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059 message.download.volume.confirm=\u3053\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1812,23 +1876,31 @@ message.edit.confirm=[\u4fdd\u5b58] \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u message.edit.limits=\u6b21\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u5236\u9650\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300c-1\u300d\u306f\u3001\u30ea\u30bd\u30fc\u30b9\u4f5c\u6210\u306b\u5236\u9650\u304c\u306a\u3044\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002 message.edit.traffic.type=\u3053\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e\u306b\u95a2\u9023\u4ed8\u3051\u308b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af \u30e9\u30d9\u30eb\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.enable.account=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.enabled.vpn.ip.sec=IPSec \u4e8b\u524d\u5171\u6709\u30ad\u30fc\: +message.enabled.vpn=\u73fe\u5728\u3001\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u6b21\u306e IP \u30a2\u30c9\u30ec\u30b9\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 message.enable.user=\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.enable.vpn.access=\u73fe\u5728\u3053\u306e IP \u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3059\u308b VPN \u306f\u7121\u52b9\u3067\u3059\u3002VPN \u30a2\u30af\u30bb\u30b9\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.enable.vpn=\u3053\u306e IP \u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3059\u308b\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.enabled.vpn.ip.sec=IPSec \u4e8b\u524d\u5171\u6709\u30ad\u30fc\: -message.enabled.vpn=\u73fe\u5728\u3001\u30ea\u30e2\u30fc\u30c8 \u30a2\u30af\u30bb\u30b9 VPN \u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u6b21\u306e IP \u30a2\u30c9\u30ec\u30b9\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 +message.enabling.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 message.enabling.security.group.provider=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7 \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +message.enabling.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +message.enabling.zone.dots=\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059... message.enabling.zone=\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 +message.enter.seperated.list.multiple.cidrs=CIDR \u304c\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u3001\u30b3\u30f3\u30de\u533a\u5207\u308a\u306e\u4e00\u89a7\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 message.enter.token=\u96fb\u5b50\u30e1\u30fc\u30eb\u306e\u62db\u5f85\u72b6\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u30c8\u30fc\u30af\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.generate.keys=\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u65b0\u3057\u3044\u30ad\u30fc\u3092\u751f\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.gslb.delete.confirm=\u3053\u306e GSLB \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.gslb.lb.remove.confirm=GSLB \u304b\u3089\u8ca0\u8377\u5206\u6563\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.guest.traffic.in.advanced.zone=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306f\u3001\u30a8\u30f3\u30c9 \u30e6\u30fc\u30b6\u30fc\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u9593\u306e\u901a\u4fe1\u3067\u3059\u3002\u5404\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30b2\u30b9\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e VLAN ID \u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.guest.traffic.in.basic.zone=\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306f\u3001\u30a8\u30f3\u30c9 \u30e6\u30fc\u30b6\u30fc\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u9593\u306e\u901a\u4fe1\u3067\u3059\u3002CloudStack \u3067\u30b2\u30b9\u30c8 VM \u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u7bc4\u56f2\u304c\u4e88\u7d04\u6e08\u307f\u306e\u30b7\u30b9\u30c6\u30e0 IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3068\u91cd\u8907\u3057\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.host.dedicated=\u30db\u30b9\u30c8\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f +message.host.dedication.released=\u5c02\u7528\u30db\u30b9\u30c8\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f message.installWizard.click.retry=\u8d77\u52d5\u3092\u518d\u8a66\u884c\u3059\u308b\u306b\u306f\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.installWizard.copy.whatIsACluster=\u30af\u30e9\u30b9\u30bf\u30fc\u306f\u30db\u30b9\u30c8\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\u65b9\u6cd5\u3067\u3059\u30021 \u3064\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30db\u30b9\u30c8\u306f\u3059\u3079\u3066\u540c\u4e00\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304b\u3089\u69cb\u6210\u3055\u308c\u3001\u540c\u3058\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3092\u5b9f\u884c\u3057\u3001\u540c\u3058\u30b5\u30d6\u30cd\u30c3\u30c8\u4e0a\u306b\u3042\u308a\u3001\u540c\u3058\u5171\u6709\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u540c\u3058\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30db\u30b9\u30c8\u9593\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u3078\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4e2d\u65ad\u305b\u305a\u306b\u3001\u4eee\u60f3\u30de\u30b7\u30f3 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30e9\u30a4\u30d6 \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30af\u30e9\u30b9\u30bf\u30fc\u306f CloudStack&\#8482; \u74b0\u5883\u5185\u306e 3 \u756a\u76ee\u306b\u5927\u304d\u306a\u7d44\u7e54\u5358\u4f4d\u3067\u3059\u3002\u30af\u30e9\u30b9\u30bf\u30fc\u306f\u30dd\u30c3\u30c9\u306b\u542b\u307e\u308c\u3001\u30dd\u30c3\u30c9\u306f\u30be\u30fc\u30f3\u306b\u542b\u307e\u308c\u307e\u3059\u3002

CloudStack&\#8482; \u3067\u306f 1 \u3064\u306e\u30af\u30e9\u30a6\u30c9\u74b0\u5883\u306b\u8907\u6570\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u304c\u3001\u57fa\u672c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u306f 1 \u3064\u3067\u3059\u3002 message.installWizard.copy.whatIsAHost=\u30db\u30b9\u30c8\u306f\u5358\u4e00\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3067\u3001\u30b2\u30b9\u30c8\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30ea\u30bd\u30fc\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30d9\u30a2 \u30e1\u30bf\u30eb \u30db\u30b9\u30c8\u3092\u9664\u3044\u3066\u3001\u5404\u30db\u30b9\u30c8\u306b\u306f\u30b2\u30b9\u30c8\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u30d9\u30a2 \u30e1\u30bf\u30eb \u30db\u30b9\u30c8\u306b\u3064\u3044\u3066\u306f\u3001\u300e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30ac\u30a4\u30c9\u4e0a\u7d1a\u7de8\u300f\u3067\u7279\u6b8a\u4f8b\u3068\u3057\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001KVM \u304c\u6709\u52b9\u306a Linux \u30b5\u30fc\u30d0\u30fc\u3001Citrix XenServer \u304c\u52d5\u4f5c\u3059\u308b\u30b5\u30fc\u30d0\u30fc\u3001\u304a\u3088\u3073 ESXi \u30b5\u30fc\u30d0\u30fc\u304c\u30db\u30b9\u30c8\u3067\u3059\u3002\u57fa\u672c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306f\u3001XenServer \u307e\u305f\u306f KVM \u3092\u5b9f\u884c\u3059\u308b\u5358\u4e00\u306e\u30db\u30b9\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002

\u30db\u30b9\u30c8\u306f CloudStack&\#8482; \u74b0\u5883\u5185\u306e\u6700\u5c0f\u306e\u7d44\u7e54\u5358\u4f4d\u3067\u3059\u3002\u30db\u30b9\u30c8\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u542b\u307e\u308c\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u306f\u30dd\u30c3\u30c9\u306b\u542b\u307e\u308c\u3001\u30dd\u30c3\u30c9\u306f\u30be\u30fc\u30f3\u306b\u542b\u307e\u308c\u307e\u3059\u3002 message.installWizard.copy.whatIsAPod=\u901a\u5e38\u30011 \u3064\u306e\u30dd\u30c3\u30c9\u306f\u5358\u4e00\u306e\u30e9\u30c3\u30af\u3092\u8868\u3057\u307e\u3059\u3002\u540c\u3058\u30dd\u30c3\u30c9\u5185\u306e\u30db\u30b9\u30c8\u306f\u540c\u3058\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u542b\u307e\u308c\u307e\u3059\u3002

\u30dd\u30c3\u30c9\u306f CloudStack&\#8482; \u74b0\u5883\u5185\u306e 2 \u756a\u76ee\u306b\u5927\u304d\u306a\u7d44\u7e54\u5358\u4f4d\u3067\u3059\u3002\u30dd\u30c3\u30c9\u306f\u30be\u30fc\u30f3\u306b\u542b\u307e\u308c\u307e\u3059\u3002\u5404\u30be\u30fc\u30f3\u306f 1 \u3064\u4ee5\u4e0a\u306e\u30dd\u30c3\u30c9\u3092\u542b\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u57fa\u672c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306f\u3001\u30be\u30fc\u30f3\u5185\u306e\u30dd\u30c3\u30c9\u306f 1 \u3064\u3067\u3059\u3002 message.installWizard.copy.whatIsAZone=\u30be\u30fc\u30f3\u306f CloudStack&\#8482; \u74b0\u5883\u5185\u306e\u6700\u5927\u306e\u7d44\u7e54\u5358\u4f4d\u3067\u3059\u30021 \u3064\u306e\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u5185\u306b\u8907\u6570\u306e\u30be\u30fc\u30f3\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u304c\u3001\u901a\u5e38\u3001\u30be\u30fc\u30f3\u306f\u5358\u4e00\u306e\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u30be\u30fc\u30f3\u306b\u7d44\u7e54\u5316\u3059\u308b\u3068\u3001\u30be\u30fc\u30f3\u3092\u7269\u7406\u7684\u306b\u5206\u96e2\u3057\u3066\u5197\u9577\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u5404\u30be\u30fc\u30f3\u306b\u96fb\u6e90\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30c3\u30d7\u30ea\u30f3\u30af\u3092\u914d\u5099\u3057\u307e\u3059\u3002\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30be\u30fc\u30f3\u306f\u9060\u9694\u5730\u306b\u5206\u6563\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 -message.installWizard.copy.whatIsCloudStack=CloudStack&\#8482 \u306f\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30ea\u30bd\u30fc\u30b9\u3092\u30d7\u30fc\u30eb\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3001\u30d1\u30d6\u30ea\u30c3\u30af\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3001\u304a\u3088\u3073\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u306e Infrastructure as a Service (IaaS) \u30af\u30e9\u30a6\u30c9\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002CloudStack&\#8482 \u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30a6\u30c9 \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u69cb\u6210\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30ce\u30fc\u30c9\u3092\u7ba1\u7406\u3057\u3001\u30af\u30e9\u30a6\u30c9 \u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u74b0\u5883\u3092\u5c55\u958b\u3001\u7ba1\u7406\u3001\u304a\u3088\u3073\u69cb\u6210\u3057\u307e\u3059\u3002

CloudStack&\#8482 \u306f\u30b3\u30e2\u30c7\u30a3\u30c6\u30a3\u5316\u3057\u305f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\u500b\u5225\u306e\u4eee\u60f3\u30de\u30b7\u30f3 \u30a4\u30e1\u30fc\u30b8\u3092\u8d85\u3048\u3066\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7c21\u5358\u306a\u8a2d\u5b9a\u3067\u52d5\u4f5c\u3059\u308b\u30af\u30e9\u30a6\u30c9 \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 \u30b9\u30bf\u30c3\u30af\u306b\u3088\u3063\u3066\u3001\u4eee\u60f3\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3064\u307e\u308a\u591a\u5c64\u578b\u306e\u30de\u30eb\u30c1\u30c6\u30ca\u30f3\u30c8 \u30af\u30e9\u30a6\u30c9 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u69cb\u7bc9\u3057\u3001\u5c55\u958b\u3057\u3001\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4e0d\u53ef\u6b20\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3059\u3079\u3066\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9 \u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u30d7\u30ec\u30df\u30a2\u30e0 \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u4e21\u65b9\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u304c\u3001\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9 \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u307b\u3068\u3093\u3069\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 +message.installWizard.copy.whatIsCloudStack=CloudStack&\#8482; \u306f\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30ea\u30bd\u30fc\u30b9\u3092\u30d7\u30fc\u30eb\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3001\u30d1\u30d6\u30ea\u30c3\u30af\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3001\u304a\u3088\u3073\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u306e Infrastructure as a Service (IaaS) \u30af\u30e9\u30a6\u30c9\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002CloudStack&\#8482; \u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30a6\u30c9 \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u69cb\u6210\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u30ce\u30fc\u30c9\u3092\u7ba1\u7406\u3057\u3001\u30af\u30e9\u30a6\u30c9 \u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u74b0\u5883\u3092\u5c55\u958b\u3001\u7ba1\u7406\u3001\u304a\u3088\u3073\u69cb\u6210\u3057\u307e\u3059\u3002

CloudStack&\#8482; \u306f\u30b3\u30e2\u30c7\u30a3\u30c6\u30a3\u5316\u3057\u305f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\u500b\u5225\u306e\u4eee\u60f3\u30de\u30b7\u30f3 \u30a4\u30e1\u30fc\u30b8\u3092\u8d85\u3048\u3066\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7c21\u5358\u306a\u8a2d\u5b9a\u3067\u52d5\u4f5c\u3059\u308b\u30af\u30e9\u30a6\u30c9 \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 \u30b9\u30bf\u30c3\u30af\u306b\u3088\u3063\u3066\u3001\u4eee\u60f3\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3064\u307e\u308a\u591a\u5c64\u578b\u306e\u30de\u30eb\u30c1\u30c6\u30ca\u30f3\u30c8 \u30af\u30e9\u30a6\u30c9 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u69cb\u7bc9\u3057\u3001\u5c55\u958b\u3057\u3001\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4e0d\u53ef\u6b20\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3059\u3079\u3066\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9 \u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u30d7\u30ec\u30df\u30a2\u30e0 \u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u4e21\u65b9\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u304c\u3001\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9 \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u307b\u3068\u3093\u3069\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 message.installWizard.copy.whatIsPrimaryStorage=CloudStack&\#8482; \u306e\u30af\u30e9\u30a6\u30c9 \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3067\u306f\u3001\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3068\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e 2 \u7a2e\u985e\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3069\u3061\u3089\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u3082\u3001iSCSI\u3001NFS \u30b5\u30fc\u30d0\u30fc\u3001\u307e\u305f\u306f\u30ed\u30fc\u30ab\u30eb \u30c7\u30a3\u30b9\u30af\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002

\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3001\u305d\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u306e\u30db\u30b9\u30c8\u3067\u52d5\u4f5c\u3059\u308b\u3059\u3079\u3066\u306e VM \u306e\u5404\u30b2\u30b9\u30c8 VM \u306e\u30c7\u30a3\u30b9\u30af \u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002\u901a\u5e38\u3001\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8 \u30b5\u30fc\u30d0\u30fc\u306f\u30db\u30b9\u30c8\u306e\u8fd1\u304f\u306b\u8a2d\u7f6e\u3057\u307e\u3059\u3002 message.installWizard.copy.whatIsSecondaryStorage=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306f\u30be\u30fc\u30f3\u3068\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3001\u6b21\u306e\u9805\u76ee\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002
  • \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 - VM \u306e\u8d77\u52d5\u306b\u4f7f\u7528\u3067\u304d\u308b OS \u30a4\u30e1\u30fc\u30b8\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u8ffd\u52a0\u306e\u69cb\u6210\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
  • ISO \u30a4\u30e1\u30fc\u30b8 - \u8d77\u52d5\u53ef\u80fd\u307e\u305f\u306f\u8d77\u52d5\u4e0d\u53ef\u306e OS \u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002
  • \u30c7\u30a3\u30b9\u30af \u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 - VM \u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u30b3\u30d4\u30fc\u3067\u3059\u3002\u30c7\u30fc\u30bf\u306e\u5fa9\u5143\u307e\u305f\u306f\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002
message.installWizard.now.building=\u30af\u30e9\u30a6\u30c9\u3092\u69cb\u7bc9\u3057\u3066\u3044\u307e\u3059... @@ -1857,12 +1929,14 @@ message.installWizard.tooltip.configureGuestTraffic.guestGateway=\u30b2\u30b9\u3 message.installWizard.tooltip.configureGuestTraffic.guestNetmask=\u30b2\u30b9\u30c8\u306e\u4f7f\u7528\u3059\u308b\u30b5\u30d6\u30cd\u30c3\u30c8\u4e0a\u3067\u4f7f\u7528\u3055\u308c\u308b\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3067\u3059\u3002 message.installWizard.tooltip.configureGuestTraffic.guestStartIp=\u3053\u306e\u30be\u30fc\u30f3\u306e\u30b2\u30b9\u30c8\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u308b IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3067\u3059\u3002\u4f7f\u7528\u3059\u308b NIC \u304c 1 \u3064\u306e\u5834\u5408\u306f\u3001\u3053\u308c\u3089\u306e IP \u30a2\u30c9\u30ec\u30b9\u306f\u30dd\u30c3\u30c9\u306e CIDR \u3068\u540c\u3058 CIDR \u306b\u542b\u307e\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.installWizard.tooltip.configureGuestTraffic.name=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u540d\u524d\u3067\u3059\u3002 +message.instance.scaled.up.confirm=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.instanceWizard.noTemplates=\u4f7f\u7528\u53ef\u80fd\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u4e92\u63db\u6027\u306e\u3042\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 \u30a6\u30a3\u30b6\u30fc\u30c9\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.ip.address.changed=\u304a\u4f7f\u3044\u306e IP \u30a2\u30c9\u30ec\u30b9\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u4e00\u89a7\u3092\u66f4\u65b0\u3057\u307e\u3059\u304b? \u305d\u306e\u5834\u5408\u306f\u3001\u8a73\u7d30\u30da\u30a4\u30f3\u304c\u9589\u3058\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.iso.desc=\u30c7\u30fc\u30bf\u307e\u305f\u306f OS \u8d77\u52d5\u53ef\u80fd\u30e1\u30c7\u30a3\u30a2\u3092\u542b\u3080\u30c7\u30a3\u30b9\u30af \u30a4\u30e1\u30fc\u30b8 message.join.project=\u3053\u308c\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53c2\u52a0\u3057\u307e\u3057\u305f\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30d3\u30e5\u30fc\u306b\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002 message.launch.vm.on.private.network=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5c02\u7528\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u307e\u3059\u304b? message.launch.zone=\u30be\u30fc\u30f3\u3092\u8d77\u52d5\u3059\u308b\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u6b21\u306e\u624b\u9806\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 +message.listView.subselect.multi=(Ctrl/Cmd \u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30af\u30ea\u30c3\u30af) message.lock.account=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u30ed\u30c3\u30af\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? \u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30af\u30e9\u30a6\u30c9 \u30ea\u30bd\u30fc\u30b9\u3092\u7ba1\u7406\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u5f8c\u3082\u65e2\u5b58\u306e\u30ea\u30bd\u30fc\u30b9\u306b\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 message.migrate.instance.confirm=\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u79fb\u884c\u5148\u306f\u6b21\u306e\u30db\u30b9\u30c8\u3067\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.migrate.instance.to.host=\u5225\u306e\u30db\u30b9\u30c8\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u79fb\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? @@ -1870,7 +1944,11 @@ message.migrate.instance.to.ps=\u5225\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9 message.migrate.router.confirm=\u30eb\u30fc\u30bf\u30fc\u306e\u79fb\u884c\u5148\u306f\u6b21\u306e\u30db\u30b9\u30c8\u3067\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.migrate.systemvm.confirm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u79fb\u884c\u5148\u306f\u6b21\u306e\u30db\u30b9\u30c8\u3067\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.migrate.volume=\u5225\u306e\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u79fb\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.network.addVM.desc=\u3053\u306e VM \u3092\u8ffd\u52a0\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u305f\u3081\u306e\u65b0\u3057\u3044 NIC \u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 +message.network.addVMNIC=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u65b0\u3057\u3044 VM NIC \u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.new.user=\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u65b0\u3057\u3044\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.no.affinity.groups=\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u6b21\u306e\u624b\u9806\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 +message.no.host.available=\u79fb\u884c\u306b\u4f7f\u7528\u3067\u304d\u308b\u30db\u30b9\u30c8\u306f\u3042\u308a\u307e\u305b\u3093 message.no.network.support.configuration.not.true=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u304c\u6709\u52b9\u306a\u30be\u30fc\u30f3\u304c\u7121\u3044\u305f\u3081\u3001\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u624b\u9806 5. \u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 message.no.network.support=\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3068\u3057\u3066 vSphere \u3092\u9078\u629e\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u306b\u8ffd\u52a0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u624b\u9806 5. \u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 message.no.projects.adminOnly=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002
\u7ba1\u7406\u8005\u306b\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u3092\u4f9d\u983c\u3057\u3066\u304f\u3060\u3055\u3044\u3002 @@ -1888,11 +1966,17 @@ message.please.select.a.configuration.for.your.zone=\u30be\u30fc\u30f3\u306e\u69 message.please.select.a.different.public.and.management.network.before.removing=\u524a\u9664\u306e\u524d\u306b\u7570\u306a\u308b\u30d1\u30d6\u30ea\u30c3\u30af\u304a\u3088\u3073\u7ba1\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.please.select.networks=\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.please.wait.while.zone.is.being.created=\u30be\u30fc\u30f3\u304c\u4f5c\u6210\u3055\u308c\u308b\u307e\u3067\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044... +message.pod.dedication.released=\u5c02\u7528\u30dd\u30c3\u30c9\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f +message.portable.ip.delete.confirm=\u3053\u306e\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.project.invite.sent=\u30e6\u30fc\u30b6\u30fc\u306b\u62db\u5f85\u72b6\u304c\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u62db\u5f85\u3092\u627f\u8afe\u3059\u308b\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 message.public.traffic.in.advanced.zone=\u30af\u30e9\u30a6\u30c9\u5185\u306e VM \u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u305f\u3081\u306b\u3001\u4e00\u822c\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a IP \u30a2\u30c9\u30ec\u30b9\u3092\u5272\u308a\u5f53\u3066\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30a8\u30f3\u30c9 \u30e6\u30fc\u30b6\u30fc\u306f CloudStack \u306e\u30e6\u30fc\u30b6\u30fc \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3053\u308c\u3089\u306e IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3001\u30b2\u30b9\u30c8 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u30d1\u30d6\u30ea\u30c3\u30af \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u9593\u306b NAT \u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002

\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u305f\u3081\u306b\u3001\u5c11\u306a\u304f\u3068\u3082 1 \u3064 IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.public.traffic.in.basic.zone=\u30af\u30e9\u30a6\u30c9\u5185\u306e VM \u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u304b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u7d4c\u7531\u3067\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3068\u3001\u30d1\u30d6\u30ea\u30c3\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u305f\u3081\u306b\u3001\u4e00\u822c\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a IP \u30a2\u30c9\u30ec\u30b9\u3092\u5272\u308a\u5f53\u3066\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u30b2\u30b9\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306e\u307b\u304b\u306b\u3053\u306e\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u304b\u3089\u30a2\u30c9\u30ec\u30b9\u304c 1 \u3064\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u3068\u30b2\u30b9\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u306e\u9593\u306b\u3001\u9759\u7684\u306a 1 \u5bfe 1 \u306e NAT \u304c\u81ea\u52d5\u7684\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002\u30a8\u30f3\u30c9 \u30e6\u30fc\u30b6\u30fc\u306f CloudStack \u306e\u30e6\u30fc\u30b6\u30fc \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u7528\u3057\u3066\u8ffd\u52a0\u306e IP \u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u306e\u9593\u306b\u9759\u7684 NAT \u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 -message.redirecting.region=\u9818\u57df\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u3044\u307e\u3059... -message.remove.region=\u3053\u306e\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u3053\u306e\u9818\u57df\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.read.admin.guide.scaling.up=\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3059\u308b\u524d\u306b\u7ba1\u7406\u8005\u30ac\u30a4\u30c9\u306e\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002 +message.recover.vm=\u3053\u306e VM \u3092\u5fa9\u5143\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.redirecting.region=\u30ea\u30fc\u30b8\u30e7\u30f3\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u3044\u307e\u3059... +message.reinstall.vm=\u6ce8\: \u6ce8\u610f\u3057\u3066\u7d9a\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a VM \u304c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002\u30eb\u30fc\u30c8 \u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u30c7\u30fc\u30bf\u306f\u5931\u308f\u308c\u307e\u3059\u3002\u8ffd\u52a0\u306e\u30c7\u30fc\u30bf \u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u5f71\u97ff\u306f\u3042\u308a\u307e\u305b\u3093\u3002 +message.remove.ldap=LDAP \u69cb\u6210\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.remove.region=\u3053\u306e\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u3053\u306e\u30ea\u30fc\u30b8\u30e7\u30f3\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.remove.vpc=VPC \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.remove.vpn.access=\u6b21\u306e\u30e6\u30fc\u30b6\u30fc\u304b\u3089 VPN \u30a2\u30af\u30bb\u30b9\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.reset.password.warning.notPasswordEnabled=\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u7ba1\u7406\u3092\u6709\u52b9\u306b\u305b\u305a\u306b\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002 @@ -1901,18 +1985,24 @@ message.reset.VPN.connection=VPN \u63a5\u7d9a\u3092\u30ea\u30bb\u30c3\u30c8\u305 message.restart.mgmt.server=\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.restart.mgmt.usage.server=\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3068\u4f7f\u7528\u72b6\u6cc1\u6e2c\u5b9a\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.restart.network=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u63d0\u4f9b\u3059\u308b\u3059\u3079\u3066\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.restart.vpc.remark=VPC \u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?

\u6ce8\u610f\: \u975e\u5197\u9577 VPC \u306e\u5197\u9577\u5316\u306f\u5f37\u5236\u7684\u306b\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u3055\u308c\u307e\u3059. \u307e\u305f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306f\u6570\u5206\u9593\u5229\u7528\u51fa\u6765\u306a\u304f\u306a\u308a\u307e\u3059.

message.restart.vpc=VPC \u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.restoreVM=VM \u3092\u5fa9\u5143\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.security.group.usage=(\u8a72\u5f53\u3059\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u3059\u3079\u3066\u9078\u629e\u3059\u308b\u306b\u306f\u3001Ctrl \u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044) +message.select.affinity.groups=\u3053\u306e VM \u3092\u8ffd\u52a0\u3059\u308b\u30a2\u30d5\u30a3\u30cb\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.select.a.zone=\u30be\u30fc\u30f3\u306f\u901a\u5e38\u3001\u5358\u4e00\u306e\u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002\u8907\u6570\u306e\u30be\u30fc\u30f3\u3092\u8a2d\u5b9a\u3057\u3001\u7269\u7406\u7684\u306b\u5206\u96e2\u3057\u3066\u5197\u9577\u6027\u3092\u6301\u305f\u305b\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30af\u30e9\u30a6\u30c9\u306e\u4fe1\u983c\u6027\u3092\u9ad8\u3081\u307e\u3059\u3002 message.select.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.select.iso=\u65b0\u3057\u3044\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e ISO \u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.select.item=\u9805\u76ee\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.select.security.groups=\u65b0\u3057\u3044\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30b0\u30eb\u30fc\u30d7\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.select.template=\u65b0\u3057\u3044\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.select.tier=\u968e\u5c64\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.set.default.NIC.manual=\u4eca\u3059\u3050\u306b\u3053\u306e VM \u306e\u30c7\u30d5\u30a9\u30eb\u30c8 NIC \u3092\u624b\u52d5\u3067\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.set.default.NIC=\u3053\u306e NIC \u3092\u3053\u306e VM \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.setup.physical.network.during.zone.creation.basic=\u57fa\u672c\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306f\u3001\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u4e0a\u306e NIC \u306b\u5bfe\u5fdc\u3059\u308b 1 \u3064\u306e\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306f\u3044\u304f\u3064\u304b\u306e\u7a2e\u985e\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u4f1d\u9001\u3057\u307e\u3059\u3002

\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u307b\u304b\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e\u3092\u30c9\u30e9\u30c3\u30b0 \u30a2\u30f3\u30c9 \u30c9\u30ed\u30c3\u30d7\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 message.setup.physical.network.during.zone.creation=\u62e1\u5f35\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306f\u30011 \u3064\u4ee5\u4e0a\u306e\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5404\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306f\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u4e0a\u306e 1 \u3064\u306e NIC \u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u5404\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u306f\u3001\u7d44\u307f\u5408\u308f\u305b\u306b\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u304c\u30011 \u3064\u4ee5\u4e0a\u306e\u7a2e\u985e\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u901a\u4fe1\u3067\u304d\u307e\u3059\u3002

\u5404\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u5bfe\u3057\u3066\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7a2e\u985e\u3092\u30c9\u30e9\u30c3\u30b0 \u30a2\u30f3\u30c9 \u30c9\u30ed\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.setup.successful=\u30af\u30e9\u30a6\u30c9\u304c\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3055\u308c\u307e\u3057\u305f\u3002 -message.snapshot.schedule=\u6b21\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304b\u3089\u9078\u629e\u3057\u3066\u30dd\u30ea\u30b7\u30fc\u306e\u57fa\u672c\u8a2d\u5b9a\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5b9a\u671f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002 +message.specifiy.tag.key.value=\u30bf\u30b0 \u30ad\u30fc\u304a\u3088\u3073\u5024\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044 message.specify.url=URL \u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044 message.step.1.continue=\u7d9a\u884c\u3059\u308b\u306b\u306f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u307e\u305f\u306f ISO \u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044 message.step.1.desc=\u65b0\u3057\u3044\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002ISO \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u7a7a\u767d\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 @@ -1922,7 +2012,10 @@ message.step.4.continue=\u7d9a\u884c\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u message.step.4.desc=\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u63a5\u7d9a\u3059\u308b\u30d7\u30e9\u30a4\u30de\u30ea \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.storage.traffic=\u30db\u30b9\u30c8\u3084 CloudStack \u30b7\u30b9\u30c6\u30e0 VM \u306a\u3069\u3001\u7ba1\u7406\u30b5\u30fc\u30d0\u30fc\u3068\u901a\u4fe1\u3059\u308b CloudStack \u306e\u5185\u90e8\u30ea\u30bd\u30fc\u30b9\u9593\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3067\u3059\u3002\u3053\u3053\u3067\u30b9\u30c8\u30ec\u30fc\u30b8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u69cb\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.suspend.project=\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4e00\u6642\u505c\u6b62\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.systems.vms.ready=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002 +message.template.copying=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\u3002 message.template.desc=VM \u306e\u8d77\u52d5\u306b\u4f7f\u7528\u3067\u304d\u308b OS \u30a4\u30e1\u30fc\u30b8 +message.tier.required=\u968e\u5c64\u306f\u5fc5\u9808\u3067\u3059 message.tooltip.dns.1=\u30be\u30fc\u30f3\u5185\u306e VM \u3067\u4f7f\u7528\u3059\u308b DNS \u30b5\u30fc\u30d0\u30fc\u306e\u540d\u524d\u3067\u3059\u3002\u30be\u30fc\u30f3\u306e\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u304b\u3089\u3001\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u4fe1\u3067\u304d\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.tooltip.dns.2=\u30be\u30fc\u30f3\u5185\u306e VM \u3067\u4f7f\u7528\u3059\u308b 2 \u756a\u76ee\u306e DNS \u30b5\u30fc\u30d0\u30fc\u306e\u540d\u524d\u3067\u3059\u3002\u30be\u30fc\u30f3\u306e\u30d1\u30d6\u30ea\u30c3\u30af IP \u30a2\u30c9\u30ec\u30b9\u304b\u3089\u3001\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u4fe1\u3067\u304d\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 message.tooltip.internal.dns.1=\u30be\u30fc\u30f3\u5185\u306e CloudStack \u5185\u90e8\u30b7\u30b9\u30c6\u30e0 VM \u3067\u4f7f\u7528\u3059\u308b DNS \u30b5\u30fc\u30d0\u30fc\u306e\u540d\u524d\u3067\u3059\u3002\u30dd\u30c3\u30c9\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 IP \u30a2\u30c9\u30ec\u30b9\u304b\u3089\u3001\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u4fe1\u3067\u304d\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 @@ -1934,111 +2027,45 @@ message.tooltip.reserved.system.netmask=\u30dd\u30c3\u30c9\u306e\u30b5\u30d6\u30 message.tooltip.zone.name=\u30be\u30fc\u30f3\u306e\u540d\u524d\u3067\u3059\u3002 message.update.os.preference=\u3053\u306e\u30db\u30b9\u30c8\u306e OS \u57fa\u672c\u8a2d\u5b9a\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u540c\u69d8\u306e\u57fa\u672c\u8a2d\u5b9a\u3092\u6301\u3064\u3059\u3079\u3066\u306e\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u3001\u5225\u306e\u30db\u30b9\u30c8\u3092\u9078\u629e\u3059\u308b\u524d\u306b\u307e\u305a\u3053\u306e\u30db\u30b9\u30c8\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002 message.update.resource.count=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30ea\u30bd\u30fc\u30b9\u6570\u3092\u66f4\u65b0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.update.ssl=\u5404\u30b3\u30f3\u30bd\u30fc\u30eb \u30d7\u30ed\u30ad\u30b7\u304a\u3088\u3073\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u66f4\u65b0\u3059\u308b\u3001X.509 \u6e96\u62e0\u306e\u65b0\u3057\u3044 SSL \u8a3c\u660e\u66f8\u3092\u9001\u4fe1\u3057\u3066\u304f\u3060\u3055\u3044\: -message.update.ssl.succeeded=SSL \u8a3c\u660e\u66f8\u306e\u66f4\u65b0\u306b\u6210\u529f\u3057\u307e\u3057\u305f message.update.ssl.failed=SSL \u8a3c\u660e\u66f8\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +message.update.ssl.succeeded=SSL \u8a3c\u660e\u66f8\u306e\u66f4\u65b0\u306b\u6210\u529f\u3057\u307e\u3057\u305f +message.update.ssl=\u5404\u30b3\u30f3\u30bd\u30fc\u30eb \u30d7\u30ed\u30ad\u30b7\u304a\u3088\u3073\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u66f4\u65b0\u3059\u308b\u3001X.509 \u6e96\u62e0\u306e\u65b0\u3057\u3044 SSL \u8a3c\u660e\u66f8\u3092\u9001\u4fe1\u3057\u3066\u304f\u3060\u3055\u3044\: +message.validate.accept=\u6709\u52b9\u306a\u62e1\u5f35\u5b50\u3092\u6301\u3064\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.creditcard=\u30af\u30ec\u30b8\u30c3\u30c8 \u30ab\u30fc\u30c9\u756a\u53f7\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.date.ISO=\u65e5\u4ed8\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 (ISO)\u3002 +message.validate.date=\u65e5\u4ed8\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.digits=\u6570\u5b57\u306e\u307f\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.email.address=\u30e1\u30fc\u30eb \u30a2\u30c9\u30ec\u30b9\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.equalto=\u540c\u3058\u5024\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.fieldrequired=\u3053\u308c\u306f\u5fc5\u9808\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002 +message.validate.fixfield=\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.validate.instance.name=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u306f 63 \u6587\u5b57\u4ee5\u5185\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002ASCII \u6587\u5b57\u306e a\uff5ez\u3001A\uff5eZ\u3001\u6570\u5b57\u306e 0\uff5e9\u3001\u304a\u3088\u3073\u30cf\u30a4\u30d5\u30f3\u306e\u307f\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u6587\u5b57\u3067\u59cb\u307e\u308a\u3001\u6587\u5b57\u307e\u305f\u306f\u6570\u5b57\u3067\u7d42\u308f\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 +message.validate.invalid.characters=\u7121\u52b9\u306a\u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002\u4fee\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.max={0} \u4ee5\u4e0b\u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.maxlength={0} \u6587\u5b57\u4ee5\u4e0b\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.minlength={0} \u6587\u5b57\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.number=\u6570\u5024\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.range={0} \uff5e {1} \u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.range.length={0} \uff5e {1} \u6587\u5b57\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.validate.URL=URL \u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.virtual.network.desc=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u5c02\u7528\u4eee\u60f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u3059\u3002\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8 \u30c9\u30e1\u30a4\u30f3\u306f VLAN \u5185\u306b\u914d\u7f6e\u3055\u308c\u3001\u30d1\u30d6\u30ea\u30c3\u30af \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3059\u3079\u3066\u4eee\u60f3\u30eb\u30fc\u30bf\u30fc\u306b\u3088\u3063\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002 message.vm.create.template.confirm=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3068 VM \u304c\u81ea\u52d5\u7684\u306b\u518d\u8d77\u52d5\u3055\u308c\u307e\u3059\u3002 message.vm.review.launch=\u6b21\u306e\u60c5\u5831\u3092\u53c2\u7167\u3057\u3066\u3001\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u6b63\u3057\u304f\u8a2d\u5b9a\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +message.vnmc.available.list=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u4e00\u89a7\u3067 VNMC \u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 +message.vnmc.not.available.list=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u4e00\u89a7\u3067 VNMC \u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 message.volume.create.template.confirm=\u3053\u306e\u30c7\u30a3\u30b9\u30af \u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? \u30dc\u30ea\u30e5\u30fc\u30e0 \u30b5\u30a4\u30ba\u306b\u3088\u3063\u3066\u306f\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u304b\u304b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 +message.waiting.for.builtin.templates.to.load=\u7d44\u307f\u8fbc\u307f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30ed\u30fc\u30c9\u3092\u5f85\u6a5f\u3057\u3066\u3044\u307e\u3059... +message.XSTools61plus.update.failed=[\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d] \u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u66f4\u65b0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30a8\u30e9\u30fc\: message.you.must.have.at.least.one.physical.network=\u5c11\u306a\u304f\u3068\u3082 1 \u3064\u7269\u7406\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u5fc5\u8981\u3067\u3059 -message.zone.creation.complete.would.you.like.to.enable.this.zone=\u30be\u30fc\u30f3\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? +message.your.cloudstack.is.ready=CloudStack \u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\! message.Zone.creation.complete=\u30be\u30fc\u30f3\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f +message.zone.creation.complete.would.you.like.to.enable.this.zone=\u30be\u30fc\u30f3\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? message.zone.no.network.selection=\u9078\u629e\u3057\u305f\u30be\u30fc\u30f3\u3067\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u9078\u629e\u3067\u304d\u307e\u305b\u3093\u3002 message.zone.step.1.desc=\u30be\u30fc\u30f3\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30e2\u30c7\u30eb\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.zone.step.2.desc=\u65b0\u3057\u3044\u30be\u30fc\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.zone.step.3.desc=\u65b0\u3057\u3044\u30dd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306b\u3001\u6b21\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 message.zoneWizard.enable.local.storage=\u8b66\u544a\: \u3053\u306e\u30be\u30fc\u30f3\u306e\u30ed\u30fc\u30ab\u30eb \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u6709\u52b9\u306b\u3059\u308b\u5834\u5408\u306f\u3001\u30b7\u30b9\u30c6\u30e0 VM \u306e\u8d77\u52d5\u5834\u6240\u306b\u5fdc\u3058\u3066\u6b21\u306e\u64cd\u4f5c\u304c\u5fc5\u8981\u3067\u3059\u3002

1. \u30b7\u30b9\u30c6\u30e0 VM \u3092\u5171\u6709\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3067\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u5171\u6709\u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u3067\u30be\u30fc\u30f3\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30be\u30fc\u30f3\u3092\u7121\u52b9\u72b6\u614b\u304b\u3089\u958b\u59cb\u3059\u308b\u5fc5\u8981\u3082\u3042\u308a\u307e\u3059\u3002

2. \u30b7\u30b9\u30c6\u30e0 VM \u3092\u30ed\u30fc\u30ab\u30eb \u30d7\u30e9\u30a4\u30de\u30ea \u30b9\u30c8\u30ec\u30fc\u30b8\u3067\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3059\u308b\u524d\u306b system.vm.use.local.storage \u3092 true \u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002


\u7d9a\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.validate.fieldrequired=\u3053\u308c\u306f\u5fc5\u9808\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002 -message.validate.fixfield=\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.email.address=\u30e1\u30fc\u30eb \u30a2\u30c9\u30ec\u30b9\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.URL=URL \u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.date=\u65e5\u4ed8\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.date.ISO=\u65e5\u4ed8\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 (ISO)\u3002 -message.validate.number=\u6570\u5024\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.digits=\u6570\u5b57\u306e\u307f\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.creditcard=\u30af\u30ec\u30b8\u30c3\u30c8 \u30ab\u30fc\u30c9\u756a\u53f7\u3092\u6b63\u3057\u304f\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.equalto=\u540c\u3058\u5024\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.accept=\u6709\u52b9\u306a\u62e1\u5f35\u5b50\u3092\u6301\u3064\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.maxlength={0} \u6587\u5b57\u4ee5\u4e0b\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.minlength={0} \u6587\u5b57\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.range.length={0} \uff5e {1} \u6587\u5b57\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.range={0} \uff5e {1} \u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.validate.max={0} \u4ee5\u4e0b\u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 messgae.validate.min={0} \u4ee5\u4e0a\u306e\u5024\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.creating.systemVM=\u30b7\u30b9\u30c6\u30e0 VM \u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 (\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044) -message.enabling.zone.dots=\u30be\u30fc\u30f3\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059... -message.restoreVM=VM \u3092\u5fa9\u5143\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.no.host.available=\u79fb\u884c\u306b\u4f7f\u7528\u3067\u304d\u308b\u30db\u30b9\u30c8\u306f\u3042\u308a\u307e\u305b\u3093 -message.network.addVM.desc=\u3053\u306e VM \u3092\u8ffd\u52a0\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u305f\u3081\u306e\u65b0\u3057\u3044 NIC \u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 -message.network.addVMNIC=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u65b0\u3057\u3044 VM NIC \u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.set.default.NIC=\u3053\u306e NIC \u3092\u3053\u306e VM \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.set.default.NIC.manual=\u4eca\u3059\u3050\u306b\u3053\u306e VM \u306e\u30c7\u30d5\u30a9\u30eb\u30c8 NIC \u3092\u624b\u52d5\u3067\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.instance.scaled.up.confirm=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.copy.template.confirm=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.template.copying=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\u3002 -message.XSTools61plus.update.failed=[\u5143\u306e XS \u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.1 \u4ee5\u964d] \u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u66f4\u65b0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30a8\u30e9\u30fc\: -message.gslb.delete.confirm=\u3053\u306e GSLB \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.portable.ip.delete.confirm=\u3053\u306e\u30dd\u30fc\u30bf\u30d6\u30eb IP \u30a2\u30c9\u30ec\u30b9\u306e\u7bc4\u56f2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.gslb.lb.remove.confirm=GSLB \u304b\u3089\u8ca0\u8377\u5206\u6563\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.admin.guide.read=VMware \u30d9\u30fc\u30b9\u306e VM \u306b\u3064\u3044\u3066\u306f\u3001\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u524d\u306b\u7ba1\u7406\u8005\u30ac\u30a4\u30c9\u306e\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002\u7d9a\u884c\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b?, -message.tier.required=\u968e\u5c64\u306f\u5fc5\u9808\u3067\u3059 -message.remove.ldap=LDAP \u69cb\u6210\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.action.downloading.template=\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u3002 -message.configure.ldap=LDAP \u3092\u69cb\u6210\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.ciscovnmc.resource=Cisco VNMC \u30ea\u30bd\u30fc\u30b9\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.add.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.enable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.disable.vnmc.provider=VNMC \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.vnmc.available.list=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u4e00\u89a7\u3067 VNMC \u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 -message.vnmc.not.available.list=\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u4e00\u89a7\u3067 VNMC \u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 -message.confirm.release.dedicate.vlan.range=\u5c02\u7528 VLAN \u306e\u7bc4\u56f2\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.start.lb.vm=LB VM \u3092\u8d77\u52d5\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.stop.lb.vm=LB VM \u3092\u505c\u6b62\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.remove.vmware.datacenter=VMware \u30c7\u30fc\u30bf\u30bb\u30f3\u30bf\u30fc\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.dedicate.zone=\u3053\u306e\u30be\u30fc\u30f3\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.release.dedicated.zone=\u3053\u306e\u5c02\u7528\u30be\u30fc\u30f3\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.dedicated.zone.released=\u5c02\u7528\u30be\u30fc\u30f3\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f -message.read.admin.guide.scaling.up=\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3059\u308b\u524d\u306b\u7ba1\u7406\u8005\u30ac\u30a4\u30c9\u306e\u52d5\u7684\u306a\u30b5\u30a4\u30ba\u5909\u66f4\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u304a\u8aad\u307f\u304f\u3060\u3055\u3044\u3002 -message.confirm.scale.up.system.vm=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.upgrade.router.newer.template=\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.scale.up.router.vm=\u30eb\u30fc\u30bf\u30fc VM \u306e\u30b5\u30a4\u30ba\u3092\u62e1\u5927\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.upgrade.routers.newtemplate=\u3053\u306e\u30be\u30fc\u30f3\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.upgrade.routers.pod.newtemplate=\u3053\u306e\u30dd\u30c3\u30c9\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.upgrade.routers.cluster.newtemplate=\u3053\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.upgrade.routers.account.newtemplate=\u3053\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u3059\u3079\u3066\u306e\u30eb\u30fc\u30bf\u30fc\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u65b0\u3057\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.dedicate.pod.domain.account=\u3053\u306e\u30dd\u30c3\u30c9\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.release.dedicated.pod=\u3053\u306e\u5c02\u7528\u30dd\u30c3\u30c9\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.pod.dedication.released=\u5c02\u7528\u30dd\u30c3\u30c9\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f -message.confirm.dedicate.cluster.domain.account=\u3053\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.cluster.dedicated=\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f -message.confirm.release.dedicated.cluster=\u3053\u306e\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.cluster.dedication.released=\u5c02\u7528\u30af\u30e9\u30b9\u30bf\u30fc\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f -message.confirm.dedicate.host.domain.account=\u3053\u306e\u30db\u30b9\u30c8\u3092\u30c9\u30e1\u30a4\u30f3/\u30a2\u30ab\u30a6\u30f3\u30c8\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.host.dedicated=\u30db\u30b9\u30c8\u3092\u5c02\u7528\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f -message.confirm.release.dedicated.host=\u3053\u306e\u5c02\u7528\u30db\u30b9\u30c8\u3092\u89e3\u653e\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.host.dedication.released=\u5c02\u7528\u30db\u30b9\u30c8\u304c\u89e3\u653e\u3055\u308c\u307e\u3057\u305f -message.confirm.delete.ucs.manager=UCS Manager \u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.refresh.blades=\u30d6\u30ec\u30fc\u30c9\u3092\u66f4\u65b0\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.delete.secondary.staging.store=\u30bb\u30ab\u30f3\u30c0\u30ea \u30b9\u30c6\u30fc\u30b8\u30f3\u30b0 \u30b9\u30c8\u30a2\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.select.tier=\u968e\u5c64\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -message.disallowed.characters=\u8a31\u53ef\u3055\u308c\u306a\u3044\u6587\u5b57: \<\,\> -message.waiting.for.builtin.templates.to.load=\u7d44\u307f\u8fbc\u307f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30ed\u30fc\u30c9\u3092\u5f85\u6a5f\u3057\u3066\u3044\u307e\u3059... -message.systems.vms.ready=\u30b7\u30b9\u30c6\u30e0 VM \u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002 -message.your.cloudstack.is.ready=CloudStack \u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\! -message.specifiy.tag.key.value=\u30bf\u30b0 \u30ad\u30fc\u304a\u3088\u3073\u5024\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044 -message.enter.seperated.list.multiple.cidrs=CIDR \u304c\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u3001\u30b3\u30f3\u30de\u533a\u5207\u308a\u306e\u4e00\u89a7\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 -message.disabling.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 -message.confirm.enable.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.enabling.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 -message.confirm.remove.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.disable.network.offering=\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.disabling.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 -message.confirm.enable.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.enabling.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u307e\u3059 -message.confirm.remove.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.confirm.disable.vpc.offering=\u3053\u306e VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u7121\u52b9\u306b\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? mode=\u30e2\u30fc\u30c9 network.rate=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901f\u5ea6 notification.reboot.instance=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u518d\u8d77\u52d5 @@ -2068,47 +2095,6 @@ state.Starting=\u958b\u59cb\u4e2d state.Stopped=\u505c\u6b62\u6e08\u307f state.Stopping=\u505c\u6b62\u3057\u3066\u3044\u307e\u3059 state.Suspended=\u4e00\u6642\u505c\u6b62 +title.upload.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 ui.listView.filters.all=\u3059\u3079\u3066 ui.listView.filters.mine=\u81ea\u5206\u306e\u3082\u306e -label.na=\u8a72\u5f53\u306a\u3057 -label.added.network.offering=\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -hint.type.part.storage.tag=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30bf\u30b0\u306e\u4e00\u90e8\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 -hint.type.part.host.tag=\u30db\u30b9\u30c8 \u30bf\u30b0\u306e\u4e00\u90e8\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 -hint.no.storage.tags=\u30b9\u30c8\u30ec\u30fc\u30b8 \u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 -hint.no.host.tags=\u30db\u30b9\u30c8 \u30bf\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 -label.availabilityZone=\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3 \u30be\u30fc\u30f3 -label.diskoffering=\u30c7\u30a3\u30b9\u30af \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0 -title.upload.volume=\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 -label.format.lower=\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 -label.checksum=\u30c1\u30a7\u30c3\u30af\u30b5\u30e0 -label.assign.vms=VM \u306e\u5272\u308a\u5f53\u3066 -label.extractable.lower=\u62bd\u51fa\u53ef\u80fd -label.globo.dns=GloboDNS -label.add.globo.dns=GloboDNS \u306e\u8ffd\u52a0 -label.globo.dns.configuration=GloboDNS \u69cb\u6210 -label.region.details=\u9818\u57df\u306e\u8a73\u7d30 -label.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb \u30e9\u30c3\u30af\u69cb\u6210 -label.add.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb \u30e9\u30c3\u30af\u69cb\u6210\u306e\u8ffd\u52a0 -label.delete.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb \u30e9\u30c3\u30af\u69cb\u6210\u306e\u524a\u9664 -message.confirm.delete.baremetal.rack.configuration=\u30d9\u30a2\u30e1\u30bf\u30eb \u30e9\u30c3\u30af\u69cb\u6210\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? -message.added.new.nuage.vsp.controller=\u65b0\u3057\u3044 Nuage VSP \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -message.added.vpc.offering=VPC \u30aa\u30d5\u30a1\u30ea\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f -label.keyboard.language=\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u8a00\u8a9e -label.standard.us.keyboard=\u6a19\u6e96 (US) \u30ad\u30fc\u30dc\u30fc\u30c9 -label.uk.keyboard=UK \u30ad\u30fc\u30dc\u30fc\u30c9 -label.japanese.keyboard=\u65e5\u672c\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9 -label.simplified.chinese.keyboard=\u7c21\u4f53\u4e2d\u56fd\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9 -label.display.name=\u8868\u793a\u540d -label.zone.name=\u30be\u30fc\u30f3\u540d -label.instances=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 -label.event=\u30a4\u30d9\u30f3\u30c8 -label.minutes.past.hour=\u5206 (\u6bce\u6642) -label.snapshots=\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8 -label.time.colon=\u6642\u523b: -label.min.past.the.hr=\u5206 (\u6bce\u6642) -label.timezone.colon=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3: -label.keep.colon=\u4fdd\u6301\u6570: -label.every=\u6bce\u9031 -label.day=\u6bce\u6708 -label.of.month=\u65e5 -label.add.private.gateway=\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306e\u8ffd\u52a0 diff --git a/client/WEB-INF/classes/resources/messages_ko_KR.properties b/client/WEB-INF/classes/resources/messages_ko_KR.properties index a08b909c188..3fe80b6b792 100644 --- a/client/WEB-INF/classes/resources/messages_ko_KR.properties +++ b/client/WEB-INF/classes/resources/messages_ko_KR.properties @@ -930,10 +930,8 @@ label.service.capabilities=\uc11c\ube44\uc2a4 \uae30\ub2a5 label.service.offering=\uc11c\ube44\uc2a4\uc81c\uacf5 label.service.state=\uc11c\ube44\uc2a4 label.session.expired=\uc138\uc158 \uc720\ud6a8\uae30\uac04\uc774 \ub04a\uc5b4\uc9d0 -label.setup.network=\ub124\ud2b8\uc6cc\ud06c \uc124\uc815 label.setup=\uc124\uc815 label.set.up.zone.type=Zone \uc885\ub958 \uc124\uc815 -label.setup.zone=Zone \uc124\uc815 label.SharedMountPoint=SharedMountPoint label.shared=\uacf5\uc720 label.show.ingress.rule=\uc218\uc2e0 \uaddc\uce59 \ud45c\uc2dc @@ -943,7 +941,7 @@ label.size=\ud06c\uae30 label.skip.guide=CloudStack \uc0ac\uc6a9 \uac00\uc774\ub4dc \uac74\ub108\ub6f0\uae30 label.snapshot.limits=\uc2a4\ub0c5\uc0f7 \uc81c\ud55c label.snapshot.name=\uc2a4\ub0c5\uc0f7 \uc774\ub984 -label.snapshot.schedule=\uc815\uae30 \uc2a4\ub0c5\uc0f7 \uc124\uc815 +label.snapshot.s=\uc2a4\ub0c5\uc0f7 label.snapshots=\uc2a4\ub0c5\uc0f7 label.snapshot=\uc2a4\ub0c5\uc0f7 label.source.nat=\uc804\uc1a1\uc6d0 NAT @@ -1397,7 +1395,6 @@ message.select.template=\uc0c8\ub85c\uc6b4 \uac00\uc0c1 \uc778\uc2a4\ud134\uc2a4 message.setup.physical.network.during.zone.creation.basic=\uae30\ubcf8 Zone\uc744 \ucd94\uac00\ud560 \ub54c\ub294 \ud558\uc774\ud37c \ubc14\uc774\uc800\uc0c1\uc758 \ub124\ud2b8\uc6cd\uce74\ub4dc(NIC)\uc5d0 \ub300\uc751\ud558\ub294 \ud55c \uac00\uc9c0 \ubb3c\ub9ac \ub124\ud2b8\uc6cc\ud06c\ub97c \uc124\uc815 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub124\ud2b8\uc6cc\ud06c\ub294 \uba87 \uac00\uc9c0 \uc885\ub958\uc758 \ud2b8\ub798\ud53d\uc744 \uc804\uc1a1\ud569\ub2c8\ub2e4.

\ubb3c\ub9ac \ub124\ud2b8\uc6cc\ud06c\uc5d0 \ub2e4\ub978 \ud2b8\ub798\ud53d\uc758 \uc885\ub958\ub97c\ub4dc\ub798\uadf8 \uc564 \ub4dc\ub86d \ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4. message.setup.physical.network.during.zone.creation=\ud655\uc7a5 Zone\uc744 \ucd94\uac00\ud560 \ub54c\ub294 \ud55c \uac1c \uc774\uc0c1 \ubb3c\ub9ac \ub124\ud2b8\uc6cc\ud06c\ub97c \uc124\uc815\ud574\uc57c \ud569\ub2c8\ub2e4. \uac01 \ub124\ud2b8\uc6cc\ud06c\ub294 \ud558\uc774\ud37c \ubc14\uc774\uc800\uc0c1 \ud55c \uac00\uc9c0 \ub124\ud2b8\uc6cc\ud06c \uce74\ub4dc(NIC)\uc5d0 \ub300\uc751\ud569\ub2c8\ub2e4. \uac01 \ubb3c\ub9ac \ub124\ud2b8\uc6cc\ud06c\uc5d0\uc11c\ub294 \uad6c\uc131\uc5d0 \uc81c\ud55c\uc774 \uc788\uc73c\ub098, \ud55c \uac00\uc9c0 \uc885\ub958 \uc774\uc0c1 \ud2b8\ub798\ud53d\uc744 \ud1b5\uc2e0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.

\uac01 \ubb3c\ub9ac \ub124\ud2b8\uc6cc\ud06c\uc5d0 \ub300\ud574\uc11c\ud2b8\ub798\ud53d \uc885\ub958\ub97c \ub4dc\ub798\uadf8 \uc564 \ub4dc\ub86d\ud574 \uc8fc\uc2ed\uc2dc\uc624. message.setup.successful=\ud074\ub77c\uc6b0\ub4dc\uac00 \uc124\uc815 \ub418\uc5c8\uc2b5\ub2c8\ub2e4. -message.snapshot.schedule=\ub2e4\uc74c \uc635\uc158\uc5d0\uc11c \uc120\ud0dd\ud55c \uc815\ucc45 \uae30\ubcf8 \uc124\uc815\uc744 \uc801\uc6a9\ud558\uc5ec \uc815\uae30 \uc2a4\ub0c5\uc0f7 \uc2a4\ucf00\uc904\uc744 \uc124\uc815 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. message.specify.url=URL\ub97c \uc9c0\uc815\ud574 \uc8fc\uc2ed\uc2dc\uc624 message.step.1.continue=\uc2e4\ud589\ud558\ub824\uba74 \ud15c\ud50c\ub9bf \ub610\ub294 ISO\ub97c \uc120\ud0dd\ud574 \uc8fc\uc2ed\uc2dc\uc624. message.step.1.desc=\uc0c8\ub85c\uc6b4 \uac00\uc0c1 \uc778\uc2a4\ud134\uc2a4\uc6a9 \ud15c\ud50c\ub9bf\uc744 \uc120\ud0dd\ud574 \uc8fc\uc2ed\uc2dc\uc624.ISO\ub97c \uc124\uce58 \ud560 \uc218 \uc788\ub294 \uacf5\ubc31 \ud15c\ud50c\ub9bf\uc744 \uc120\ud0dd\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4. diff --git a/client/WEB-INF/classes/resources/messages_nb_NO.properties b/client/WEB-INF/classes/resources/messages_nb_NO.properties index 30c3c7d0ed3..d063cac4860 100644 --- a/client/WEB-INF/classes/resources/messages_nb_NO.properties +++ b/client/WEB-INF/classes/resources/messages_nb_NO.properties @@ -21,14 +21,20 @@ error.could.not.change.your.password.because.ldap.is.enabled=Feil kunne ikke byt error.could.not.enable.zone=Kunne ikke aktivere sonen error.installWizard.message=Noe gikk galt. G\u00e5 tilbake og korriger feilene. error.invalid.username.password=Ugyldig brukernavn eller passord +error.login=Ditt brukernavn/passord stemmer ikke overens med v\u00e5re opplysninger. error.mgmt.server.inaccessible=Administrasjonsserver er utilgjengelig. Vennligst pr\u00f8v igjen senere. error.password.not.match=Passordfeltene sammensvarer ikke error.session.expired=Din sesjon har utl\u00f8pt. error.something.went.wrong.please.correct.the.following=Noe gikk galt. Vennligst korrig\u00e9r f\u00f8lgende error.unable.to.reach.management.server=Kan ikke oppn\u00e5 kontakt med administrasjonsserveren +error.unresolved.internet.name=Ditt internettnavn kan ikke l\u00f8ses. force.delete=Tving sletting force.remove=Tving fjerning force.stop=Tving stopp +hint.no.host.tags=Ingen hosttagger funnet +hint.no.storage.tags=Ingen lagringstagger funnet +hint.type.part.host.tag=Skriv inn deler av hosttagg +hint.type.part.storage.tag=Skriv inn deler av lagringstagg ICMP.code=ICMP-kode ICMP.type=ICMP-type image.directory=Bilde-katalog @@ -43,11 +49,16 @@ label.account.lower=konto label.account.name=Kontonavn label.accounts=Kontoer label.acl=ACL +label.acl.id=ACL ID label.acl.name=ACL Navn +label.acl.replaced=ACL erstattet +label.acquire.new.ip=Tilegne ny IP label.action.attach.disk.processing=Tilknytter Disk.... label.action.attach.disk=Tilknytt Disk label.action.attach.iso.processing=Tilknytter ISO.... label.action.attach.iso=Tilknytt ISO +label.action.cancel.maintenance.mode=Avbryt vedlikeholdsmodus +label.action.cancel.maintenance.mode.processing=Avbryter vedlikeholdsmodus.... label.action.change.password=Endre passord label.action.change.service=Endre Tjeneste label.action.change.service.processing=Endrer Tjeneste.... @@ -111,6 +122,9 @@ label.action.destroy.instance.processing=\u00d8delegge instans.... label.action.destroy.instance=\u00d8delegg Instans label.action.destroy.systemvm.processing=Sletter system VM.... label.action.destroy.systemvm=Slett system VM +label.action.detach.disk=Frakoble disk +label.action.detach.iso=Frakoble ISO +label.action.detach.iso.processing=Frakobler ISO.... label.action.disable.account=Deaktiver konto label.action.disable.account.processing=Deaktiverer konto.... label.action.disable.cluster=Deaktiver klyngen @@ -137,6 +151,7 @@ label.action.edit.host=Editer vert label.action.edit.instance=Rediger instans label.action.edit.ISO=Rediger ISO label.action.edit.network=Editer Nettverk +label.action.edit.network.offering=Editer nettverkstilbud label.action.edit.network.processing=Editerer Nettverk.... label.action.edit.pod=Editer Pod label.action.edit.primary.storage=Editer Prim\u00e6rlagring @@ -148,6 +163,8 @@ label.action.enable.account=Aktiver konto label.action.enable.account.processing=Aktiverer konto.... label.action.enable.cluster=Aktiver klynge label.action.enable.cluster.processing=Aktiverer klyngen... +label.action.enable.maintenance.mode=Aktiver vedlikeholdsmodus +label.action.enable.maintenance.mode.processing=Aktiver vedlikeholdsmodus... label.action.enable.nexusVswitch=Aktiver Nexus 1000v label.action.enable.physical.network=Aktiver fysisk nettverk label.action.enable.pod=Aktiver pod @@ -160,6 +177,7 @@ label.action.enable.zone=Aktiver sone label.action.enable.zone.processing=Aktiverer sone... label.action.generate.keys=Generer n\u00f8kler label.action.generate.keys.processing=Genererer n\u00f8kler.... +label.action=Handling label.action.list.nexusVswitch=Liste Nexus 1000v label.action.lock.account=L\u00e5s konto label.action.lock.account.processing=L\u00e5ser konto.... @@ -212,29 +230,42 @@ label.add.accounts=Legg til kontoer label.add.accounts.to=Legg kontoer til label.add.account.to.project=Legg kontoen til prosjektet label.add.ACL=Legg til ACL +label.add.acl.list=Legg til ACL liste +label.add.BigSwitchBcf.device=Legg til BigSwitch BCF kontroller label.add.by=Legg til ved label.add.cluster=Legg til klynge label.add.compute.offering=Legg til systemtilbud label.add.domain=Legg til domene +label.added.network.offering=La til nettverkstilbud +label.added.new.bigswitch.bcf.controller=La til ny BigSwitch BCF kontroller +label.add.egress.rule=Legg til egress regel +label.addes.new.f5=La til ny F5 label.add.F5.device=Legg til F5 enhet label.add.firewall=Legg til brannmurregel +label.add.globo.dns=legg til GloboDNS +label.add.gslb=Legg til GSLB label.add.guest.network=Legg til gjestenettverk label.add.host=Legg til vert label.adding.cluster=Legger til klynge label.adding.failed=Tillegging feilet label.adding.pod=Legger til pod label.adding.processing=Legger til +label.add.ingress.rule=Legg til ingressregel label.adding.succeeded=Tillegging vellykket label.adding=Tillegger label.adding.user=Legger til bruker label.adding.zone=Legger til sone +label.add.intermediate.certificate=Legg til intermediate sertifikat +label.add.internal.lb=Legg til intern LB label.add.ip.range=Legg til IP-rekke -label.add.ldap.account=Legg til LDAP konto +label.add.ldap.account=Legg til LDAP-konto label.add=Legg til +label.add.list.name=ACL listenavn label.add.load.balancer=Legg til lastbalanserer label.add.more=Legg til mer label.add.netScaler.device=Legg til Netscaler enhet label.add.network.ACL=Legg til nettverk ACL +label.add.network.acl.list=Legg til nettverk ACL liste label.add.network.device=Legg til nettverksenhet label.add.network=Legg til nettverk label.add.network.offering=Legg til nettverkstilbud @@ -243,11 +274,14 @@ label.add.new.gateway=Legg til ny gateway label.add.new.NetScaler=Legg til ny NetScaler label.add.new.PA=Legg til ny Palo Alto label.add.new.SRX=Legg til ny SRX +label.add.NiciraNvp.device=Legg til Nvp kontroller +label.add.OpenDaylight.device=Legg til OpenDayLight kontroller label.add.PA.device=Legg til Palo Alto enhet label.add.physical.network=Legg til fysisk nettverk label.add.pod=Legg til pod label.add.port.forwarding.rule=Legg til portvideresendingsregel label.add.primary.storage=Legg til prim\u00e6rlagring +label.add.private.gateway=Legg til privat gateway label.add.region=Legg til region label.add.resources=Legg til ressurser label.add.route=Legg til rute @@ -261,13 +295,18 @@ label.add.static.route=Legg til statisk rute label.add.system.service.offering=Legg til et systemtilbud label.add.template=Legg til mal label.add.to.group=Legg til gruppe +label.add.userdata=Brukerdata label.add.user=Legg til bruker label.add.vlan=Legg til VLAN label.add.vm=Legg til VM label.add.vms=Legg til VMer label.add.vms.to.lb=Legg til VM(er) til lastbalanseringsregel +label.add.vmware.datacenter=Legg til VMware datasenter +label.add.vnmc.device=Legg til VNMC enhet +label.add.vnmc.provider=Legg til VNMC tilbyder label.add.volume=Legg til volum label.add.vpc=Legg til VPC +label.add.vpc.offering=Legg til VPC tilbud label.add.VPN.gateway=Legg til VPN Gateway label.add.vpn.user=Legg til VPN-bruker label.add.vxlan=Legg til VXLAN @@ -278,10 +317,18 @@ label.advanced=Avansert label.advanced.mode=Avansermodus label.advanced.search=Avansert s\u00f8k label.agent.password=Agentpassord +label.agent.port=Agentport +label.agent.state=Agentstatus +label.agent.username=Agentbrukernavn label.agree=Godtar +label.alert.archived=Varsel arkivert +label.alert.deleted=Varsel slettet +label.alert.details=Varseldetaljer label.alert=Varsel +label.algorithm=Algoritme label.allocated=Allokert label.allocation.state=Allokeringsstatus +label.allow=Tillat label.api.key=API-n\u00f8kkel label.api.version=API Versjon label.apply=Bruk @@ -289,10 +336,13 @@ label.app.name=CloudStack label.archive.alerts=Arkiver varsler label.archive=Arkiv label.archive.events=Arkiver hendelser +label.assign.instance.another=Tildel instans til en annen konto label.assign=Tildel +label.assign.vms=Tildel VMer label.attached.iso=Tilknyttet ISO label.author.email=Forfatter e-post label.author.name=Forfatternavn +label.autoscale=Autoskaler label.availability=Tilgjengelighet label.availability.zone=Tilgjengelighetssone label.available.public.ips=Tilgjengelig offentlige IP-adresser @@ -302,6 +352,11 @@ label.bandwidth=B\u00e5ndbredde label.basic=Basis label.basic.mode=Basismodus label.bigswitch.bcf.details=BigSwitch BCF detaljer +label.bigswitch.bcf.nat=BigSwitch BCF NAT aktivert +label.bigswitch.controller.address=BigSwitch BCF kontrolleradresse +label.blade.id=Blad-ID +label.blades=Blad +label.bootable=Botbar label.by.account=Etter Konto label.by.alert.type=Etter varseltype label.by.availability=Etter Tilgjengelighet @@ -313,6 +368,7 @@ label.by.pod=Etter Pod label.by.role=Etter Rolle label.by.start.date=Etter Startdato label.bytes.received=Bytes Mottatt +label.bytes.sent=Bytes sendt label.by.traffic.type=Etter Trafikktype label.by.type=Etter Type label.by.type.id=Etter Type ID @@ -325,12 +381,15 @@ label.certificate=Sertifikat label.change.service.offering=Endre tjenestetilbud label.change.value=Endre verdi label.character=Karakter +label.chassis=Kasse +label.checksum=sjekksum label.cidr=CIDR label.CIDR.list=CIDR liste label.cidr.list=Kilde-CIDR label.cisco.nexus1000v.ip.address=Nexus 1000v IP Addresse label.cisco.nexus1000v.password=Nexus 1000v Passord label.cisco.nexus1000v.username=Nexus 1000v Brukernavn +label.ciscovnmc.resource.details=CiscoVNMC ressursdetaljer label.clean.up=Rydd opp label.clear.list=T\u00f8m liste label.close=Lukk @@ -341,6 +400,7 @@ label.clusters=Klynger label.cluster.type=Klyngetype label.clvm=CLVM label.code=Kode +label.community=Fellesskap label.compute.and.storage=Regnekraft og lagring label.compute=Beregne label.compute.offering=Regnekraftstilbud @@ -348,12 +408,14 @@ label.compute.offerings=Regnekraftstilbud label.configuration=Konfigurering label.configure=Konfigurer label.configure.ldap=Konfigurer LDAP +label.configure.network.ACLs=Konfigurer Nettverksaksesslister label.configure.vpc=Konfigurer VPC label.confirmation=Bekreftelse label.confirm.password=Bekreft passord label.congratulations=Gratulerer\! label.conserve.mode=Konserveringsmodus label.console.proxy=Konsollproxy +label.console.proxy.vm=Konsollproxy VM label.continue.basic.install=Fortsett med enkelt oppsett label.continue=Fortsett label.copying.iso=Kopierer ISO @@ -370,22 +432,31 @@ label.created=Opprettet label.create.project=Opprett prosjekt label.create.template=Opprett mal label.create.VPN.connection=Opprett VPN-tilkobling +label.cross.zones=Kryssoner label.custom.disk.size=Tilpasset Diskst\u00f8rrelse label.daily=Daglig label.data.disk.offering=Datadisktilbud label.date=Dato label.day=Dag label.decline.invitation=Avvis invitasjon +label.dedicate.cluster=Dediker kluster label.dedicated=Dedikert +label.dedicate=Dediker +label.dedicate.host=Dediker host +label.dedicate.zone=Dediker sone label.default=Standardverdi label.default.use=Standard bruk label.default.view=Standardvisning +label.delete.acl.list=Slett ACL liste label.delete.alerts=Slette varsler label.delete.ciscoASA1000v=Slett CiscoASA1000v +label.delete.ciscovnmc.resource=Slett CiscoVNMC ressurs label.delete.events=Slett hendelser label.delete.F5=Slett F5 label.delete.gateway=slett gateway +label.delete.internal.lb=Slett intern LB label.delete.NetScaler=Slett Netscaler +label.delete.OpenDaylight.device=Fjern OpenDaylight kontroller label.delete.PA=Slett Palo Alto label.delete.profile=Slett Profil label.delete.project=Slett prosjekt @@ -396,6 +467,7 @@ label.delete.VPN.gateway=Slett VPN-gateway label.delete.vpn.user=Slett VPN-bruker label.deleting.failed=Sletting feilet label.deleting.processing=Sletter.... +label.deny=Nekt label.description=Beskrivelse label.destination.physical.network.id=Fysisk nettverksid-destinasjon label.destination.zone=Destinasjonssone @@ -406,15 +478,22 @@ label.device.id=Enhets ID label.devices=Enheter label.dhcp=DHCP label.DHCP.server.type=DHCP servertype +label.disable.autoscale=Deaktiver autoskalering label.disabled=Inaktiv +label.disable.network.offering=Deaktiver nettverkstilbud label.disable.provider=Deaktiver tilbyder +label.disable.vnmc.provider=Deatkivert VNMC tilbyder +label.disable.vpc.offering=Deaktivert VPC tilbud label.disable.vpn=Dekativer VPN label.disabling.vpn.access=Deaktiverer VPN Tilgang +label.disbale.vnmc.device=Deaktivert VNMC enhet label.disk.allocated=Disk allokert label.disk.iops.max=Maks IOPS label.disk.iops.min=Min IOPS label.disk.iops.total=IOPS Totalt +label.diskoffering=diskoffering label.disk.offering=Disktilbud +label.disk.provisioningtype=Provisjoneringstype label.disk.read.bytes=Disk lese (Bytes) label.disk.read.io=Disk lese (IO) label.disk.size=Diskst\u00f8rrelse @@ -423,7 +502,9 @@ label.disk.total=Disk Totalt label.disk.volume=Disk Volum label.disk.write.bytes=Disk skrive (Bytes) label.disk.write.io=Disk skrive (IO) +label.display.name=Visningsnavn label.display.text=Visningstekst +label.distributedrouter=DIstribuert router label.dns.1=DNS 1 label.dns.2=DNS 2 label.dns=DNS @@ -436,30 +517,49 @@ label.domain.name=Domenenavn label.domain.router=Domeneruter label.done=Utf\u00f8rt label.drag.new.position=Dra til ny posisjon +label.duration.in.sec=Varighet (i sek.) +label.dynamically.scalable=Dynamisk skalerbar +label.edit.acl.rule=Endre ACL regel label.edit=Editer label.edit.lb.rule=Endre LB-regel label.edit.network.details=Edit\u00e9r nettverksdetaljer label.edit.project.details=Editer prosjektdetaljer +label.edit.region=Editer region label.edit.secondary.ips=Endre sekund\u00e6re IPer label.edit.traffic.type=Endre trafikktype label.edit.vpc=Rediger VPC +label.egress.default.policy=Egress standard policy +label.egress.rule=Egressregel +label.egress.rules=Egressregler label.elastic=Elastisk label.elastic.IP=Elastisk IP label.elastic.LB=Elastisk LB label.email=E-post label.email.lower=epost +label.enable.autoscale=Aktivert autoskalering +label.enable.network.offering=Aktiver nettverkstilbud label.enable.provider=Aktiver tilbyder +label.enable.s3=Aktiver S3-st\u00f8ttet sekund\u00e6rlagring label.enable.swift=Aktiver Swift +label.enable.vnmc.device=Aktivert VNMC enhet +label.enable.vnmc.provider=Aktivert VNMC tilbyder +label.enable.vpc.offering=Aktiver VPC tilbud label.enable.vpn=Aktiver VPN label.enabling.vpn.access=Aktiverer VPN-tilgang label.enabling.vpn=Aktiverer VPN label.end.IP=Slutt-IP label.end.port=Sluttport +label.end.vlan=Slutt VLAN +label.end.vxlan=Slutt VXLAN label.enter.token=Skriv inn koden +label.error.code=Feilkode label.error=Feil label.error.upper=ERROR label.esx.host=ESX/ESXi vert +label.event=Hendelse +label.every=Hver label.example=Eksempel +label.extractable.lower=Nedlastbar label.extractable=Utpakkbar label.f5.details=F5 detaljer label.f5=F5 @@ -470,18 +570,35 @@ label.firewall=Brannmur label.first.name=Fornavn label.firstname.lower=fornavn label.format=Format +label.format.lower=format label.friday=Fredag label.full=Full label.full.path=Full sti label.general.alerts=Generelle varsler +label.globo.dns.configuration=GloboDNS-konfigurasjon +label.globo.dns=GloboDNS label.gluster.volume=Volum label.go.step.2=G\u00e5 til steg 2 label.go.step.3=G\u00e5 til steg 3 label.go.step.4=G\u00e5 til steg 4 label.go.step.5=G\u00e5 til steg 5 label.gpu=CPU +label.group.by.account=Grupper p\u00e5 konto +label.group.by.cluster=Grupper p\u00e5 kluster +label.group.by.pod=Grupper p\u00e5 pod +label.group.by.zone=Grupper p\u00e5 sone label.group=Gruppe label.group.optional=Gruppe (Valgfritt) +label.gslb.assigned.lb.more=Tildel mer lastbalansering +label.gslb.assigned.lb=Tildelt lastbalansering +label.gslb.delete=Slett GSLB +label.gslb.details=GSLB detaljer +label.gslb.domain.name=GSLB domenenavn +label.gslb=GSLB +label.gslb.lb.details=Lastbalanseringsdetaljer +label.gslb.lb.remove=Fjern lastbalansering fra denne GSLB +label.gslb.lb.rule=Lastbalanseringsregel +label.gslb.service=GSLB tjeneste label.guest.cidr=Gjest CIDR label.guest.end.ip=Gjest slutt-IP label.guest=Gjest @@ -493,19 +610,27 @@ label.guest.start.ip=Gjest start-IP label.guest.traffic=Gjestetrafikk label.guest.type=Gjestetype label.ha.enabled=HA Aktivert +label.health.check=Helsesjekk label.help=Hjelp +label.hide.ingress.rule=Skjul ingressregel label.hints=Hint label.home=Hjem label.host.alerts=Vertsvarsler label.host.MAC=Verts MAC label.host.name=Vertsnavn label.hosts=Verter +label.host.tags=Vertsknagger label.host=Vert label.hourly=Hver time label.hvm=HVM +label.hypervisor=Hypervisor +label.hypervisors=Hypervisors +label.hypervisor.type=Hypervisor type +label.hypervisor.version=Hypervisor versjon label.id=ID label.info=Info label.info.upper=INFO +label.ingress.rule=Ingressregel label.installWizard.addClusterIntro.subtitle=Hva er en klynge? label.installWizard.addClusterIntro.title=La oss legge til en klynge label.installWizard.addHostIntro.subtitle=Hva er en vert? @@ -525,9 +650,11 @@ label.installWizard.title=Hei og velkommen til CloudStack&\#8482 label.instance=Instans label.instance.limits=Instans Begrensninger label.instance.name=Instans Navn +label.instance.port=Instansport label.instances=Instanser label.internal.dns.1=Intern DNS 1 label.internal.dns.2=Intern DNS 2 +label.internal.lb.details=Intern LB detaljer label.internal.name=Internt navn label.introduction.to.cloudstack=Introduksjon til CloudStack&\#8482 label.invitations=Invitasjoner @@ -546,12 +673,18 @@ label.ipv4.cidr=IPv4 CIDR label.ipv4.dns1=IPv4 DNS1 label.ipv4.dns2=IPv4 DNS2 label.ipv4.end.ip=IPv4 Slutt IP +label.ipv4.netmask=IPv4 nettmaske label.ipv4.start.ip=IPv4 Start IP label.ipv6.address=IPv6 IP Adresse +label.ipv6.CIDR=IPv6 CIDR +label.ipv6.dns1=IPv6 DNS1 +label.ipv6.dns2=IPv6 DNS2 label.ipv6.end.ip=IPv6 Slutt IP label.ipv6.gateway=IPv6 Gateway label.ipv6.start.ip=IPv6 Start IP +label.iscsi=iSCSI label.is.default=Er standard +label.iso.boot=ISO Boot label.iso=ISO label.isolated.networks=Isolerte nettverk label.isolation.method=Isolasjonsmetode @@ -560,20 +693,28 @@ label.is.redundant.router=Redundant label.is.shared=Er delt label.is.system=Er system label.item.listing=Elementlisting +label.japanese.keyboard=Japansk-tastatur label.keep=Behold +label.keep.colon=Behold\: +label.keyboard.language=Tastaturspr\u00e5k +label.keyboard.type=Tastaturtype label.key=N\u00f8kkel label.kvm.traffic.label=KVM trafikketikett +label.label=Etikett label.lang.arabic=Arabisk label.lang.brportugese=Brasiliansk Portugisisk label.lang.catalan=Katalansk label.lang.chinese=Kinesisk (Forenklet) +label.lang.dutch=Dutch (Nederland) label.lang.english=Engelsk label.lang.french=Fransk label.lang.german=Tysk +label.lang.hungarian=Ungarsk label.lang.italian=Italiensk label.lang.japanese=Japanesisk label.lang.korean=Koreansk label.lang.norwegian=Norsk +label.lang.polish=Polsk label.lang.russian=Russisk label.lang.spanish=Spansk label.last.name=Etternavn @@ -589,29 +730,40 @@ label.ldap.configuration=LDAP Konfigurering label.ldap.group.name=LDAP Gruppe label.ldap.port=LDAP port label.load.balancer=Lastbalanserer +label.load.balancer.type=Lastbalanseringstype label.load.balancing=Lastbalansering label.load.balancing.policies=Regler for lastbalansering label.loading=Laster label.local=Lokal +label.local.storage.enabled.system.vms=Aktiver lokal lagring for SystemVMer label.local.storage=Lokal lagring +label.login=Logg inn label.logout=Logg ut label.lun=LUN label.LUN.number=LUN \# label.make.project.owner=Gj\u00f8r konto prosjekteier +label.make.redundant=Gj\u00f8r redundant label.manage=Administrer label.management=Administrasjon label.management.ips=Administrasjons IP-adresser label.manage.resources=Behandle ressurser +label.max.cpus=Maks CPU kjerner label.maximum=Maksimum label.max.instances=Maks Instanser +label.max.memory=Maks minne (MiB) +label.max.networks=Maks nettverk +label.max.primary.storage=Maks prim\u00e6r (GiB) label.max.public.ips=Maks offentlige IPer +label.max.secondary.storage=Maks sekund\u00e6r (GiB) label.max.snapshots=Maks \u00f8yeblikksbilder label.max.templates=Maks maler label.max.vms=Maks bruker-VMer label.max.volumes=Maks volumer +label.max.vpcs=Maks VPCs label.may.continue=Du kan n\u00e5 fortsette. label.md5.checksum=MD5 sjekksum label.memory.allocated=Minne allokert +label.memory.limits=Minnebegrensning (MiB) label.memory.mb=Minne (i MB) label.memory=Minne label.memory.total=Minne totalt @@ -623,6 +775,7 @@ label.menu.all.instances=Alle instanser label.menu.configuration=Konfigurering label.menu.domains=Domener label.menu.events=Hendelser +label.menu.global.settings=Globale innstillinger label.menu.infrastructure=Infrastruktur label.menu.instances=Instanser label.menu.ipaddresses=IP-adresser @@ -647,16 +800,22 @@ label.menu.system.vms=System VMer label.menu.templates=Maler label.menu.virtual.resources=Virtuelle ressurser label.menu.volumes=Volumer +label.menu.vpc.offerings=VPC tilbud label.migrate.instance.to.host=Migrer instansen til en annen vert label.migrate.instance.to=Migrer instans til label.migrate.instance.to.ps=Migrer instansen til en annen sekund\u00e6r lagring. +label.migrate.lb.vm=Migrer LB VM label.migrate.router.to=Migrer Ruter til label.migrate.systemvm.to=Migrer System VM til label.migrate.to.host=Migrer til vert label.migrate.to.storage=Migrer til lagring +label.migrate.volume=Migrer volum label.migrate.volume.to.primary.storage=Migrer volumet til en annen prim\u00e6rlagring. label.minimum=Minimum label.min.instances=Min Instanser +label.min.past.the.hr=minutter etter time +label.minutes.past.hour=minutt(er) etter time +label.mode=Modus label.monday=Mandag label.monthly=M\u00e5nedlig label.more.templates=Flere maler @@ -670,12 +829,15 @@ label.my.templates=Mine maler label.name.lower=Navn label.name=Navn label.name.optional=Navn (Valgfritt) +label.na=N/A label.nat.port.range=NAT portrekke label.netmask=Nettmaske label.netscaler.details=NetScaler detaljer label.netScaler=NetScaler label.network.ACL=Nettverk ACL label.network.ACLs=Nettverk ACLer +label.network.addVM=Legg nettverk til VM +label.network.cidr=Nettverk CIDR label.network.desc=Nettverksbeskrivelse label.network.device=Nettverksenhet label.network.device.type=Type nettverksenhet @@ -684,9 +846,11 @@ label.network.domain.text=Nettverksdomene label.network.id=Nettverks ID label.networking.and.security=Nettverk og sikkerhet label.network.label.display.for.blank.value=Bruk standard gateway +label.network.limits=Nettverksbegrensninger label.network.name=Nettverksdame label.network=Nettverk label.network.offering=Nettverkstilbud +label.network.read=Nettverk les label.networks=Nettverk label.new=Ny label.new.password=Nytt passord @@ -697,24 +861,41 @@ label.nexusVswitch=Nexus 1000v label.nfs=NFS label.nfs.server=NFS Server label.nfs.storage=NFS Lagring +label.nic.adapter.type=NIC adaptertype label.nicira.nvp.details=Nicira NVP detaljer label.nics=NICer label.no.data=Ingen data \u00e5 vise +label.no.grouping=(ingen gruppering) +label.no.isos=Ingen tilgjengelige ISOer +label.no.items=Ingen tilgjengelige elementer label.no=Nei label.none=Ingen +label.no.security.groups=Ingen tilgjengelige sikkerhetsgrupper label.not.found=Ikke funnet label.no.thanks=Nei, takk label.notifications=Notifikasjoner label.number.of.clusters=Antall klynger +label.number.of.cpu.sockets=Totalt antall CPU-sockets +label.number.of.hosts=Antall verter label.number.of.pods=Antall pods +label.number.of.system.vms=Antall System VMer label.number.of.virtual.routers=Antall virtuelle rutere label.number.of.zones=Antall soner +label.num.cpu.cores=\# av CPU-kjerner +label.ocfs2=OCFS2 label.offer.ha=Tilby HA label.ok=OK +label.opendaylight.controllerdetail=OpenDaylight kontrollerdetaljer +label.opendaylight.controller=OpenDaylight kontroller +label.opendaylight.controllers=OpenDaylight kontrollere +label.openDaylight=OpenDaylight label.optional=Valgfritt label.order=Rekkef\u00f8lge label.os.type=OS-type +label.other=Andre label.ovs=OVS +label.owner.account=Eierkonto +label.owner.domain=Eierdomene label.palo.alto.details=Palo Alto detaljer label.PA=Palo Alto label.passive=Passiv @@ -776,29 +957,51 @@ label.rbd.monitor=Ceph monitor label.rbd.pool=Ceph pool label.rbd=RBD label.reboot=Restart +label.recover.vm=Gjenopprett VM label.redundant.router.capability=Redundant ruter label.redundant.router=Redundant ruter label.redundant.state=Redundant tilstand +label.redundant.vpc=Redundant VPC +label.refresh.blades=Oppdater blad(er) label.refresh=Oppfrisk +label.region.details=Regiondetaljer label.region=Region label.reinstall.vm=Reinstaller VM label.related=Relaterte +label.release.dedicated.cluster=Frigj\u00f8r dedikert kluster +label.release.dedicated.host=Frigj\u00f8r dedikert host +label.release.dedicated.zone=Frigj\u00f8r dedikert sone label.remind.later=P\u00e5minn meg senere label.remove.ACL=Fjern ACL +label.remove.egress.rule=Fjern egressregel label.remove.from.load.balancer=Fjerner instans fra lastbalanserer +label.remove.ingress.rule=Fjern ingressregel label.remove.ip.range=Fjern IP-rekke label.remove.ldap=Fjern LDAP +label.remove.network.offering=Fjern nettverkstilbud label.remove.pf=Fjern portvideresendingsregel +label.remove.project.account=Fjern konto fra prosjekt label.remove.region=Fjern region label.remove.rule=Fjern regel label.remove.static.nat.rule=Fjern statisk NAT-regel label.remove.static.route=Fjern statisk rute +label.remove.vm.from.lb=Fjern VM fra lastbalanseringsregel +label.remove.vmware.datacenter=Fjern VMware datasenter label.remove.vpc=fjern VPC +label.remove.vpc.offering=Fjern VPC tilbud label.removing=Fjerner label.removing.user=Fjerner Bruker +label.reource.id=Ressurs ID +label.replace.acl=Erstatt ACL label.required=P\u00e5krevd +label.requires.upgrade=Krever oppgradering label.reserved.system.ip=Reservert System IP label.reset.VPN.connection=Resett VPN-tilkobling +label.resize.new.offering.id=Nytt tilbud +label.resize.new.size=Ny st\u00f8rrelse (GB) +label.resize.shrink.ok=Krympe OK +label.resource.limits=Ressursbegrensninger +label.resource.name=Ressursnavn label.resource=Ressurs label.resources=Ressurser label.restart.network=Nettverksomstart @@ -808,12 +1011,19 @@ label.restore=Gjenopprett label.review=Gjennomg\u00e5 label.revoke.project.invite=Tilbakekall invitasjonen label.role=Rolle +label.root.certificate=Rootsertifikat +label.root.disk.controller=Root diskkontroller +label.root.disk.offering=Root disktilbud label.root.disk.size=Rotdiskst\u00f8rrelse +label.router.vm.scaled.up=RuterVM skalert opp label.routing=Ruting +label.rule.number=Regelnummer label.rules=Regler label.running.vms=Kj\u00f8rende VMer +label.s3.access_key=Aksessn\u00f8kkel label.s3.nfs.path=S3 NFS Sti label.s3.nfs.server=S3 NFS Server +label.s3.secret_key=Hemmelig n\u00f8kkel label.s3.use_https=Bruk HTTPS label.saturday=L\u00f8rdag label.save.and.continue=Lagre og fortsett @@ -823,6 +1033,7 @@ label.search=S\u00f8k label.secondary.ips=Sekund\u00e6re IPer label.secondary.storage=Sekund\u00e6rlagring label.secondary.storage.vm=Sekund\u00e6rlagring VM +label.secret.key=Hemmelig n\u00f8kkel label.security.group.name=Sikkerhetsgruppenavn label.security.group=Sikkerhetsgruppe label.security.groups=Sikkerhetsgrupper @@ -844,31 +1055,42 @@ label.service.offering=Tjenestetilbud label.service.state=Tjeneste Status label.services=Tjenester label.session.expired=Sesjon utl\u00f8pt +label.set.default.NIC=Sett som standard NIC label.settings=Innstillinger -label.setup.network=Nettverksoppsett label.setup=Oppsett -label.setup.zone=Soneoppsett label.set.up.zone.type=Oppsett av sonetype label.shared=Delt +label.show.advanced.settings=VIs avanserte instillinger +label.show.ingress.rule=Vis ingressregel label.shutdown.provider=Steng tilbyder +label.simplified.chinese.keyboard=Forenklet kinesisk-tastatur +label.site.to.site.VPN=Site-to-site VPN label.size=St\u00f8rrelse label.skip.guide=Jeg har brukt CloudStack tidligere. Hopp over denne veiviseren label.smb.domain=SMB Domene label.smb.password=SMB Passord label.smb.username=SMB Brukernavn +label.snapshot.s=\u00d8yeblikksbilder label.snapshots=\u00d8yeblikksbilder label.snapshot=\u00d8yeblikksbilde label.SNMP.port=SNM Port label.sockets=CPU Sokkel +label.source.ip.address=Kilde IP-adresse label.source.nat=Kilde NAT +label.source.nat.supported=SourceNAT st\u00f8ttet +label.source.port=Kildeport label.specify.IP.ranges=Spesifiser IP-rekker label.specify.vlan=Spesifiser VLAN label.specify.vxlan=Spesifiser VXLAN label.SR.name=SR navnelapp label.srx.details=SRX detaljer label.srx=SRX +label.standard.us.keyboard=Standard (Amerikansk) tastatur label.start.IP=Start-IP +label.start.lb.vm=Start LB VM label.start.port=Start port +label.start.vlan=Start VLAN +label.start.vxlan=Start VXLAN label.state=Status label.static.nat.enabled=Statisk NAT aktivert label.static.nat=Statistk NAT @@ -889,6 +1111,9 @@ label.stickiness=Klebrighet label.sticky.domain=Domene label.sticky.expire=Utl\u00f8per label.sticky.length=Lengde +label.sticky.mode=Modus +label.sticky.tablesize=Tabellst\u00f8rrelse +label.stop.lb.vm=Stop LB VM label.stopped.vms=Stoppede VMer label.stop=Stopp label.storage=Lagring @@ -904,6 +1129,8 @@ label.suspend.project=Suspender prosjekt label.switch.type=Svitsjtype label.system.capacity=Systemkapasistet label.system.offering=Systemtilbud +label.system.vm.details=SystemVM-detaljer +label.system.vm.scaled.up=SystemVM skalert opp label.system.vms=System VMer label.system.vm=System VM label.tagged=Tagget @@ -924,6 +1151,7 @@ label.total.CPU=Totalt CPU label.total.hosts=Totalt Verter label.total.memory=Totalt minne label.total.storage=Totalt lagring +label.total.virtual.routers.upgrade=Totalt antall virtuelle routere som trenger oppgradering label.traffic.label=Trafikketikett label.traffic.types=Trafikktyper label.traffic.type=Trafikktype @@ -931,17 +1159,22 @@ label.tuesday=Tirsdag label.type.id=Type ID label.type.lower=type label.type=Type +label.ucs=UCS +label.uk.keyboard=UK-tastatur +label.unavailable=Utilgjengelig label.unlimited=Ubegrenset label.update.project.resources=Oppdater prosjektressurser label.update.ssl.cert= SSL-sertifikat label.update.ssl= SSL-sertifikat label.updating=Oppdaterer label.upgrade.required=Oppgradering er p\u00e5krevd +label.upgrade.router.newer.template=Oppgrader ruter til nyere mal label.upload=Last opp label.upload.volume=Last opp volum label.url=URL label.used=Brukt label.user=Bruker +label.user.data=Brukerdata label.username=Brukernavn label.username.lower=brukernavn label.users=Brukere @@ -950,12 +1183,19 @@ label.use.vm.ips=Bruk VM IPer label.value=Verdi label.vcdcname=vCenter DC navn label.vcenter.cluster=vCenter Klynge +label.vcenter.datacenter=vCenter Datacenter +label.vcenter.datastore=vCenter Datastore label.vcenter.host=vCenter Vert label.vcenter.password=vCenter passord label.vcenter.username=vCenter brukernavn label.vcenter=vcenter label.vcipaddress=vCenter IP-adresse label.version=Versjon +label.vgpu.max.resolution=Maks oppl\u00f8sning +label.vgpu.max.vgpu.per.gpu=VGPUs per GPU +label.vgpu.type=vGPU type +label.vgpu=VGPU +label.vgpu.video.ram=Video RAM label.view.all=Vis alle label.view.console=Se konsoll label.viewing=Viser @@ -965,6 +1205,10 @@ label.view=Vis label.virtual.machines=Virtuelle Maskiner label.virtual.machine=Virtuell Maskin label.virtual.network=Virtuelt-nettverk +label.virtual.routers.group.account=Virtuelle rutere gruppert p\u00e5 konto +label.virtual.routers.group.cluster=Virtuelle rutere gruppert p\u00e5 kluster +label.virtual.routers.group.pod=Virtuelle rutere gruppert p\u00e5 pod +label.virtual.routers.group.zone=Virtuelle rutere gruppert p\u00e5 sone label.virtual.routers=Virtuelle rutere label.virtual.router=Virtuell ruter label.vlan.id=VLAN/VNI ID @@ -975,28 +1219,45 @@ label.vm.destroy=Destruer label.vm.display.name=Visningsnavn for VM label.VMFS.datastore=VMFS lagringsomr\u00e5de label.vmfs=VMFS +label.vm.id=VM ID label.vm.ip=VM IP Adresse label.vm.name=VM-navn +label.vm.password=Passord til VM er label.vm.reboot=Restart +label.vmsnapshot.parentname=Forelder label.vmsnapshot.type=Type label.vmsnapshot=VM \u00d8yeblikksbilder label.vm.start=Start +label.vm.state=VM-status label.vm.stop=Stopp label.vms=VMer +label.vmware.datacenter.id=VMware datasenter ID +label.vmware.datacenter.name=VMware datasenternavn +label.vmware.datacenter.vcenter=VMware datasenter vcenter label.vmware.traffic.label=VMware trafikketikett label.vnet.id=VLAN/VNI ID label.vnet=VLAN/VNI +label.vnmc.devices=VNMC enheter +label.vnmc=VNMC label.volgroup=Volumgruppe +label.volume.details=Volumdetaljer label.volume.limits=Volumbegrensninger +label.volume.migrated=Volum migrert label.volume.name=Volumnavn label.volumes=Volumer label.volume=Volum +label.vpc.distributedvpcrouter=Distribuert VPC router label.vpc.id=VPC ID +label.VPC.limits=VPC begrensninger +label.vpc.offering.details=VPC tilbudsdetaljer +label.vpc.offering=VPC tilbud label.VPC.router.details=VPC ruterdetaljer label.vpc=VPC label.VPN.connection=VPN-tilkobling label.VPN.gateway=VPN Gateway label.vpn=VPN +label.vswitch.name=vSwitch navn +label.vSwitch.type=vSwitch type label.vxlan.id=VXLAN ID label.vxlan.range=VXLAN-rekke label.vxlan=VXLAN @@ -1009,11 +1270,15 @@ label.weekly=Ukentlig label.welcome.cloud.console=Velkommen til administrasjonskonsollet label.welcome=Velkommen label.what.is.cloudstack=Hva er CloudStack&\#8482? +label.xenserver.tools.version.61.plus=Original XS versjon er 6.1\\+ +label.Xenserver.Tools.Version61plus=Original XS versjon er 6.1\\+ label.xenserver.traffic.label=XenServer trafikketikett label.yes=Ja +label.zone.dedicated=Dedikert sone label.zone.details=Sonedetaljer label.zone.id=Sone ID label.zone.lower=Sone +label.zone.name=Sonenavn label.zone=Sone label.zones=Soner label.zone.step.1.title=Steg 1\: Velg et nettverk @@ -1048,6 +1313,7 @@ message.action.disable.nexusVswitch=Vennligst bekreft at du \u00f8nsker \u00e5 d message.action.disable.physical.network=Vennligst bekreft at du \u00f8nsker \u00e5 deaktivere dette fysiske nettverket. message.action.disable.pod=Vennligst bekreft at du \u00f8nsker \u00e5 aktivere denne poden message.action.disable.zone=Vennligst bekreft at du \u00f8nsker \u00e5 deaktivere denne sonen. +message.action.downloading.template=Laster ned mal. message.action.download.iso=Vennligst bekreft at du \u00f8nsker \u00e5 laste ned denne ISO. message.action.download.template=Vennligst bekreft at du \u00f8nsker \u00e5 laste ned denne malen. message.action.enable.cluster=Vennligst bekreft at du \u00f8nsker \u00e5 aktivere denne klyngen. @@ -1074,6 +1340,7 @@ message.add.load.balancer.under.ip=Lastbalanseringsregelen har blitt lagt til un message.add.VPN.gateway=Vennligst bekreft at du \u00f8nsker \u00e5 legge til en VPN Gateway message.alert.state.detected=Alarm oppdaget message.change.password=Vennligst endre ditt passord +message.configure.ldap=Bekreft at du \u00f8nsker \u00e5 konfigurere LDAP. message.configuring.guest.traffic=Konfigurerer gjestetrafikk message.configuring.physical.networks=Konfigurer fysisk nettverk message.configuring.public.traffic=Konfigurerer offentlig trafikk @@ -1084,10 +1351,20 @@ message.confirm.delete.NetScaler=Vennligst bekreft at du \u00f8nsker \u00e5 slet message.confirm.delete.PA=Vennligst bekreft at du vil slette Palo Alto message.confirm.delete.SRX=Vennligst bekreft at du \u00f8nsker \u00e5 slette SRX message.confirm.destroy.router=Vennligst bekreft at du \u00f8nsker \u00e5 fjerne denne ruteren +message.confirm.disable.network.offering=Er du sikker p\u00e5 at du vil deaktivere dette nettverkstilbudet? message.confirm.disable.provider=Vennligst bekreft at du \u00f8nsker \u00e5 deaktivere denne tilbyderen +message.confirm.disable.vpc.offering=Er du sikker p\u00e5 at du vil deaktivere dette VPC tilbudet? +message.confirm.enable.network.offering=Vil du aktivere dette nettverkstilbudet? message.confirm.enable.provider=Vennligst bekreft at du \u00f8nsker \u00e5 aktivere denne tilbyderen message.confirm.join.project=Vennligst bekreft at du \u00f8nsker \u00e5 delta i dette prosjektet. +message.confirm.remove.network.offering=Er du sikker p\u00e5 at du vil fjerne dette nettverkstilbudet? +message.confirm.remove.vpc.offering=Er du sikker p\u00e5 at du vil fjerne dette VPC tilbudet? +message.confirm.scale.up.router.vm=\u00d8nsker du \u00e5 skalere opp denne Ruter-VMen? +message.confirm.scale.up.system.vm=\u00d8nsker du \u00e5 skalere opp denne system VM? message.confirm.shutdown.provider=Vennligst bekreft at du \u00f8nsker \u00e5 stenge denne tilbyderen +message.confirm.start.lb.vm=Vennligst bekreft at du vil starte LB VM +message.confirm.stop.lb.vm=Vennligst bekreft at du vil stoppe LB VM +message.copy.template.confirm=\u00d8nsker du \u00e5 kopiere malen? message.create.template=Er du sikker p\u00e5 at du \u00f8nsker \u00e5 lage malen? message.creating.cluster=Oppretter klynge message.creating.guest.network=Oppretter gjestenettverk @@ -1095,6 +1372,7 @@ message.creating.physical.networks=Oppretter fysiske nettverk message.creating.pod=Oppretter pod message.creating.primary.storage=Oppretter prim\u00e6rlagring message.creating.secondary.storage=Oppretter sekund\u00e6rlagring +message.creating.systemVM=Oppretter system-VMer (dette kan ta litt tid) message.creating.zone=Oppretter sone message.decline.invitation=Er du sikker p\u00e5 du \u00f8nsker \u00e5 avvise denne prosjektinvitasjonen? message.delete.gateway=Vennligst bekreft at du \u00f8nsker \u00e5 slette gateway @@ -1104,11 +1382,21 @@ message.delete.VPN.connection=Vennligst bekreft at du \u00f8nsker \u00e5 slette message.detach.disk=Er du sikker p\u00e5 at du \u00f8nsker \u00e5 frakoble denne disken? message.disable.user=Vennligst bekreft at du \u00f8nsker \u00e5 deaktivere denne bruker. message.disable.vpn=Er du sikker p\u00e5 at du vil deaktivere VPN? +message.disabling.network.offering=Deaktiverer nettverkstilbud +message.disabling.vpc.offering=Deaktiverer VPC tilbud +message.disallowed.characters=Ikke tillatte tegn\: \\<\\,\\> +message.enable.account=Bekreft at du \u00f8nsker \u00e5 aktivere denne kontoen. +message.enabled.vpn.ip.sec=Din IPSec delte n\u00f8kkel (psk) er message.enable.user=Vennligst bekreft at du \u00f8nsker \u00e5 aktivere denne bruker. message.enable.vpn=Vennligst bekreft at du \u00f8nsker \u00e5 aktivere VPN-tilgang for denne IP-adressen +message.enabling.network.offering=Aktiver nettverkstilbud +message.enabling.vpc.offering=Aktiverer VPC tilbud message.enabling.zone=Aktiverer sonen +message.enabling.zone.dots=Aktiverer sone... +message.enter.seperated.list.multiple.cidrs=Skriv inn en kommaseparert liste over CIDRs hvis du har mer enn en message.enter.token=Vennligst skriv inn koden du fikk i invitasjonsmailen. message.generate.keys=Vennligst bekreft at du \u00f8nsker \u00e5 generere nye n\u00f8kler for denne bruker. +message.gslb.delete.confirm=Vennligst bekreft at du vil slette denne GSLB message.installWizard.click.retry=Klikk p\u00e5 knappen for \u00e5 pr\u00f8ve oppstart p\u00e5 nytt. message.installWizard.tooltip.addCluster.name=Klyngenavnet. Dette kan v\u00e6re hva som helst og er ikke benyttet av CloudStack. message.installWizard.tooltip.addHost.hostname=DNS-navnet eller IP-adressen til verten. @@ -1129,6 +1417,7 @@ message.installWizard.tooltip.configureGuestTraffic.description=En beskrivelse a message.installWizard.tooltip.configureGuestTraffic.guestGateway=Gatewayen gjestene skal bruke message.installWizard.tooltip.configureGuestTraffic.guestNetmask=Nettmasken benyttet p\u00e5 subnettet gjestene skal bruke message.installWizard.tooltip.configureGuestTraffic.name=Et navn for nettverket +message.instance.scaled.up.confirm=\u00d8nsker du \u00e5 skalere opp denne instancen? message.instanceWizard.noTemplates=Du har ingen maler tilgjengelig. Vennligst legg til en kompatibel mal og kj\u00f8r instansveiviseren. message.ip.address.changed=Din IP-adresse kan ha endret seg. \u00d8nsker du \u00e5 oppdatere visningen? Merk at detaljvisningen vil i s\u00e5fall lukkes. message.iso.desc=Diskimage som inneholder data etter oppstartsbar media for OS @@ -1139,6 +1428,9 @@ message.migrate.instance.to.ps=Vennligst bekreft at du \u00f8nsker \u00e5 migrer message.migrate.router.confirm=Vennligst bekreft verten du \u00f8nsker \u00e5 migrere ruteren til\: message.migrate.systemvm.confirm=Vennligst bekreft verten du \u00f8nsker \u00e5 migrere system VM til\: message.migrate.volume=Vennligst bekreft at du \u00f8nsker \u00e5 migrere volumet til en annen prim\u00e6rlagring. +message.network.addVM.desc=Vennligst spesifiser nettverket du vil legge til denne VMen. Et nytt NIC vil bli lagt til for dette nettverket. +message.network.addVMNIC=Vennligst bekreft at du vil legge til ett nytt NIC for dette nettverket. +message.no.host.available=Ingen hoster tilgjengelig for migrering message.no.projects.adminOnly=Du har ingen prosjekter.
Vennligst be din administrator om \u00e5 opprette et nytt prosjekt. message.no.projects=Du har ingen prosjekter.
Vennligst opprett et nytt fra prosjektseksjonen. message.pending.projects.1=Du har f\u00f8lgende prosjektinvitasjoner\: @@ -1150,6 +1442,9 @@ message.please.select.a.different.public.and.management.network.before.removing= message.please.select.networks=Vennligst velg nettverk for din VM message.please.wait.while.zone.is.being.created=Vennlist vent mens din sone opprettes. Dette kan ta noe tid... message.project.invite.sent=Invitasjon sendt til bruker. De vil bli lagt til prosjektet s\u00e5 snart de har akseptert invitasjonen +message.recover.vm=Vennligst bekreft at du \u00f8nsker \u00e5 gjenopprette denne VMen. +message.reinstall.vm=Advarsel\: Fortsett med forsiktighet. Dette vil reinstallere VMen fra malen; data p\u00e5 rot-disken vil forsvinne. Ekstra datavolumer; hvis noen, vil ikke bli r\u00f8rt. +message.remove.ldap=Er du sikker p\u00e5 at du vil slette LDAP-konfigurasjonen? message.remove.region=Er du sikker p\u00e5 at du vil fjerne denne regionen fra denne administrasjonsserveren? message.remove.vpc=Vennligst bekreft at du \u00f8nsker \u00e5 fjerne VPC message.reset.password.warning.notPasswordEnabled=Denne malen vil bli opprettet uten passord @@ -1157,27 +1452,54 @@ message.reset.password.warning.notStopped=Din instans m\u00e5 stoppes f\u00f8r m message.reset.VPN.connection=Vennligst bekreft at du \u00f8nsker \u00e5 resette VPN-tilkobling message.restart.mgmt.server=Vennlist restart administrajonsserveren(e) din(e) for at de nye innstillingene skal tr\u00e5 i kraft. message.restart.vpc=Vennligst bekreft at du \u00f8nsker \u00e5 restarte VPC +message.restoreVM=Vil du gjenopprette denne VMen? message.select.instance=Vennligst velg en instans. message.select.iso=Vennligst velg en ISO for din nye virtuelle instans. message.select.item=Vennligst velg et element message.select.security.groups=Vennligst velg sikkerhetsgruppe(r) for din nye VM message.select.template=Vennligst velg en mal for din nye virtuelle instans. +message.set.default.NIC.manual=Vennligst oppdater standard-NIC manuelt p\u00e5 VMen n\u00e5. +message.set.default.NIC=Vennligst bekreft at du vil gj\u00f8re dette NIC til standard for denne VM. message.setup.successful=Oppsettet av nettskyen er vellykket\! message.specify.url=Vennligst spesifiser URL message.suspend.project=Er du sikker du \u00f8nsker \u00e5 pause dette prosjektet? +message.systems.vms.ready=System-VMer klare. +message.template.copying=Malen blir kopiert. message.template.desc=OS-image som kan brukes til \u00e5 starte VMer message.tooltip.pod.name=Et navn for denne pod. message.tooltip.zone.name=Et navn for denne sonen. +message.validate.creditcard=Vennligst oppgi et gyldig kredittkortnummer. +message.validate.date.ISO=Vennligst skriv inn en gyldig dato (ISO). +message.validate.date=Vennligst skriv inn en gyldig dato. +message.validate.digits=Vennligst skriv inn kun tall. +message.validate.email.address=Vennligst skriv inn en gyldig e-postadresse. +message.validate.equalto=Vennligst skriv inn den samme verdien igjen. +message.validate.fieldrequired=Dette feltet er p\u00e5krevd. +message.validate.fixfield=Vennligst fiks dette feltet. message.validate.invalid.characters=Ugyldige tegn funnet; vennligst korriger. +message.validate.maxlength=Vennligst ikke skriv inn mer enn {0} tegn. +message.validate.max=Skriv en verdi mindre enn eller lik {0}. +message.validate.minlength=Vennligst skriv inn minst {0} tegn. +message.validate.number=Vennligst skriv inn et gyldig nummer. +message.validate.range.length=Vennligst skriv inn en verdi som er mellom {0} og {1} tegn langt. +message.validate.range=Skriv en verdi mellom {0} og {1}. +message.validate.URL=Vennligst skriv inn en gyldig URL. message.vm.create.template.confirm=Oppretting av Mal vil restarte VM automatisk. message.vm.review.launch=Vennligst vurder f\u00f8lgende informasjon og bekreft at din virtuelle instans er korrekt f\u00f8r kj\u00f8ring message.you.must.have.at.least.one.physical.network=Du trenger minst ett fysisk nettverk +message.your.cloudstack.is.ready=Din CloudStack er klar\! message.Zone.creation.complete=Opprettelsen av sonen utf\u00f8rt message.zone.creation.complete.would.you.like.to.enable.this.zone=Soneopprettelse fullf\u00f8rt. \u00d8nsker du \u00e5 aktivere denne sonen? message.zone.no.network.selection=Sonen du har valgt har ingen mulighet for valg av nettverk. +message.zone.step.1.desc=Vennligst en nettverksmodell for din sone. +message.zone.step.2.desc=Vennligst skriv inn f\u00f8lgende informasjon for \u00e5 legge til en ny sone +messgae.validate.min=Skriv en verdig st\u00f8rre enn eller lik {0}. +mode=Modus +network.rate=Nettverksrate notification.reboot.instance=Omstart av instans notification.start.instance=Start instans notification.stop.instance=Stopp instans +side.by.side=Side ved side state.Accepted=Akseptert state.Active=Aktiv state.Allocated=Allokert @@ -1188,6 +1510,7 @@ state.Completed=Utf\u00f8rt state.Creating=Oppretter state.Declined=Avvist state.Destroyed=Destruert +state.detached=Frakoblet state.Disabled=Inaktiv state.Enabled=Aktivert state.Error=Feil @@ -1200,5 +1523,6 @@ state.Starting=Starter state.Stopped=Stoppet state.Stopping=Stopper state.Suspended=Pauset +title.upload.volume=Last opp volum ui.listView.filters.all=Alle ui.listView.filters.mine=Mine diff --git a/client/WEB-INF/classes/resources/messages_nl_NL.properties b/client/WEB-INF/classes/resources/messages_nl_NL.properties index 8b71d168e9c..cb3f56f838d 100644 --- a/client/WEB-INF/classes/resources/messages_nl_NL.properties +++ b/client/WEB-INF/classes/resources/messages_nl_NL.properties @@ -1203,8 +1203,6 @@ label.session.expired=Sessie Verlopen label.set.default.NIC=Stel standaard NIC in label.settings=Instellingen label.setup=Instellen -label.setup.network=Stel Netwerk in -label.setup.zone=Stel Zone in label.set.up.zone.type=Stel zone type in label.shared=Gedeeld label.SharedMountPoint=SharedMountPoint @@ -1219,8 +1217,8 @@ label.smb.password=SMB Wachtwoord label.smb.username=SMB Gebruikersnaam label.snapshot.limits=Snapshot Limieten label.snapshot.name=Snapshot Naam -label.snapshot.schedule=Stel herhalende Snapshot in label.snapshot=Snapshot +label.snapshot.s=Snapshots label.snapshots=Snapshots label.SNMP.community=SNMP Community label.SNMP.port=SNMP Poort @@ -1577,7 +1575,7 @@ message.add.system.service.offering=Specificeer de volgende gegevens om een nieu message.add.template=Specificeer de volgende gegevens om een nieuwe template aan te maken message.add.volume=Specificeer de volgende gegevens om een nieuw volume toe te voegen. message.add.VPN.gateway=Bevestig dat u een VPN Gateway wilt toevoegen -message.admin.guide.read=Voor VMware-gebaseerde VMs, lees eerst de dynamic scaling sectie in de admin guide voordat u gaat schalen. Weet u zeker dat u verder wilt gaan? +message.admin.guide.read=Voor VMware-gebaseerde VMs, lees eerst de dynamic scaling sectie in de admin guide voordat u gaat schalen. Weet u zeker dat u verder wilt gaan?\\, message.advanced.mode.desc=Kies dit netwerk model als u VLAN ondersteuning wilt inschakelen. Dit netwerk model geeft u de meeste flexibiliteit en stelt beheerders in staat om aangepaste netwerk aanbiedingen aan te maken met firewall, vpn, of load balancer ondersteuning. Ook kunt u kiezen tussen direct en virtual networking. message.advanced.security.group=Kies dit netwerk model als u security groups wilt gebruiken om virtueele machines te isoleren. message.advanced.virtual=Kies deze optie als u zone breede VLANs wilt gebruiken om virtueele machines te isoleren. @@ -1817,7 +1815,6 @@ message.set.default.NIC.manual=U dient nu manueel de netwerk interface op de VM message.setup.physical.network.during.zone.creation.basic=Wanneer u een basis zone toevoegt bevat deze een fysiek netwerk welke correspondeert met de netwerkkaart op de hypervisor. Op dit netwerk zullen meerdere verkeerstypen gebruikt worden.

U kunt via drag & drop andere verkeerstypen toevoegen aan het fysieke netwerk. message.setup.physical.network.during.zone.creation=Wanneer u een geavanceerde zone toevoegt, dient u meerdere fysiek netwerken te configureren. Een netwerk correspondeert met een netwerkkaart op de hypervisor. Elk fysiek netwerk kan een of meerdere traffic types bevatten, met bepaald geldende restricties hoe deze gecombineerd mogen worden. Drag & Drop een of meerdere verkeerstypen op het fysieke netwerk. message.setup.successful=Cloud installatie is succesvol verlopen\! -message.snapshot.schedule=U kunt terugkerende snapshots schema&\#39s aanmaken door een van de beschikbare opties hieronder te selecteren. message.specifiy.tag.key.value=Gelieve een tag sleutel en waarde te specificeren message.specify.url=Gelieve een URL te specificeren message.step.1.continue=Gelieve een template of ISO te selecteren om door te gaan diff --git a/client/WEB-INF/classes/resources/messages_pt_BR.properties b/client/WEB-INF/classes/resources/messages_pt_BR.properties index 78d2b6bdc65..e951f9eadee 100644 --- a/client/WEB-INF/classes/resources/messages_pt_BR.properties +++ b/client/WEB-INF/classes/resources/messages_pt_BR.properties @@ -37,6 +37,10 @@ force.remove=For\u00e7ar Remo\u00e7\u00e3o force.remove.host.warning=Aten\u00e7\u00e3o\: O CloudStack desligar\u00e1 de maneira for\u00e7ada todas as VMs antes de remover o host do cluster. force.stop=For\u00e7ar Parada force.stop.instance.warning=Aviso\: For\u00e7ar o desligamento desta inst\u00e2ncia deve ser sua \u00faltima op\u00e7\u00e3o. Isto pode levar a perda de dados, bem como comportamento inconsist\u00eante do estado da m\u00e1quina virtual. +hint.no.host.tags=Nenhuma tag de host encontrada +hint.no.storage.tags=Nenhuma tag de storage encontrada +hint.type.part.host.tag=Digite parte de um tag de host +hint.type.part.storage.tag=Digite parte de um tag de storage ICMP.code=C\u00f3digo ICMP ICMP.type=Tipo ICMP image.directory=Diret\u00f3rio da Imagem @@ -47,23 +51,34 @@ label.about=Sobre label.accept.project.invitation=Aceitar convite de projeto. label.account.and.security.group=Contas, grupos de Seguran\u00e7a label.account=Conta +label.account.details=Detalhes da conta label.account.id=ID da Conta +label.account.lower=conta label.account.name=Nome da Conta label.accounts=Contas label.account.specific=Conta-Specific +label.acl=ACL +label.acl.id=ACL ID +label.acl.list.rules=Lista de regas de ACL +label.acl.name=Nome da ACL +label.acl.replaced=ACL trocado label.acquire.new.ip=Adquirir novo IP label.acquire.new.secondary.ip=Adquira um novo IP secund\u00e1rio label.action.attach.disk=Anexar Disco label.action.attach.disk.processing=Anexando Disco.... label.action.attach.iso=Anexar ISO label.action.attach.iso.processing=Anexando ISO.... +label.action=A\u00e7\u00e3o label.action.cancel.maintenance.mode=Cancelar Modo de Manuten\u00e7\u00e3o label.action.cancel.maintenance.mode.processing=Cancelando Modo de Manuten\u00e7\u00e3o.... label.action.change.password=Troca de Senha label.action.change.service.processing=Trocando de Plano.... label.action.change.service=Trocar Plano +label.action.configure.samlauthorization=Configurar Autoriza\u00e7\u00e3o SAML SSO label.action.copy.ISO=Copiar ISO +label.action.copy.ISO.processing=Copiando ISO... label.action.copy.template=Copiar Template +label.action.copy.template.processing=Copiando Template... label.action.create.template=Criar Template label.action.create.template.from.vm=Criar Template a partir da VM label.action.create.template.from.volume=Criar Template a partir do Disco @@ -200,6 +215,7 @@ label.action.reboot.systemvm.processing=Reiniciando VM de Sistema.... label.action.reboot.systemvm=Reiniciar VM de Sistema label.action.recurring.snapshot=Snapshots recorrentes label.action.register.iso=Registrar ISO +label.action.register.template=Registrar Template da URL label.action.release.ip=Liberar IP label.action.release.ip.processing=Liberando IP.... label.action.remove.host.processing=Removendo Host.... @@ -244,19 +260,31 @@ label.add.accounts=Adicionar contas label.add.accounts.to=Adicionar contas para label.add.account.to.project=Adicionar conta ao projeto label.add.ACL=Adicionar ACL +label.add.acl.list=Adiciona Lista ACL label.add=Adicionar label.add.affinity.group=Adicionar um grupo de afinidade +label.add.baremetal.dhcp.device=Adiciona Dispositivo DHCP Baremetal +label.add.baremetal.rack.configuration=Adicionar Configura\u00e7\u00e3o de Rack de Baremetal +label.add.BigSwitchBcf.device=Adicionar BigSwitch BCF Controller +label.add.BrocadeVcs.device=Adicionar Brocade Vcs Switch label.add.by=Adicionado por label.add.by.cidr=Adicionar por CIDR label.add.by.group=Adicionar por Grupo +label.add.ciscoASA1000v=Adicone Recurso label.add.cluster=Adicionar Cluster label.add.compute.offering=Adicionar oferta de computa\u00e7\u00e3o label.add.direct.iprange=Add Direct Ip Range label.add.disk.offering=Adicionar Oferta de Disco label.add.domain=Adicionar Dom\u00ednio +label.added.brocade.vcs.switch=Adicionado novo Brocade Vcs Switch +label.added.network.offering=Adicionar uma oferta de rede +label.added.new.bigswitch.bcf.controller=Adicionar novo BigSwitch BCF Controller +label.added.nicira.nvp.controller=Adicionado nova Controladora Nicira NVP label.add.egress.rule=Adicionar regra egress +label.addes.new.f5=Adicionado novo F5 label.add.F5.device=Adicionar dispositivo F5 label.add.firewall=Adicionar regra de Firewall +label.add.globo.dns=Adicionar GloboDNS label.add.gslb=Adicionar GSLB label.add.guest.network=Adicionar rede guest label.add.host=Adicionar Host @@ -269,12 +297,21 @@ label.add.ingress.rule=Adicionar Regra de Entrada label.adding.succeeded=Adicionado com Sucesso label.adding.user=Adicionando Usu\u00e1rio label.adding.zone=Adicionando Zona +label.add.intermediate.certificate=Adicionar certificado intermedi\u00e1rio +label.add.internal.lb=Adiciona LB Interno label.add.ip.range=Adicionar Range de IP +label.add.isolated.guest.network=Adiciona Rede Guest Isolada +label.add.isolated.guest.network.with.sourcenat=Adicionar rede Guest isolada com SourceNat +label.add.isolated.network=Adiciona Rede Isolada label.additional.networks=Redes Adicionais +label.add.ldap.account=Adicionar Conta LDAP +label.add.LDAP.account=Adicionar Conta LDAP +label.add.list.name=Nome de Lista ACL label.add.load.balancer=Adicionar Load Balance label.add.more=Adicionar Mais label.add.netScaler.device=Adicionar dispositivo Netscaler label.add.network.ACL=Adicione ACL de rede +label.add.network.acl.list=Adicionar Lista de ACL de Rede label.add.network=Adicionar Rede label.add.network.device=Adicionar Dispositivo de Rede label.add.network.offering=Adicionar oferta de rede @@ -284,13 +321,17 @@ label.add.new.NetScaler=Adicionar um novo NetScaler label.add.new.PA=Adicionar novo Palo Alto label.add.new.SRX=Adicionar um novo SRX label.add.new.tier=Adicionar nova camada +label.add.nfs.secondary.staging.store=Adiciona Armazenamento NFS de Est\u00e1gio Secund\u00e1rio label.add.NiciraNvp.device=Adicionar Controlador Nvp +label.add.NuageVsp.device=Adicionar Nuage Virtualized Services Directory (VSD) +label.add.OpenDaylight.device=Adiciona Controlador OpenDaylight label.add.PA.device=Adicionar dispositivo Palo Alto label.add.physical.network=Adicionar rede f\u00edsica label.add.pod=Adicionar POD label.add.portable.ip.range=Adicionar Faixa de Endere\u00e7os IPs Port\u00e1veis label.add.port.forwarding.rule=Adicionar regra de encaminhamento de porta label.add.primary.storage=Adicionar Storage Prim\u00e1rio +label.add.private.gateway=Adicionar Gateway Privado label.add.region=Adicionar Regi\u00e3o label.add.resources=Adicionar Recursos label.add.route=Adicionar rota @@ -304,6 +345,7 @@ label.add.static.route=Adicionar rota est\u00e1tica label.add.system.service.offering=Adicionar Plano para VM de Sistema label.add.template=Adicionar Template label.add.to.group=Adicionar ao grupo +label.add.ucs.manager=Adiciona Gerenciador UCS label.add.user=Adicionar Usu\u00e1rio label.add.userdata=Userdata label.add.vlan=Adicionar VLAN @@ -311,8 +353,12 @@ label.add.vm=Adicionar VM label.add.vms=Adicionar VMs label.add.vms.to.lb=Add VM(s) na regra de balanceamento de carga label.add.VM.to.tier=Adicionar m\u00e1quina virtual \u00e0 camada +label.add.vmware.datacenter=Adicionar Datacerter VMware +label.add.vnmc.device=Adiciona dispositivo VNMC +label.add.vnmc.provider=Adicione provedor VNMC label.add.volume=Adicionar Disco label.add.vpc=Adicionar VPC +label.add.vpc.offering=Adicionar Oferta VPC label.add.vpn.customer.gateway=Adicionar Gateway de VPN de usu\u00e1rio label.add.VPN.gateway=Adicionar gateway de VPN label.add.vpn.user=Adicionar usu\u00e1rio VPN @@ -327,41 +373,70 @@ label.affinity=Afinidade label.affinity.group=Grupo de Afinidade label.affinity.groups=Grupos de Afinidade label.agent.password=Senha do Agente +label.agent.port=Porta do Agente +label.agent.state=Estado do Agente label.agent.username=Usu\u00e1rio do Agente label.agree=Concordo label.alert=Alerta +label.alert.archived=Alerta Arquivado +label.alert.deleted=Alerta Apagado +label.alert.details=Detalhes de alerta label.algorithm=Algoritmo label.allocated=Alocado label.allocation.state=Status da Aloca\u00e7\u00e3o +label.allow=Pertitir label.anti.affinity=Anti-afinidade label.anti.affinity.group=Grupo de Anti-afinidade label.anti.affinity.groups=Grupos de Anti-afinidade label.api.key=API Key +label.api.version=Ver\u00e3o da API label.apply=Aplicar label.app.name=CloudStack label.archive.alerts=Guardar alertas +label.archive=Arquivo label.archive.events=Guardar eventos label.assign=Atribuir +label.assigned.vms=VMs designadas label.assign.instance.another=Atribuir Inst\u00e2ncia para outra Conta label.assign.to.load.balancer=Atribuindo Inst\u00e2ncia ao balanceador de carga +label.assign.vms=Atribuir VMs label.associated.network.id=ID de Rede Associado label.associated.network=Rede associada +label.associated.profile=Perfil Associado +label.associate.public.ip=Associa IP P\u00fablico label.attached.iso=Imagem ISO Plugada label.author.email=E-mail do autor label.author.name=Nome do autor +label.autoscale.configuration.wizard=Assistente de configura\u00e7\u00e3o de AutoScale +label.autoscale=Escalonamento Autom\u00e1tico label.availability=Availability +label.availabilityZone=availabilityZone label.availability.zone=Datacenter label.available=Dispon\u00edvel label.available.public.ips=IP P\u00fablico Dispon\u00edvel label.back=Voltar label.bandwidth=Bandwidth +label.baremetal.dhcp.devices=Dispositivos DHCP Baremetal +label.baremetal.dhcp.provider=Provedor DHCP Baremetal +label.baremetal.pxe.device=Adiciona Dispositivo PXE Baremetal +label.baremetal.pxe.devices=Dispositivo PXE Baremetal +label.baremetal.pxe.provider=Provedor PXE Baremetal +label.baremetal.rack.configuration=Configura\u00e7\u00e3o do Rack de Baremetal label.basic=B\u00e1sico label.basic.mode=Modo B\u00e1sico +label.bigswitch.bcf.details=Detalhes do BigSwitch BCF +label.bigswitch.bcf.nat=Habilitar BigSwitch BCF NAT +label.bigswitch.controller.address=Endere\u00e7o do BigSwitch BCF Controller +label.blade.id=ID da L\u00e2mina +label.blades=L\u00e2minas label.bootable=Inicializ\u00e1vel label.broadcast.domain.range=Range do dom\u00ednio de Broadcast label.broadcast.domain.type=Tipo de Dom\u00ednio Broadcast label.broadcast.uri=URI de broadcast +label.broadcasturi=url de broadcast label.broadcat.uri=URI de broadcast +label.brocade.vcs.address=Endere\u00e7o do Vcs Switch +label.brocade.vcs.details=Detalhes do Brocade Vcs Switch label.by.account=por Conta label.by.alert.type=Por tipo de alerta label.by.availability=By Availability @@ -383,16 +458,25 @@ label.by.type=Por Tipo label.by.zone=por Zona label.cache.mode=Tipo do cache de escrita label.cancel=Cancelar +label.capacity.bytes=Capacidade de Bytes label.capacity=Capacidade +label.capacity.iops=Capacidade de IOPS label.certificate=Certificado +label.change.affinity=Muda Afinidade label.change.service.offering=Alterar oferta de servi\u00e7o label.change.value=Alterar valor label.character=Caracter +label.chassis=Chassis +label.checksum=checksum label.cidr.account=CIDR ou Conta/Security Group label.cidr=CIDR label.cidr.list=CIDR de Origem label.CIDR.list=Lista CIDR label.CIDR.of.destination.network=CIDR da rede de destino +label.cisco.nexus1000v.ip.address=Endere\u00e7o IP do Nexus 1000v +label.cisco.nexus1000v.password=Senha do Nexus 1000v +label.cisco.nexus1000v.username=Usu\u00e1rio do Nexus 1000v +label.ciscovnmc.resource.details=Detalhes de recurso CiscoVNMC label.clean.up=Limpar label.clear.list=Limpar lista label.close=Fechar @@ -413,15 +497,19 @@ label.configuration=Configura\u00e7\u00e3o label.configure=Configurar label.configure.ldap=Configurar LDAP label.configure.network.ACLs=Configure ACLs de rede +label.configure.sticky.policy=Configurar Pol\u00edtica Fixa label.configure.vpc=Configurar VPC label.confirmation=Confirma\u00e7\u00e3o label.confirm.password=Confirme a senha label.congratulations=Parab\u00e9ns\! label.conserve.mode=Modo Conservativo label.console.proxy=Console proxy +label.console.proxy.vm=VM da Console Proxy label.continue.basic.install=Continuar com a instala\u00e7\u00e3o b\u00e1sica label.continue=Continuar +label.copying.iso=Copiando ISO label.corrections.saved=Altera\u00e7\u00f5es salvas +label.counter=Contador label.cpu.allocated=CPU Alocada label.cpu.allocated.for.VMs=CPU Alocada por VMs label.CPU.cap=CPU Cap @@ -431,59 +519,95 @@ label.cpu.mhz=CPU (em MHz) label.cpu.utilized=CPU Utilizada label.created.by.system=Criado pelo sistema label.created=Criado +label.create.nfs.secondary.staging.storage=Cria Armazenamento NFS de Est\u00e1gio Secund\u00e1rio label.create.nfs.secondary.staging.store=Criar storage staging secund\u00e1rio NFS label.create.project=Criar um projeto +label.create.ssh.key.pair=Criar par de chaves SSH label.create.template=Criar template label.create.VPN.connection=Criar uma conex\u00e3o VPN label.cross.zones=Inter Zonas +label.custom=Customizado label.custom.disk.iops=IOPS personalizado +label.custom.disk.offering=Oferta de Disco customizado label.custom.disk.size=Tamanho Customizado label.daily=Di\u00e1rio label.data.disk.offering=Oferta de Disco Adicional label.date=Data +label.day=Dia label.day.of.month=Dia do M\u00eas label.day.of.week=Dia da Semana +label.dc.name=Nome do DC label.dead.peer.detection=Detec\u00e7\u00e3o de correspondente morto label.decline.invitation=Rejeitar convite +label.dedicate.cluster=Cluster Dedicado label.dedicated=Dedicado +label.dedicate=Dedicado +label.dedicated.vlan.vni.ranges=Range(s) de VLAN/VNI Dedicados +label.dedicate.host=Dedica Host +label.dedicate.pod=Pod Dedicado +label.dedicate.vlan.vni.range=Range de VLAN/VNI Dedicado +label.dedicate.zone=Zona Dedicada +label.default.egress.policy=Pol\u00edtica padr\u00e3o de egress\u00e3o label.default=Padr\u00e3o label.default.use=Uso padr\u00e3o label.default.view=Vis\u00e3o Padr\u00e3o +label.delete.acl.list=Apagar Lista ACL label.delete.affinity.group=Deletar Grupo de Afinidade label.delete.alerts=Remover alertas +label.delete.baremetal.rack.configuration=Deletar Configura\u00e7\u00e3o de Rack de Baremetal +label.delete.BigSwitchBcf=Remover BigSwitch BCF Controller +label.delete.BrocadeVcs=Remover Brocade Vcs Switch +label.delete.ciscoASA1000v=Apaga CiscoASA1000v +label.delete.ciscovnmc.resource=Apaga recurso CiscoVNMC label.delete.events=Remover eventos label.delete.F5=Remover F5 label.delete.gateway=delete gateway +label.delete.internal.lb=Apaga LB Interno label.delete.NetScaler=Remover NetScaler label.delete.NiciraNvp=Remover Controlador Nvp +label.delete.NuageVsp=Remover Nuage VSD +label.delete.OpenDaylight.device=Apaga Controladora OpenDaylight label.delete.PA=Remover Palo Alto label.delete.portable.ip.range=Deletar Endere\u00e7os IPs Port\u00e1teis +label.delete.profile=Apaga Perfil label.delete.project=Deletar projeto label.delete=Remover +label.delete.secondary.staging.store=Apaga Armazenamento de Est\u00e1gio Secund\u00e1rio label.delete.SRX=Remover SRX +label.delete.ucs.manager=Apaga Gerenciador UCS label.delete.VPN.connection=deletar a conex\u00e3o VPN label.delete.VPN.customer.gateway=deletar gateway de VPN de usu\u00e1rio label.delete.VPN.gateway=deletar um gateway de VPN label.delete.vpn.user=Deletar usu\u00e1rio VPN label.deleting.failed=Falha ao remover label.deleting.processing=Removendo.... +label.deny=Negar label.deployment.planner=Deployment planejado label.description=Descri\u00e7\u00e3o label.destination.physical.network.id=ID de destino da rede f\u00edsica label.destination.zone=Zona de Destino label.destroy=Apagar label.destroy.router=Destruir roteador +label.destroy.vm.graceperiod=Destruir Grace Period da VM label.detaching.disk=Desplugando Disco label.details=Detalhes label.device.id=ID do Dispositivo label.devices=Dispositivos label.dhcp=DHCP label.DHCP.server.type=Tipo de Servidor DHCP +label.direct.attached.public.ip=IP P\u00fablico COnectado Diretamente label.direct.ips=IPs Diretos +label.disable.autoscale=Desabilita Auto-escala label.disabled=Desativado +label.disable.host=Desabilita Host +label.disable.network.offering=Desabilita oferta de rede label.disable.provider=Desabilitar Provider +label.disable.vnmc.provider=Habilita provedor VNMC +label.disable.vpc.offering=Desabilitar oferta VPC label.disable.vpn=Desabilitar VPN label.disabling.vpn.access=Desativando Acesso VPN +label.disassociate.profile.blade=Desassocia Perfil de L\u00e2mina +label.disbale.vnmc.device=Desabilita dispositivo VNMC label.disk.allocated=Disco Alocado label.disk.bytes.read.rate=Taxa de Leitura do Disco (BPS) label.disk.bytes.write.rate=Taxa de Escrita no Disco (BPS) @@ -492,7 +616,10 @@ label.disk.iops.min=M\u00edn IOPS label.disk.iops.read.rate=Taxa de Leitura do Disco (IOPS) label.disk.iops.total=IOPS Total label.disk.iops.write.rate=Taxa de Escrita no Disco (IOPS) +label.disk.offering.details=Detalhes da oferta de disco +label.diskoffering=diskoffering label.disk.offering=Oferta de Disco +label.disk.provisioningtype=Tipo de Provisionamento label.disk.read.bytes=Leitura do Disco (Bytes) label.disk.read.io=Leitura do Disk (I/O) label.disk.size.gb=Tamanho (em GB) @@ -501,14 +628,18 @@ label.disk.total=Disco Total label.disk.volume=Disco label.disk.write.bytes=Escrita no Disco (Bytes) label.disk.write.io=Escrita no Disco (I/O) +label.display.name=Mostrar Nome label.display.text=Descri\u00e7\u00e3o +label.distributedrouter=Roteador Distribuido label.dns.1=DNS 1 label.dns.2=DNS 2 label.dns=DNS label.DNS.domain.for.guest.networks=Dom\u00ednio DNS para redes h\u00f3spedes label.domain.admin=Administrador de Dom\u00ednio +label.domain.details=Detalhes do dom\u00ednio label.domain=Dom\u00ednio label.domain.id=ID do Dom\u00ednio +label.domain.lower=dom\u00ednio label.domain.name=Nome do Dom\u00ednio label.domain.router=Roteador do Dom\u00ednio label.domain.suffix=Sufixo de Dom\u00ednio DNS (ex. xyz.com) @@ -516,13 +647,17 @@ label.done=Pronto label.double.quotes.are.not.allowed=Aspas duplas n\u00e3o s\u00e3o permitidas label.download.progress=Status do Download label.drag.new.position=Arrastar para uma nova posi\u00e7\u00e3o +label.duration.in.sec=Dura\u00e7\u00e3o (em seg) label.dynamically.scalable=Dinamicamente Escal\u00e1vel +label.edit.acl.rule=Edita regra ACL label.edit.affinity.group=Editar Grupo de Afinidade label.edit=Editar label.edit.lb.rule=Editar regra de LB label.edit.network.details=Editar detalhes de rede label.edit.project.details=Editar detalhes do projeto label.edit.region=Editar Regi\u00e3o +label.edit.rule=Editar regra +label.edit.secondary.ips=Editar IPs secund\u00e1rios label.edit.tags=Edite etiquetas label.edit.traffic.type=Editar tipo de tr\u00e1fego label.edit.vpc=Editar VPC @@ -533,9 +668,16 @@ label.elastic=El\u00e1stico label.elastic.IP=IP El\u00e1stico label.elastic.LB=LB El\u00e1stico label.email=Email +label.email.lower=email +label.enable.autoscale=Habilita Auto-escala +label.enable.host=Habilita Host +label.enable.network.offering=Habilita oferta de rede label.enable.provider=Habilitar provider label.enable.s3=Habilita storage secund\u00e1ria fornecida por S3 label.enable.swift=Habilitar Swift +label.enable.vnmc.device=Habilita dispositivo VNMC +label.enable.vnmc.provider=Habilita provedor VNMC +label.enable.vpc.offering=Habilitar oferta VPC label.enable.vpn=Habilitar VPN label.enabling.vpn.access=Ativando Acesso VPN label.enabling.vpn=Ativando VPN @@ -544,42 +686,70 @@ label.endpoint.or.operation=Endpoint or Operation label.endpoint=Ponto de acesso label.end.port=Porta Final label.end.reserved.system.IP=Fim dos IPs reservados para o sistema +label.end.vlan=VLAN final +label.end.vxlan=VXLAN final label.enter.token=Digite o token label.error.code=C\u00f3digo de Erro label.error=Erro +label.error.upper=ERRO label.ESP.encryption=Encripta\u00e7\u00e3o ESP label.ESP.hash=Hash ESP label.ESP.lifetime=Tempo de vida do ESP (segundos) label.ESP.policy=Pol\u00edtica ESP label.esx.host=ESX/ESXi Host +label.event.archived=Evento Arquivado +label.event.deleted=Evento Detectado +label.event=Eventos +label.every=Cada label.example=Examplo label.expunge=Eliminar label.external.link=Link externo label.extractable=Extra\u00edvel +label.extractable.lower=extra\u00edvel +label.f5.details=Detalhes do F5 label.f5=F5 label.failed=Falhou label.featured=Featured label.fetch.latest=Obter \u00faltimos label.filterBy=Filtrar por +label.fingerprint=Impress\u00e3o Digital label.firewall=Firewall +label.firstname.lower=primeiro nome label.first.name=Primeiro Nome label.format=Formato +label.format.lower=formato label.friday=Sexta-feira label.full=Full label.full.path=Path completo label.gateway=Gateway label.general.alerts=Alertas Gerais label.generating.url=Criando URL +label.globo.dns.configuration=Configurar GloboDNS +label.globo.dns=GloboDNS label.gluster.volume=Disco label.go.step.2=V\u00e1 para passo 2 label.go.step.3=V\u00e1 para passo 3 label.go.step.4=V\u00e1 para passo 4 label.go.step.5=V\u00e1 para passo 5 label.gpu=CPU +label.group.by.account=Agrupamento por conta +label.group.by.cluster=Grupo por cluster +label.group.by.pod=Grupo por pod +label.group.by.zone=Grupo por Zona label.group=Grupo label.group.optional=Grupo (Opcional) +label.gslb.assigned.lb=Balanceamento de carga designado +label.gslb.assigned.lb.more=Designe mais balanceamento de carga +label.gslb.delete=Apaga GSLB label.gslb.details=Detalhes do GSLB label.gslb.domain.name=Nome do Dom\u00ednio GSLB +label.gslb=GSLB +label.gslb.lb.details=Detalhes de balanceamento de carga +label.gslb.lb.remove=Remova balanceamento de carga deste GSLB +label.gslb.lb.rule=Regra de balanceamento de carga +label.gslb.service.private.ip=Servi\u00e7o GSLB - IP Privado +label.gslb.service.public.ip=GSLB atende IP P\u00fablico +label.gslb.service=Servi\u00e7o GSLB label.gslb.servicetype=Tipo do Servi\u00e7o label.guest.cidr=CIDR de rede Convidado label.guest.end.ip=IP do fim do guest @@ -588,11 +758,21 @@ label.guest=Guest label.guest.ip=Endere\u00e7o IP Convidado label.guest.ip.range=Intervalo de rede convidado label.guest.netmask=M\u00e1scara de rede Guest +label.guest.network.details=Detalhes de rede convidada label.guest.networks=Redes Guest label.guest.start.ip=IP de in\u00edcio do guest label.guest.traffic=Tr\u00e1fego de h\u00f3spedes +label.guest.traffic.vswitch.name=Nome do vSwitch de Tr\u00e1fego Convidado +label.guest.traffic.vswitch.type=Tipo de vSwitch de Tr\u00e1fego Convidado label.guest.type=Tipo de Guest label.ha.enabled=HA Ativado +label.health.check.advanced.options=Op\u00e7\u00f5es avan\u00e7adas\: +label.health.check=Checagem de Sa\u00fade +label.health.check.configurations.options=Op\u00e7\u00f5es de configura\u00e7\u00e3o\: +label.health.check.interval.in.sec=Intervalo de Health Check (em seg) +label.health.check.message.desc=Seu balanceador de carga realizar\u00e1 automaticamente verifica\u00e7\u00f5es da sa\u00fade das suas inst\u00e2ncias no Cloudstack e ir\u00e1 rotear tr\u00e1fego somente para as inst\u00e2ncias que passarem nas verifica\u00e7\u00f5es. +label.health.check.wizard=Assistente de configura\u00e7\u00e3o de Health Check +label.healthy.threshold=Limiar de Sanidade label.help=Ajuda label.hide.ingress.rule=Ocultar Regra de Entrada label.hints=Dicas @@ -603,13 +783,16 @@ label.host.MAC=Host MAC label.host.name=Host Name label.hosts=Hosts label.host.tags=Tags de Host +label.host.tag=Tag de host label.hourly=A cada hora +label.hvm=HVM label.hypervisor.capabilities=Recursos de Virtualizador label.hypervisor=Hipervisor label.hypervisors=Hypervisors label.hypervisor.snapshot.reserve=Reserva de Snapshot do Hypervisor label.hypervisor.type=Tipo do Hypervisor label.hypervisor.version=Vers\u00e3o de Virtualizador +label.hyperv.traffic.label=R\u00f3tulo de tr\u00e1fego HyperV label.id=ID label.IKE.DH=DH IKE label.IKE.encryption=Encripta\u00e7\u00e3o IKE @@ -617,8 +800,10 @@ label.IKE.hash=Hash IKE label.IKE.lifetime=Tempo de vida IKE (segundos) label.IKE.policy=Pol\u00edtica IKE label.info=Info +label.info.upper=INFO label.ingress.rule=Regra de Entrada label.initiated.by=Iniciado por +label.inside.port.profile=Perfil de Porta Interna label.installWizard.addClusterIntro.subtitle=O que \u00e9 um cluster? label.installWizard.addClusterIntro.title=Vamos adicionar um cluster label.installWizard.addHostIntro.subtitle=O que \u00e9 um Host ? @@ -638,9 +823,16 @@ label.installWizard.title=Ol\u00e1, seja bem vindo ao CloudStack&\#8482 label.instance=Inst\u00e2ncia label.instance.limits=Limites da Inst\u00e2ncia label.instance.name=Nome da Inst\u00e2ncia +label.instance.port=Instanciar Porta +label.instance.scaled.up=Inst\u00e2ncia escalada para a oferta solicitada label.instances=Inst\u00e2ncias +label.instanciate.template.associate.profile.blade=Instancia Template e Associa Perfil \u00e0 L\u00e2mina +label.intermediate.certificate=Certificado intermedi\u00e1rio {0} label.internal.dns.1=DNS 1 Interno label.internal.dns.2=DNS 2 Interno +label.internal.lb.details=Detalhes de LB Interno +label.internal.lb=LB interno +label.internallbvm=LbVm Interno label.internal.name=Nome interno label.interval.type=Tipo de Intervalo label.introduction.to.cloudstack=Introdu\u00e7\u00e3o ao CloudStack&\#8482 @@ -660,9 +852,20 @@ label.ip.range=Range de IP label.ip.ranges=Ranges de IP label.IPsec.preshared.key=Chave IPSec pr\u00e9 compartilhada label.ips=IPs +label.ipv4.cidr=CIDR IPv4 +label.ipv4.dns1=IPv4 DNS1 +label.ipv4.dns2=IPv4 DNS2 +label.ipv4.end.ip=IP FInal IPv4 +label.ipv4.gateway=Gateway IPV4 +label.ipv4.netmask=M\u00e1scara de Rede IPv4 +label.ipv4.start.ip=IP Inicial IPv4 label.ipv6.address=Endere\u00e7o IPv6 label.ipv6.CIDR=CIDR IPv6 +label.ipv6.dns1=IPv6 DNS1 +label.ipv6.dns2=IPv6 DNS2 +label.ipv6.end.ip=IP FInal IPv6 label.ipv6.gateway=Gateway IPv6 +label.ipv6.start.ip=IP Inicial IPv6 label.iscsi=iSCSI label.is.default=\u00c9\u0089 Padr\u00e3o label.iso.boot=ISO de Boot @@ -675,7 +878,10 @@ label.is.redundant.router=Redundante label.is.shared=\u00c9 Compartilhado label.is.system=\u00e9 um sistema label.item.listing=Listar items +label.japanese.keyboard=Japanese keyboard +label.keep.colon=Manter label.keep=Manter +label.keyboard.language=Linguagem do teclado label.keyboard.type=Tipo de Teclado label.key=Chave label.kvm.traffic.label=Etiqueta de tr\u00e1fego KVM @@ -688,6 +894,7 @@ label.lang.dutch=Holand\u00eas (Holanda) label.lang.english=English label.lang.french=Franc\u00eas label.lang.german=Alem\u00e3o +label.lang.hungarian=H\u00fangaro label.lang.italian=Italiano label.lang.japanese=Japanese label.lang.korean=Coreano @@ -696,6 +903,7 @@ label.lang.polish=Polon\u00eas label.lang.russian=Russo label.lang.spanish=Spanish label.last.disconnected=Last Disconnected +label.lastname.lower=\u00faltimo nome label.last.name=\u00daltimo Nome label.latest.events=\u00daltimos eventos label.launch=Executar @@ -711,23 +919,32 @@ label.ldap.port=Porta do LDAP label.level=N\u00edvel label.linklocal.ip=Endere\u00e7o IP do Link Local label.load.balancer=Load Balancer +label.load.balancer.type=Tipo de Balanceamento de Carga label.load.balancing=Balanceamento de Carga label.load.balancing.policies=Pol\u00edticas de balanceamento de carga label.loading=Carregando +label.local.file=Arquivo local label.local=Local +label.local.storage.enabled=Habilitar storage local para VMs de usu\u00e1rios +label.local.storage.enabled.system.vms=Habilitar storage local para VMs de Sistema label.local.storage=Storage Local label.login=Entrar label.logout=Sair label.lun=LUN label.LUN.number=LUN \# +label.lxc.traffic.label=R\u00f3tulo de tr\u00e1fego LXC label.make.project.owner=Criar propriet\u00e1rio de conta de projeto +label.make.redundant=Deixar redundante +label.managed=Gerenciado label.manage=Gerenciar label.management=Gerenciamento label.management.ips=Gerenciamento de Endere\u00e7os IP +label.management.server=Servidor de Gerenciamento label.manage.resources=Gerenciar Recursos label.max.cpus=M\u00e1ximo de cores de CPU label.max.guest.limit=Limite m\u00e1x. de guest label.maximum=M\u00e1ximo +label.max.instances=Inst\u00e2ncias Max label.max.memory=M\u00e1x. de mem\u00f3ria (MiB) label.max.networks=M\u00e1x. de redes label.max.primary.storage=M\u00e1x. prim\u00e1rio (GiB) @@ -777,6 +994,7 @@ label.menu.running.instances=Inst\u00e2ncias Rodando label.menu.security.groups=Grupos de seguran\u00e7a label.menu.service.offerings=Oferta de Servi\u00e7os label.menu.snapshots=Snapshots +label.menu.sshkeypair=SSH KeyPair label.menu.stopped.instances=Inst\u00e2ncias Paradas label.menu.storage=Storage label.menu.system.service.offerings=Ofertas do Sistema @@ -786,15 +1004,22 @@ label.menu.templates=Templates label.menu.virtual.appliances=Appliance Virtual label.menu.virtual.resources=Recursos Virtuais label.menu.volumes=Discos +label.menu.vpc.offerings=Ofertas VPC label.migrate.instance.to.host=Migrar inst\u00e2ncia para outro host label.migrate.instance.to=Migrar Inst\u00e2ncia para label.migrate.instance.to.ps=Migrar inst\u00e2ncia para outro storage prim\u00e1rio +label.migrate.lb.vm=Migre LB VM label.migrate.router.to=Migrar Roteador para label.migrate.systemvm.to=Migrar VM de sistema para label.migrate.to.host=Migrar para outro host label.migrate.to.storage=Migrar para storage +label.migrate.volume=Migrar Volume label.migrate.volume.to.primary.storage=Migrar volume para outro storage prim\u00e1rio label.minimum=M\u00ed\u00adnimo +label.min.instances=Inst\u00e2ncias Min +label.min.past.the.hr=minutos passados da \u00faltima hora +label.minute.past.hour=minuto(s) passado(s) da \u00faltima hora +label.minutes.past.hour=minuto(s) passados da \u00faltima hora label.mode=Modo label.monday=Segunda label.monthly=Mensal @@ -809,14 +1034,18 @@ label.my.templates=Meus templates label.name.lower=Nome label.name=Nome label.name.optional=Nome (Opcional) +label.na=N/D label.nat.port.range=Range de Portas NAT label.netmask=M\u00e1scara de Rede +label.netscaler.details=Detalhes do NetScaler label.netScaler=NetScaler label.network.ACL=ACL de rede label.network.ACLs=Network ACLs label.network.ACL.total=Total de rede ACL label.network.addVM=Adicionar rede para VM +label.network.cidr=CIDR da Rede label.network.desc=Descri\u00e7\u00e3o de Rede +label.network.details=Detalhes da rede label.network.device=Dispositivo de Rede label.network.device.type=Tipo de Dispositivo de Rede label.network.domain=Dom\u00ednio de Rede @@ -826,6 +1055,7 @@ label.networking.and.security=Rede e seguran\u00e7a label.network.label.display.for.blank.value=Utilizar gateway default label.network.limits=Limites de rede label.network.name=Nome da Rede +label.network.offering.details=Detalhes da oferta de rede label.network.offering.display.text=Network Offering Display Text label.network.offering.id=Network Offering ID label.network.offering.name=Network Offering Name @@ -841,6 +1071,7 @@ label.network.write=Network Write label.new=Novo label.new.password=Nova Senha label.new.project=Novo Projeto +label.new.ssh.key.pair=Novo par de chaves SSH label.new.vm=Nova VM label.next=Pr\u00f3ximo label.nexusVswitch=Nexus Vswitch @@ -850,12 +1081,14 @@ label.nfs.storage=Storage NFS label.nic.adapter.type=Tipo de adaptador de Rede label.nicira.controller.address=Endere\u00e7o do Controlador label.nicira.l3gatewayserviceuuid=Uuid do Servi\u00e7o de Gateway L3 +label.nicira.nvp.details=Detalhes do Nicira NVP label.nicira.transportzoneuuid=Uuid da Zona de Transporte label.nics=Adaptadores de Rede label.no.actions=Sem A\u00e7\u00f5es Dispon\u00edveis label.no.alerts=Sem Alertas Recentes label.no.data=Sem dados para mostrar label.no.errors=Sem Erros Recentes +label.no.grouping=(sem agrupamento) label.no.isos=Sem ISO Dispon\u00edvel label.no.items=Sem Itens Dispon\u00edveis label.none=Nenhum @@ -865,6 +1098,7 @@ label.not.found=N\u00e3o Encontrado label.no.thanks=N\u00e3o obrigado label.notifications=Notifica\u00e7\u00f5es label.number.of.clusters=N\u00famero de Clusters +label.number.of.cpu.sockets=O N\u00famero de Sockets de CPU label.number.of.hosts=N\u00famero de Hosts label.number.of.pods=N\u00famero de Pods label.number.of.system.vms=N\u00famero de VMs de sistema @@ -874,42 +1108,64 @@ label.num.cpu.cores=\# de Core CPU label.numretries=N\u00famero de Tentativas label.ocfs2=OCFS2 label.offer.ha=Offer HA +label.of.month=do m\u00eas label.ok=OK label.opendaylight.controller=Controlador OpenDaylight label.opendaylight.controllerdetail=Detalhes do Controlador OpenDaylight label.opendaylight.controllers=Controladores OpenDaylight label.openDaylight=OpenDaylight +label.operator=Operador label.optional=Opcional label.order=Ordenar label.os.preference=Prefer\u00eancia de SO label.os.type=Tipo de SO +label.other=Outro +label.override.guest.traffic=Anula Tr\u00e1fego Convidado +label.override.public.traffic=Sobrep\u00f5e Tr\u00e1fego P\u00fablico +label.ovm3.cluster=Native Clustering +label.ovm3.pool=Native Pooling +label.ovm3.vip=IP principal do Vip +label.ovm.traffic.label=R\u00f3tulo de tr\u00e1fego OVM +label.ovs=OVS label.owned.public.ips=IP P\u00fablico Utilizado label.owner.account=Dono da Conta label.owner.domain=Dono do Dom\u00ednio +label.palo.alto.details=Detalhes do Palo Alto label.PA.log.profile=Palo Alto Log Profile label.PA=Palo Alto label.parent.domain=Dom\u00ednio Principal +label.passive=Passivo label.password.enabled=Senha Ativada +label.password.lower=senha label.password.reset.confirm=A senha foi recuperada para label.password=Senha label.path=Caminho (Path) label.PA.threat.profile=Palo Alto Threat Profile label.perfect.forward.secrecy=Perfect Forward Secrecy +label.persistent=Persistente label.physical.network.ID=ID da rede f\u00edsica +label.physical.network.name=Nome da rede f\u00edsica label.physical.network=Rede F\u00edsica label.PING.CIFS.password=PING CIFS password label.PING.CIFS.username=PING CIFS username label.PING.dir=PING Directory +label.ping.path=Caminho do Ping label.PING.storage.IP=Disparar PING para IP do Storage label.planner.mode=Modo planejado +label.please.complete.the.following.fields=Por favor, preencha os seguintes campos label.please.specify.netscaler.info=Por favor especifique as informa\u00e7\u00f5es do Netscaler label.please.wait=Por Favor Aguarde label.plugin.details=Detalhes do plugin label.plugins=Plugins +label.pod.dedicated=Pod Dedicado label.pod.name=Nome do Pod label.pod=POD label.pods=Pods +label.polling.interval.sec=Intervalo de Polling (em seg) +label.portable.ip=IP Port\u00e1vel +label.portable.ip.range.details=Detalhes de Range de IP Port\u00e1veis label.portable.ip.ranges=Faixa de endere\u00e7os IPs Port\u00e1vel +label.portable.ips=IPs Port\u00e1veis label.port.forwarding=Encaminhamento de Porta label.port.forwarding.policies=Pol\u00edticas de redirecionamento de portas label.port=Porta @@ -928,10 +1184,12 @@ label.private.interface=Interface Privada label.private.ip=Endere\u00e7o IP Privado label.private.ip.range=Range de IP Privado label.private.ips=IPs Privados +label.private.key=Chave privada label.privatekey=PKCS\#8 Private Key label.private.network=Rede Privada label.private.port=Porta Privada label.private.zone=Zona Privada +label.profile=Perfil label.project.dashboard=Dashboard do Projeto label.project.id=ID de Projeto label.project.invite=Convidar para o projeto @@ -939,22 +1197,29 @@ label.project.name=Nome de projeto label.project=Projeto label.projects=Projetos label.project.view=Vis\u00e3o de Projeto +label.protocol.number=N\u00famero do Protocolo label.protocol=Protocolo label.provider=Provedor label.providers=Providers label.public.interface=Interface P\u00fablica label.public.ip=Endere\u00e7o IP P\u00fablico label.public.ips=IPs P\u00fablicos +label.public.key=Chave p\u00fablica +label.public.lb=LB p\u00fablico +label.public.load.balancer.provider=Provedor P\u00fablico de Balanceamento de Carga label.public.network=Rede P\u00fablica label.public.port=Porta P\u00fablica label.public=P\u00fablico label.public.traffic=Tr\u00e1fego P\u00fablico +label.public.traffic.vswitch.name=Nome do vSwitch de Tr\u00e1fego P\u00fablico +label.public.traffic.vswitch.type=Tipo de vSwitch de Tr\u00e1fego P\u00fablico label.public.zone=Zona P\u00fablica label.purpose=Prop\u00f3sito label.Pxe.server.type=Tipo de Servidor PXE label.qos.type=Tipo de QoS label.quickview=Visualiza\u00e7\u00e3o r\u00e1pida label.quiesce.vm=Quiesce VM +label.quiet.time.sec=Tempo Silencioso (em seg) label.rbd.id=Usu\u00e1rio Ceph label.rbd.monitor=Monitor Ceph label.rbd.pool=Pool Ceph @@ -966,10 +1231,21 @@ label.recover.vm=Recuperar VM label.redundant.router.capability=Recurso de roteador redundante label.redundant.router=Roteador Redundantee label.redundant.state=Estado redundante +label.redundant.vpc=VPC Redundante label.refresh=Atualizar +label.refresh.blades=Atualizar L\u00e2minas +label.region.details=Detalhes da regi\u00e3o +label.regionlevelvpc=VPC a N\u00edvel de Regi\u00e3o label.region=Regi\u00e3o label.reinstall.vm=Reinstalar VM label.related=Relacionado +label.release.account=Liberar de Conta +label.release.account.lowercase=LIberar de conta +label.release.dedicated.cluster=Libera Cluster Dedicado +label.release.dedicated.host=Libera Host Dedicado +label.release.dedicated.pod=LIberar Pod Dedicado +label.release.dedicated.vlan.range=Liberar range de VLAN dedicado +label.release.dedicated.zone=Liberar Zona Dedicada label.remind.later=Me lembre depois label.remove.ACL=Remove ACL label.remove.egress.rule=Remover regra egress @@ -977,40 +1253,62 @@ label.remove.from.load.balancer=Removendo Inst\u00e2ncia do balanceador de carga label.remove.ingress.rule=Remover regra ingress label.remove.ip.range=Remover range de IP label.remove.ldap=Remover LDAP +label.remove.network.offering=Remove oferta de rede label.remove.pf=Remover regra de redirecionamento de porta label.remove.project.account=Remover conta de projeto label.remove.region=Remover Regi\u00e3o label.remove.rule=Remover regra +label.remove.ssh.key.pair=Remover par de chaves SSH label.remove.static.nat.rule=Remover regra de NAT est\u00e1tico label.remove.static.route=Remover rota est\u00e1tica +label.remove.this.physical.network=Remover esta rede f\u00edsica label.remove.tier=Remover camada label.remove.vm.from.lb=Remover VM da regra de balanceamento de carga +label.remove.vm.load.balancer=Remover VM do balanceamento de carga +label.remove.vmware.datacenter=Remover Datacenter VMware +label.remove.vpc.offering=Remover oferta VPC label.remove.vpc=remover a VPC label.removing=Removendo label.removing.user=Removendo Usu\u00e1rio +label.reource.id=ID do Recurso +label.replace.acl.list=Substituir Lista ACL +label.replace.acl=Substituir ACL label.required=Obrigat\u00f3rio +label.requires.upgrade=Requer Atualiza\u00e7\u00e3o +label.reserved.ip.range=Faixa de IP Reservada label.reserved.system.gateway=Gateway de sistema reservado label.reserved.system.ip=IP de Sistema Reservado label.reserved.system.netmask=M\u00e1scara de rede reservada do sistema +label.reset.ssh.key.pair.on.vm=Recriar par de chaves SSH na VM +label.reset.ssh.key.pair=Recriar par de chaves SSH label.resetVM=Restabelecer VM label.reset.VPN.connection=Resetar a conex\u00e3o VPN label.resize.new.offering.id=New Offering +label.resize.new.size=Novo Tamanho (GB) label.resize.shrink.ok=Shrink OK +label.resource.limit.exceeded=Limite de Recurso Excedido label.resource.limits=Limite de Recursos +label.resource.name=Nome do Recurso label.resource=Recurso label.resources=Recursos label.resource.state=Estado do Recurso +label.response.timeout.in.sec=Timeout de Resposta (em seg) label.restart.network=Reiniciar rede label.restart.required=Reiniciar obrigat\u00f3rio label.restart.vpc=reiniciar a VPC label.restore=Restaurar +label.retry.interval=Intervalo de repeti\u00e7\u00e3o label.review=Revisar label.revoke.project.invite=Revogar convite label.role=Fun\u00e7\u00e3o +label.root.certificate=Certificado Root label.root.disk.controller=Controlador do disco Root label.root.disk.offering=Oferta de Disco ROOT label.root.disk.size=Tamanho do disco root +label.router.vm.scaled.up=VM do Roteador Escalonada +label.routing.host=Host de Roteamento label.routing=Roteamento +label.rule.number=Regra N\u00famero label.rules=Regras label.running.vms=VMs Rodando label.s3.access_key=Chave de acesso @@ -1023,13 +1321,24 @@ label.s3.nfs.server=Servidor NFS S3 label.s3.secret_key=Chave Secreta label.s3.socket_timeout=Tempo limite no socket label.s3.use_https=Use HTTPS +label.saml.enable=Autorizar SAML SSO +label.saml.entity=Provedor de Identidade label.saturday=S\u00e1bado label.save.and.continue=Salvar e continuar +label.save.changes=Salvar altera\u00e7\u00f5es label.save=Salvar label.saving.processing=Salvando.... +label.scaledown.policy=Pol\u00edtica de redu\u00e7\u00e3o +label.scaleup.policy=Pol\u00edtica de amplia\u00e7\u00e3o +label.scale.up.policy=Pol\u00edtica de Escalonamento label.scope=Escopo label.search=Pesquisar +label.secondary.ips=IPs secund\u00e1rios +label.secondary.isolated.vlan.id=ID de VLAN Secund\u00e1ria Isolada +label.secondary.staging.store=Armazenamento de Est\u00e1gio Secund\u00e1rio +label.secondary.staging.store.details=Detalhes do Armazenamento de Est\u00e1gio Secund\u00e1rio label.secondary.storage.count=Pools de Storage secund\u00e1rios +label.secondary.storage.details=Detalhes de armazenamento secund\u00e1rio label.secondary.storage.limits=Limites do Storage Secund\u00e1rio (GiB) label.secondary.storage=Storage Secund\u00e1rio label.secondary.storage.vm=VM de storage secund\u00e1rio @@ -1046,25 +1355,32 @@ label.select.instance.to.attach.volume.to=Escolha uma inst\u00e2ncia para conect label.select.iso.or.template=Selecione ISO ou template label.select.offering=Selecionar Oferta label.select.project=Selecionar Projeto +label.select.region=Selecione Regi\u00e3o label.select=Selecionar +label.select.template=Seleciona Template label.select.tier=Selecione camada label.select-view=Selecionar visualiza\u00e7\u00e3o label.select.vm.for.static.nat=Selecionar VM para NAT est\u00e1tico label.sent=Enviado label.server=Servidor label.service.capabilities=Recursos de servi\u00e7os +label.service.offering.details=Detalhes da oferta de servi\u00e7o label.service.offering=Plano +label.services=Servi\u00e7os label.service.state=Estado do Servi\u00e7o label.session.expired=Sess\u00e3o Expirada label.set.default.NIC=Configurar para NIC padr\u00e3o +label.settings=Ajustes label.setup=Configura\u00e7\u00e3o label.setup.network=Configurar Rede label.setup.zone=Configurar Zona label.set.up.zone.type=Configurar tipo de zona label.shared=Compatilhado label.SharedMountPoint=SharedMountPoint +label.show.advanced.settings=Mostra ajustes avan\u00e7ados label.show.ingress.rule=Mostrar Regra de Entrada label.shutdown.provider=Desabilitar provider +label.simplified.chinese.keyboard=Simplified Chinese keyboard label.site.to.site.VPN=Site-to-site VPN label.size=Tamanho label.skip.guide=Eu utilizei o CloudStack antes, pular este guia @@ -1073,25 +1389,39 @@ label.smb.password=Senha SMB label.smb.username=Usu\u00e1rio SMB label.snapshot.limits=Limites de Snapshot label.snapshot.name=Nome do Snapshot -label.snapshot.schedule=Configure Snapshots recorrentes +label.snapshot.schedule=Configurar Snapshot Recorrente label.snapshot=Snapshot +label.snapshot.s=Snapshots label.snapshots=Snapshots +label.SNMP.community=Comunidade SNMP +label.SNMP.port=Porta SNMP label.sockets=Sockets +label.source.ip.address=Endere\u00e7o IP de origem label.source.nat=Source NAT +label.source.nat.supported=SourceNAT Supportado +label.source.port=Porta de origem label.specify.IP.ranges=Especifique range de IP label.specify.vlan=Especificar VLAN label.specify.vxlan=Especificar VXLAN label.SR.name=SR Name-Label +label.srx.details=Detalhes do SRX label.srx=SRX +label.ssh.key.pair.details=Detalhes do par de chaves SSH +label.ssh.key.pair=Par de chaves SSH +label.ssh.key.pairs=Par de chaves SSH +label.standard.us.keyboard=Standard (US) keyboard label.start.IP=IP do in\u00edcio label.start.lb.vm=Iniciar LB VM label.start.port=Porta de In\u00edcio label.start.reserved.system.IP=In\u00edcio dos IPs reservados para o sistema +label.start.vlan=VLAN Inicial +label.start.vxlan=VXLAN Inicial label.state=Estado label.static.nat.enabled=NAT est\u00e1tico Habilitado label.static.nat=NAT Est\u00e1tico label.static.nat.to=NAT Est\u00e1tico para label.static.nat.vm.details=Detalhes de NAT est\u00e1tico da VM +label.static.routes=Rotas est\u00e1ticas label.statistics=Estat\u00edsticas label.status=Estado label.step.1=Passo 1 @@ -1105,6 +1435,7 @@ label.step.4.title=Passo 4\: Rede label.step.5=Passo 5 label.step.5.title=Passo 5\: Revisar label.stickiness=Ader\u00eancia +label.stickiness.method=M\u00e9todo de Stickness label.sticky.cookie-name=Nome do Cookie label.sticky.domain=Dom\u00ednio label.sticky.expire=Expires @@ -1112,13 +1443,16 @@ label.sticky.holdtime=Tempo de espera label.sticky.indirect=Indireto label.sticky.length=Tamanho label.sticky.mode=Modo +label.sticky.name=Nome Sticky label.sticky.nocache=Sem Cache label.sticky.postonly=Apenas publicar label.sticky.prefix=Prefixo label.sticky.request-learn=Solicitar para aprender label.sticky.tablesize=Tamanho da Tabela +label.stop.lb.vm=Pare LB VM label.stop=Parar label.stopped.vms=VMs Paradas +label.storage.pool=Pool de Armazanamento label.storage=Storage label.storage.tags=Tags de Storage label.storage.traffic=Tr\u00e1fego do Storage @@ -1131,11 +1465,16 @@ label.sunday=Domingo label.super.cidr.for.guest.networks=Super CIDR para redes h\u00f3spedes label.supported.services=Servi\u00e7os Suportados label.supported.source.NAT.type=Tipo de Source NAT Suportado +label.supportsstrechedl2subnet=Suporte \u00e0 Streched L2 Subnet label.suspend.project=Suspender Projeto label.switch.type=Tipo de Switch label.system.capacity=Capacidade do Sistema +label.system.offering.for.router=Oferta do Sistema para Roteador label.system.offering=Ofertas de Sistema +label.system.service.offering.details=Detalhes da oferta de servi\u00e7o de sistema label.system.service.offering=System Service Offering +label.system.vm.details=Detalhes do System VM +label.system.vm.scaled.up=System VM Escalonada label.system.vms=VM de Sistemas label.system.vm.type=Tipo de VM de Sistema label.system.vm=VM de Sistema @@ -1149,14 +1488,19 @@ label.task.completed=Tarefa completa label.template.limits=Limites do Template label.template=Template label.TFTP.dir=TFTP Directory +label.tftp.root.directory=Diret\u00f3rio raiz do tftp label.theme.default=Tema Padr\u00e3o label.theme.grey=Custom - Grey label.theme.lightblue=Custom - Light Blue +label.threshold=Limiar label.thursday=Quinta label.tier=Camada label.tier.details=Detalhes da camada +label.time.colon=Tempo\: +label.timeout.in.second = Timeout (segundos) label.timeout=Timeout label.time=Time +label.timezone.colon=Fuso Hor\u00e1rio label.time.zone=Fuso Hor\u00e1rio label.timezone=Fuso Hor\u00e1rio label.token=Token @@ -1164,30 +1508,50 @@ label.total.cpu=CPU TOTAL label.total.CPU=CPU TOTAL label.total.hosts=Total de Hosts label.total.memory=Total de Mem\u00f3ria +label.total.of.ip=Total de Endere\u00e7os IPs label.total.of.vm=Total VMs label.total.storage=Totam de Storage +label.total.virtual.routers=Total de Roteadores Virtuais +label.total.virtual.routers.upgrade=Total de Roteadores Virtuais que requerem atualiza\u00e7\u00e3o label.total.vms=Total VMs label.traffic.label=Etiqueta de tr\u00e1fego label.traffic.types=Tipos de Tr\u00e1fego label.traffic.type=Tipo de Tr\u00e1fego label.tuesday=Ter\u00e7a label.type.id=Tipo do ID +label.type.lower=tipo label.type=Tipo +label.ucs=UCS +label.uk.keyboard=UK keyboard label.unavailable=Indispon\u00edvel +label.unhealthy.threshold=Limiar de Insalubridade label.unlimited=Ilimitado label.untagged=N\u00e3o Marcado label.update.project.resources=Atualizar recursos de projeto label.update.ssl= Atualizar Certificado SSL label.update.ssl.cert= Atualizar Certificado SSL label.updating=Atualizando +label.upgrade.required=Atualiza\u00e7\u00e3o \u00e9 necess\u00e1ria +label.upgrade.router.newer.template=Atualize Roteador Para Usar Template Mais Novo label.upload=Enviar +label.upload.from.local=Fazer upload local +label.upload.template.from.local=Upload de Template Local label.upload.volume=Enviar o Volume +label.upload.volume.from.local=Upload de Volume Local +label.upload.volume.from.url=Upload de volume por URL label.url=URL label.usage.interface=Usage Interface +label.usage.sanity.result=Resultado de Sanidade de Uso +label.usage.server=Uso do Servidor label.used=Usado +label.user.data=Dados de Usu\u00e1rio +label.user.details=Detalhes do usu\u00e1rio +label.username.lower=nome do usu\u00e1rio label.username=Nome de usu\u00e1rio label.users=Usu\u00e1rios label.user=Usu\u00e1rio +label.user.vm=VM do Usu\u00e1rio +label.use.vm.ips=Usa IPs da VM label.use.vm.ip=Usar IP da VM\: label.value=Valor label.vcdcname=Nome do vCenter DC @@ -1197,8 +1561,15 @@ label.vcenter.datastore=vCenter Datastore label.vcenter.host=vCenter Host label.vcenter.password=vCenter Password label.vcenter.username=vCenter Username +label.vcenter=vcenter label.vcipaddress=Endere\u00e7o IP do vCenter label.version=Vers\u00e3o +label.vgpu.max.resolution=Resulo\u00e7\u00e3o max +label.vgpu.max.vgpu.per.gpu=vGPU por GPU +label.vgpu.remaining.capacity=Capacidade restante +label.vgpu.type=Tipo de vGPU +label.vgpu=VGPU +label.vgpu.video.ram=RAM de v\u00eddeo label.view.all=Visualizar tudo label.view.console=Visualizar Console label.viewing=Visualizar @@ -1206,21 +1577,35 @@ label.view.more=Ver mais label.view.secondary.ips=Visualizar os IPs secund\u00e1rios label.view=Visualizar label.virtual.appliance=Appliance Virtual +label.virtual.appliance.details=Detalhes de appliance virtual label.virtual.appliances=Appliance Virtual +label.virtual.machine=Maquina Virtual +label.virtual.machines=Maquinas Virtuais +label.virtual.networking=Rede Virtual label.virtual.network=Rede Virtual label.virtual.router=Roteador Virtual +label.virtual.routers.group.account=Grupo de Roteadores Virtuais por conta +label.virtual.routers.group.cluster=Grupo de Roteadores Virtuais por cluster +label.virtual.routers.group.pod=Grupo de Roteadores Virtuais por pod +label.virtual.routers.group.zone=Grupo de Roteadores Virtuais por Zona label.virtual.routers=Roteadores Virtuais label.vlan.id=VLAN ID label.vlan.only=VLAN +label.vlan.range.details=Detalhes de range VLAN label.vlan.range=Intervalo de VLAN +label.vlan.ranges=Range(s) de VLAN label.vlan=VLAN label.vlan.vni.range=Intervalo de VLAN +label.vlan.vni.ranges=Range(s) de VLAN/VNI label.vm.add=Adicionar Inst\u00e2ncia label.vm.destroy=Apagar label.vm.display.name=Nome de exibi\u00e7\u00e3o da VM label.VMFS.datastore=VMFS datastore label.vmfs=VMFS +label.vm.id=ID da VM +label.vm.ip=Endere\u00e7o IP da VM label.vm.name=Nome da VM +label.vm.password=Senha para a VM \u00e9 label.vm.reboot=Reiniciar label.VMs.in.tier=M\u00e1quinas virtuais em camadas label.vmsnapshot.current=isCurrent @@ -1232,18 +1617,31 @@ label.vm.start=In\u00edcio label.vm.state=Estado da VM label.vm.stop=Parar label.vms=VMs +label.vmware.datacenter.id=ID do datacenter VMware +label.vmware.datacenter.name=Nome do datacenter VMware +label.vmware.datacenter.vcenter=Vcednter do datacenter VMware label.vmware.traffic.label=Etiqueta de tr\u00e1fego VMware label.vnet.id=VLAN ID label.vnet=VLAN +label.vnmc.devices=Dispositivos VNMC +label.vnmc=VNMC label.volatile=Vol\u00e1til label.volgroup=Grupo de Volume +label.volume.details=Detalhe do volume label.volume=Disco label.volume.limits=Limites de Disco +label.volume.migrated=Volume migrado label.volume.name=Nome do Disco label.volumes=Discos +label.vpc.distributedvpcrouter=Roteador VPC Distribuido label.vpc.id=VPC ID label.VPC.limits=Limites VPC +label.vpc.offering.details=Detalhes da oferta VPC +label.vpc.offering=Oferta VPC label.VPC.router.details=Detalhes de roteador de VPC +label.vpc.router.details=Detalhes do roteador da VPC +label.vpc.supportsregionlevelvpc=Suporta VPC em N\u00edvel de Regi\u00e3o +label.vpc.virtual.router=Roteador Virtual VPC label.vpc=VPC label.VPN.connection=Conex\u00e3o VPN label.vpn.customer.gateway=Gateway de VPN de usu\u00e1rio @@ -1254,21 +1652,29 @@ label.vsmctrlvlanid=Control VLAN ID label.vsmpktvlanid=Packet VLAN ID label.vsmstoragevlanid=Storage VLAN ID label.vsphere.managed=vSphere Managed +label.vswitch.name=Nome do vSwitch +label.vSwitch.type=Tipo do vSwitch label.vxlan.id=VXLAN ID label.vxlan.range=Intervalo de VXLAN label.vxlan=VXLAN label.waiting=Aguardando label.warn=Avisar +label.warning=Aten\u00e7\u00e3o +label.warn.upper=AVISO label.wednesday=Quarta-Feira label.weekly=Semanal label.welcome=Bem-Vindo label.welcome.cloud.console=Painel de Controle label.what.is.cloudstack=O que \u00e9 o CloudStack&\#8482? +label.xenserver.tools.version.61.plus=Vers\u00e3o original do XS \u00e9 6.1\\+ +label.Xenserver.Tools.Version61plus=Vers\u00e3o original do XS \u00e9 6.1\\+ label.xenserver.traffic.label=Etiqueta de tr\u00e1fego XenServer label.yes=Sim +label.zone.dedicated=Zona Dedicada label.zone.details=Detalhes de zona label.zone.id=ID da Zona label.zone.lower=Zona +label.zone.name=Nome da zona label.zone.step.1.title=Passo 1\: Selecionar a Rede label.zone.step.2.title=Passo 2\: Adicionar a Zona label.zone.step.3.title=Passo 3\: Adicionar o POD @@ -1321,6 +1727,7 @@ message.action.disable.physical.network=Por favor confirme que voc\u00ea deseja message.action.disable.pod=Confirma a desativa\u00e7\u00e3o do POD. message.action.disable.static.NAT=Confirme que voc\u00ea deseja desativar o NAT Est\u00e1tico. message.action.disable.zone=Confirma a desativa\u00e7\u00e3o da zona. +message.action.downloading.template=Baixando template message.action.download.iso=Por favor confirme que voc\u00ea deseja baixar esta ISO. message.action.download.template=Por favor confirme que voc\u00ea deseja baixar este template. message.action.enable.cluster=Confirma a ativa\u00e7\u00e3o do cluster. @@ -1359,6 +1766,8 @@ message.add.cluster=Add a hypervisor managed cluster for zone message.add.disk.offering=Especifique o seguintes par\u00e2metros para adicionar uma nova oferta de disco. message.add.domain=Por favor especifique o subdom\u00ednio que voc\u00ea deseja criar neste dom\u00ednio +message.added.new.nuage.vsp.controller=Adicionada nova Controladora Nuage Vsp +message.added.vpc.offering=Adicionada oferta VPC message.add.firewall=Adicionar Firewall \u00e0\u00a0 zona. message.add.guest.network=Por favor confirme que voc\u00ea gostaria de adicionar uma rede guest. message.add.host=Especifique os seguintes par\u00e2metros para adicionar um novo host. @@ -1384,6 +1793,7 @@ message.add.system.service.offering=Por favor preencha os dados abaixo para adic message.add.template=Entre com os dados para criar um novo template. message.add.volume=Entre com os dados para criar um novo disco. message.add.VPN.gateway=Favor confirmar que voc\u00ea deseja adicionar um gateway de VPN +message.admin.guide.read=Para VMs baseadas em VMware, por favor leia a sess\u00e3o sobre escalonamento din\u00e2mico no guia do administrador antes de escalonar. Voc\u00ea gostaria de continuar?\\, message.advanced.mode.desc=Escolhe este modelo de rede se deseja ter habilitar o suporte a VLAN. Este modelo permite maior flexibilidade ao administrador ao permitir ofertas de rede customizada, firewall, vpn ou load balancer bem como acesso via rede virtual ou acesso direto. message.advanced.security.group=Escolha esta op\u00e7\u00e3o se desejar utilizar Security Groups para isolamento das VMs guest. message.advanced.virtual=Escolha esta op\u00e7\u00e3o se desejar utilizar VLANs para isolamento das VMs guest. @@ -1397,6 +1807,8 @@ message.attach.volume=Preencha os seguintes dados para conectar o novo disco. Se message.basic.mode.desc=Escolha este modelo de rede se voc\u00ea *n\u00e3o* quer suporte a VLAN. Toda Inst\u00e2ncia criada neste modelo de rede estar\u00e1 ligado diretamente a um IP da rede e ser\u00e1 usado Security Groups para prover seguran\u00e7a e segrega\u00e7\u00e3o. message.change.offering.confirm=Por favor, confirme que voc\u00ea deseja mudar a oferta de servi\u00e7o desta inst\u00e2ncia virtual. message.change.password=Por favor, troque sua senha. +message.cluster.dedicated=Cluster Dedicado +message.cluster.dedication.released=Cluster dedicado liberado message.configure.all.traffic.types=Voc\u00ea tem m\u00faltiplas redes f\u00edsicas; favor configurar etiquetas para cada tipo de tr\u00e1fego clicando no bot\u00e3o Edit. message.configure.ldap=Por favor, confirme que voc\u00ea deseja configurar o LDAP. message.configuring.guest.traffic=Configurando tr\u00e1fego do guest @@ -1404,17 +1816,73 @@ message.configuring.physical.networks=Configurando redes f\u00edsicas message.configuring.public.traffic=Configurando tr\u00e1fego p\u00fablico message.configuring.storage.traffic=Configurando tr\u00e1fego de storage message.confirm.action.force.reconnect=Por favor confirme que voc\u00ea deseja for\u00e7ar a reconex\u00e3o com este host. +message.confirm.add.vnmc.provider=Por favor confirme que voc\u00ea gostaria de adicionar este provedor VNMC. +message.confirm.archive.alert=Por favor confirme que voc\u00ea deseja arquivar este alerta. +message.confirm.archive.event=Por favor confirme que voc\u00ea deseja arquivar este evento +message.confirm.archive.selected.alerts=Por favor confirme que voc\u00ea deseja arquivar os alertas selecionados +message.confirm.archive.selected.events=Por favor confirme que voc\u00ea deseja arquivar os eventos selecionados +message.confirm.attach.disk=Voc\u00ea tem certeza que deseja conectar este disco? +message.confirm.create.volume=Voc\u00ea tem certeza que deseja criar o volume? +message.confirm.current.guest.CIDR.unchanged=Gostaria de manter o CIDR da rede convidado inalterado? +message.confirm.dedicate.cluster.domain.account=Voc\u00ea realmente quer dedicar este cluster ao dom\u00ednio/conta? +message.confirm.dedicate.host.domain.account=Voc\u00ea realmente quer dedicar este host ao dom\u00ednio/conta? +message.confirm.dedicate.pod.domain.account=Voc\u00ea realmente quer dedicar este pod ao dom\u00ednio/conta? +message.confirm.dedicate.zone=Voc\u00ea realmente quer dedicar esta zona ao dom\u00ednio/conta? +message.confirm.delete.acl.list=Voc\u00ea tem certeza que deseja apagar esta lista ACL? +message.confirm.delete.alert=Voc\u00ea tem certeza que deseja apagar este alerta? +message.confirm.delete.baremetal.rack.configuration=Por favor, confirme que voc\u00ea deseja remover a Configura\u00e7\u00e3o de Rack de Baremetal +message.confirm.delete.BigSwitchBcf=Por favor, confirme que voc\u00ea deseja deletar este BigSwitch BCF Controller +message.confirm.delete.BrocadeVcs=Por favor confirme que voc\u00ea deseja remover o Brocade Vcs Switch +message.confirm.delete.ciscoASA1000v=Favor confirmar que voc\u00ea deseja apagar este CiscoASA1000v +message.confirm.delete.ciscovnmc.resource=Por favor confirme que voc\u00ea deseja apagar este recurso CiscoVNMC message.confirm.delete.F5=Por favor confirme que voc\u00ea deseja remover o F5 +message.confirm.delete.internal.lb=Por favor confirme que voc\u00ea deseja remover este LB interno message.confirm.delete.NetScaler=Por favor confirme que voc\u00ea deseja remover o NetScaler +message.confirm.delete.NuageVsp=Por favor confirme que voc\u00ea deseja remover o message.confirm.delete.PA=Por favor, confirme que voc\u00ea deseja remover Palo Alto +message.confirm.delete.secondary.staging.store=Por favor confirme que deseja apagar Armazenamento de Est\u00e1gio Secund\u00e1rio message.confirm.delete.SRX=Por favor confirme que voc\u00ea deseja remover o SRX +message.confirm.delete.ucs.manager=Confirme se voc\u00ea deseja excluir o Gerente UCS. message.confirm.destroy.router=Por favor confirme que voc\u00ea gostaria de destruir este roteador +message.confirm.disable.host=Favor confirmar que voc\u00ea deseja desabilitar este host. +message.confirm.disable.network.offering=Voc\u00ea tem certeza que deseja deshabilitar esta oferta de rede? message.confirm.disable.provider=Por favor confirme que voc\u00ea gostaria de desabilitar este provider +message.confirm.disable.vnmc.provider=Por favor confirme que voc\u00ea gostaria de desabilitar este provedor VNMC. +message.confirm.disable.vpc.offering=Voc\u00ea tem certeza que deseja desabilitar esta oferta de VPC? +message.confirm.enable.host=Por favor confirme que voc\u00ea deseja habilitar este host. +message.confirm.enable.network.offering=Voc\u00ea tem certeza que deseja habilitar esta oferta de rede? message.confirm.enable.provider=Por favor confirme que voc\u00ea gostaria de habilitar este provider +message.confirm.enable.vnmc.provider=Por favor confirme que voc\u00ea gostaria de habilitar este provedor VNMC. +message.confirm.enable.vpc.offering=Voc\u00ea tem certeza que deseja habilitar esta oferta de VPC? message.confirm.join.project=Por favor confirme que voc\u00ea deseja entrar neste projeto +message.confirm.migrate.volume=Voc\u00ea quer migrar este volume? +message.confirm.refresh.blades=Por favor confirme que voc\u00ea deseja renovar as l\u00e2minas. +message.confirm.release.dedicated.cluster=Voc\u00ea deseja liberar este cluster dedicado? +message.confirm.release.dedicated.host=Voc\u00ea deseja liberar esta host dedicado? +message.confirm.release.dedicated.pod=Voc\u00ea deseja liberar esta pod dedicado? +message.confirm.release.dedicated.zone=Voc\u00ea deseja liberar esta zona dedicada? +message.confirm.release.dedicate.vlan.range=Confirme que voc\u00ea deseja liberar esta faixa de VLAN dedicada. +message.confirm.remove.event=Voc\u00ea tem certeza que deseja remover este evento? message.confirm.remove.IP.range=Por favor confirme que voc\u00ea deseja remover este range de IP. +message.confirm.remove.load.balancer=Por favor, confirme que voc\u00ea quer remover a VM do Balanceador de Carga +message.confirm.remove.network.offering=Voc\u00ea tem certeza que deseja remover esta oferta de rede? +message.confirm.remove.selected.alerts=Por favor confirme que voc\u00ea deseja remover os alertas selecionados +message.confirm.remove.selected.events=Por favor confirme que voc\u00ea deseja remover os eventos selecionados +message.confirm.remove.vmware.datacenter=Por favor, confirme que voc\u00ea quer remover este VMware datacenter +message.confirm.remove.vpc.offering=Voc\u00ea tem certeza que deseja remover esta oferta de VPC? +message.confirm.replace.acl.new.one=Voc\u00ea deseja substituir a ACL com uma nova? +message.confirm.scale.up.router.vm=Voc\u00ea realmente quer escalonar a VM do Roteador? +message.confirm.scale.up.system.vm=Voc\u00ea realmente quer escalonar a VM do sistema? message.confirm.shutdown.provider=Por favor confirme que voc\u00ea deseja desligar este provider +message.confirm.start.lb.vm=Confirme que voc\u00ea deseja iniciar esta LB VM +message.confirm.stop.lb.vm=Confirme que voc\u00ea deseja parar esta LB VM +message.confirm.upgrade.router.newer.template=Por favor confirme que voc\u00ea deseja atualizar o roteador para usar template mais recente. +message.confirm.upgrade.routers.account.newtemplate=Por favor confirme que voc\u00ea deseja atualizar todos os roteadores desta conta para o template mais novo. +message.confirm.upgrade.routers.cluster.newtemplate=Por favor confirme que voc\u00ea deseja atualizar todos os roteadores deste cluster para o template mais novo. +message.confirm.upgrade.routers.newtemplate=Por favor confirme que voc\u00ea deseja atualizar todos os roteadores desta zona para o template mais novo. +message.confirm.upgrade.routers.pod.newtemplate=Por favor confirme que voc\u00ea deseja atualizar todos os roteadores neste pod para o template mais novo. message.copy.iso.confirm=Confirme se voc\u00ea deseja copiar a ISO para +message.copy.template.confirm=Voc\u00ea tem certeza que deseja copiar o template ? message.copy.template=Copiar template XXX da zona para message.create.template.vm=Criar VM do template message.create.template=Voc\u00ea tem certeza que deseja criar um template ? @@ -1425,8 +1893,10 @@ message.creating.physical.networks=Criando redes fisicas message.creating.pod=Criando pod message.creating.primary.storage=Criando storage prim\u00e1rio message.creating.secondary.storage=Criando storage secund\u00e1rio +message.creating.systemVM=Criando VMs do sistema (isso pode levar algum tempo) message.creating.zone=Criando zona. message.decline.invitation=Voc\u00ea tem certeza que quer rejeitar este convite de projeto ? +message.dedicated.zone.released=Zona dedicada lioberada message.dedicate.zone=Zona dedicada message.delete.account=Confirme se voc\u00ea deseja excluir esta conta. message.delete.affinity.group=Por favor, confirme que voc\u00ea deseja remover este grupo de afinidade @@ -1436,11 +1906,15 @@ message.delete.user=Por favor confirme que voc\u00ea deseja deletar este usu\u00 message.delete.VPN.connection=Favor confirmar que voc\u00ea deseja deletar esta conex\u00e3o VPN message.delete.VPN.customer.gateway=Favor confirmar que voc\u00ea deseja deletar este gateway de VPN de usu\u00e1rio message.delete.VPN.gateway=Favor confirmar que voc\u00ea deseja deletar este gateway de VPN +message.desc.add.new.lb.sticky.rule=Adicionar nova regra fixa de LB message.desc.advanced.zone=Para topologias de rede mais sofisticadas. Este modelo fornece maior flexibilidade na defini\u00e7\u00e3o de redes de clientes e fornece ofertas de rede personalizadas, tais como firewall, VPN ou de balanceamento de carga. message.desc.basic.zone=Fornece uma \u00fanica rede onde em cada inst\u00e2ncia de VM \u00e9 atribu\u00eddo um IP diretamente na rede. O isolamento Guest podem ser fornecidos atrav\u00e9s de camada-3 da rede com grupos de seguran\u00e7a (filtragem da fonte de endere\u00e7os IP). message.desc.cluster=Cada pod deve conter um ou mais clusters, e iremos adicionar o primeiro cluster agora. Um cluster fornece uma maneira de agrupamento de hosts. Os hosts de um cluster t\u00eam hardware id\u00eantico, executam o mesmo hypervisor, est\u00e3o na mesma sub-rede e acessam o mesmo storage compartilhado. Cada cluster \u00e9 constitu\u00eddo por um ou mais hosts e um ou mais servidores de storage prim\u00e1rio. +message.desc.created.ssh.key.pair=Par de chaves SSH criado +message.desc.create.ssh.key.pair=Por favor, preencha os seguintes dados para criar ou registar um par de chaves ssh.

(1) Se a chave p\u00fablica est\u00e1 definida, CloudStack ir\u00e1 registrar a chave p\u00fablica. Voc\u00ea pode us\u00e1-la atrav\u00e9s de sua chave privada.

(2) Se a chave p\u00fablica n\u00e3o est\u00e1 definida, CloudStack ir\u00e1 criar um novo par de chaves SSH. Neste caso, copie e salve a chave privada. CloudStack n\u00e3o ir\u00e1 mant\u00ea-la.
message.desc.host=Cada cluster deve conter pelo menos um host (computador) para as VMs guest serem executadas e iremos adicionar o primeira host agora. Para um host funcionar no CloudStack, voc\u00ea deve instalar um hypervisor no host, atribuir um endere\u00e7o IP e garantir que o host est\u00e1 conectado ao servidor de gerenciamento do CloudStack.

Forne\u00e7a o hostname ou o endere\u00e7o IP do host, o nome de usu\u00e1rio (geralmente root) e a senha e qualquer label que voc\u00ea utiliza para categorizar os hosts. message.desc.primary.storage=Cada cluster deve conter um ou mais servidores de storage prim\u00e1rio e iremos adicionar o primeiro agora. Um storage prim\u00e1rio, cont\u00e9m os volumes de disco para todas as VMs em execu\u00e7\u00e3o nos hosts do cluster. Utiliza qualquer protocolo compat\u00edvel com os padr\u00f5es que \u00e9 suportado pelo hypervisor utilizado. +message.desc.reset.ssh.key.pair=Por favor, especifique um par de chaves SSH que voc\u00ea deseja adicionar a esta VM. Por favor, note que a senha de root ser\u00e1 alterada por esta opera\u00e7\u00e3o caso a senha esteja ativada. message.desc.secondary.storage=Cada zona deve ter pelo menos um NFS ou servidor de storage secund\u00e1rio e iremos adicionar o primeiro agora. Um storage secund\u00e1rios armazena templates de VM, imagens ISO e snapshots do volume de disco da VM. Esse servidor deve estar dispon\u00edvel para todos os hosts na zona.

Fornecer o endere\u00e7o IP e o caminho exportados. message.desc.zone=Uma zona \u00e9 a maior unidade organizacional no CloudStack e normalmente corresponde \u00e0 um \u00fanico datacenter. As Zonas disponibilizam isolamento f\u00edsico e redund\u00e2ncia. Uma zona \u00e9 composta por um ou mais pods (cada um dos quais cont\u00e9m os hosts e servidores de storage prim\u00e1rio) e um servidor de storage secund\u00e1rio que \u00e9 compartilhado por todos os pods na zona. message.detach.disk=Voc\u00ea tem certeza que deseja desconectar este disco ? @@ -1450,9 +1924,13 @@ message.disable.snapshot.policy=Voc\u00ea desativou com sucesso sua pol\u00edtic message.disable.user=Por favor confirme que voc\u00ea deseja desabilitar este usu\u00e1rio. message.disable.vpn.access=Confirme se voc\u00ea deseja desativar o acesso VPN. message.disable.vpn=Voc\u00ea tem certeza que deseja desabilitar a VPN? +message.disabling.network.offering=Desabilita oferta de rede +message.disabling.vpc.offering=Desabilitando oferta VPC +message.disallowed.characters=Caracteres n\u00e3o-permitidos\: \\<\\,\\> message.download.ISO=Por favor clique 00000 para baixar o ISO message.download.template=Por favor clique 00000 para baixar o template message.download.volume=Clique 00000 para baixar o disco +message.download.volume.confirm=Por favor confirme que voc\u00ea quer baixar este volume message.edit.account=Editar ("-1" indica que n\u00e3o haver\u00e1 limites para a quantidade de recursos criado) message.edit.confirm=Por favor confirme suas altera\u00e7\u00f5es antes de clicar em "Salvar". message.edit.limits=Especifique os limites para os seguintes recursos. "-1" indica sem limite para o total de recursos criados. @@ -1463,12 +1941,20 @@ message.enabled.vpn=Seu acesso VPN Est\u00e1 ativado e pode ser acessado atrav\u message.enable.user=Por favor confirme que voc\u00ea deseja habilitar este usu\u00e1rio. message.enable.vpn.access=VPN Est\u00e1 desativada para este endere\u00e7o IP. Gostaria de ativar o acesso VPN? message.enable.vpn=Por favor confirme que voc\u00ea deseja acesso VPN habilitado para este endere\u00e7o IP. +message.enabling.network.offering=Habilitando oferta de rede message.enabling.security.group.provider=Habilitar provider de grupo de seguran\u00e7a +message.enabling.vpc.offering=Habilitando oferta VPC +message.enabling.zone.dots=Habilitando Zona.... message.enabling.zone=Habilitando zona +message.enter.seperated.list.multiple.cidrs=Por favor entre a de CIDRs separadas por v\u00edrgula, se houver mais de uma message.enter.token=Por favor entre o token que voc\u00ea recebeu no e-mail privado. message.generate.keys=Por favor confirme que voc\u00ea deseja gerar novas chaves para este usu\u00e1rio. +message.gslb.delete.confirm=Confirme que voc\u00ea deseja apagar este GSLB +message.gslb.lb.remove.confirm=Confirme que voc\u00ea deseja remover o balanceamento de carga deste GSLB message.guest.traffic.in.advanced.zone=O tr\u00e1fego de rede guest \u00e9 para comunica\u00e7\u00e3o entre m\u00e1quinas virtuais do usu\u00e1rio final. Especifique um intervalo de IDs de VLAN para transportar o tr\u00e1fego do guest para cada rede f\u00edsica. message.guest.traffic.in.basic.zone=O tr\u00e1fego de rede guest \u00e9 para comunica\u00e7\u00e3o entre m\u00e1quinas virtuais do usu\u00e1rio final. Especifique um intervalo de endere\u00e7os IP para que CloudStack possa atribuir \u00e0s VMs. Certifique-se que este intervalo n\u00e3o se sobreponha o range de IPs reservados do sistema. +message.host.dedicated=Host dedicado +message.host.dedication.released=Host dedicado liberado message.installWizard.click.retry=Click no bot\u00e3o para tentar executar novamente. message.installWizard.copy.whatIsACluster=Um cluster prov\u00ea uma maneira de agrupar hosts. Os hosts em um cluster tem hardware id\u00eantico, rodam o mesmo hypervisor, est\u00e3o na mesma subnet, acessam o mesmo storage compartilhado. Inst\u00e2ncias de m\u00e1quinas virtuais (VMs) podem ser migradas a quente - live migration - de um host para outro host no mesmo cluster, sem interromper o servi\u00e7o para o usu\u00e1rio. Um Cluster \u00e9 a terceira maior unidade organizacional em uma instala\u00e7\u00e3o CloudStack&\#8482; . Clusters est\u00e3o contidos em pods e pods est\u00e3o contidos em zonas.

O CloudStack&\#8482; permite m\u00faltiplos clusters em uma mesma cloud, entretanto para a instala\u00e7\u00e3o b\u00e1sica, n\u00f3s iremos precisar apenas de um cluster. message.installWizard.copy.whatIsAHost=Um host \u00e9 um \u00fanico computador. Os Hosts prov\u00eaem os recursos computacionais para executar as m\u00e1quinas virtuais. Cada host possu\u00ed o software do hypervisor instalado nele para gerenciar as guest VMs (Exceto os hosts bare metal, que s\u00e3o um caso especial discutido no Guia Avan\u00e7ado de Instala\u00e7\u00e3o). Por exemplo, um servidor Linux com KVM habilitado, um servidor Citrix XenServer e um servidor ESXi s\u00e3o hosts. Na Instala\u00e7\u00e3o B\u00e1sica, n\u00f3s utilizamos um \u00fanico host rodando XenServer ou KVM.

O host \u00e9 a menor unidade organizacional dentro de uma instala\u00e7\u00e3o CloudStack&\#8482; . Hosts est\u00e3o contidos dentro de Clusters, clusters est\u00e3o contidos dentro de pods e pods est\u00e3o contidos dentro de zonas. @@ -1503,12 +1989,14 @@ message.installWizard.tooltip.configureGuestTraffic.guestGateway=O gateway que o message.installWizard.tooltip.configureGuestTraffic.guestNetmask=A m\u00e1scara de rede da subrede que os guests devem usar message.installWizard.tooltip.configureGuestTraffic.guestStartIp=O range de endere\u00e7os IP que estar\u00e1 dispon\u00edvel para aloca\u00e7\u00e3o para os guests nesta zona. Caso uma Interface de Rede seja utilizada, estes IPs devem estar no mesmo CIDR que o CIDR do pod. message.installWizard.tooltip.configureGuestTraffic.name=Um nome para sua rede +message.instance.scaled.up.confirm=Voc\u00ea realmente quer escalonar sua inst\u00e2ncia? message.instanceWizard.noTemplates=Voc\u00ea n\u00e3o possui nenhum template dispon\u00edvel; por favor adicione um template compat\u00edvel e reinicie o wizard de inst\u00e2ncia. message.ip.address.changed=Seu endere\u00e7o IP pode ter mudado; voc\u00ea gostaria de atualizar a listagem ? Note que neste caso o painel de detalhes ir\u00e1 fechar. message.iso.desc=Imagem de disco contendo dados ou m\u00eddia de sistema operacional boot\u00e1vel message.join.project=Voc\u00ea agora entrou em um projeto. Por favor troque para a vis\u00e3o de Projeto para visualizar o projeto. message.launch.vm.on.private.network=Voc\u00ea deseja executar a sua inst\u00e2ncia na sua pr\u00f3pria rede privada dedicada? message.launch.zone=A zona est\u00e1 pronta para ser executada; por favor, v\u00e1 para o pr\u00f3ximo passo. +message.listView.subselect.multi=(Ctrl/Cmd-click) message.lock.account=Confirme se voc\u00ea deseja bloquear esta conta. Bloqueando a conta, todos os Usu\u00e1rios desta conta n\u00e3o estar\u00e3o mais habilitados a gerenciar os recursos na nuvem. Os recursos existentes (Cloud Server) ainda poder\u00e3o ser acessados. message.migrate.instance.confirm=Confirme o host que voc\u00ea deseja migrar a inst\u00e2ncia virtual. message.migrate.instance.to.host=Por favor confirme que voc\u00ea deseja migrar a inst\u00e2ncia para outro host. @@ -1516,8 +2004,12 @@ message.migrate.instance.to.ps=Por favor confirme que voc\u00ea deseja migrar a message.migrate.router.confirm=Por favor confirme o host que voc\u00ea deseja migrar o roteador para\: message.migrate.systemvm.confirm=Por favor confirme o host para o qual voc\u00ea deseja migrar a VM de sistema\: message.migrate.volume=Por favor confirme que voc\u00ea deseja migrar o volume para outro storage prim\u00e1rio. +message.network.addVM.desc=Por favor especifique a rede onde voc\u00ea gostaria de adicionar esta VM. Uma nova NIC ser\u00e1 adicionada a esta rede. +message.network.addVMNIC=Por favor confirme que voc\u00ea gostaria de adicionar uma nova VM NIC para esta rede. +message.network.remote.access.vpn.configuration=A configura\u00e7\u00e3o de acesso remoto VPN foi gerada, mas falhou ao ser aplicada. Por favor, verifique a conectividade dos elementos de rede e depois tente novamente. message.new.user=Especifique abaixo para adicionar novos usu\u00e1rios para a conta message.no.affinity.groups=Voc\u00ea n\u00e3o tem nenhum grupo de afinidade. Por favor, v\u00e1 para o pr\u00f3ximo passo. +message.no.host.available=Sem hosts dispon\u00edveis para Migra\u00e7\u00e3o message.no.network.support.configuration.not.true=Voc\u00ea n\u00e3o possui nenhuma zona com grupos de seguran\u00e7a habilitado. Assim sendo, n\u00e3o possui recursos adicionais de rede. Por favor continue para o passo 5. message.no.network.support=O hypervisor escolhido, vSphere, n\u00e3o possui nenhum recurso de rede adicional. Por favor, v\u00e1 para o passo 5. message.no.projects.adminOnly=Voc\u00ea n\u00e3o possui nenhum projeto.
Por favor solicite ao seu administrador a cria\u00e7\u00e3o de um novo projeto. @@ -1527,20 +2019,29 @@ message.number.hosts=

Hosts

message.number.pods=

PODs

message.number.storage=

Volumes do Storage Prim\u00e1rio

message.number.zones=

Zonas

+message.password.has.been.reset.to=A senha foi redefinida para +message.password.of.the.vm.has.been.reset.to=A senha da VM foi redefinida para message.pending.projects.1=Voc\u00ea possui convites de projetos pendentes\: message.pending.projects.2=Para visualizar, por favor acesse a se\u00e7\u00e3o de projetos, depois selecione os convites no menu drop-down. message.please.add.at.lease.one.traffic.range=Por favor adicione pelo menos um range de tr\u00e1fego. +message.please.confirm.remove.ssh.key.pair=Por favor, confirme que voc\u00ea deseja remover este par de chaves SSH message.please.proceed=Por favor, v\u00e1 para o pr\u00f3ximo passo. message.please.select.a.configuration.for.your.zone=Por favor selecione uma configuracao para sua zona. message.please.select.a.different.public.and.management.network.before.removing=Por favor selecione uma rede p\u00fablica e de gerenciamento diferente antes de remover message.please.select.networks=Por favor selecione as redes para sua m\u00e1quina virtual. +message.please.select.ssh.key.pair.use.with.this.vm=Por favor, selecione um par de chaves SSH que voc\u00ea deseja que esta VM utilize\: message.please.wait.while.zone.is.being.created=Por favor, espere enquanto sua zona est\u00e1 sendo criada; isto pode demorar um pouco... +message.pod.dedication.released=Pod Dedicado liberado +message.portable.ip.delete.confirm=Favor confirmar que voc\u00ea deseja apagar esta Faixa de IPs Port\u00e1veis message.project.invite.sent=Convite enviado para o usu\u00e1rio; Eles ser\u00e3o adicionados ao projeto ap\u00f3s aceitarem o convite message.public.traffic.in.advanced.zone=O tr\u00e1fego p\u00fablico \u00e9 gerado quando as VMs na nuvem acessam a internet. Os IPs acess\u00edveis ao p\u00fablico devem ser alocados para essa finalidade. Os usu\u00e1rios finais podem usar a interface do usu\u00e1rio CloudStack para adquirir esses IPs afim de implementar NAT entre a sua rede de guests e sua rede p\u00fablica.

Forne\u00e7a pelo menos um intervalo de endere\u00e7os IP para o tr\u00e1fego de internet. message.public.traffic.in.basic.zone=O tr\u00e1fego p\u00fablico \u00e9 gerado quando as VMs na nuvem acessam a Internet ou prestam servi\u00e7os aos clientes atrav\u00e9s da Internet. Os IPs acess\u00edveis ao p\u00fablico devem ser alocados para essa finalidade. Quando uma inst\u00e2ncia \u00e9 criada, um IP a partir deste conjunto de IPs p\u00fablicos ser\u00e3o destinados \u00e0 inst\u00e2ncia, al\u00e9m do endere\u00e7o IP guest. Um NAT est\u00e1tico 1-1 ser\u00e1 criada automaticamente entre o IP p\u00fablico e IP guest. Os usu\u00e1rios finais tamb\u00e9m podem usar a interface de usu\u00e1rio CloudStack para adquirir IPs adicionais afim de se implementar NAT est\u00e1tico entre suas inst\u00e2ncias e o IP p\u00fablico. +message.question.are.you.sure.you.want.to.add=Voc\u00ea tem certeza que deseja adicionar +message.read.admin.guide.scaling.up=Por favor leia a sess\u00e3o sobre escalonamento din\u00e2mico no guia do administrador antes de escalonar. message.recover.vm=Por favor, confirme a recupera\u00e7\u00e3o desta VM. message.redirecting.region=Redirecionando para regi\u00e3o... message.reinstall.vm=NOTA\: Proceda com cuidado. Isso far\u00e1 com que a m\u00e1quina virtual seja re-instalada a partir do Template. Todos os datos do disco ROOT ser\u00e3o perdidos. Volumes de Dados adicionais, se houver, n\u00e3o ser\u00e3o alterados. +message.removed.ssh.key.pair=Par de chaves SSH removido message.remove.ldap=Voc\u00ea tem certeza que deseja deletar a configura\u00e7\u00e3o LDAP? message.remove.region=Voc\u00ea tem certeza que deseja remover esta regi\u00e3o deste servidor de gerenciamento? message.remove.vpc=Favor confirmar que voc\u00ea deseja remover a VPC @@ -1552,6 +2053,8 @@ message.restart.mgmt.server=Reinicie o(s) servidor(es) de gerenciamento para que message.restart.mgmt.usage.server=Por favor reinicie seu servidor(es) de gerenciamento e seu servidor(es) de utiliza\u00e7\u00e3o para as mudan\u00e7as entrarem em efeito. message.restart.network=Por favor confirme que voc\ufffd deseja reiniciar a rede message.restart.vpc=Favor confirmar que voc\u00ea deseja reiniciar a VPC +message.restart.vpc.remark=Por favor, confirme a reinicializa\u00e7\u00e3o do VPC

Observa\u00e7\u00e3o\: fazendo um VPC redundante n\u00e3o redundante ir\u00e1 for\u00e7ar uma limpeza. As redes n\u00e3o estar\u00e3o dispon\u00edveis por alguns minutos.

+message.restoreVM=Quer restaurar a VM? message.security.group.usage=(Use Ctrl-clique para selecionar todos os Security Groups) message.select.affinity.groups=Por favor, selecione quaisquer grupos de afinidade que voc\u00ea deseja que esta VM perten\u00e7a\: message.select.a.zone=A zone tipicamente corresponde a um \u00fanico datacenter. M\u00faltiplas zonas auxiliam a cloud a ser mais confi\u00e1vel provendo isolamento f\u00edsico e redund\u00e2ncia. @@ -1560,10 +2063,14 @@ message.select.iso=Por favor selecione um ISO para sua nova inst\u00e2ncia virtu message.select.item=Por favor selecione um item. message.select.security.groups=Por favor selecione o(s) grupo(s) de seguran\u00e7a para sua nova VM message.select.template=Por favor selecione um template para sua nova inst\u00e2ncia virtual. +message.select.tier=Por favor, selecione um tier +message.set.default.NIC.manual=Por favor atualize manualmente o NIC padr\u00e3o desta VM agora. +message.set.default.NIC=Por favor confirme que voc\u00ea quer tornar este NIC o padr\u00e3o para esta VM, message.setup.physical.network.during.zone.creation=Ao adicionar uma zona avan\u00e7ada, voc\u00ea precisa configurar uma ou mais redes f\u00edsicas. Cada rede corresponde \u00e0 uma Interface de Rede no hypervisor. Cada rede f\u00edsica pode ser utilizada para transportar um ou mais tipos de tr\u00e1fego, com certas restri\u00e7\u00f5es sobre como eles podem ser combinados.
Arraste e solte um ou mais tipos de tr\u00e1fego em cada rede f\u00edsica. message.setup.physical.network.during.zone.creation.basic=Quando adicionar uma zona b\u00e1sica, voc\u00ea pode configurar uma rede f\u00edsica, que corresponde a uma Interface de Rede no hypervisor. A rede carrega diversos tipos de tr\u00e1fego.

Voc\u00ea pode adicionar e remover outros tipos de tr\u00e1fego na mesma interface de rede f\u00edsica. message.setup.successful=Cloud configurada com sucesso\! -message.snapshot.schedule=Voc\u00ea pode configurar Snapshots recorrentes agendados selecionando as op\u00e7\u00f5es Dispon\u00edveis abaixo +message.snapshot.schedule=Voc\u00ea pode configurar Snapshots recorrentes agendados selecionando as op\u00e7\u00f5es dispon\u00edveis abaixo e aplicando suas pol\u00edticas preferenciais +message.specifiy.tag.key.value=Por favor especifique chave e valor da tag message.specify.url=Por favor especifique a URL message.step.1.continue=Selecione o template ou ISO para continuar message.step.1.desc=Por favor, selecione um template para a sua nova inst\u00e2ncia virtual. Voc\u00ea pode tamb\u00e9m escolher um template limpo e instalar a partir de uma imagem ISO. @@ -1573,7 +2080,10 @@ message.step.4.continue=Selecione pelo menos uma rede para continuar message.step.4.desc=Selecione a rede principal que a sua inst\u00e2ncia virtual estar\u00e1 conectada. message.storage.traffic=Tr\u00e1fego entre os recursos internos do CloudStack, incluindo todos os componentes que se comunicam com o servidor de gerenciamento tais como hosts e m\u00e1quinas virtuais de sistema CloudStack. Por favor, configure o tr\u00e1fego do storage aqui. message.suspend.project=Voc\u00ea tem certeza que deseja suspender este projeto ? +message.systems.vms.ready=VM de Sistema prontas. +message.template.copying=O template est\u00e1 sendo copiado. message.template.desc=Imagem de SO que pode ser utilizada para bootar VMs +message.tier.required=Tier \u00e9 obrigat\u00f3rio message.tooltip.dns.1=Endere\u00e7o de um servidor DNS que ser\u00e1 utilizado por todas as VMs da Zone. A faixa de IPs p\u00fablicos para essa Zone deve possuir uma rota para o servidor configurado. message.tooltip.dns.2=Um servidor DNS secund\u00e1rio para ser utilizado pelas VMs nesta zona. Os endere\u00e7os IP p\u00fablicos nesta zona devem ter rota para este servidor. message.tooltip.internal.dns.1=Nome de um servidor DNS que ser\u00e1 utilizado pelas VMs internas de sistema do CloudStack nesta zona. Os endere\u00e7os privados dos pods devem ter uma rota para este servidor. @@ -1586,19 +2096,44 @@ message.tooltip.zone.name=Um nome para a zona. message.update.os.preference=Escolha o SO de preferencia para este host. Todas Inst\u00e2ncias com preferencias similares ser\u00e3o alocadas neste host antes de tentar em outro. message.update.resource.count=Por favor confirme que voc\u00ea quer atualizar a contagem de recursos para esta conta. message.update.ssl=Envie o novo certificado SSL X.509 para ser atualizado em cada console proxy\: +message.update.ssl.failed=Atualiza\u00e7\u00e3o do Certificado SSL falhou +message.update.ssl.succeeded=Atualiza\u00e7\u00e3o do Certificado SSL feita com sucesso +message.validate.accept=Por favor entre com uma extens\u00e3o v\u00e1lida. +message.validate.creditcard=Por favor entre um n\u00famero de cart\u00e3o de cr\u00e9dito v\u00e1lido. +message.validate.date.ISO=Por favor entre com uma data v\u00e1lida (ISO). +message.validate.date=Por favor entre com uma data v\u00e1lida. +message.validate.digits=Por favor entre com d\u00edgitos apenas. +message.validate.email.address=Por favor entre um email v\u00e1lido. +message.validate.equalto=Por favor entre com o mesmo valor novamente. +message.validate.fieldrequired=Este campo \u00e9 obrigat\u00f3rio. +message.validate.fixfield=Por favor, arrume este campo. message.validate.instance.name=Nomes de inst\u00e2ncias n\u00e3o podem ter mais de 63 caracteres. Somente letras ASCII a~z, A~Z, d\u00edgitos 0~9 e h\u00edfen s\u00e3o permitidos. Deve come\u00e7ar com uma letra e terminar com uma letra ou d\u00edgito. message.validate.invalid.characters=Caracteres inv\u00e1lidos encontrados, por favor corrija. +message.validate.maxlength=Por favor entre com mais de [0] caracteres. +message.validate.max=Por favor entre com um valor menor que ou igual a {0}. +message.validate.minlength=Por favor entre com pelo menos [0] caracteres. +message.validate.number=Por favor entre um n\u00famero v\u00e1lido. +message.validate.range.length=Por favor entre com um valor com tamanho entre [0] e [1] caracteres. +message.validate.range=Por favor entre com um valor com valor entre [0] e [1]. +message.validate.URL=Por favor entre uma URL v\u00e1lida. message.virtual.network.desc=Rede virtual dedicado para sua conta. O Dom\u00ednio de broadcast Est\u00e1 na VLAN e todo acesso a internet \u00e9 roteado atrav\u00e9s do virtual router. message.vm.create.template.confirm=Criar Template reiniciar\u00e1 a VM automaticamente. message.vm.review.launch=Por favor revise a informa\u00e7\u00e3o abaixo e confirme que sua inst\u00e2ncia virtual est\u00e1 correta antes de executa-la. +message.vnmc.available.list=VNMC n\u00e3o est\u00e1 dispon\u00edvel na lista de provedores. +message.vnmc.not.available.list=VNMC n\u00e3o est\u00e1 dispon\u00edvel na lista de provedores. message.volume.create.template.confirm=Confirme se voc\u00ea deseja criar um template a partir deste disco. A cria\u00e7\u00e3o do template pode levar alguns minutos ou mais dependendo do tamanho do disco. +message.waiting.for.builtin.templates.to.load=Aguardando a carga dos templates integrados... +message.XSTools61plus.update.failed=A atualiza\u00e7\u00e3o do campo Original XS Version is 6.1\\+ falhou. Erro\: message.you.must.have.at.least.one.physical.network=Voc\u00ea deve ter pelo menos uma rede f\u00edsica +message.your.cloudstack.is.ready=Seu CLoudStack est\u00e1 pronto\! message.Zone.creation.complete=Cria\u00e7\u00e3o de zona completa message.zone.creation.complete.would.you.like.to.enable.this.zone=Cria\u00e7\u00e3o de zona completa. Voc\u00ea gostaria de habilitar esta zona? message.zone.no.network.selection=A zona que voc\u00ea selecionou n\u00e3o possui nenhuma rede para ser escolhida. message.zone.step.1.desc=Seleciona o modelo de rede para a zona. message.zone.step.2.desc=Entre a informa\u00e7\u00e3o a seguir para adicionar uma nova zona message.zone.step.3.desc=Entre a informa\u00e7\u00e3o a seguir para adicionar um novo pod +message.zoneWizard.enable.local.storage=ALERTA\: se voc\u00ea habilitar storage local para esta zona, voc\u00ea deve fazer o seguinte, dependendo se voc\u00ea quiser que suas m\u00e1quinas virtuais de sistema inicializem\:

1. Se m\u00e1quinas virtuais de sistema precisam ser iniciadas em storage prim\u00e1ria, storage prim\u00e1ria precisa ser adicionada \u00e0 zona ap\u00f3s a cria\u00e7\u00e3o. Voc\u00ea tamb\u00e9m deve ativar a zona em um estado desabilitado.

2. Se m\u00e1quinas virtuais de sistema precisam ser iniciadas em storage local, system.vm.use.local.storage precisa ser estabelecida como verdadeira antes de voc\u00ea habilitar a zona.


Voc\u00ea quer continuar? +messgae.validate.min=Por favor entre com um valor maior que ou igual a {0}. mode=Modo network.rate=Taxa de Transfer\u00eancia notification.reboot.instance=Reiniciar inst\u00e2ncia @@ -1615,6 +2150,7 @@ state.Completed=Completo state.Creating=Criando state.Declined=Recusado state.Destroyed=Destru\u00eddo +state.detached=Desanexado state.Disabled=Desativado state.Enabled=Habilitado state.Error=Erro @@ -1627,5 +2163,6 @@ state.Starting=Iniciando state.Stopped=Parado state.Stopping=Parando state.Suspended=Suspendido +title.upload.volume=Upload Volume ui.listView.filters.all=Todos ui.listView.filters.mine=Meus diff --git a/client/WEB-INF/classes/resources/messages_ru_RU.properties b/client/WEB-INF/classes/resources/messages_ru_RU.properties index 94f2481a425..172955e5fd0 100644 --- a/client/WEB-INF/classes/resources/messages_ru_RU.properties +++ b/client/WEB-INF/classes/resources/messages_ru_RU.properties @@ -21,73 +21,76 @@ confirm.enable.swift=\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u04 error.could.not.enable.zone=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u043e\u043d\u0443 error.installWizard.message=\u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. error.invalid.username.password=\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0456\u0439 \u043b\u043e\u0433\u0438\u043d \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c -error.login=\u0412\u0430\u0448\u0435 \u0438\u043c\u044f/\u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438. +error.login=\u0412\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0448\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044f\u043c. error.menu.select=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432. -error.mgmt.server.inaccessible=\u0421\u0435\u0440\u0432\u0435\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e\u0437\u0436\u0435. +error.mgmt.server.inaccessible=\u0421\u0435\u0440\u0432\u0435\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0437\u0436\u0435. error.password.not.match=\u041f\u0430\u0440\u043e\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 -error.please.specify.physical.network.tags=\u0421\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430, \u043f\u043e\u043a\u0430 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0435\u0433\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438. -error.session.expired=\u0412\u0430\u0448\u0430 \u0441\u0435\u0441\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 -error.something.went.wrong.please.correct.the.following=\u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 +error.please.specify.physical.network.tags=\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e, \u043f\u043e\u043a\u0430 \u0432\u044b \u043d\u0435 \u0443\u043a\u0430\u0436\u0435\u0442\u0435 \u0442\u0435\u0433\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438. +error.session.expired=\u0412\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u0441\u0442\u0435\u043a\u043b\u043e. +error.something.went.wrong.please.correct.the.following=\u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. error.unable.to.reach.management.server=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f -error.unresolved.internet.name=\u0412\u0430\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0438\u043c\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c -force.delete.domain.warning=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0438 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u0438 \u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. -force.delete=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c -force.remove.host.warning=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u043d CloudStack \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043a\u0438 \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0441\u043d\u0438\u043c\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.. -force.remove=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c -force.stop.instance.warning=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u0443\u044e\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435/\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. -force.stop=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c +error.unresolved.internet.name=\u0412\u0430\u0448\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0438\u043c\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c. +force.delete.domain.warning=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\: \u0412\u044b\u0431\u043e\u0440 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0438\u043c\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 \u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +force.delete=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 +force.remove.host.warning=\u0412\u044b\u0431\u043e\u0440 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043f\u0435\u0440\u0435\u0434 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. +force.remove=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 +force.stop.instance.warning=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435/\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. +force.stop=\u041f\u0440\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430. ICMP.code=\u041a\u043e\u0434 ICMP ICMP.type=\u0422\u0438\u043f ICMP image.directory=\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 inline=\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 instances.actions.reboot.label=\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 label.about.app=\u041e CloudStack -label.about=\u041e +label.about=\u041e \u0441\u0438\u0441\u0442\u0435\u043c\u0435 label.accept.project.invitation=\u041f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 label.account.and.security.group=\u0410\u043a\u043a\u0430\u0443\u043d\u0442, \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 label.account.id=ID \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 +label.account.lower=\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c label.account.name=\u0418\u043c\u044f \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 label.account.specific=\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u043d\u0442\u0430 label.accounts=\u0423\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 label.account=\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c label.acquire.new.ip=\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 IP label.acquire.new.secondary.ip=\u0417\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 -label.action.attach.disk.processing=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430... -label.action.attach.disk=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0434\u0438\u0441\u043a -label.action.attach.iso.processing=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 ISO... -label.action.attach.iso=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c ISO -label.action.cancel.maintenance.mode.processing=\u041e\u0442\u043c\u0435\u043d\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f... -label.action.cancel.maintenance.mode=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f +label.action.attach.disk.processing=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430... +label.action.attach.disk=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0438\u0441\u043a +label.action.attach.iso.processing=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 ISO... +label.action.attach.iso=\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c ISO +label.action.cancel.maintenance.mode.processing=\u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f... +label.action.cancel.maintenance.mode=\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. label.action.change.password=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c label.action.change.service.processing=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b... label.action.change.service=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 +label.action.copy.ISO.processing=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 ISO... label.action.copy.ISO=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c ISO -label.action.copy.template=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d +label.action.copy.template.processing=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430... +label.action.copy.template=\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d label.action.create.template.from.vm=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0437 \u0412\u041c label.action.create.template.from.volume=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0437 \u0442\u043e\u043c\u0430 label.action.create.template.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430... label.action.create.template=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d -label.action.create.vm.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0412\u041c... -label.action.create.vm=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0412\u041c -label.action.create.volume.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u043e\u043c\u0430... -label.action.create.volume=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u043c +label.action.create.vm.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b... +label.action.create.vm=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 +label.action.create.volume.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430... +label.action.create.volume=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0438\u0441\u043a label.action.delete.account.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438... label.action.delete.account=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c label.action.delete.cluster.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430... label.action.delete.cluster=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 -label.action.delete.disk.offering.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430... -label.action.delete.disk.offering=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.action.delete.disk.offering.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430... +label.action.delete.disk.offering=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.action.delete.domain.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u0430... label.action.delete.domain=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d -label.action.delete.firewall.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430... +label.action.delete.firewall.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430... label.action.delete.firewall=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430 -label.action.delete.ingress.rule.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430... -label.action.delete.ingress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e -label.action.delete.IP.range.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 IP... -label.action.delete.IP.range=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP +label.action.delete.ingress.rule.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430... +label.action.delete.ingress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.action.delete.IP.range.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432... +label.action.delete.IP.range=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 label.action.delete.ISO.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 ISO... label.action.delete.ISO=\u0423\u0434\u0430\u043b\u0438\u0442\u044c ISO -label.action.delete.load.balancer.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438... +label.action.delete.load.balancer.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.... label.action.delete.load.balancer=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.action.delete.network.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0438... label.action.delete.network=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0442\u044c @@ -100,8 +103,8 @@ label.action.delete.primary.storage.processing=\u0423\u0434\u0430\u043b\u0435\u0 label.action.delete.primary.storage=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.action.delete.secondary.storage.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430... label.action.delete.secondary.storage=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 -label.action.delete.security.group.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438... -label.action.delete.security.group=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 +label.action.delete.security.group.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 Security Group.... +label.action.delete.security.group=\u0423\u0434\u0430\u043b\u0438\u0442\u044c Security Group label.action.delete.service.offering.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430... label.action.delete.service.offering=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 label.action.delete.snapshot.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u043a\u0430... @@ -117,73 +120,74 @@ label.action.delete.zone.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u label.action.delete.zone=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0437\u043e\u043d\u0443 label.action.destroy.instance.processing=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u044b... label.action.destroy.instance=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 -label.action.destroy.systemvm.processing=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0412\u041c... -label.action.destroy.systemvm=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0412\u041c -label.action.detach.disk.processing=\u041e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430... -label.action.detach.disk=\u041e\u0442\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0434\u0438\u0441\u043a -label.action.detach.iso.processing=\u041e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 ISO -label.action.detach.iso=\u041e\u0442\u043a\u0440\u0435\u043f\u0438\u0442\u044c ISO +label.action.destroy.systemvm.processing=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u0412\u041c.... +label.action.destroy.systemvm=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c +label.action.detach.disk.processing=\u041e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430.... +label.action.detach.disk=\u041e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0434\u0438\u0441\u043a +label.action.detach.iso.processing=\u041e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 ISO.... +label.action.detach.iso=\u041e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c ISO label.action.disable.account.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 -label.action.disable.account=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c -label.action.disable.cluster.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430... -label.action.disable.cluster=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 -label.action.disable.nexusVswitch=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c NexusVswitch +label.action.disable.account=\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c +label.action.disable.cluster.processing=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430... +label.action.disable.cluster=\u041e\u0442\u043a\u043b\u044e\u0447\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 +label.action.disable.nexusVswitch=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c Nexus 1000v label.action.disable.physical.network=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c -label.action.disable.pod.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043d\u0434\u0430. -label.action.disable.pod=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043d\u0434 -label.action.disable.static.NAT.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e NAT... -label.action.disable.static.NAT=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 NAT -label.action.disable.user.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -label.action.disable.user=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -label.action.disable.zone.processing=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u043e\u043d\u044b... -label.action.disable.zone=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u043e\u043d\u0443 +label.action.disable.pod.processing=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043d\u0434\u0430... +label.action.disable.pod=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043d\u0434. +label.action.disable.static.NAT.processing=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.... +label.action.disable.static.NAT=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c Static NAT +label.action.disable.user.processing=\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.... +label.action.disable.user=\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f +label.action.disable.zone.processing=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u043e\u043d\u044b... +label.action.disable.zone=\u041e\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u043e\u043d\u0443 label.action.download.ISO=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ISO label.action.download.template=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d -label.action.download.volume.processing=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0442\u043e\u043c\u0430... -label.action.download.volume=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0442\u043e\u043c -label.action.edit.account=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c -label.action.edit.disk.offering=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 -label.action.edit.domain=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d -label.action.edit.global.setting=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 +label.action.download.volume.processing=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0438\u0441\u043a\u0430.... +label.action.download.volume=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0438\u0441\u043a +label.action.edit.account=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c +label.action.edit.disk.offering=\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 +label.action.edit.domain=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d +label.action.edit.global.setting=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 label.action.edit.host=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u0435\u043b -label.action.edit.instance=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 -label.action.edit.ISO=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c ISO -label.action.edit.network.offering=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 -label.action.edit.network.processing=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438... -label.action.edit.network=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c +label.action.edit.instance=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 +label.action.edit.ISO=\u0418\u0437\u043c\u0435\u043d\u0438\u0438\u0442\u044c ISO +label.action.edit.network.offering=\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 +label.action.edit.network.processing=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438.... +label.action.edit.network=\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0442\u044c label.action.edit.pod=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0435\u043d\u0434 -label.action.edit.primary.storage=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 -label.action.edit.resource.limits=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 -label.action.edit.service.offering=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 -label.action.edit.template=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d -label.action.edit.user=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -label.action.edit.zone=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043e\u043d\u0443 -label.action.enable.account.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430... -label.action.enable.account=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c +label.action.edit.primary.storage=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 +label.action.edit.resource.limits=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f +label.action.edit.service.offering=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f +label.action.edit.template=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d +label.action.edit.user=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f +label.action.edit.zone=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043e\u043d\u0443 +label.action.enable.account.processing=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.... +label.action.enable.account=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c label.action.enable.cluster.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430... label.action.enable.cluster=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 -label.action.enable.maintenance.mode.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f... -label.action.enable.maintenance.mode=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f -label.action.enable.nexusVswitch=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c NexusVswitch +label.action.enable.maintenance.mode.processing=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f..... +label.action.enable.maintenance.mode=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f +label.action.enable.nexusVswitch=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c Nexus 1000v label.action.enable.physical.network=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c label.action.enable.pod.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043d\u0434\u0430.. label.action.enable.pod=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043d\u0434 -label.action.enable.static.NAT.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e NAT.. -label.action.enable.static.NAT=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 NAT -label.action.enable.user.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f... -label.action.enable.user=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f -label.action.enable.zone.processing=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u043e\u043d\u044b... -label.action.enable.zone=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u043e\u043d\u0443 +label.action.enable.static.NAT.processing=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432.... +label.action.enable.static.NAT=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c Static NAT +label.action.enable.user.processing=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.... +label.action.enable.user=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f +label.action.enable.zone.processing=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0437\u043e\u043d\u044b... +label.action.enable.zone=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043e\u043d\u0443 +label.action.expunge.instance=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u0412\u041c label.action.force.reconnect.processing=\u041f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435... label.action.force.reconnect=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c -label.action.generate.keys.processing=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0439... -label.action.generate.keys=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 -label.action.list.nexusVswitch=\u041b\u0438\u0441\u0442 NexusVswitch -label.action.lock.account.processing=\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 +label.action.generate.keys.processing=\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439... +label.action.generate.keys=\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 +label.action.list.nexusVswitch=\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 Nexus 1000v +label.action.lock.account.processing=\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.... label.action.lock.account=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c label.action.manage.cluster.processing=\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f... label.action.manage.cluster=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c -label.action.migrate.instance.processing=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043c\u0430\u0448\u0438\u043d\u044b...... +label.action.migrate.instance.processing=\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043c\u0430\u0448\u0438\u043d\u044b.... label.action.migrate.instance=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u0443 label.action.migrate.router.processing=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u0430... label.action.migrate.router=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0440\u043e\u0443\u0442\u0435\u0440 @@ -197,22 +201,23 @@ label.action.reboot.systemvm.processing=\u041f\u0435\u0440\u0435\u0437\u0430\u04 label.action.reboot.systemvm=\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c label.action.recurring.snapshot=\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0435 \u0441\u043d\u0438\u043c\u043a\u0438 label.action.register.iso=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f ISO +label.action.register.template=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e URL label.action.release.ip.processing=\u041e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 IP... label.action.release.ip=\u041e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c IP label.action.remove.host.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430... label.action.remove.host=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0437\u0435\u043b label.action.reset.password.processing=\u0421\u0431\u0440\u043e\u0441 \u043f\u0430\u0440\u043e\u043b\u044f... label.action.reset.password=\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c -label.action.resize.volume.processing=Resizing Volume.... -label.action.resize.volume=Resize Volume -label.action.resource.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +label.action.resize.volume.processing=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u0438\u0441\u043a\u0430.... +label.action.resize.volume=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 +label.action.resource.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u043e\u0432 label.action.restore.instance.processing=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u044b... label.action.restore.instance=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 label.action.revert.snapshot.processing=\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u043d\u0438\u043c\u043a\u0443... label.action.revert.snapshot=\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043a \u0441\u043d\u0438\u043c\u043a\u0443 label.action.start.instance.processing=\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u0430\u0448\u0438\u043d\u044b... label.action.start.instance=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 -label.action.start.router.processing=\u0417\u0430\u043f\u0443\u0441\u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0430 +label.action.start.router.processing=\u0417\u0430\u043f\u0443\u0441\u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0430.... label.action.start.router=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 label.action.start.systemvm.processing=\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u0412\u041c... label.action.start.systemvm=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c @@ -225,53 +230,57 @@ label.action.stop.systemvm=\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u044 label.actions=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f label.action.take.snapshot.processing=\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u043a\u0430... label.action.take.snapshot=\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a... +label.action=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f label.action.unmanage.cluster.processing=\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c... label.action.unmanage.cluster=\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c label.action.update.OS.preference.processing=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u041e\u0421... -label.action.update.OS.preference=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u041e\u0421 -label.action.update.resource.count.processing=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432... -label.action.update.resource.count=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +label.action.update.OS.preference=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041e\u0421 +label.action.update.resource.count.processing=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +label.action.update.resource.count=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0443\u0447\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 label.action.vmsnapshot.create=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u0412\u041c label.action.vmsnapshot.delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u0412\u041c label.action.vmsnapshot.revert=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u0412\u041c label.activate.project=\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 label.active.sessions=\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 label.add.accounts.to=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 -label.add.accounts=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b -label.add.account.to.project=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 -label.add.account=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 +label.add.accounts=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 +label.add.account.to.project=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 +label.add.account=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c label.add.ACL=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c ACL label.add.affinity.group=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e affinity group label.add.by.cidr=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a CIDR label.add.by.group=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0433\u0440\u0443\u043f\u043f\u0435 label.add.by=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c label.add.cluster=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 -label.add.compute.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 -label.add.direct.iprange=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u0440\u044f\u043c\u044b\u0445 IP -label.add.disk.offering=\u041d\u043e\u0432\u044b\u0439 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.add.compute.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f +label.add.direct.iprange=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0445 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 +label.add.disk.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.add.domain=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d -label.add.egress.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.added.network.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 +label.add.egress.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.add.F5.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c F5 \u0443\u0441\u0442\u0440\u043e\u0439\u0432\u043e label.add.firewall=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430. label.add.guest.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e \u0441\u0435\u0442\u044c label.add.host=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0437\u0435\u043b label.adding.cluster=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 -label.adding.failed=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c +label.adding.failed=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c label.adding.pod=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043d\u0434\u0430 label.adding.processing=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435... -label.add.ingress.rule=\u041d\u043e\u0432\u043e\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.add.ingress.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.adding.succeeded=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e label.adding=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043e\u043d\u044b label.adding.user=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f label.adding.zone=\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043e\u043d\u044b -label.add.ip.range=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP +label.add.ip.range=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432 +label.add.isolated.guest.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e \u0441\u0435\u0442\u044c +label.add.isolated.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c label.additional.networks=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 -label.add.load.balancer=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 +label.add.load.balancer=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.add.more=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 label.add.netScaler.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c Netscaler \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e label.add.network.ACL=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u0443\u044e ACL label.add.network.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e -label.add.network.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.add.network.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b label.add.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u044c label.add.new.F5=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 F5 label.add.new.gateway=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0448\u043b\u044e\u0437 @@ -283,96 +292,101 @@ label.add.NiciraNvp.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u04 label.add.PA.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Palo Alto label.add.physical.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c label.add.pod=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0435\u043d\u0434 -label.add.port.forwarding.rule=\u0414\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430 -label.add.primary.storage=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 +label.add.port.forwarding.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430 +label.add.primary.storage=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 label.add.region=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0433\u0438\u043e\u043d label.add.resources=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 label.add.route=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 label.add.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.add.secondary.storage=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.add.security.group=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 -label.add.service.offering=\u041d\u043e\u0432\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.add.service.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 label.add.SRX.device=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c SRX \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e label.add.static.nat.rule=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e NAT label.add.static.route=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 -label.add.system.service.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.add.system.service.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431 label.add.template=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d label.add.to.group=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 label.add=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c label.add.user=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f label.add.vlan=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c VLAN label.add.vms.to.lb=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0412\u041c \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 -label.add.vms=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0412\u041c +label.add.vms=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0412\u041c-\u044b label.add.VM.to.tier=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0412\u041c \u043a tier label.add.vm=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0412\u041c -label.add.volume=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043c +label.add.volume=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0441\u043a +label.add.vpc.offering=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 VPC label.add.vpc=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c VPC label.add.vpn.customer.gateway=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c VPN \u0448\u043b\u044e\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 label.add.VPN.gateway=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c VPN \u0448\u043b\u044e\u0437 label.add.vpn.user=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f VPN label.add.vxlan=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c VXLAN label.add.zone=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u043e\u043d\u0443 -label.admin.accounts=\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 +label.admin.accounts=\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 label.admin=\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 -label.advanced.mode=\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0440\u0435\u0436\u0438\u043c +label.advanced.mode=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c label.advanced.search=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a -label.advanced=\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 +label.advanced=\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 label.affinity=\ \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c label.agent.password=\u041f\u0430\u0440\u043e\u043b\u044c \u0430\u0433\u0435\u043d\u0442\u0430 label.agent.username=\u0418\u043c\u044f \u0430\u0433\u0435\u043d\u0442\u0430 label.agree=\u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d label.alert=\u0422\u0440\u0435\u0432\u043e\u0433\u0430 label.algorithm=\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c -label.allocated=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e -label.allocation.state=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f +label.allocated=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043e +label.allocation.state=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f label.api.key=\u041a\u043b\u044e\u0447 API +label.api.version=\u0412\u0435\u0440\u0441\u0438\u044f API label.apply=\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c label.app.name=CloudStack label.archive.alerts=\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0432\u043e\u0433\u0438 -label.archive.events=\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f +label.archive.events=\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f label.assign.to.load.balancer=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 -label.assign=\u041f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c -label.associated.network.id=\u0421\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 ID \u0441\u0435\u0442\u0438 +label.assign=\u041f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e +label.associated.network.id=ID \u0421\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 label.associated.network=\u0421\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c -label.attached.iso=\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u0439 ISO +label.associate.public.ip=\u0421\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0435 IP +label.attached.iso=\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0439 ISO label.author.email=E-mail \u0430\u0432\u0442\u043e\u0440\u0430 label.author.name=\u0418\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 label.availability=\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c label.availability.zone=\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0437\u043e\u043d\u044b -label.available.public.ips=\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 +label.available.public.ips=\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 IP \u0430\u0434\u0440\u0435\u0441\u0430 label.available=\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e label.back=\u041d\u0430\u0437\u0430\u0434 label.bandwidth=\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c -label.basic.mode=\u041f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0436\u0438\u043c -label.basic=\u041f\u0440\u043e\u0441\u0442\u043e\u0439 +label.basic.mode=\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0435\u0436\u0438\u043c +label.basic=\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 label.bootable=\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0439 label.broadcast.domain.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 label.broadcast.domain.type=\u0422\u0438\u043f \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 label.broadcast.uri=\u0428\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 URI label.broadcat.uri=\u0428\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 URI -label.by.account=\u041f\u043e \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 +label.by.account=\u041f\u043e \u0443\u0447\u0435\u0442\u043d\u044b\u043c \u0437\u0430\u043f\u0438\u0441\u044f\u043c label.by.alert.type=\u041f\u043e \u0442\u0438\u043f\u0443 \u0442\u0440\u0435\u0432\u043e\u0433\u0438 label.by.availability=\u041f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 label.by.date.end=\u041f\u043e \u0434\u0430\u0442\u0435(\u043a\u043e\u043d\u0435\u0446) label.by.date.start=\u041f\u043e \u0434\u0430\u0442\u0435(\u043d\u0430\u0447\u0430\u043b\u043e) label.by.domain=\u0414\u043e \u0434\u043e\u043c\u0435\u043d\u0443 -label.by.end.date=\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e +label.by.end.date=\u041f\u043e \u0434\u0430\u0442\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f label.by.event.type=\u041f\u043e \u0442\u0438\u043f\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f label.by.level=\u041f\u043e \u0443\u0440\u043e\u0432\u043d\u044e label.by.pod=\u041f\u043e \u0441\u0442\u0435\u043d\u0434\u0443 -label.by.role=\u041f\u043e \u0440\u043e\u043b\u0438 -label.by.start.date=\u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 +label.by.role=\u041f\u043e \u0440\u043e\u043b\u044f\u043c +label.by.start.date=\u041f\u043e \u0434\u0430\u0442\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 label.by.state=\u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e -label.bytes.received=\u0411\u0430\u0439\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d -label.bytes.sent=\u0411\u0430\u0439\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e +label.bytes.received=\u0411\u0430\u0439\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e +label.bytes.sent=\u0411\u0430\u0439\u0442\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e label.by.traffic.type=\u041f\u043e \u0442\u0438\u043f\u0443 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 label.by.type.id=\u041f\u043e \u0442\u0438\u043f\u0443 ID label.by.type=\u041f\u043e \u0442\u0438\u043f\u0443 label.by.zone=\u041f\u043e \u0437\u043e\u043d\u0435 label.cancel=\u041e\u0442\u043c\u0435\u043d\u0430 +label.capacity.bytes=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0411\u0430\u0439\u0442 +label.capacity.iops=\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e IOPS label.capacity=\u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c label.certificate=\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 -label.change.service.offering=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.change.service.offering=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f label.change.value=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 label.character=\u0421\u0438\u043c\u0432\u043e\u043b\u043e\u0432 label.cidr.account=CIDR \u0438\u043b\u0438 \u0443\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c/\u0433\u0440\u0443\u043f\u043f\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 @@ -383,7 +397,7 @@ label.CIDR.of.destination.network=CIDR \u0441\u0435\u0442\u0438 \u043d\u0430\u04 label.clean.up=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c label.clear.list=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a label.close=\u0417\u0430\u043a\u0440\u044b\u0442\u044c -label.cloud.console=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u043c +label.cloud.console=\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u043c label.cloud.managed=\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f label.cluster.name=\u0418\u043c\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 label.clusters=\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u044b @@ -394,7 +408,7 @@ label.code=\u041a\u043e\u0434 label.community=\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e label.compute.and.storage=\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.compute.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 \u0432\u044b\u0447\u0435\u0441\u043b\u0435\u043d\u0438\u044f -label.compute.offering=\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 +label.compute.offering=\u0423\u0441\u043b\u0443\u0433\u0430 \u0432\u044b\u0447\u0435\u0441\u043b\u0435\u043d\u0438\u044f label.compute=\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 label.configuration=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f label.configure.network.ACLs=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ACL \u0441\u0435\u0442\u0438 @@ -404,17 +418,18 @@ label.confirmation=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\ label.confirm.password=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c label.congratulations=\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c\! label.conserve.mode=\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c -label.console.proxy=\u041f\u0440\u043e\u043a\u0441\u0438 +label.console.proxy=\u041f\u0440\u043e\u043a\u0441\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 label.continue.basic.install=\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 label.continue=\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c +label.copying.iso=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 ISO label.corrections.saved=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b -label.cpu.allocated.for.VMs=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0426\u041f\u0423 \u0434\u043b\u044f \u0412\u041c -label.cpu.allocated=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0426\u041f\u0423 +label.cpu.allocated.for.VMs=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0448\u0438\u043d\u0430\u043c CPU +label.cpu.allocated=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 CPU label.CPU.cap=CPU Cap label.cpu=CPU label.cpu.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f CPU label.cpu.mhz=CPU (\u0432 \u041c\u0433\u0446) -label.cpu.utilized=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 CPU +label.cpu.utilized=\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e CPU label.created.by.system=\u0421\u043e\u0437\u0434\u0430\u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 label.created=\u0421\u043e\u0437\u0434\u0430\u043d\u043e label.create.project=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 @@ -422,18 +437,19 @@ label.create.template=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0 label.create.VPN.connection=\u0421\u043e\u0437\u0434\u0430\u0442\u044c VPN \u043f\u043e\u0434\u043b\u044e\u0447\u0435\u043d\u0438\u0435 label.cross.zones=\u041e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u0437\u043e\u043d label.custom.disk.iops=\u0421\u0432\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e IPOS -label.custom.disk.size=\u0421\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 +label.custom.disk.size=\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 label.daily=\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e -label.data.disk.offering=\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0430 +label.data.disk.offering=\u0423\u0441\u043b\u0443\u0433\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.date=\u0414\u0430\u0442\u0430 label.day.of.month=\u0414\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430 label.day.of.week=\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 label.dead.peer.detection=Dead Peer Detection label.decline.invitation=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 label.dedicated=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 +label.default.egress.policy=\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e label.default=\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e label.default.use=\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e -label.default.view=\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u0438\u0434 +label.default.view=\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0438\u0434 label.delete.affinity.group=\u0423\u0434\u0430\u043b\u0438\u0442\u044c affinity group label.delete.alerts=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0440\u0435\u0432\u043e\u0433\u0438 label.delete.events=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f @@ -442,6 +458,7 @@ label.delete.gateway=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0448\u043b\u04 label.delete.NetScaler=\u0423\u0434\u0430\u043b\u0438\u0442\u044c NetScaler label.delete.NiciraNvp=\u0423\u0434\u0430\u043b\u0438\u0442\u044c Nvp \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 label.delete.PA=\u0423\u0434\u0430\u043b\u0438\u0442\u044c Palo Alto +label.delete.profile=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c label.delete.project=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 label.delete.SRX=\u0423\u0434\u0430\u043b\u0438\u0442\u044c SRX label.delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c @@ -449,25 +466,30 @@ label.delete.VPN.connection=\u0423\u0434\u0430\u043b\u0438\u0442\u044c VPN \u043 label.delete.VPN.customer.gateway=\u0423\u0434\u0430\u043b\u0438\u0442\u044c VPN \u0448\u043b\u044e\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 label.delete.VPN.gateway=\u0423\u0434\u0430\u043b\u0438\u0442\u044c VPN \u0448\u043b\u044e\u0437 label.delete.vpn.user=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f VPN -label.deleting.failed=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c +label.deleting.failed=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c label.deleting.processing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435... label.description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 label.destination.physical.network.id=ID \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 label.destination.zone=\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0437\u043e\u043d\u0430 label.destroy.router=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440 label.destroy=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c -label.detaching.disk=\u041e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430 +label.detaching.disk=\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430 label.details=\u0414\u0435\u0442\u0430\u043b\u0438 label.device.id=ID \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 label.devices=\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e label.dhcp=DHCP label.DHCP.server.type=\u0422\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 DHCP +label.direct.attached.public.ip=\u0412\u044b\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP label.direct.ips=\u041f\u0440\u044f\u043c\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 +label.disable.autoscale=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0430\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 label.disabled=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e +label.disable.host=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0445\u043e\u0441\u0442 +label.disable.network.offering=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 label.disable.provider=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 +label.disable.vpc.offering=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 VPC label.disable.vpn=\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN label.disabling.vpn.access=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a VPN -label.disk.allocated=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 +label.disk.allocated=\u0417\u0430\u043d\u044f\u0442\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.disk.bytes.read.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430 (BPS) label.disk.bytes.write.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0438\u0441\u043a\u0430 (BPS) label.disk.iops.max=\u041c\u0430\u043a\u0441. IOPS @@ -475,13 +497,13 @@ label.disk.iops.min=\u041c\u0438\u043d. IOPS label.disk.iops.read.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0438\u0441\u043a\u0430 (IOPS) label.disk.iops.total=\u0412\u0441\u0435\u0433\u043e IOPS label.disk.iops.write.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0438\u0441\u043a\u0430 (IOPS) -label.disk.offering=\u0414\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.disk.offering=\u0423\u0441\u043b\u0443\u0433\u0430 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.disk.read.bytes=\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e \u0441 \u0434\u0438\u0441\u043a\u0430 (\u0411\u0430\u0439\u0442) label.disk.read.io=\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e \u0441 \u0434\u0438\u0441\u043a\u0430 (IO) label.disk.size.gb=\u0420\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 (\u0432 \u0413\u0411) label.disk.size=\u0420\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 label.disk.total=\u0412\u0441\u0435\u0433\u043e \u0432 \u0434\u0438\u0441\u043a\u0430\u0445 -label.disk.volume=\u0422\u043e\u043c \u0434\u0438\u0441\u043a\u0430 +label.disk.volume=\u041e\u0431\u044a\u0435\u043c \u0434\u0438\u0441\u043a\u0430 label.disk.write.bytes=\u0417\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0434\u0438\u0441\u043a (\u0411\u0430\u0439\u0442) label.disk.write.io=\u0417\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0434\u0438\u0441\u043a (IO) label.display.text=\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 @@ -491,41 +513,49 @@ label.dns=DNS label.DNS.domain.for.guest.networks=DNS \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 label.domain.admin=\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0434\u043e\u043c\u0435\u043d\u0430 label.domain.id=ID \u0434\u043e\u043c\u0435\u043d\u0430 +label.domain.lower=\u0414\u043e\u043c\u0435\u043d label.domain.name=\u0418\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 label.domain.router=\u041c\u0430\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 label.domain.suffix=\u0421\u0443\u0444\u0444\u0438\u043a\u0441 \u0434\u043e\u043c\u0435\u043d\u0430 DNS (\u043d\u043f\u0440. xyz.com) label.domain=\u0414\u043e\u043c\u0435\u043d label.done=\u0413\u043e\u0442\u043e\u0432\u043e -label.double.quotes.are.not.allowed=\u0414\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b +label.double.quotes.are.not.allowed=\u0414\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f label.download.progress=\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.drag.new.position=\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e +label.dynamically.scalable=\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 label.edit.affinity.group=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c affinity group label.edit.lb.rule=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c LB \u043f\u0440\u0430\u0432\u0438\u043b\u0430 -label.edit.network.details=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0441\u0435\u0442\u0438 +label.edit.network.details=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 label.edit.project.details=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +label.edit.region=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u043e\u043d label.edit.tags=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u044d\u0433\u0438 label.edit.traffic.type=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0438\u043f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 label.edit=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c label.edit.vpc=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c VPC label.egress.default.policy=\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e label.egress.rules=\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 -label.egress.rule=\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.egress.rule=\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.elastic.IP=\u0413\u0438\u0431\u043a\u0438\u0439 IP label.elastic.LB=\u0413\u0438\u0431\u043a\u0438\u0439 LB label.elastic=\u0413\u0438\u0431\u043a\u0438\u0439 label.email=E-mail +label.email.lower=E-mail +label.enable.autoscale=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0430\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 +label.enable.host=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0445\u043e\u0441\u0442 +label.enable.network.offering=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u0443\u0441\u043b\u0443\u0433\u0443 label.enable.provider=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 label.enable.s3=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.enable.swift=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c Swift +label.enable.vpc.offering=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 VPC label.enable.vpn=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN -label.enabling.vpn.access=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a VPN -label.enabling.vpn=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 VPN +label.enabling.vpn.access=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e VPN +label.enabling.vpn=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f VPN label.end.IP=\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 IP label.endpoint.or.operation=\u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f label.endpoint=\u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 -label.end.port=\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 +label.end.port=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u0440\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 label.end.reserved.system.IP=\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 -label.enter.token=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0430\u043b\u043e\u043d +label.enter.token=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u043e\u043a\u0435\u043d label.error.code=\u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 label.error=\u041e\u0448\u0438\u0431\u043a\u0430 label.ESP.encryption=\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 ESP @@ -534,14 +564,16 @@ label.ESP.lifetime=\u0412\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 label.ESP.policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 ESP label.esx.host=\u0423\u0437\u0435\u043b ESX/ESXi label.example=\u041f\u0440\u0438\u043c\u0435\u0440 +label.expunge=\u0423\u0434\u0430\u043b\u0451\u043d label.external.link=\u0412\u043d\u0435\u0448\u043d\u0435\u0435 \u043f\u043e\u0434\u043b\u044e\u0447\u0435\u043d\u0438\u0435 label.extractable=\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u044b\u0439 label.f5=F5 label.failed=\u041d\u0435\u0443\u0434\u0430\u0447\u043d\u043e -label.featured=\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 +label.featured=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439 label.fetch.latest=\u0412\u044b\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 label.filterBy=\u0424\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c label.firewall=\u0424\u0430\u0435\u0440\u0432\u043e\u043b +label.firstname.lower=\u0418\u043c\u044f label.first.name=\u0418\u043c\u044f label.format=\u0424\u043e\u0440\u043c\u0430\u0442 label.friday=\u041f\u044f\u0442\u043d\u0438\u0446\u0430 @@ -550,14 +582,16 @@ label.full=\u041f\u043e\u043b\u043d\u044b\u0439 label.gateway=\u0428\u043b\u044e\u0437 label.general.alerts=\u041e\u0431\u0449\u0438\u0435 \u0442\u0440\u0435\u0432\u043e\u0433\u0438 label.generating.url=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 URL -label.gluster.volume=\u0422\u043e\u043c +label.gluster.volume=\u0414\u0438\u0441\u043a label.go.step.2=\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0448\u0430\u0433\u0443 2 label.go.step.3=\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0448\u0430\u0433\u0443 3 label.go.step.4=\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0448\u0430\u0433\u0443 4 label.go.step.5=\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0448\u0430\u0433\u0443 5 -label.gpu=CPU -label.group.optional=\u0413\u0440\u0443\u043f\u043f\u0430 (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) +label.gpu=GPU +label.group.optional=\u0413\u0440\u0443\u043f\u043f\u0430 (\u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e) label.group=\u0413\u0440\u0443\u043f\u043f\u0430 +label.gslb.lb.details=\u0414\u0435\u0442\u0430\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 +label.gslb.lb.rule=\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.guest.cidr=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0439 CIDR label.guest.end.ip=\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 IP. label.guest.gateway=\u0428\u043b\u044e\u0437 @@ -569,18 +603,18 @@ label.guest.start.ip=\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u04 label.guest.traffic=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a label.guest.type=\u0422\u0438\u043f \u0433\u043e\u0441\u0442\u044f label.guest=\u0413\u043e\u0441\u0442\u044c -label.ha.enabled=HA \u0432\u043a\u043b\u044e\u0447\u0435\u043d +label.ha.enabled=\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 label.help=\u041f\u043e\u043c\u043e\u0449\u044c -label.hide.ingress.rule=\u0421\u043a\u0440\u044b\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.hide.ingress.rule=\u0421\u043a\u0440\u044b\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.hints=\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 label.home=\u0413\u043b\u0430\u0432\u043d\u0430\u044f -label.host.alerts=\u0422\u0440\u0435\u0432\u043e\u0433\u0438 \u0443\u0437\u043b\u0430 +label.host.alerts=\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 label.host.MAC=MAC \u0443\u0437\u043b\u0430 label.host.name=\u0418\u043c\u044f \u0443\u0437\u043b\u0430 label.hosts=\u0423\u0437\u043b\u044b label.host.tags=\u041c\u0435\u0442\u043a\u0438 \u0443\u0437\u043b\u0430 label.host=\u0423\u0437\u0435\u043b -label.hourly=\u0427\u0430\u0441\u043e\u0432\u0430\u044f +label.hourly=\u0415\u0436\u0435\u0447\u0430\u0441\u043d\u043e label.hypervisor.capabilities=\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 label.hypervisors=\u0413\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u044b label.hypervisor.type=\u0422\u0438\u043f \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 @@ -593,8 +627,8 @@ label.IKE.hash=IKE Hash label.IKE.lifetime=IKE lifetime (second) label.IKE.policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 IKE label.info=\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f -label.ingress.rule=\u0412\u043d\u0443\u0442\u0440\u0438\u043d\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e -label.initiated.by=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c +label.ingress.rule=\u0412\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.initiated.by=\u0418\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043e label.installWizard.addClusterIntro.subtitle=\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 "\u041a\u043b\u0430\u0441\u0442\u0435\u0440"? label.installWizard.addClusterIntro.title=\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 label.installWizard.addHostIntro.subtitle=\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 "\u0423\u0437\u0435\u043b"? @@ -611,7 +645,7 @@ label.installWizard.addZone.title=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u04 label.installWizard.click.launch=\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 label.installWizard.subtitle=\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442 \u0432\u0430\u0448 CloudStack. label.installWizard.title=\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 CloudStack\! -label.instance.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u043c\u0430\u0448\u0438\u043d\u044b +label.instance.limits=\u041b\u0438\u043c\u0438\u0442 \u043c\u0430\u0448\u0438\u043d label.instance.name=\u0418\u043c\u044f \u043c\u0430\u0448\u0438\u043d\u044b label.instances=\u041c\u0430\u0448\u0438\u043d\u044b label.instance=\u041c\u0430\u0448\u0438\u043d\u0430 @@ -627,13 +661,13 @@ label.invited.accounts=\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0451\u043d\u0 label.invite.to=\u041f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c label.invite=\u041f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c label.ip.address=IP-\u0430\u0434\u0440\u0435\u0441 -label.ipaddress=IP-\u0430\u0434\u0440\u0435\u0441 -label.ip.allocations=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f IP +label.ipaddress=IP \u0430\u0434\u0440\u0435\u0441\u0441\u0430 +label.ip.allocations=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 IP label.ip=IP -label.ip.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 IP +label.ip.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0445 IP label.ip.or.fqdn=IP \u0438\u043b\u0438 FQDN -label.ip.ranges=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b IP -label.ip.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP +label.ip.ranges=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 +label.ip.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 label.IPsec.preshared.key=IPsec Preshared-Key label.ips=IP label.iscsi=iSCSI @@ -644,9 +678,9 @@ label.isolated.networks=\u0418\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u label.isolation.method=\u041c\u0435\u0442\u043e\u0434 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 label.isolation.mode=\u0420\u0435\u0436\u0438\u043c \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 label.isolation.uri=\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f URI -label.is.redundant.router=\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 -label.is.shared=\u043e\u0431\u0449\u0438\u0435 -label.is.system=\u0415\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 +label.is.redundant.router=\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0439 +label.is.shared=\u041e\u0431\u0449\u0438\u0439 +label.is.system=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 label.item.listing=\u0421\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 label.keep=\u0425\u0440\u0430\u043d\u0438\u0442\u044c label.keyboard.type=\u0422\u0438\u043f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b @@ -659,8 +693,9 @@ label.lang.japanese=\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 label.lang.korean=\u043a\u043e\u0440\u0435\u0439\u0441\u043a\u0438\u0439 label.lang.russian=\u0420\u0443\u0441\u0441\u043a\u0438\u0439 label.lang.spanish=\u0418\u0441\u043f\u0430\u043d\u0441\u043a\u0438\u0439 -label.last.disconnected=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 -label.last.name=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u043c\u044f +label.last.disconnected=\u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f +label.lastname.lower=\u0424\u0430\u043c\u0438\u043b\u0438\u044f +label.last.name=\u0424\u0430\u043c\u0438\u043b\u0438\u044f label.latest.events=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f label.launch=\u0417\u0430\u043f\u0443\u0441\u043a label.launch.vm=\u0417\u0430\u043f\u0443\u0441\u043a \u0412\u041c @@ -671,23 +706,26 @@ label.lb.algorithm.source=\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a label.LB.isolation=\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f LB label.level=\u0423\u0440\u043e\u0432\u0435\u043d\u044c label.linklocal.ip=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 -label.load.balancer=\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 +label.load.balancer=\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.load.balancing.policies=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.load.balancing=\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 label.loading=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 +label.local.storage.enabled=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0412\u041c label.local.storage=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.local=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 -label.login=\u0412\u0445\u043e\u0434 -label.logout=\u0412\u044b\u0445\u043e\u0434 +label.login=\u0412\u043e\u0439\u0442\u0438 +label.logout=\u0412\u044b\u0439\u0442\u0438 label.lun=LUN label.LUN.number=LUN \# label.make.project.owner=\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +label.managed=\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 label.management.ips=\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f IP \u0430\u0434\u0440\u0435\u0441\u0441\u0430\u043c\u0438 +label.management.server=\u0421\u0435\u0440\u0432\u0435\u0440 \u0443\u043f\u0440\u0430\u043b\u0435\u043d\u0438\u044f label.management=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 label.manage.resources=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 label.manage=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 label.max.cpus=\u041c\u0430\u043a\u0441. \u044f\u0434\u0435\u0440 \u0426\u041f -label.max.guest.limit=\u041f\u0440\u0435\u0434\u0435\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u0441\u0442\u0435\u0439 +label.max.guest.limit=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u0441\u0442\u0435\u0439 label.maximum=\u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c label.max.memory=\u041c\u0430\u043a\u0441. \u043f\u0430\u043c\u044f\u0442\u0438 (\u0432 \u041c\u0438\u0411) label.max.networks=\u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0441\u0435\u0442\u0435\u0439 @@ -697,32 +735,32 @@ label.max.secondary.storage=\u041c\u0430\u043a\u0441. \u0432\u0442\u043e\u0440\u label.max.snapshots=\u041c\u0430\u043a\u0441. \u0441\u043d\u0438\u043c\u043a\u043e\u0432 label.max.templates=\u041c\u0430\u043a\u0441. \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 label.max.vms=\u041c\u0430\u043a\u0441. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0412\u041c -label.max.volumes=\u041c\u0430\u043a\u0441. \u0442\u043e\u043c\u043e\u0432 +label.max.volumes=\u041c\u0430\u043a\u0441. \u0434\u0438\u0441\u043a\u043e\u0432 label.max.vpcs=\u041c\u0430\u043a\u0441. VPC label.may.continue=\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c. label.md5.checksum=\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c MD5 \u0441\u0443\u043c\u043c\u0443 -label.memory.allocated=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 +label.memory.allocated=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 label.memory.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 (\u0432 \u041c\u0438\u0411) label.memory.mb=\u041f\u0430\u043c\u044f\u0442\u044c (\u0432 \u041c\u0411) label.memory.total=\u0412\u0441\u0435\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438 label.memory=\u041f\u0430\u043c\u044f\u0442\u044c -label.memory.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 +label.memory.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 label.menu.accounts=\u0423\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 -label.menu.alerts=\u0422\u0440\u0435\u0432\u043e\u0433\u0438 +label.menu.alerts=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f label.menu.all.accounts=\u0412\u0441\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 label.menu.all.instances=\u0412\u0441\u0435 \u043c\u0430\u0448\u0438\u043d\u044b label.menu.community.isos=ISO-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 label.menu.community.templates=\u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 label.menu.configuration=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f -label.menu.dashboard=\u0413\u043b\u0430\u0432\u043d\u0430\u044f +label.menu.dashboard=\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f label.menu.destroyed.instances=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b -label.menu.disk.offerings=\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u043e\u0432 +label.menu.disk.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.menu.domains=\u0414\u043e\u043c\u0435\u043d\u044b label.menu.events=\u0421\u043e\u0431\u044b\u0442\u0438\u044f label.menu.featured.isos=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 ISO label.menu.featured.templates=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b -label.menu.global.settings=\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 -label.menu.infrastructure=\u0418\u043d\u0444\u043e\u0440\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 +label.menu.global.settings=\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 +label.menu.infrastructure=\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 label.menu.instances=\u041c\u0430\u0448\u0438\u043d\u044b label.menu.ipaddresses=IP-\u0430\u0434\u0440\u0435\u0441\u0430 label.menu.isos=ISO @@ -730,14 +768,15 @@ label.menu.my.accounts=\u041c\u043e\u0438 \u0443\u0447\u0451\u0442\u043d\u044b\u label.menu.my.instances=\u041c\u043e\u0438 \u043c\u0430\u0448\u0438\u043d\u044b label.menu.my.isos=\u041c\u043e\u0438 ISO label.menu.my.templates=\u041c\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b -label.menu.network.offerings=\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 +label.menu.network.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 \u0441\u0435\u0442\u0438 label.menu.network=\u0421\u0435\u0442\u044c label.menu.physical.resources=\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b label.menu.regions=\u0420\u0435\u0433\u0438\u043e\u043d -label.menu.running.instances=\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b -label.menu.security.groups=\u0413\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 -label.menu.service.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 +label.menu.running.instances=\u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u044b +label.menu.security.groups=Security Groups +label.menu.service.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 \u0441\u043b\u0443\u0436\u0431 label.menu.snapshots=\u0421\u043d\u0438\u043c\u043a\u0438 +label.menu.sshkeypair=SSH KeyPair label.menu.stopped.instances=\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b label.menu.storage=\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.menu.system.service.offerings=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b @@ -746,7 +785,8 @@ label.menu.system.vms=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0 label.menu.templates=\u0428\u0430\u0431\u043b\u043e\u043d\u044b label.menu.virtual.appliances=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 label.menu.virtual.resources=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b -label.menu.volumes=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f +label.menu.volumes=\u0414\u0438\u0441\u043a\u0438 +label.menu.vpc.offerings=\u0423\u0441\u043b\u0443\u0433\u0438 VPS label.migrate.instance.to.host=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u0437\u0435\u043b label.migrate.instance.to.ps=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 label.migrate.instance.to=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 @@ -754,12 +794,14 @@ label.migrate.router.to=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \ label.migrate.systemvm.to=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c \u0432 label.migrate.to.host=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u0443\u0437\u0435\u043b label.migrate.to.storage=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 -label.migrate.volume.to.primary.storage=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0442\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 +label.migrate.volume.to.primary.storage=\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0434\u0438\u0441\u043a \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 +label.migrate.volume=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u0438\u0441\u043a\u0430 label.minimum=\u041c\u0438\u043d\u0438\u043c\u0443\u043c +label.minute.past.hour=\u041c\u0438\u043d\u0443\u0442 label.mode=\u0420\u0435\u0436\u0438\u043c label.monday=\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a label.monthly=\u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 -label.more.templates=\u0411\u043e\u043b\u044c\u0448\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 +label.more.templates=\u0415\u0449\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b label.move.down.row=\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0438\u0436\u0435 label.move.to.bottom=\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u0437 label.move.to.top=\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445 @@ -768,27 +810,28 @@ label.my.account=\u041c\u043e\u044f \u0443\u0447\u0451\u0442\u043d\u0430\u044f \ label.my.network=\u041c\u043e\u044f \u0441\u0435\u0442\u044c label.my.templates=\u041c\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b label.name.lower=\u0418\u043c\u044f -label.name.optional=\u0418\u043c\u044f (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) +label.name.optional=\u0418\u043c\u044f (\u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e) label.name=\u0418\u043c\u044f -label.nat.port.range=NAT \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u043e\u0440\u0442\u043e\u0432 +label.nat.port.range=\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u043e\u0440\u0442\u043e\u0432 NAT label.netmask=\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0430 label.netScaler=NetScaler -label.network.ACL=ACL \u0441\u0435\u0442\u0438 label.network.ACLs=\u0421\u0435\u0442\u0435\u0432\u044b\u0435 ACL -label.network.ACL.total=\u0412\u0441\u0435\u0433\u043e ACL \u0441\u0435\u0442\u0438 +label.network.ACL.total=\u0412\u0441\u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 ACL +label.network.ACL=\u0421\u0435\u0442\u0435\u0432\u044b\u0435 ACL +label.network.addVM=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0442\u044c \u0432 \u0412\u041c label.network.desc=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 label.network.device.type=\u0422\u0438\u043f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 label.network.device=\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e -label.network.domain.text=\u0422\u0435\u043a\u0441\u0442 \u0434\u043e\u043c\u0435\u043d\u0430 \u0441\u0435\u0442\u0438 -label.network.domain=\u0414\u043e\u043c\u0435\u043d \u0441\u0435\u0442\u0438 +label.network.domain.text=\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d +label.network.domain=\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d label.network.id=ID \u0441\u0435\u0442\u0438 label.networking.and.security=\u0421\u0435\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c label.network.label.display.for.blank.value=\u0418\u0441\u043f. \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0448\u043b\u044e\u0437 label.network.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0438 label.network.name=\u0418\u043c\u044f \u0441\u0435\u0442\u0438 -label.network.offering.display.text=\u0441\u0435\u0442\u044c, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 -label.network.offering.id=\u0441\u0435\u0442\u044c, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0443\u044e ID -label.network.offering.name=\u0441\u0435\u0442\u044c, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u0418\u043c\u044f +label.network.offering.display.text=\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 +label.network.offering.id=ID \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 +label.network.offering.name=\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 label.network.offering=\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 label.network.rate.megabytes=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438 (MB/s) label.network.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438 @@ -803,7 +846,7 @@ label.new.project=\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\ label.new=\u0421\u043e\u0437\u0434\u0430\u0442\u044c label.new.vm=\u041d\u043e\u0432\u0430\u044f \u0412\u041c label.next=\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 -label.nexusVswitch=Nexus Vswitch +label.nexusVswitch=Nexus 1000v label.nfs=NFS label.nfs.server=\u0421\u0435\u0440\u0432\u0435\u0440 NFS label.nfs.storage=\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 NFS @@ -811,15 +854,15 @@ label.nic.adapter.type=\u0422\u0438\u043f \u0441\u0435\u0442\u0435\u0432\u043e\u label.nicira.controller.address=\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 label.nicira.l3gatewayserviceuuid=L3 Gateway Service Uuid label.nicira.transportzoneuuid=Transport Zone Uuid -label.nics=\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (NIC) -label.no.actions=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 +label.nics=\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b +label.no.actions=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 label.no.alerts=\u0422\u0440\u0435\u0432\u043e\u0433 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e label.no.data=\u041d\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 label.no.errors=\u041e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e label.no.isos=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 ISO -label.no.items=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 +label.no.items=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 label.none=\u041d\u0435\u0442 -label.no.security.groups=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c +label.no.security.groups=\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 label.not.found=\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e label.no.thanks=\u041d\u0435\u0442, \u0441\u043f\u0430\u0441\u0438\u0431\u043e label.notifications=\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f @@ -827,24 +870,27 @@ label.no=\u041d\u0435\u0442 label.number.of.clusters=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 label.number.of.hosts=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432 label.number.of.pods=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0435\u043d\u0434\u043e\u0432 -label.number.of.system.vms=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d +label.number.of.system.vms=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0412\u041c label.number.of.virtual.routers=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 label.number.of.zones=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043e\u043d -label.num.cpu.cores=\u041a\u043e\u043b. CPU +label.num.cpu.cores=\u041a\u043e\u043b-\u0432\u043e \u044f\u0434\u0435\u0440 CPU label.numretries=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a label.ocfs2=OCFS2 -label.offer.ha=\u041f\u0440\u0435\u0434\u043e\u0441\u0442. HA +label.offer.ha=\u0423\u0441\u043b\u0443\u0433\u0430 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 label.ok=OK label.optional=\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e label.order=\u041e\u0447\u0435\u0440\u0435\u0434\u044c label.os.preference=\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u041e\u0421 label.os.type=\u0422\u0438\u043f \u041e\u0421 -label.owned.public.ips=\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 +label.owned.public.ips=\u041f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 IP \u0430\u0434\u0440\u0435\u0441\u0430 label.owner.account=\u0423\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 label.owner.domain=\u0414\u043e\u043c\u0435\u043d \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 label.parent.domain=\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d label.password.enabled=\u041f\u0430\u0440\u043e\u043b\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d +label.password.lower=\u041f\u0430\u0440\u043e\u043b\u044c +label.password.reset.confirm=\u041f\u0430\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0441\u0431\u0440\u043e\u0448\u0435\u043d \u0432 label.password=\u041f\u0430\u0440\u043e\u043b\u044c +label.PA=static NAT label.path=\u041f\u0443\u0442\u044c label.perfect.forward.secrecy=Perfect Forward Secrecy label.physical.network.ID=ID \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 @@ -860,27 +906,28 @@ label.plugins=\u041f\u043b\u0430\u0433\u0438\u043d\u044b label.pod.name=\u0418\u043c\u044f \u0441\u0442\u0435\u043d\u0434\u0430 label.pods=\u0421\u0442\u0435\u043d\u0434\u044b label.pod=\u0421\u0442\u0435\u043d\u0434 -label.port.forwarding.policies=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u043f\u043e\u0440\u0442\u043e\u0432 -label.port.forwarding=\u041f\u0440\u043e\u0431\u0440\u043e\u0441 \u043f\u043e\u0440\u0442\u043e\u0432 +label.port.forwarding.policies=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u043e\u0432 +label.port.forwarding=\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 label.port.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u043e\u0440\u0442\u043e\u0432 label.PreSetup=\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 label.previous=\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 label.prev=\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0448\u0438\u0439 -label.primary.allocated=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 +label.primary.allocated=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.primary.network=\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0435\u0442\u044c -label.primary.storage.count=\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f -label.primary.storage.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 (\u0432 \u0413\u0438\u0411) +label.primary.storage.count=\u041f\u0443\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 +label.primary.storage.limits=\u041b\u0438\u043c\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 (GiB) label.primary.storage=\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 -label.primary.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 +label.primary.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.private.Gateway=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 \u0448\u043b\u044e\u0437 label.private.interface=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 -label.private.ip.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0430\u0441\u0442\u043d\u044b\u0445 IP +label.private.ip.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0430\u0441\u0442\u043d\u044b\u0445 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 label.private.ips=\u0427\u0430\u0441\u0442\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 -label.private.ip=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 +label.private.ip=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 label.privatekey=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 PKCS\#8 label.private.network=\u0427\u0430\u0441\u0442\u043d\u0430\u044f \u0441\u0435\u0442\u044c label.private.port=\u0427\u0430\u0441\u0442\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 label.private.zone=\u0427\u0430\u0441\u0442\u043d\u0430\u044f \u0437\u043e\u043d\u0430 +label.profile=\u041f\u0440\u043e\u0444\u0438\u043b\u044c label.project.dashboard=\u041f\u0430\u043d\u0435\u043b\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 label.project.id=ID \u043f\u0440\u043e\u0435\u043a\u0442\u0430 label.project.invite=\u041f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 @@ -890,6 +937,7 @@ label.project=\u041f\u0440\u043e\u0435\u043a\u0442 label.project.view=\u041f\u0440\u043e\u0435\u043a\u0442\u044b label.protocol=\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b label.providers=\u041f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0438 +label.provider=\u041f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0438 label.public.interface=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 label.public.ips=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 label.public.ip=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 @@ -903,38 +951,47 @@ label.Pxe.server.type=\u0422\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u0 label.qos.type=\u0422\u0438\u043f QoS label.quickview=\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 label.reboot=\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c -label.recent.errors=\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 +label.recent.errors=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 +label.recover.vm=\u0412\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0412\u041c label.redundant.router.capability=\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430 label.redundant.router=\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 label.redundant.state=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u0430 label.refresh=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c label.region=\u0420\u0435\u0433\u0438\u043e\u043d +label.reinstall.vm=\u041f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0412\u041c label.related=\u0421\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 label.remind.later=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u043f\u043e\u0437\u0436\u0435 label.remove.ACL=\u0423\u0434\u0430\u043b\u0438\u0442\u044c ACL -label.remove.egress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.remove.egress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.remove.from.load.balancer=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 -label.remove.ingress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.remove.ingress.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.remove.ip.range=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP -label.remove.pf=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u043f\u043e\u0440\u0442\u0430 +label.remove.network.offering=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u0443\u0441\u043b\u0443\u0433\u0443 +label.remove.pf=\u0414\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0430 label.remove.project.account=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 label.remove.region=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0435\u0433\u0438\u043e\u043d label.remove.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e -label.remove.static.nat.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e NAT +label.remove.static.nat.rule=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e static NAT label.remove.static.route=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 label.remove.tier=\u0423\u0434\u0430\u043b\u0438\u0442\u044c tier label.remove.vm.from.lb=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0412\u041c \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 +label.remove.vm.load.balancer=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0412\u041c \u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 +label.remove.vpc.offering=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0443 VPC label.remove.vpc=\u0423\u0434\u0430\u043b\u0438\u0442\u044c VPC label.removing=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 label.removing.user=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f label.required=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f +label.reserved.ip.range=\u0417\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 IP \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d label.reserved.system.gateway=\u0417\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0448\u043b\u044e\u0437 label.reserved.system.ip=\u0417\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 IP label.reserved.system.netmask=\u0417\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043c\u0430\u0441\u043a\u0430 +label.resetVM=\u0421\u0431\u0440\u043e\u0441 \u0412\u041c label.reset.VPN.connection=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c VPN \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 -label.resize.new.offering.id=New Offering +label.resize.new.offering.id=\u041d\u043e\u0432\u0430\u044f \u0443\u0441\u043b\u0443\u0433\u0430 +label.resize.new.size=\u041d\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 (GB) label.resize.shrink.ok=Shrink OK -label.resource.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +label.resource.limit.exceeded=\u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 +label.resource.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 label.resource.state=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 label.resources=\u0420\u0435\u0441\u0443\u0440\u0441\u044b label.resource=\u0420\u0435\u0441\u0443\u0440\u0441 @@ -945,10 +1002,11 @@ label.restore=\u0412\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c label.review=\u041e\u0431\u0437\u043e\u0440 label.revoke.project.invite=\u041e\u0442\u043e\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 label.role=\u0420\u043e\u043b\u044c -label.root.disk.controller=\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 -label.root.disk.offering=\u0420\u0435\u0441\u0443\u0440\u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 +label.root.disk.controller=\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 +label.root.disk.offering=\u0423\u0441\u043b\u0443\u0433\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 label.root.disk.size=\u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 label.routing=\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f +label.rule.number=\u041d\u043e\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 label.rules=\u041f\u0440\u0430\u0432\u0438\u043b\u0430 label.running.vms=\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0412\u041c label.s3.access_key=\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 @@ -966,10 +1024,10 @@ label.save=\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c label.saving.processing=\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435... label.scope=\u041e\u0445\u0432\u0430\u0442 label.search=\u041f\u043e\u0438\u0441\u043a -label.secondary.storage.count=\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0432 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f -label.secondary.storage.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 (\u0432 \u0413\u0438\u0411) +label.secondary.storage.count=\u041f\u0443\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 +label.secondary.storage.limits=\u041b\u0438\u043c\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 (GiB) label.secondary.storage=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 -label.secondary.storage.vm=\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 +label.secondary.storage.vm=\u0412\u041c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.secondary.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.secret.key=\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 label.security.group.name=\u0418\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 @@ -978,11 +1036,13 @@ label.security.groups=\u0413\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u0 label.security.group=\u0413\u0440\u0443\u043f\u043f\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 label.select.a.template=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d label.select.a.zone=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043e\u043d\u0443 -label.select.instance.to.attach.volume.to=\u0412\u044b\u0431\u0438\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044c\u0435\u043c\u0430 +label.select.instance.to.attach.volume.to=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430 label.select.instance=\u0412\u044b\u0431\u0438\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 label.select.iso.or.template=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 ISO \u0438\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d label.select.offering=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 label.select.project=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 +label.select.region=\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u043e\u043d +label.select.template=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d label.select.tier=\u0412\u044b\u0431\u0440\u0430\u0442\u044c Tier label.select=\u0412\u044b\u0431\u0440\u0430\u0442\u044c label.select-view=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0438\u0434 @@ -992,20 +1052,22 @@ label.server=\u0421\u0435\u0440\u0432\u0435\u0440 label.service.capabilities=\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0443\u0436\u0431\u044b label.service.offering=\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 label.service.state=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431 -label.session.expired=\u0412\u0440\u0435\u043c\u044f \u0441\u0435\u0441\u0441\u0438\u0438 \u0432\u044b\u0448\u043b\u043e -label.setup.network=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438 +label.session.expired=\u0421\u0435\u0430\u043d\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d +label.set.default.NIC=\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c NIC \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e +label.settings=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 label.setup=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 label.set.up.zone.type=\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0438\u043f \u0437\u043e\u043d\u044b -label.setup.zone=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u043e\u043d\u044b label.SharedMountPoint=\u041e\u0442\u043a\u0440\u044b\u0442\u0430\u044f\u0422\u043e\u0447\u043a\u0430\u0414\u043e\u0441\u0442\u0443\u043f\u0430 label.shared=\u041e\u0431\u0449\u0438\u0439 -label.show.ingress.rule=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e +label.show.advanced.settings=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 +label.show.ingress.rule=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e label.shutdown.provider=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 +label.site.to.site.VPN=Site-to-site VPN label.size=\u0420\u0430\u0437\u043c\u0435\u0440 -label.skip.guide=\u042f \u0443\u0436\u0435 \u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u043c\u0430\u0441\u0442\u0435\u0440 CloudStack, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e -label.snapshot.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u0441\u043d\u0438\u043c\u043a\u043e\u0432 +label.skip.guide=\u042f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b CloudStack, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e +label.snapshot.limits=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043d\u0438\u043c\u043a\u043e\u0432 label.snapshot.name=\u0418\u043c\u044f \u0441\u043d\u0438\u043c\u043a\u0430 -label.snapshot.schedule=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0445 \u0441\u043d\u0438\u043c\u043a\u043e\u0432 +label.snapshot.s=\u0421\u043d\u0438\u043c\u043a\u0438 label.snapshots=\u0421\u043d\u0438\u043c\u043a\u0438 label.snapshot=\u0421\u043d\u0438\u043c\u043e\u043a label.source.nat=Source NAT @@ -1028,14 +1090,14 @@ label.step.1.title=\u0428\u0430\u0433 1\: \u0412\u044b\u0431\u0435\u0440 label.step.1=\u0428\u0430\u0433 1 label.step.2.title=\u0428\u0430\u0433 2\: \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 label.step.2=\u0428\u0430\u0433 2 -label.step.3.title=\u0428\u0430\u0433 3\: \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.step.3.title=Step 3\: \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 label.step.3=\u0428\u0430\u0433 3 label.step.4.title=Step 4\: \u0421\u0435\u0442\u044c label.step.4=\u0428\u0430\u0433 4 label.step.5.title=Step 5\: \u041e\u0431\u0437\u043e\u0440 label.step.5=\u0428\u0430\u0433 5 label.stickiness=\u041b\u0438\u043f\u043a\u0438\u0439 -label.sticky.cookie-name=Cookie \u0438\u043c\u044f +label.sticky.cookie-name=Cookie name label.sticky.domain=\u0414\u043e\u043c\u0435\u043d label.sticky.expire=\u0418\u0441\u0442\u0435\u043a\u0430\u0435\u0442 label.sticky.holdtime=\u0432\u0440\u0435\u043c\u044f \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f @@ -1043,12 +1105,13 @@ label.sticky.indirect=\u041a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0439 label.sticky.length=\u0414\u043b\u0438\u043d\u0430 label.sticky.mode=\u0420\u0435\u0436\u0438\u043c label.sticky.nocache=\u041d\u0435\u0442 \u043a\u044d\u0448\u0430 -label.sticky.postonly=\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e +label.sticky.postonly=\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 label.sticky.prefix=\u041f\u0440\u0435\u0444\u0438\u043a\u0441 label.sticky.request-learn=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435. label.sticky.tablesize=\u0420\u0430\u0437\u043c\u0435\u0440 \u0442\u0430\u0431\u043b\u0438\u0446\u044b label.stopped.vms=\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0412\u041c label.stop=\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c +label.storage.pool=\u041f\u0443\u043b \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.storage.tags=\u041c\u0435\u0442\u043a\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.storage.traffic=\u0422\u0440\u0430\u0444\u0438\u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 label.storage.type=\u0422\u0438\u043f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 @@ -1064,8 +1127,9 @@ label.supported.source.NAT.type=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438 label.suspend.project=\u041f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 label.switch.type=\u0422\u0438\u043f \u0441\u0432\u0438\u0447\u0430 label.system.capacity=\u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b -label.system.offering=\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f -label.system.service.offering=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 +label.system.offering=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b +label.system.service.offering=\u0423\u0441\u043b\u0443\u0433\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431 +label.system.vm.details=\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0412\u041c label.system.vms=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0412\u041c label.system.vm.type=\u0422\u0438\u043f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u0412\u041c label.system.vm=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0412\u041c @@ -1086,19 +1150,22 @@ label.timeout=\u0412\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043 label.time=\u0412\u0440\u0435\u043c\u044f label.time.zone=\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 label.timezone=\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 -label.token=\u0422\u0430\u043b\u043e\u043d +label.token=\u0422\u043e\u043a\u0435\u043d label.total.cpu=\u0412\u0441\u0435\u0433\u043e CPU label.total.CPU=\u0412\u0441\u0435\u0433\u043e CPU label.total.hosts=\u0412\u0441\u0435\u0433\u043e \u0443\u0437\u043b\u043e\u0432 label.total.memory=\u0412\u0441\u0435\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438 +label.total.of.ip=\u0412\u0441\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 label.total.of.vm=\u0412\u0441\u0435\u0433\u043e \u0412\u041c -label.total.storage=\u0412\u0441\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 +label.total.storage=\u0412\u0441\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f +label.total.virtual.routers=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 label.total.vms=\u0412\u0441\u0435\u0433\u043e \u0412\u041c label.traffic.label=\u0422\u0440\u0430\u0444\u0438\u043a label.traffic.types=\u0422\u0438\u043f\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430 label.traffic.type=\u0422\u0438\u043f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 label.tuesday=\u0412\u0442\u043e\u0440\u043d\u0438\u043a label.type.id=ID \u0442\u0438\u043f\u0430 +label.type.lower=\u0422\u0438\u043f label.type=\u0422\u0438\u043f label.unavailable=\u041d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e label.unlimited=\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e @@ -1108,13 +1175,16 @@ label.update.ssl.cert= \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u label.update.ssl= \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b SSL label.updating=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 label.upload=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c -label.upload.volume=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c +label.upload.volume=\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0438\u0441\u043a label.url=URL label.usage.interface=\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f +label.usage.server=\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 label.used=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e +label.username.lower=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f label.username=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f label.users=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 label.user=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c +label.use.vm.ips=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0412\u041c IPs label.use.vm.ip=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 IP \u0412\u041c\: label.value=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 label.vcdcname=\u0418\u043c\u044f vCenter DC @@ -1126,6 +1196,7 @@ label.vcenter.password=\u041f\u0430\u0440\u043e\u043b\u044c vCenter label.vcenter.username=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f vCenter label.vcipaddress=vCenter IP \u0410\u0434\u0440\u0435\u0441\u0441 label.version=\u0412\u0435\u0440\u0441\u0438\u044f +label.vgpu.remaining.capacity=\u041e\u0441\u0442\u0430\u0448\u0438\u0435\u0441\u044f \u0435\u043c\u043a\u043e\u0441\u0442\u044c label.view.all=\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0451 label.view.console=\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c label.viewing=\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 @@ -1134,6 +1205,9 @@ label.view.secondary.ips=\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434 label.view=\u0412\u0438\u0434 label.virtual.appliances=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 label.virtual.appliance=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e +label.virtual.machines=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b +label.virtual.machine=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 +label.virtual.networking=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430t \u0441\u0435\u0442\u0438 label.virtual.network=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c label.virtual.routers=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 label.virtual.router=\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 @@ -1141,12 +1215,13 @@ label.vlan.id=ID VLAN label.vlan.only=VLAN label.vlan.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d VLAN label.vlan=VLAN -label.vlan.vni.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d VLAN +label.vlan.vni.range=VLAN/VNI Range label.vm.add=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b label.vm.destroy=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c label.vm.display.name=\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u0412\u041c label.VMFS.datastore=\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 VMFS label.vmfs=VMFS +label.vm.ip=\u0412\u041c IP-\u0430\u0434\u0440\u0435\u0441 label.vm.name=\u0418\u043c\u044f VM label.vm.reboot=\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c label.VMs.in.tier=Tier \u0412\u041c @@ -1162,12 +1237,17 @@ label.vms=\u0412\u041c label.vmware.traffic.label=\u041c\u0435\u0442\u043a\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 VMware label.vnet.id=ID VLAN label.vnet=VLAN -label.volgroup=\u0413\u0440\u0443\u043f\u043f\u0430 \u0442\u043e\u043c\u0430 -label.volume.limits=\u041f\u0440\u0435\u0434\u0435\u043b\u044b \u0442\u043e\u043c\u043e\u0432 +label.volgroup=\u0413\u0440\u0443\u043f\u043f\u0430 \u0434\u0438\u0441\u043a\u0430 +label.volume.details=\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u0438\u0441\u043a\u0435 +label.volume.limits=\u041a\u043e\u043b\u0438\u0447\u0435\u0442\u0441\u0432\u043e \u0434\u0438\u0441\u043a\u043e\u0432 +label.volume.migrated=\u0414\u0438\u0441\u043a \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u043d label.volume.name=\u0418\u043c\u044f \u0442\u043e\u043c\u0430 label.volumes=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f label.volume=\u0422\u043e\u043c label.vpc.id=VPC ID +label.VPC.limits=\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f VPC +label.vpc.offering.details=\u0414\u0435\u0442\u0430\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438 VPC +label.vpc.offering=\u0423\u0441\u043b\u0443\u0433\u0430 VPC label.VPC.router.details=\u0414\u0435\u0442\u0430\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 VPC label.vpc=VPC label.VPN.connection=VPN \u043f\u043e\u0434\u043b\u044e\u0447\u0435\u043d\u0438\u0435 @@ -1175,10 +1255,10 @@ label.vpn.customer.gateway=VPN \u0448\u043b\u044e\u0437 \u043a\u043b\u0438\u0435 label.VPN.customer.gateway=VPN \u0448\u043b\u044e\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 label.VPN.gateway=VPN \u0448\u043b\u044e\u0437 label.vpn=VPN -label.vsmctrlvlanid=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 VLAN ID -label.vsmpktvlanid=\u041f\u0430\u043a\u0435\u0442 VLAN ID -label.vsmstoragevlanid=\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 VLAN ID -label.vsphere.managed=\u041e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 vSphere +label.vsmctrlvlanid=Control VLAN ID +label.vsmpktvlanid=Packet VLAN ID +label.vsmstoragevlanid=Storage VLAN ID +label.vsphere.managed=vSphere Managed label.vxlan.id=VXLAN ID label.vxlan.range=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d Range label.vxlan=VXLAN @@ -1186,9 +1266,9 @@ label.waiting=\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 label.warn=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435 label.wednesday=\u0421\u0440\u0435\u0434\u0430 label.weekly=\u0415\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e -label.welcome.cloud.console=\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f +label.welcome.cloud.console=\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f label.welcome=\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c -label.what.is.cloudstack=\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 CloudStack? +label.what.is.cloudstack=\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 CloudStack&\#8482? label.xenserver.traffic.label=\u041c\u0435\u0442\u043a\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 XenServer label.yes=\u0414\u0430 label.zone.details=\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0437\u043e\u043d\u044b @@ -1206,82 +1286,82 @@ label.zoneWizard.trafficType.guest=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0 label.zoneWizard.trafficType.management=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\: \u0422\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c CloudStack, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0443\u0437\u043b\u044b \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b. label.zoneWizard.trafficType.public=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439\: \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 label.zoneWizard.trafficType.storage=\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\: \u0422\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u043c\u0438 \u0438 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u0441\u043d\u0438\u043c\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. -managed.state=\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f -message.acquire.ip.nic=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 IP \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e NIC.
\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435\: \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 IP \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. +managed.state=\u0420\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f +message.acquire.ip.nic=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 IP \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b.
\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435\: \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 IP \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. message.acquire.new.ip=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c "\u0431\u0435\u043b\u044b\u0439" IP \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438. message.acquire.new.ip.vpc=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c "\u0431\u0435\u043b\u044b\u0439" IP \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e VPC. message.acquire.public.ip=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043e\u043d\u0443, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043d\u043e\u0432\u044b\u0439 IP. message.action.cancel.maintenance.mode=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. -message.action.cancel.maintenance=\u0423\u0437\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043b\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. -message.action.change.service.warning.for.instance=\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430. -message.action.change.service.warning.for.router=\u0414\u043b\u044f \u0440\u043e\u0443\u0442\u0435\u0440 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430. -message.action.delete.cluster=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. -message.action.delete.disk.offering=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. -message.action.delete.domain=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u043e\u043c\u0435\u043d. -message.action.delete.external.firewall=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0435\u0440\u0432\u043e\u043b. \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. -message.action.delete.external.load.balancer=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0435, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. -message.action.delete.ingress.rule=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. -message.action.delete.ISO.for.all.zones=\u042d\u0442\u043e ISO, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432\u0441\u0435\u043c\u0438 \u0437\u043e\u043d\u0430\u043c\u0438. \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043e \u0432\u0441\u0435\u0445 \u0437\u043e\u043d. -message.action.delete.ISO=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 ISO. -message.action.delete.network=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0435\u0442\u044c. -message.action.delete.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e nexusVswitch. +message.action.cancel.maintenance=\u0423\u0437\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. +message.action.change.service.warning.for.instance=\u041f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0412\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 +message.action.change.service.warning.for.router=\u0414\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u043d\u0430\u0431\u043e\u0440\u0430 \u0443\u0441\u043b\u0443\u0433 \u0412\u0430\u0448 \u0440\u043e\u0443\u0442\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d +message.action.delete.cluster=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. +message.action.delete.disk.offering=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u042b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 +message.action.delete.domain=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u043e\u043c\u0435\u043d. +message.action.delete.external.firewall=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0435\u0440\u0432\u043e\u043b. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0435\u043d\u0438\u0435\: \u0415\u0441\u043b\u0438 \u0412\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u0436\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0435\u0440\u0432\u043e\u043b, \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. +message.action.delete.external.load.balancer=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0435\u043d\u0438\u0435\: \u0415\u0441\u043b\u0438 \u0412\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u0436\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0435\u0440\u0432\u043e\u043b, \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 +message.action.delete.ingress.rule=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e. +message.action.delete.ISO.for.all.zones=ISO \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0437\u043e\u043d\u0430\u043c\u0438. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u0432\u0441\u0435\u0445 \u0437\u043e\u043d. +message.action.delete.ISO=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 ISO. +message.action.delete.network=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0435\u0442\u044c. +message.action.delete.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e nexus 1000v message.action.delete.nic=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 NIC, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u0438\u0437 \u0412\u041c. -message.action.delete.physical.network=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c -message.action.delete.pod=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0435\u043d\u0434. -message.action.delete.primary.storage=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. -message.action.delete.secondary.storage=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. -message.action.delete.security.group=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. -message.action.delete.service.offering=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. -message.action.delete.snapshot=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043d\u0438\u043c\u043e\u043a. -message.action.delete.system.service.offering=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431. -message.action.delete.template.for.all.zones=\u0428\u0430\u0431\u043b\u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u043e\u043d\u0430\u0445. \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043e \u0432\u0441\u0435\u0445 \u0437\u043e\u043d. -message.action.delete.template=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d. -message.action.delete.volume=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u043e\u043c. -message.action.delete.zone=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443. -message.action.destroy.instance=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. -message.action.destroy.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. -message.action.disable.cluster=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. -message.action.disable.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 nexusVswitch. +message.action.delete.physical.network=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c +message.action.delete.pod=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0435\u043d\u0434. +message.action.delete.primary.storage=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. +message.action.delete.secondary.storage=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 +message.action.delete.security.group=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 security group. +message.action.delete.service.offering=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u042b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0443\u0441\u043b\u0443\u0433\u0443 \u0441\u043b\u0443\u0436\u0431 +message.action.delete.snapshot=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043d\u0438\u043c\u043e\u043a. +message.action.delete.system.service.offering=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. +message.action.delete.template.for.all.zones=\u042d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u043e\u043d\u0430\u0445. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u043e\u043d\u0430\u0445. +message.action.delete.template=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u043a \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d. +message.action.delete.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u043e\u043c. +message.action.delete.zone=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443. +message.action.destroy.instance=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. +message.action.destroy.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c. +message.action.disable.cluster=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. +message.action.disable.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e nexusVswitch. message.action.disable.physical.network=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c. -message.action.disable.pod=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443. -message.action.disable.static.NAT=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 NAT. -message.action.disable.zone=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443 +message.action.disable.pod=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0435\u043d\u0434. +message.action.disable.static.NAT=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u0430\u0434\u0440\u0435\u0441\u043e\u0432. +message.action.disable.zone=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u043e\u043d\u0443. message.action.download.iso=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 ISO. message.action.download.template=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d. -message.action.enable.cluster=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. -message.action.enable.maintenance=\u0423\u0437\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u043e\u0448\u0435\u043b \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0412\u041c \u0432 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435 \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0432\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043c\u0438\u043d\u0443\u0442\u0430\u043c. -message.action.enable.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e nexusVswitch. +message.action.enable.cluster=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. +message.action.enable.maintenance=\u0412\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043d\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. +message.action.enable.nexusVswitch=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e nexus 1000v. message.action.enable.physical.network=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c. message.action.enable.pod=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0442\u0435\u043d\u0434. -message.action.enable.zone=\u041f\u043e\u0442\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443 -message.action.force.reconnect=\u0423\u0437\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. -message.action.host.enable.maintenance.mode=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0443\u0437\u043b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0443\u0437\u043b\u044b. -message.action.instance.reset.password=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c root \u044d\u0442\u043e\u0439 \u0412\u041c. +message.action.enable.zone=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443. +message.action.force.reconnect=\u0412\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442. +message.action.host.enable.maintenance.mode=\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. +message.action.instance.reset.password=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. message.action.manage.cluster=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. -message.action.primarystorage.enable.maintenance.mode=\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435\: \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f, \u0432\u0441\u0435 \u0412\u041c \u0431\u0443\u0434\u0443\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c? +message.action.primarystorage.enable.maintenance.mode=\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\: \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0432\u0441\u0435\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0435\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c? message.action.reboot.instance=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. message.action.reboot.router=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440. -message.action.reboot.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0412\u041c. -message.action.release.ip=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 IP-\u0430\u0434\u0440\u0435\u0441. +message.action.reboot.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c. +message.action.release.ip=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 IP \u0430\u0434\u0440\u0435\u0441. message.action.remove.host=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e/\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f/\u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u043c\u0438 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. message.action.reset.password.off=\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0430\u0448\u0438\u043d\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e -message.action.reset.password.warning=\u041c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f -message.action.restore.instance=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. +message.action.reset.password.warning=\u041f\u0435\u0440\u0435\u0434 \u043f\u043e\u043f\u044b\u0442\u043a\u043e\u0439 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0412\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430. +message.action.restore.instance=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. message.action.revert.snapshot=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u0438\u0441\u043a \u043a \u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u043c \u0441\u043d\u0438\u043c\u043a\u0443 -message.action.start.instance=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. -message.action.start.router=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440. +message.action.start.instance=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. +message.action.start.router=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440. message.action.start.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c. -message.action.stop.instance=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. +message.action.stop.instance=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043c\u0430\u0448\u0438\u043d\u0443. message.action.stop.router=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440. -message.action.stop.systemvm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0412\u041c. -message.action.take.snapshot=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043c\u0430. +message.action.stop.systemvm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. +message.action.take.snapshot=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. message.action.unmanage.cluster=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c. message.action.vmsnapshot.delete=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043d\u0438\u043c\u043e\u043a \u0412\u041c. message.action.vmsnapshot.revert=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a \u0412\u041c message.activate.project=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442? -message.add.cluster=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0437\u043e\u043d\u044b , \u043c\u043e\u0434\u0443\u043b\u044c -message.add.cluster.zone=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0437\u043e\u043d\u044b -message.add.disk.offering=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0430 +message.add.cluster=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u043e\u0432 \u0432 \u0437\u043e\u043d\u0435 , pod +message.add.cluster.zone=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u043e\u0432 \u0432 \u0437\u043e\u043d\u0435 +message.add.disk.offering=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u0443\u0433\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 message.add.domain=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d, \u0433\u0434\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d message.add.firewall=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0435\u0440\u0432\u043e\u043b \u0432 \u0437\u043e\u043d\u0443 message.add.guest.network=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e \u0441\u0435\u0442\u044c @@ -1292,7 +1372,7 @@ message.adding.Netscaler.provider=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u04 message.add.ip.range.direct.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c IP-\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0441\u0435\u0442\u0438 \u0432 \u0437\u043e\u043d\u0435 message.add.ip.range.to.pod=

\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 \u0441\u0442\u0435\u043d\u0434\:

message.add.ip.range=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0437\u043e\u043d\u044b -message.additional.networks.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438, \u043a\u0443\u0434\u0430 \u0432\u0430\u0448\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b. +message.additional.networks.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0412\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430. message.add.load.balancer=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0437\u043e\u043d\u0443 message.add.load.balancer.under.ip=\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 IP\: message.add.network=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u0437\u043e\u043d\u044b\: @@ -1300,26 +1380,26 @@ message.add.new.gateway.to.vpc=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441 message.add.pod.during.zone.creation=\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u043e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0435\u043d\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0432\u044b\u043c. \u0421\u0442\u0435\u043d\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0437\u043b\u044b \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 IP \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 IP \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u043e\u043d\u044b \u043e\u0431\u043b\u0430\u043a\u0430. message.add.pod=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u0437\u043e\u043d\u044b message.add.primary.storage=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u043b\u044f \u0437\u043e\u043d\u044b , \u0441\u0442\u0435\u043d\u0434\u0430 -message.add.primary=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 +message.add.primary=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0437\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 message.add.region=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430. message.add.secondary.storage=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0432 \u0437\u043e\u043d\u0443 -message.add.service.offering=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430. -message.add.system.service.offering=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043b\u0443\u0436\u0431. -message.add.template=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 -message.add.volume=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u043e\u043c\u0430 +message.add.service.offering=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430. +message.add.system.service.offering=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 +message.add.template=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 +message.add.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. message.add.VPN.gateway=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c VPN \u0448\u043b\u044e\u0437 -message.advanced.mode.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0435\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 VLAN. \u042d\u0442\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u0435\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043c\u0435\u0436\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d, VPN, \u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. -message.advanced.security.group=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. -message.advanced.virtual=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0439 \u0437\u043e\u043d\u044b \u0441\u0435\u0442\u0438 VLAN, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. +message.advanced.mode.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u0443 \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0435\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e VLAN. \u042d\u0442\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u0430\u043a \u0444\u0430\u0435\u0440\u0432\u043e\u043b, \u0412\u041f\u041d, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0441\u0435\u0442\u0438. +message.advanced.security.group=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c security groups \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. +message.advanced.virtual=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c VLAN \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. message.after.enable.s3=S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435\: \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043a\u0438\u043d\u0435\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c S3 \u0441\u043d\u043e\u0432\u0430. message.after.enable.swift=Swift \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d. \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435\: \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043a\u0438\u043d\u0435\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c Swift \u0441\u043d\u043e\u0432\u0430 message.alert.state.detected=\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0441\u0438\u0433\u043d\u0430\u043b \u0442\u0440\u0435\u0432\u043e\u0433\u0438 -message.allow.vpn.access=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043b\u044f VPN-\u0434\u043e\u0441\u0442\u0443\u043f\u0430. -message.apply.snapshot.policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0438\u043c\u043a\u0430 \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b. -message.attach.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c ISO \u0432 \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440. -message.attach.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e \u0431\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043e. \u0414\u043b\u044f Windows, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 -message.basic.mode.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0435\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b *not* \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u043b\u044e\u0431\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 VLAN. \u0412\u0441\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0448\u0438\u043d\u0430\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0435\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d IP \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0441\u0435\u0442\u0438 \u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0435\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438. -message.change.offering.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e VM. +message.allow.vpn.access=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c VPN \u0434\u043e\u0441\u0442\u0443\u043f. +message.apply.snapshot.policy=\u0412\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439. +message.attach.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c ISO \u043a \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. +message.attach.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u0438\u043d\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0415\u0441\u043b\u0438 \u0412\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0434\u0438\u0441\u043a \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 Windows, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0434\u0438\u0441\u043a \u0431\u044b\u043b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d. +message.basic.mode.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u0443 \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0435\u0441\u043b\u0438 \u0412\u044b *\u043d\u0435* \u0445\u043e\u0442\u0438\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 VLAN. \u0412\u0441\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0448\u0438\u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441. \u0414\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b Security groups. +message.change.offering.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0438 \u0441\u043b\u0443\u0436\u0431 \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. message.change.password=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c. message.configure.all.traffic.types=\u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c. message.configuring.guest.traffic=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 @@ -1337,11 +1417,11 @@ message.confirm.enable.provider=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434 message.confirm.join.project=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. message.confirm.remove.IP.range=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP. message.confirm.shutdown.provider=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 -message.copy.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c ISO \u0434\u043e +message.copy.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0412\u0430\u0448 ISO \u0432 message.copy.template=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d XXX \u0438\u0437 \u0437\u043e\u043d\u044b \u0432 message.create.template=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d? -message.create.template.vm=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b -message.create.template.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u0438\u0441\u043a\u0430 \u043e\u0431\u044a\u0435\u043c\u043e\u043c\: . \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u0434\u043e \u0434\u043e\u043b\u044c\u0448\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0442\u043e\u043c\u0430. +message.create.template.vm=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 +message.create.template.volume=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u0412\u0430\u0448\u0435\u0433\u043e \u0434\u0438\u0441\u043a\u0430\: . \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0412\u0430\u0448\u0435\u0433\u043e \u0434\u0438\u0441\u043a\u0430. message.creating.cluster=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 message.creating.guest.network=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e \u0441\u0435\u0442\u044c message.creating.physical.networks=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439 @@ -1351,7 +1431,7 @@ message.creating.secondary.storage=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0 message.creating.zone=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043e\u043d\u044b message.decline.invitation=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442. message.dedicate.zone=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430 -message.delete.account=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442. +message.delete.account=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. message.delete.affinity.group=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 affinity group message.delete.gateway=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u043b\u044e\u0437. message.delete.project=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442? @@ -1364,41 +1444,42 @@ message.desc.basic.zone=\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u message.desc.cluster=\u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0443\u0437\u043b\u043e\u0432. \u0423\u0437\u043b\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0437\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449. message.desc.host=\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b (\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440) \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c, \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0441\u0435\u0439\u0447\u0430\u0441. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0437\u043b\u0430 \u0432 CloudStack \u0432\u0430\u0436\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 \u043d\u0430 \u0443\u0437\u0435\u043b, \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 IP \u043a \u0443\u0437\u043b\u0443 \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f CloudStack.

\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c\u044f DNS \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 IP, \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043a \u041e\u0421 (\u043e\u0431\u044b\u0447\u043d\u043e root), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0437\u043b\u043e\u0432. message.desc.primary.storage=\u041a\u0430\u0436\u0434\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441. \u041f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430. -message.desc.secondary.storage=\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c NFS \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0438 \u0438\u0445 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0412\u041c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432 ISO \u0438 \u0441\u043d\u0438\u043c\u043a\u043e\u0432 \u0412\u041c. \u042d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0437\u043e\u043d\u044b.

\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u0443\u0442\u044c. +message.desc.secondary.storage=\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c NFS \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0438 \u0438\u0445 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0412\u041c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432 ISO \u0438 \u0441\u043d\u0438\u043c\u043a\u043e\u0432 \u0412\u041c. \u042d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0437\u043e\u043d\u044b.

\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u0443\u0442\u044c. message.desc.zone=layer 3 message.detach.disk=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u043a? -message.detach.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c ISO \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. -message.disable.account=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u041f\u0440\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u0432\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043e\u0431\u043b\u0430\u043a\u0430. \u0412\u0441\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044b. -message.disable.snapshot.policy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0438\u043c\u043a\u0430 \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b. +message.detach.iso.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c ISO \u043e\u0442 \u044d\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. +message.disable.account=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u041e\u0431\u043b\u0430\u043a\u0430. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. +message.disable.snapshot.policy=\u0412\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439. message.disable.user=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. -message.disable.vpn.access=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN \u0434\u043e\u0441\u0442\u0443\u043f +message.disable.vpn.access=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c VPN \u0434\u043e\u0441\u0442\u0443\u043f. message.disable.vpn=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN? message.download.ISO=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 00000 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 message.download.template=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 00000\u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 -message.download.volume=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 00000 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u043e\u043c\u0430 +message.download.volume.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 00000 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0438\u0441\u043a\u0430 +message.download.volume=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 00000 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0438\u0441\u043a\u0430 message.edit.account=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 "-1" \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430) -message.edit.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0436\u0430\u0442\u044c "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c". -message.edit.limits=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 "-1" \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430. -message.edit.traffic.type=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0442\u043a\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u0430. -message.enable.account=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. +message.edit.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0436\u0430\u0442\u044c \\'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c\\'. +message.edit.limits=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. "-1" \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. +message.edit.traffic.type=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043c\u0435\u0442\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u0430. +message.enable.account=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. message.enabled.vpn.ip.sec=\u0412\u0430\u0448 IPSec pre-shared \u043a\u043b\u044e\u0447 -message.enabled.vpn=\u0412\u0430\u0448 VPN \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 IP +message.enabled.vpn=\u0412\u0430\u0448 VPN \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d. \u0414\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d \u0447\u0435\u0440\u0435\u0437 IP \u0430\u0434\u0440\u0435\u0441 message.enable.user=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. -message.enable.vpn.access=\u0421\u0435\u0439\u0447\u0430\u0441 VPN \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e IP-a\u0434\u0440\u0435\u0441\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d. \u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN-\u0434\u043e\u0441\u0442\u0443\u043f? +message.enable.vpn.access=VPN \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430. \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c VPN? message.enable.vpn=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a VPN \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430. -message.enabling.security.group.provider=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 \u0437\u0430\u0441\u0438\u0449\u0435\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 +message.enabling.security.group.provider=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 \u0433\u0440\u0443\u043f\u043f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 message.enabling.zone=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u043e\u043d\u0443 message.enter.token=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432 \u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0438\u0441\u044c\u043c\u0435 message.generate.keys=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. -message.guest.traffic.in.advanced.zone=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0441\u0435\u0442\u0438 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 VLAN \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0433\u043e\u0441\u0442\u044f \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438. +message.guest.traffic.in.advanced.zone=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0438\u0442 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 VLAN \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438. message.guest.traffic.in.basic.zone=\u0413\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432 IP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 CloudStack \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u0412\u041c. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0449\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. message.installWizard.click.retry=\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a. -message.installWizard.copy.whatIsACluster=\u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0443\u0437\u043b\u043e\u0432. \u0423\u0437\u043b\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u0435\u0440\u0435, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u0431\u0449\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b "\u0432\u0436\u0438\u0432\u0443\u044e" \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043b\u0443\u0436\u0431 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 - \u0442\u0440\u0435\u0442\u044c\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 CloudStack&\#8482;. \u041a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0440\u0430\u0441\u043f\u043e\u043e\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043d\u0434\u0430\u0445, \u0430 \u0441\u0442\u0435\u043d\u0434\u044b - \u0432 \u0437\u043e\u043d\u0430\u0445.

CloudStack&\#8482; \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. +message.installWizard.copy.whatIsACluster=\u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0443\u0437\u043b\u043e\u0432. \u0423\u0437\u043b\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u0435\u0440\u0435, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0431\u0449\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b (\u0412\u041c) \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b "\u0432\u0436\u0438\u0432\u0443\u044e" \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 - \u0442\u0440\u0435\u0442\u044c\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 CloudStack&\#8482. \u041a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043d\u0434\u0430\u0445, \u0430 \u0441\u0442\u0435\u043d\u0434\u044b - \u0432 \u0437\u043e\u043d\u0430\u0445.

CloudStack&\#8482; \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. message.installWizard.copy.whatIsAHost=\u0423\u0437\u0435\u043b - \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u0423\u0437\u043b\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0412\u041c (\u043a\u0440\u043e\u043c\u0435 \u0443\u0437\u043b\u043e\u0432 BareMetal, \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e Linux-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 KVM, \u0441\u0435\u0440\u0432\u0435\u0440 Citrix XenServer \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 ESXI. \u041f\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b \u0441 XenServer.

\u0423\u0437\u0435\u043b - \u044d\u0442\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 CloudStack&\#8482;, \u0434\u0430\u043b\u0435\u0435 \u0443\u0437\u043b\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b - \u0432 \u0441\u0442\u0435\u043d\u0434\u0430\u0445, \u0441\u0442\u0435\u043d\u0434\u044b - \u0432 \u0437\u043e\u043d\u0430\u0445. message.installWizard.copy.whatIsAPod=\u0421\u0442\u0435\u043d\u0434, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0439\u043a\u0443 \u0441 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u0423\u0437\u043b\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u0435\u043d\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438.

\u0421\u0442\u0435\u043d\u0434 - \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 CloudStack&\#8482;. \u0421\u0442\u0435\u043d\u0434\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u043e\u043d\u0430\u0445. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0435\u043d\u0434\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0432 \u0437\u043e\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0441\u0442\u0435\u043d\u0434. message.installWizard.copy.whatIsAZone=\u0417\u043e\u043d\u0430 - \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u0430\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 CloudStack&\#8482;. \u0417\u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c\u0443 \u0426\u041e\u0414, \u0445\u043e\u0442\u044f \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043e\u043d \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0426\u041e\u0414. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u0436\u0434\u0430\u044f \u0437\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0438 \u0441\u0435\u0442\u044c, \u0430 \u0441\u0430\u043c\u0438 \u0437\u043e\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438. message.installWizard.copy.whatIsCloudStack=CloudStack&\#8482 - \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u043f\u043b\u0430\u0444\u0442\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445, \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0438 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u043a\u043e\u0432 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 \u00ab\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u00bb (IaaS). CloudStack&\#8482 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0442\u044c\u044e, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, CloudStack&\#8482 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.

CloudStack&\#8482 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0438 \u0446\u0435\u043b\u043e\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u043b\u0430\u043a\u0430. \u041c\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0438 \u0411\u0435\u0437\u043d\u0435\u0441-\u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. -message.installWizard.copy.whatIsPrimaryStorage=CloudStack&\#8482; - \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0430\u044f \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430\: \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c iSCSI \u0438\u043b\u0438 NFS-\u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u043a.

\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043e \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0442\u043e\u043c\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432 \u0443\u0437\u043b\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u0438\u0445 \u0443\u0437\u043b\u0430\u0445. +message.installWizard.copy.whatIsPrimaryStorage=CloudStack&\#8482; - \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0430\u044f \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430\: \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c iSCSI \u0438\u043b\u0438 NFS-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u043a.

\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u0442\u0430\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0442\u043e\u043c\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432 \u0443\u0437\u043b\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u0443\u0437\u043b\u043e\u043c. message.installWizard.copy.whatIsSecondaryStorage=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043e \u043a \u0437\u043e\u043d\u0435 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435\:
  • \u0428\u0430\u0431\u043b\u043e\u043d\u044b - \u043e\u0431\u0440\u0430\u0437\u044b \u041e\u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0412\u041c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.
  • \u041e\u0431\u0440\u0430\u0437\u044b ISO - \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u041e\u0421
  • \u0421\u043d\u0438\u043c\u043a\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0442\u043e\u043c\u043e\u0432 - \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0412\u041c, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430
message.installWizard.now.building=\u0412\u0430\u0448\u0435 \u043e\u0431\u043b\u0430\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f... message.installWizard.tooltip.addCluster.name=\u0418\u043c\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u043c\u044f, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 Cloudstack. @@ -1406,12 +1487,12 @@ message.installWizard.tooltip.addHost.hostname=\u0418\u043c\u044f DNS \u0438\u04 message.installWizard.tooltip.addHost.password=\u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0441 \u0432\u0430\u0448\u0435\u0433\u043e XenServer) message.installWizard.tooltip.addHost.username=\u041e\u0431\u044b\u0447\u043d\u043e root. message.installWizard.tooltip.addPod.name=\u0418\u043c\u044f \u0441\u0442\u0435\u043d\u0434\u0430 -message.installWizard.tooltip.addPod.reservedSystemEndIp=\u042d\u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f CloudStack \u0434\u043b\u044f \u0412\u041c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438. \u042d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0441\u0435\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. +message.installWizard.tooltip.addPod.reservedSystemEndIp=\u042d\u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0412\u041c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438. \u042d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0441\u0435\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. message.installWizard.tooltip.addPod.reservedSystemGateway=\u0428\u043b\u044e\u0437 \u0434\u043b\u044f \u0443\u0437\u043b\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430. message.installWizard.tooltip.addPod.reservedSystemNetmask=\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0439. message.installWizard.tooltip.addPod.reservedSystemStartIp=\u042d\u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f CloudStack \u0434\u043b\u044f \u0412\u041c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438. \u042d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0441\u0435\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. message.installWizard.tooltip.addPrimaryStorage.name=\u0418\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. -message.installWizard.tooltip.addPrimaryStorage.path=(\u0434\u043b\u044f NFS) \u0412 NFS \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u044d\u043a\u043f\u043e\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u0443\u0442\u044c (\u0434\u043b\u044f \u041e\u0442\u043a\u0440\u044b\u0442\u043e\u0439\u0422\u043e\u0447\u043a\u0438\u0414\u043e\u0441\u0442\u0443\u043f\u0430). \u0412 KVM \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, "/mnt/primary". +message.installWizard.tooltip.addPrimaryStorage.path=(\u0434\u043b\u044f NFS) \u0412 NFS \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u044d\u043a\u043f\u043e\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u0443\u0442\u044c (\u0434\u043b\u044f SharedMountPoint). \u0412 KVM \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, "/mnt/primary". message.installWizard.tooltip.addPrimaryStorage.server=(\u0434\u043b\u044f NFS, iSCSI \u0438\u043b\u0438 PreSetup) IP-\u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0438\u043c\u044f DNS \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430. message.installWizard.tooltip.addSecondaryStorage.nfsServer=IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 NFS, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 message.installWizard.tooltip.addSecondaryStorage.path=\u041f\u0443\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. @@ -1422,26 +1503,26 @@ message.installWizard.tooltip.addZone.internaldns2=\u042d\u0442\u043e c\u0435\u0 message.installWizard.tooltip.addZone.name=\u0418\u043c\u044f \u0437\u043e\u043d\u044b message.installWizard.tooltip.configureGuestTraffic.description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 message.installWizard.tooltip.configureGuestTraffic.guestEndIp=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (NIC) \u044d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 (CIDR) \u0441\u0442\u0435\u043d\u0434\u0430. -message.installWizard.tooltip.configureGuestTraffic.guestGateway=\u0428\u043b\u044e\u0437 \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u044f\u043c\u0438 +message.installWizard.tooltip.configureGuestTraffic.guestGateway=\u0428\u043b\u044e\u0437, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0433\u043e\u0441\u0442\u044f\u043c\u0438 message.installWizard.tooltip.configureGuestTraffic.guestNetmask=\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043c\u0430\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0439. message.installWizard.tooltip.configureGuestTraffic.guestStartIp=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (NIC) \u044d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 (CIDR) \u0441\u0442\u0435\u043d\u0434\u0430. -message.installWizard.tooltip.configureGuestTraffic.name=\u0418\u043c\u044f \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 +message.installWizard.tooltip.configureGuestTraffic.name=\u0418\u043c\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 message.instanceWizard.noTemplates=\u0412\u044b \u043d\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432; \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0430\u0448\u0438\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d. message.ip.address.changed=\u0412\u0430\u0448\u0438 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b, \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432? \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u0440\u044b\u0442\u0430. -message.iso.desc=\u041e\u0431\u0440\u0430\u0437 \u0434\u0438\u0441\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u041e\u0421. -message.join.project=\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 "\u041f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0439 \u0432\u0438\u0434" \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. -message.launch.vm.on.private.network=\u0425\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0412\u041c \u0432 \u0432\u0430\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438? +message.iso.desc=\u041e\u0431\u0440\u0430\u0437 \u0434\u0438\u0441\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u041e\u0421 +message.join.project=\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430". +message.launch.vm.on.private.network=\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0412\u0430\u043c \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438? message.launch.zone=\u0417\u043e\u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. message.lock.account=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043f\u043e\u0442\u0435\u0440\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u042d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. -message.migrate.instance.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. +message.migrate.instance.confirm=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. message.migrate.instance.to.host=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u0437\u0435\u043b. message.migrate.instance.to.ps=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. -message.migrate.router.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0440\u043e\u0443\u0442\u0435\u0440 \u0432 \u0443\u0437\u0435\u043b -message.migrate.systemvm.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0440\u043e\u0443\u0442\u0435\u0440 \u0432 \u0443\u0437\u0435\u043b -message.migrate.volume=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0442\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. +message.migrate.router.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0440\u043e\u0443\u0442\u0435\u0440 \u0432 \u0443\u0437\u0435\u043b\: +message.migrate.systemvm.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0412\u041c \u0432 \u0443\u0437\u0435\u043b +message.migrate.volume=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0434\u0438\u0441\u043a \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. message.new.user=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. message.no.affinity.groups=\u0412\u044b \u043d\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 affinity groups. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. -message.no.network.support.configuration.not.true=\u041d\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0437\u043e\u043d\u0435 \u043d\u0435\u0442 \u0433\u0440\u0443\u043f\u043f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0448\u0430\u0433\u0443 5. +message.no.network.support.configuration.not.true=\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b security group \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0437\u043e\u043d\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0448\u0430\u0433\u0443 5. message.no.network.support=\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 (vSphere) \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0448\u0430\u0433\u0443 5. message.no.projects.adminOnly=\u0423 \u0432\u0430\u0441 \u043d\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. message.no.projects=\u0423 \u0432\u0430\u0441 \u043d\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 "\u041f\u0440\u043e\u0435\u043a\u0442\u044b" @@ -1459,41 +1540,42 @@ message.please.select.a.different.public.and.management.network.before.removing= message.please.select.networks=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b message.please.wait.while.zone.is.being.created=\u041f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u043e\u043d\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f... message.project.invite.sent=\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e; \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f. -message.public.traffic.in.advanced.zone=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0412\u041c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443. \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 IP \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CloudStack UI \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f IP \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NAT, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u044c\u044e.

\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0442\u0440\u0430\u0444\u0438\u043a\u0430. +message.public.traffic.in.advanced.zone=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0412\u041c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443. \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 IP \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CloudStack UI \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f IP \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NAT, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u044c\u044e.

\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0442\u0440\u0430\u0444\u0438\u043a\u0430. message.public.traffic.in.basic.zone=\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0412\u041c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443 \u0438\u043b\u0438 \u043f\u0440\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u043b\u0443\u0436\u0431 \u0447\u0435\u0440\u0435\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 IP \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0412\u041c, \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 Ip \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u0442\u0441\u044f \u043a \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 IP. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 1-1 NAT \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0441\u0435\u0442\u044c\u044e. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c CloudStack UI \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e NAT \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u044c\u044e. +message.recover.vm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0412\u041c message.redirecting.region=\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0433\u0438\u043e\u043d +message.reinstall.vm=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435\: C\u043e\u0431\u043b\u044e\u0434\u0430\u0439\u0442\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u041c \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430; \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0438, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f, \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b. message.remove.region=\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0433\u0438\u043e\u043d \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f? message.remove.vpc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 VPC -message.remove.vpn.access=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a VPN \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. +message.remove.vpn.access=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c VPN \u0434\u043e\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. message.reset.password.warning.notPasswordEnabled=\u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u043d \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f message.reset.password.warning.notStopped=\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 message.reset.VPN.connection=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e VPN \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. -message.restart.mgmt.server=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440(\u044b) \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. -message.restart.mgmt.usage.server=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0438\u043b\u0443. +message.restart.mgmt.server=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440(\u044b) \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443. +message.restart.mgmt.usage.server=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0438\u043b\u0443. message.restart.network=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0442\u044c. message.restart.vpc=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c VPC -message.security.group.usage=(\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Ctrl-\u043a\u043b\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438) +message.security.group.usage=(\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Ctrl-click \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b\u0445 security groups) message.select.affinity.groups=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043b\u044e\u0431\u044b\u0435 affinity groups, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430\: -message.select.a.zone=\u0417\u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c\u0443 \u0446\u0435\u043d\u0442\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043e\u043d\u044b\u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c. +message.select.a.zone=\u0417\u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c\u0443 \u0446\u0435\u043d\u0442\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c. message.select.instance=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440. message.select.iso=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0437 ISO \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0412\u041c message.select.item=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 -message.select.security.groups=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u0440\u0443\u043f\u043f\u0443/\u0433\u0440\u0443\u043f\u043f\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0412\u041c +message.select.security.groups=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u0440\u0443\u043f\u043f\u0443(\u044b) \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0412\u041c message.select.template=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0412\u041c message.setup.physical.network.during.zone.creation.basic=\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0437\u043e\u043d\u0443, \u0432\u044b \u043c\u043e\u0436\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u0435\u0442 NIC \u043d\u0430 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440. \u0421\u0435\u0442\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430.

\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c drag and drop \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0435\u0442\u0438. message.setup.physical.network.during.zone.creation=\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u043e\u043d\u044b, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0435\u0442\u0435\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0435\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430. \u041a\u0430\u043a\u0436\u0434\u0430\u044f \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0435\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0432\u0438\u0434\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430.

\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0442\u0438. message.setup.successful=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0431\u043b\u0430\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430\! -message.snapshot.schedule=\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u043d\u0438\u043c\u043e\u043a\u0438, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0438\u0436\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f message.specify.url=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 URL -message.step.1.continue=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u043b\u0438 ISO \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. -message.step.1.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437 ISO \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430. -message.step.2.continue=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. -message.step.3.continue=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. -message.step.4.continue=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0443 \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. -message.step.4.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0435\u0442\u044c, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0430. +message.step.1.continue=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u043b\u0438 ISO \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. +message.step.1.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0412\u0430\u0448\u0435\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u0412\u044b \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430 ISO. +message.step.2.continue=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u043b\u0443\u0433\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f +message.step.3.continue=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f +message.step.4.continue=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0443 \u0441\u0435\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f. +message.step.4.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0412\u0430\u0448\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430. message.storage.traffic=\u0422\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 CloudStack, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0443\u0437\u043b\u044b \u0438 CloudStack \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0412\u041c. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0442\u0440\u0430\u0444\u0438\u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0434\u0435\u0441\u044c. message.suspend.project=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442? -message.template.desc=\u041e\u0431\u0440\u0430\u0437 \u041e\u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439 \u0432 \u0412\u041c +message.template.desc=\u041e\u0431\u0440\u0430\u0437 \u041e\u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0439 \u0432 \u0412\u041c message.tooltip.dns.1=\u0418\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 DNS \u0434\u043b\u044f \u0412\u041c \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. message.tooltip.dns.2=\u0418\u043c\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 DNS \u0434\u043b\u044f \u0412\u041c \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. message.tooltip.internal.dns.1=\u0418\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 DNS \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0412\u041c CloudStack \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. \u0427\u0430\u0441\u0442\u043d\u044b\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0442\u0435\u043d\u0434\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. @@ -1503,22 +1585,22 @@ message.tooltip.pod.name=\u0418\u043c\u044f \u0434\u043b\u044f \u0441\u0442\u043 message.tooltip.reserved.system.gateway=\u0428\u043b\u044e\u0437 \u0434\u043b\u044f \u0443\u0437\u043b\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 message.tooltip.reserved.system.netmask=\u041f\u0440\u0435\u0444\u0438\u043a\u0441 \u0441\u0435\u0442\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u044c \u0441\u0442\u0435\u043d\u0434\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 CIDR. message.tooltip.zone.name=\u0418\u043c\u044f \u0434\u043b\u044f \u0437\u043e\u043d\u044b -message.update.os.preference=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u041e\u0421 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430. \u0412\u0441\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e. +message.update.os.preference=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u041e\u0421 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u041e\u0421 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. message.update.resource.count=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. -message.update.ssl=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 X.509 SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\: +message.update.ssl=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 X.509 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0445 \u0437\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\: message.validate.instance.name=\u0418\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u0438\u043d\u0435\u0435 63 \u0441\u0438\u043c\u0432\u043e\u043b\u0430. \u0422\u043e\u043b\u044c\u043a\u043e ASCII, \u0431\u0443\u043a\u0432\u044b a~z, A~Z, \u0446\u044b\u0444\u0440\u044b 0~9, \u0434\u0435\u0444\u0438\u0441 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f. \u0414\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u0431\u0443\u043a\u0432\u044b \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u043a\u0432\u043e\u0439 \u0438\u043b\u0438 \u0446\u0438\u0444\u0440\u043e\u0439. message.validate.invalid.characters=\u041d\u0430\u0439\u0434\u0435\u043d\u044b \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b; \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435. -message.virtual.network.desc=\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0428\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 VLAN \u0438 \u0432\u0435\u0441\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0442\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. -message.vm.create.template.confirm=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0412\u041c +message.virtual.network.desc=\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0412\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c. \u0428\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0412\u0430\u0448\u0435\u0433\u043e VLAN \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. +message.vm.create.template.confirm=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432\u0438\u0440\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b message.vm.review.launch=\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044c\u0442\u0435\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. message.volume.create.template.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043c\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0442\u043e\u043c\u0430. message.you.must.have.at.least.one.physical.network=\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0443 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c message.Zone.creation.complete=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043e\u043d\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e message.zone.creation.complete.would.you.like.to.enable.this.zone=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043e\u043d\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e. \u0425\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u043e\u043d\u0443? message.zone.no.network.selection=\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u0435\u0442\u0438. -message.zone.step.1.desc=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043f \u0441\u0435\u0442\u0438 \u044d\u0442\u043e\u0439 \u0437\u043e\u043d\u044b. -message.zone.step.2.desc=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u043e\u043d\u044b -message.zone.step.3.desc=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 +message.zone.step.1.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0412\u0430\u0448\u0435\u0439 \u0437\u043e\u043d\u044b. +message.zone.step.2.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043e\u043d\u044b +message.zone.step.3.desc=\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0421\u0442\u0435\u043d\u0434\u0430 mode=\u0420\u0435\u0436\u0438\u043c network.rate=\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0435\u0442\u0438 notification.reboot.instance=\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0443 @@ -1535,11 +1617,12 @@ state.Completed=\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e state.Creating=\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f state.Declined=\u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u043e state.Destroyed=\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043e +state.detached=\u041e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043e state.Disabled=\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e state.Enabled=\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e state.Error=\u041e\u0448\u0438\u0431\u043a\u0430 state.Expunging=\u0423\u0434\u0430\u043b\u0451\u043d -state.Migrating=\u041c\u0438\u0433\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 +state.Migrating=\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f state.Pending=\u041e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f state.Ready=\u0413\u043e\u0442\u043e\u0432 state.Running=\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties index 69e9b00d65d..b5102069301 100644 --- a/client/WEB-INF/classes/resources/messages_zh_CN.properties +++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties @@ -14,63 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -label.add.ldap.account=\u6dfb\u52a0 LDAP \u5e10\u6237 -label.vm.ip=VM IP \u5730\u5740 -message.listView.subselect.multi=(\u6309\u4f4f Ctrl/Cmd \u5e76\u5355\u51fb) -label.use.vm.ips=\u4f7f\u7528 VM IP -label.reinstall.vm=\u91cd\u65b0\u5b89\u88c5 VM -message.reinstall.vm=\u6ce8\u610f\: \u8bf7\u8c28\u614e\u64cd\u4f5c\u3002\u8fd9\u5c06\u5bfc\u81f4\u4ece\u6a21\u677f\u91cd\u65b0\u5b89\u88c5 VM\uff0c\u5e76\u4e14\u5f15\u5bfc\u78c1\u76d8\u4e0a\u5b58\u50a8\u7684\u6570\u636e\u5c06\u4e22\u5931\u3002\u989d\u5916\u7684\u6570\u636e\u5377(\u5982\u679c\u5b58\u5728)\u5c06\u65e0\u6cd5\u8bbf\u95ee\u3002 -label.recover.vm=\u6062\u590d VM -message.recover.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6062\u590d\u6b64 VM\u3002 -label.port=\u7aef\u53e3 -label.remove.ldap=\u5220\u9664 LDAP -label.configure.ldap=\u914d\u7f6e LDAP -label.ldap.configuration=LDAP \u914d\u7f6e -label.ldap.port=LDAP \u7aef\u53e3 -label.create.nfs.secondary.staging.store=\u521b\u5efa NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 -label.volatile=\u53ef\u53d8 -label.planner.mode=\u89c4\u5212\u5668\u6a21\u5f0f -label.deployment.planner=\u90e8\u7f72\u89c4\u5212\u5668 -label.quiesce.vm=\u9759\u9ed8 VM -label.smb.username=SMB \u7528\u6237\u540d -label.smb.password=SMB \u5bc6\u7801 -label.smb.domain=SMB \u57df -label.hypervisors=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f -label.home=\u9996\u9875 -label.sockets=CPU \u63d2\u69fd -label.root.disk.size=\u6839\u78c1\u76d8\u5927\u5c0f -label.s3.nfs.server=S3 NFS \u670d\u52a1\u5668 -label.s3.nfs.path=S3 NFS \u8def\u5f84 -label.delete.events=\u5220\u9664\u4e8b\u4ef6 -label.delete.alerts=\u5220\u9664\u8b66\u62a5 -label.archive.alerts=\u5b58\u6863\u8b66\u62a5 -label.archive.events=\u5b58\u6863\u4e8b\u4ef6 -label.by.alert.type=\u6309\u8b66\u62a5\u7c7b\u578b -label.by.event.type=\u6309\u4e8b\u4ef6\u7c7b\u578b -label.by.date.start=\u6309\u65e5\u671f(\u5f00\u59cb\u65e5\u671f) -label.by.date.end=\u6309\u65e5\u671f(\u7ed3\u675f\u65e5\u671f) -label.switch.type=\u4ea4\u6362\u673a\u7c7b\u578b -label.service.state=\u670d\u52a1\u72b6\u6001 -label.egress.default.policy=\u51fa\u53e3\u9ed8\u8ba4\u7b56\u7565 -label.routing=\u6b63\u5728\u8def\u7531 -label.hvm=HVM -label.about=\u5173\u4e8e -label.app.name=CloudStack -label.about.app=\u5173\u4e8e CloudStack -label.custom.disk.iops=\u81ea\u5b9a\u4e49 IOPS -label.disk.iops.min=\u6700\u5c0f IOPS -label.disk.iops.max=\u6700\u5927 IOPS -label.disk.iops.total=\u603b IOPS -label.hypervisor.snapshot.reserve=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5feb\u7167\u9884\u7559 -label.secondary.ips=\u4e8c\u7ea7 IP -label.edit.secondary.ips=\u7f16\u8f91\u4e8c\u7ea7 IP -label.view.secondary.ips=\u67e5\u770b\u4e8c\u7ea7 IP -message.validate.invalid.characters=\u67e5\u627e\u5230\u65e0\u6548\u5b57\u7b26\uff0c\u8bf7\u66f4\u6b63\u3002 -message.acquire.ip.nic=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u83b7\u53d6\u6b64 NIC \u7684\u65b0\u4e8c\u7ea7 IP\u3002
\u6ce8\u610f\: \u60a8\u9700\u8981\u5728\u865a\u62df\u673a\u5185\u90e8\u624b\u52a8\u914d\u7f6e\u65b0\u83b7\u53d6\u7684\u4e8c\u7ea7 IP\u3002 -message.select.affinity.groups=\u8bf7\u9009\u62e9\u60a8\u5e0c\u671b\u6b64 VM \u6240\u5c5e\u7684\u4efb\u4f55\u5173\u8054\u6027\u7ec4\: -message.no.affinity.groups=\u60a8\u6ca1\u6709\u4efb\u4f55\u5173\u8054\u6027\u7ec4\u3002\u8bf7\u7ee7\u7eed\u6267\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c\u3002 -label.action.delete.nic=\u79fb\u9664 NIC -message.action.delete.nic=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u79fb\u9664\u6b64 NIC\uff0c\u6b64\u64cd\u4f5c\u8fd8\u5c06\u4ece VM \u4e2d\u79fb\u9664\u5173\u8054\u7684\u7f51\u7edc\u3002 + changed.item.properties=\u66f4\u6539\u9879\u76ee\u5c5e\u6027 confirm.enable.s3=\u8bf7\u586b\u5199\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u542f\u7528\u5bf9 S3 \u652f\u6301\u7684\u4e8c\u7ea7\u5b58\u50a8\u7684\u652f\u6301 confirm.enable.swift=\u8bf7\u586b\u5199\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u542f\u7528\u5bf9 SWIFT \u7684\u652f\u6301 @@ -87,7 +31,6 @@ error.session.expired=\u60a8\u7684\u4f1a\u8bdd\u5df2\u8fc7\u671f\u3002 error.something.went.wrong.please.correct.the.following=\u51fa\u73b0\u95ee\u9898\uff1b\u8bf7\u66f4\u6b63\u4ee5\u4e0b\u5404\u9879 error.unable.to.reach.management.server=\u65e0\u6cd5\u8bbf\u95ee\u7ba1\u7406\u670d\u52a1\u5668 error.unresolved.internet.name=\u65e0\u6cd5\u89e3\u6790\u60a8\u7684 Internet \u540d\u79f0\u3002 -label.extractable=\u53ef\u63d0\u53d6 force.delete.domain.warning=\u8b66\u544a\: \u9009\u62e9\u6b64\u9009\u9879\u5c06\u5bfc\u81f4\u5220\u9664\u6240\u6709\u5b50\u57df\u4ee5\u53ca\u6240\u6709\u76f8\u5173\u8054\u7684\u5e10\u6237\u53ca\u5176\u8d44\u6e90\u3002 force.delete=\u5f3a\u5236\u5220\u9664 force.remove.host.warning=\u8b66\u544a\: \u9009\u62e9\u6b64\u9009\u9879\u5c06\u5bfc\u81f4 CloudStack \u5728\u4ece\u7fa4\u96c6\u4e2d\u79fb\u9664\u6b64\u4e3b\u673a\u4e4b\u524d\uff0c\u5f3a\u5236\u505c\u6b62\u6240\u6709\u6b63\u5728\u8fd0\u884c\u7684\u865a\u62df\u673a\u3002 @@ -99,13 +42,20 @@ ICMP.type=ICMP \u7c7b\u578b image.directory=\u56fe\u7247\u76ee\u5f55 inline=\u5185\u8054 instances.actions.reboot.label=\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b +label.about.app=\u5173\u4e8e CloudStack +label.about=\u5173\u4e8e label.accept.project.invitation=\u63a5\u53d7\u9879\u76ee\u9080\u8bf7 label.account.and.security.group=\u5e10\u6237\u3001\u5b89\u5168\u7ec4 label.account.id=\u5e10\u6237 ID +label.account.lower=\u5e10\u6237 label.account.name=\u5e10\u6237\u540d\u79f0 label.account.specific=\u5e10\u6237\u4e13\u7528 -label.account=\u5e10\u6237 label.accounts=\u5e10\u6237 +label.account=\u5e10\u6237 +label.acl=ACL +label.acl.id=ACL ID +label.acl.name=ACL \u540d\u79f0 +label.acl.replaced=ACL \u5df2\u66ff\u6362 label.acquire.new.ip=\u83b7\u53d6\u65b0 IP label.acquire.new.secondary.ip=\u83b7\u53d6\u65b0\u4e8c\u7ea7 IP label.action.attach.disk.processing=\u6b63\u5728\u9644\u52a0\u78c1\u76d8... @@ -117,9 +67,7 @@ label.action.cancel.maintenance.mode=\u53d6\u6d88\u7ef4\u62a4\u6a21\u5f0f label.action.change.password=\u66f4\u6539\u5bc6\u7801 label.action.change.service.processing=\u6b63\u5728\u66f4\u6539\u670d\u52a1... label.action.change.service=\u66f4\u6539\u670d\u52a1 -label.action.copy.ISO.processing=\u6b63\u5728\u590d\u5236 ISO... label.action.copy.ISO=\u590d\u5236 ISO -label.action.copy.template.processing=\u6b63\u5728\u590d\u5236\u6a21\u677f... label.action.copy.template=\u590d\u5236\u6a21\u677f label.action.create.template.from.vm=\u57fa\u4e8e VM \u521b\u5efa\u6a21\u677f label.action.create.template.from.volume=\u57fa\u4e8e\u5377\u521b\u5efa\u6a21\u677f @@ -150,6 +98,7 @@ label.action.delete.load.balancer=\u5220\u9664\u8d1f\u8f7d\u5e73\u8861\u5668\u89 label.action.delete.network.processing=\u6b63\u5728\u5220\u9664\u7f51\u7edc... label.action.delete.network=\u5220\u9664\u7f51\u7edc label.action.delete.nexusVswitch=\u5220\u9664 Nexus 1000v +label.action.delete.nic=\u79fb\u9664 NIC label.action.delete.physical.network=\u5220\u9664\u7269\u7406\u7f51\u7edc label.action.delete.pod.processing=\u6b63\u5728\u5220\u9664\u63d0\u4f9b\u70b9... label.action.delete.pod=\u5220\u9664\u63d0\u4f9b\u70b9 @@ -231,8 +180,8 @@ label.action.enable.user.processing=\u6b63\u5728\u542f\u7528\u7528\u6237... label.action.enable.user=\u542f\u7528\u7528\u6237 label.action.enable.zone.processing=\u6b63\u5728\u542f\u7528\u8d44\u6e90\u57df... label.action.enable.zone=\u542f\u7528\u8d44\u6e90\u57df -label.action.expunge.instance=\u5220\u9664\u5b9e\u4f8b label.action.expunge.instance.processing=\u6b63\u5728\u5220\u9664\u5b9e\u4f8b... +label.action.expunge.instance=\u5220\u9664\u5b9e\u4f8b label.action.force.reconnect.processing=\u6b63\u5728\u91cd\u65b0\u8fde\u63a5... label.action.force.reconnect=\u5f3a\u5236\u91cd\u65b0\u8fde\u63a5 label.action.generate.keys.processing=\u6b63\u5728\u751f\u6210\u5bc6\u94a5... @@ -256,7 +205,6 @@ label.action.reboot.systemvm.processing=\u6b63\u5728\u91cd\u65b0\u542f\u52a8\u7c label.action.reboot.systemvm=\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf VM label.action.recurring.snapshot=\u91cd\u73b0\u5feb\u7167 label.action.register.iso=\u6ce8\u518c ISO -label.action.register.template=\u6ce8\u518c\u6a21\u677f label.action.release.ip.processing=\u6b63\u5728\u91ca\u653e IP... label.action.release.ip=\u91ca\u653e IP label.action.remove.host.processing=\u6b63\u5728\u5220\u9664\u4e3b\u673a... @@ -268,6 +216,8 @@ label.action.resize.volume=\u8c03\u6574\u5377\u5927\u5c0f label.action.resource.limits=\u8d44\u6e90\u9650\u5236 label.action.restore.instance.processing=\u6b63\u5728\u8fd8\u539f\u5b9e\u4f8b... label.action.restore.instance=\u8fd8\u539f\u5b9e\u4f8b +label.action.revert.snapshot.processing=\u6b63\u5728\u8fd8\u539f\u5230\u5feb\u7167... +label.action.revert.snapshot=\u8fd8\u539f\u5230\u5feb\u7167 label.action.start.instance.processing=\u6b63\u5728\u542f\u52a8\u5b9e\u4f8b... label.action.start.instance=\u542f\u52a8\u5b9e\u4f8b label.action.start.router.processing=\u6b63\u5728\u542f\u52a8\u8def\u7531\u5668... @@ -280,10 +230,10 @@ label.action.stop.router.processing=\u6b63\u5728\u505c\u6b62\u8def\u7531\u5668.. label.action.stop.router=\u505c\u6b62\u8def\u7531\u5668 label.action.stop.systemvm.processing=\u6b63\u5728\u505c\u6b62\u7cfb\u7edf VM... label.action.stop.systemvm=\u505c\u6b62\u7cfb\u7edf VM +label.actions=\u64cd\u4f5c label.action.take.snapshot.processing=\u6b63\u5728\u521b\u5efa\u5feb\u7167... label.action.take.snapshot=\u521b\u5efa\u5feb\u7167 -label.action.revert.snapshot.processing=\u6b63\u5728\u8fd8\u539f\u5230\u5feb\u7167... -label.action.revert.snapshot=\u8fd8\u539f\u5230\u5feb\u7167 +label.action=\u64cd\u4f5c label.action.unmanage.cluster.processing=\u6b63\u5728\u53d6\u6d88\u6258\u7ba1\u7fa4\u96c6... label.action.unmanage.cluster=\u53d6\u6d88\u6258\u7ba1\u7fa4\u96c6 label.action.update.OS.preference.processing=\u6b63\u5728\u66f4\u65b0\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879... @@ -293,36 +243,55 @@ label.action.update.resource.count=\u66f4\u65b0\u8d44\u6e90\u6570\u91cf label.action.vmsnapshot.create=\u521b\u5efa VM \u5feb\u7167 label.action.vmsnapshot.delete=\u5220\u9664 VM \u5feb\u7167 label.action.vmsnapshot.revert=\u8fd8\u539f\u5230 VM \u5feb\u7167 -label.actions=\u64cd\u4f5c label.activate.project=\u6fc0\u6d3b\u9879\u76ee label.active.sessions=\u6d3b\u52a8\u4f1a\u8bdd -label.add.account.to.project=\u5411\u9879\u76ee\u4e2d\u6dfb\u52a0\u5e10\u6237 -label.add.account=\u6dfb\u52a0\u5e10\u6237 label.add.accounts.to=\u6dfb\u52a0\u5e10\u6237\u81f3 label.add.accounts=\u6dfb\u52a0\u5e10\u6237 +label.add.account.to.project=\u5411\u9879\u76ee\u4e2d\u6dfb\u52a0\u5e10\u6237 +label.add.account=\u6dfb\u52a0\u5e10\u6237 +label.add.acl.list=\u6dfb\u52a0 ACL \u5217\u8868 label.add.ACL=\u6dfb\u52a0 ACL label.add.affinity.group=\u6dfb\u52a0\u65b0\u5173\u8054\u6027\u7ec4 -label.add.BigSwitchBcf.device=\u6dfb\u52a0 BigSwitch BCF \u63a7\u5236\u5668 +label.add.baremetal.dhcp.device=\u6dfb\u52a0\u88f8\u673a DHCP \u8bbe\u5907 +label.add.BrocadeVcs.device=\u6dfb\u52a0 Brocade Vcs \u4ea4\u6362\u673a label.add.by.cidr=\u6309 CIDR \u6dfb\u52a0 label.add.by.group=\u6309\u7ec4\u6dfb\u52a0 label.add.by=\u6dfb\u52a0\u65b9\u5f0f +label.add.ciscoASA1000v=\u6dfb\u52a0 CiscoASA1000v \u8d44\u6e90 label.add.cluster=\u6dfb\u52a0\u7fa4\u96c6 label.add.compute.offering=\u6dfb\u52a0\u8ba1\u7b97\u65b9\u6848 label.add.direct.iprange=\u6dfb\u52a0\u76f4\u63a5 IP \u8303\u56f4 label.add.disk.offering=\u6dfb\u52a0\u78c1\u76d8\u65b9\u6848 label.add.domain=\u6dfb\u52a0\u57df +label.added.brocade.vcs.switch=\u5df2\u6dfb\u52a0\u65b0 Brocade Vcs \u4ea4\u6362\u673a +label.added.network.offering=\u5df2\u6dfb\u52a0\u7f51\u7edc\u65b9\u6848 +label.added.nicira.nvp.controller=\u5df2\u6dfb\u52a0\u65b0 Nicira NVP \u63a7\u5236\u5668 label.add.egress.rule=\u6dfb\u52a0\u51fa\u53e3\u89c4\u5219 +label.addes.new.f5=\u5df2\u6dfb\u52a0\u65b0 F5 label.add.F5.device=\u6dfb\u52a0 F5 \u8bbe\u5907 label.add.firewall=\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219 +label.add.gslb=\u6dfb\u52a0 GSLB label.add.guest.network=\u6dfb\u52a0\u6765\u5bbe\u7f51\u7edc -label.add.isolated.guest.network=\u6dfb\u52a0\u9694\u79bb\u7684\u6765\u5bbe\u7f51\u7edc label.add.host=\u6dfb\u52a0\u4e3b\u673a +label.adding.cluster=\u6b63\u5728\u6dfb\u52a0\u7fa4\u96c6 +label.adding.failed=\u6dfb\u52a0\u5931\u8d25 +label.adding.pod=\u6b63\u5728\u6dfb\u52a0\u63d0\u4f9b\u70b9 +label.adding.processing=\u6b63\u5728\u6dfb\u52a0... label.add.ingress.rule=\u6dfb\u52a0\u5165\u53e3\u89c4\u5219 +label.adding.succeeded=\u5df2\u6210\u529f\u6dfb\u52a0 +label.adding=\u6b63\u5728\u6dfb\u52a0 +label.adding.user=\u6b63\u5728\u6dfb\u52a0\u7528\u6237 +label.adding.zone=\u6b63\u5728\u6dfb\u52a0\u8d44\u6e90\u57df label.add.intermediate.certificate=\u6dfb\u52a0\u4e2d\u95f4\u8bc1\u4e66 +label.add.internal.lb=\u6dfb\u52a0\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 label.add.ip.range=\u6dfb\u52a0 IP \u8303\u56f4 +label.add.isolated.network=\u6dfb\u52a0\u9694\u79bb\u7f51\u7edc +label.additional.networks=\u5176\u4ed6\u7f51\u7edc +label.add.list.name=ACL \u5217\u8868\u540d\u79f0 label.add.load.balancer=\u6dfb\u52a0\u8d1f\u8f7d\u5e73\u8861\u5668 label.add.more=\u6dfb\u52a0\u66f4\u591a label.add.netScaler.device=\u6dfb\u52a0 Netscaler \u8bbe\u5907 +label.add.network.acl.list=\u6dfb\u52a0\u7f51\u7edc ACL \u5217\u8868 label.add.network.ACL=\u6dfb\u52a0\u7f51\u7edc ACL label.add.network.device=\u6dfb\u52a0\u7f51\u7edc\u8bbe\u5907 label.add.network.offering=\u6dfb\u52a0\u7f51\u7edc\u65b9\u6848 @@ -330,14 +299,17 @@ label.add.network=\u6dfb\u52a0\u7f51\u7edc label.add.new.F5=\u6dfb\u52a0\u65b0 F5 label.add.new.gateway=\u6dfb\u52a0\u65b0\u7f51\u5173 label.add.new.NetScaler=\u6dfb\u52a0\u65b0 NetScaler -label.add.new.SRX=\u6dfb\u52a0\u65b0 SRX label.add.new.PA=\u6dfb\u52a0\u65b0 Palo Alto +label.add.new.SRX=\u6dfb\u52a0\u65b0 SRX label.add.new.tier=\u6dfb\u52a0\u65b0\u5c42 +label.add.nfs.secondary.staging.store=\u6dfb\u52a0 NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 label.add.NiciraNvp.device=\u6dfb\u52a0 Nvp \u63a7\u5236\u5668 label.add.NuageVsp.device=\u6dfb\u52a0 Nuage \u865a\u62df\u670d\u52a1\u76ee\u5f55(VSD) -label.add.BrocadeVcs.device=\u6dfb\u52a0 Brocade Vcs \u4ea4\u6362\u673a +label.add.OpenDaylight.device=\u6dfb\u52a0 OpenDaylight \u63a7\u5236\u5668 +label.add.PA.device=\u6dfb\u52a0 Palo Alto \u8bbe\u5907 label.add.physical.network=\u6dfb\u52a0\u7269\u7406\u7f51\u7edc label.add.pod=\u6dfb\u52a0\u63d0\u4f9b\u70b9 +label.add.portable.ip.range=\u6dfb\u52a0\u53ef\u79fb\u690d IP \u8303\u56f4 label.add.port.forwarding.rule=\u6dfb\u52a0\u7aef\u53e3\u8f6c\u53d1\u89c4\u5219 label.add.primary.storage=\u6dfb\u52a0\u4e3b\u5b58\u50a8 label.add.region=\u6dfb\u52a0\u5730\u7406\u533a\u57df @@ -348,204 +320,267 @@ label.add.secondary.storage=\u6dfb\u52a0\u4e8c\u7ea7\u5b58\u50a8 label.add.security.group=\u6dfb\u52a0\u5b89\u5168\u7ec4 label.add.service.offering=\u6dfb\u52a0\u670d\u52a1\u65b9\u6848 label.add.SRX.device=\u6dfb\u52a0 SRX \u8bbe\u5907 -label.add.PA.device=\u6dfb\u52a0 Palo Alto \u8bbe\u5907 label.add.static.nat.rule=\u6dfb\u52a0\u9759\u6001 NAT \u89c4\u5219 label.add.static.route=\u6dfb\u52a0\u9759\u6001\u8def\u7531 label.add.system.service.offering=\u6dfb\u52a0\u7cfb\u7edf\u670d\u52a1\u65b9\u6848 label.add.template=\u6dfb\u52a0\u6a21\u677f label.add.to.group=\u6dfb\u52a0\u5230\u7ec4 -label.add.user=\u6dfb\u52a0\u7528\u6237 +label.add=\u6dfb\u52a0 +label.add.ucs.manager=\u6dfb\u52a0 UCS \u7ba1\u7406\u5668 label.add.userdata=\u7528\u6237\u6570\u636e +label.add.user=\u6dfb\u52a0\u7528\u6237 label.add.vlan=\u6dfb\u52a0 VLAN -label.add.vxlan=\u6dfb\u52a0 VXLAN -label.add.VM.to.tier=\u5411\u5c42\u4e2d\u6dfb\u52a0 VM -label.add.vm=\u6dfb\u52a0 VM label.add.vms.to.lb=\u5411\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219\u4e2d\u6dfb\u52a0 VM label.add.vms=\u6dfb\u52a0 VM +label.add.VM.to.tier=\u5411\u5c42\u4e2d\u6dfb\u52a0 VM +label.add.vm=\u6dfb\u52a0 VM +label.add.vmware.datacenter=\u6dfb\u52a0 VMware \u6570\u636e\u4e2d\u5fc3 +label.add.vnmc.device=\u6dfb\u52a0 VNMC \u8bbe\u5907 +label.add.vnmc.provider=\u6dfb\u52a0 VNMC \u63d0\u4f9b\u7a0b\u5e8f label.add.volume=\u6dfb\u52a0\u5377 +label.add.vpc.offering=\u6dfb\u52a0 VPC \u65b9\u6848 label.add.vpc=\u6dfb\u52a0 VPC label.add.vpn.customer.gateway=\u6dfb\u52a0 VPN \u5ba2\u6237\u7f51\u5173 label.add.VPN.gateway=\u6dfb\u52a0 VPN \u7f51\u5173 label.add.vpn.user=\u6dfb\u52a0 VPN \u7528\u6237 +label.add.vxlan=\u6dfb\u52a0 VXLAN label.add.zone=\u6dfb\u52a0\u8d44\u6e90\u57df -label.add=\u6dfb\u52a0 -label.adding.cluster=\u6b63\u5728\u6dfb\u52a0\u7fa4\u96c6 -label.adding.failed=\u6dfb\u52a0\u5931\u8d25 -label.adding.pod=\u6b63\u5728\u6dfb\u52a0\u63d0\u4f9b\u70b9 -label.adding.processing=\u6b63\u5728\u6dfb\u52a0... -label.adding.succeeded=\u5df2\u6210\u529f\u6dfb\u52a0 -label.adding.user=\u6b63\u5728\u6dfb\u52a0\u7528\u6237 -label.adding.zone=\u6b63\u5728\u6dfb\u52a0\u8d44\u6e90\u57df -label.adding=\u6b63\u5728\u6dfb\u52a0 -label.additional.networks=\u5176\u4ed6\u7f51\u7edc label.admin.accounts=\u7ba1\u7406\u5458\u5e10\u6237 label.admin=\u7ba1\u7406\u5458 label.advanced.mode=\u9ad8\u7ea7\u6a21\u5f0f label.advanced.search=\u9ad8\u7ea7\u641c\u7d22 label.advanced=\u9ad8\u7ea7 -label.affinity.group=\u5173\u8054\u6027\u7ec4 label.affinity.groups=\u5173\u8054\u6027\u7ec4 +label.affinity.group=\u5173\u8054\u6027\u7ec4 label.affinity=\u5173\u8054\u6027 label.agent.password=\u4ee3\u7406\u5bc6\u7801 -label.agent.port=\u4ee3\u7406\u7aef\u53e3 +label.agent.state=\u4ee3\u7406\u72b6\u6001 label.agent.username=\u4ee3\u7406\u7528\u6237\u540d label.agree=\u540c\u610f +label.alert.archived=\u8b66\u62a5\u5df2\u5b58\u6863 +label.alert.deleted=\u8b66\u62a5\u5df2\u5220\u9664 +label.alert.details=\u8b66\u62a5\u8be6\u7ec6\u4fe1\u606f label.alert=\u8b66\u62a5 label.algorithm=\u7b97\u6cd5 label.allocated=\u5df2\u5206\u914d label.allocation.state=\u5206\u914d\u72b6\u6001 -label.anti.affinity.group=\u53cd\u5173\u8054\u6027\u7ec4 +label.allow=\u5141\u8bb8 label.anti.affinity.groups=\u53cd\u5173\u8054\u6027\u7ec4 +label.anti.affinity.group=\u53cd\u5173\u8054\u6027\u7ec4 label.anti.affinity=\u53cd\u5173\u8054\u6027 label.api.key=API \u5bc6\u94a5 label.api.version=API \u7248\u672c label.apply=\u5e94\u7528 +label.app.name=CloudStack +label.archive.alerts=\u5b58\u6863\u8b66\u62a5 +label.archive.events=\u5b58\u6863\u4e8b\u4ef6 +label.archive=\u5b58\u6863 +label.assigned.vms=\u5df2\u5206\u914d\u7684 VM +label.assign.instance.another=\u5c06\u5b9e\u4f8b\u5206\u914d\u7ed9\u5176\u4ed6\u5e10\u6237 label.assign.to.load.balancer=\u6b63\u5728\u5c06\u5b9e\u4f8b\u5206\u914d\u7ed9\u8d1f\u8f7d\u5e73\u8861\u5668 label.assign=\u5206\u914d label.associated.network.id=\u5df2\u5173\u8054\u7f51\u7edc ID label.associated.network=\u5173\u8054\u7f51\u7edc +label.associated.profile=\u5df2\u5173\u8054\u914d\u7f6e\u6587\u4ef6 +label.associate.public.ip=\u5173\u8054\u516c\u7528 IP label.attached.iso=\u5df2\u9644\u52a0 ISO label.author.email=\u4f5c\u8005\u7535\u5b50\u90ae\u4ef6 label.author.name=\u4f5c\u8005\u59d3\u540d -label.availability.zone=\u53ef\u7528\u8d44\u6e90\u57df +label.autoscale=\u81ea\u52a8\u6269\u5c55 label.availability=\u53ef\u7528\u6027 +label.availability.zone=\u53ef\u7528\u8d44\u6e90\u57df label.available.public.ips=\u53ef\u7528\u516c\u7528 IP \u5730\u5740 label.available=\u53ef\u7528 label.back=\u540e\u9000 label.bandwidth=\u5e26\u5bbd +label.baremetal.dhcp.devices=\u88f8\u673a DHCP \u8bbe\u5907 +label.baremetal.dhcp.provider=\u88f8\u673a DHCP \u63d0\u4f9b\u7a0b\u5e8f +label.baremetal.pxe.devices=\u88f8\u673a PXE \u8bbe\u5907 +label.baremetal.pxe.device=\u6dfb\u52a0\u88f8\u673a PXE \u8bbe\u5907 +label.baremetal.pxe.provider=\u88f8\u673a PXE \u63d0\u4f9b\u7a0b\u5e8f label.basic.mode=\u57fa\u672c\u6a21\u5f0f label.basic=\u57fa\u672c -label.bigswitch.controller.address=BigSwitch Vns \u63a7\u5236\u5668\u5730\u5740 +label.blade.id=\u5200\u7247\u5f0f\u670d\u52a1\u5668 ID +label.blades=\u5200\u7247\u5f0f\u670d\u52a1\u5668 label.bootable=\u53ef\u542f\u52a8 label.broadcast.domain.range=\u5e7f\u64ad\u57df\u8303\u56f4 label.broadcast.domain.type=\u5e7f\u64ad\u57df\u7c7b\u578b label.broadcast.uri=\u5e7f\u64ad URI +label.broadcasturi=\u5e7f\u64ad URI +label.broadcat.uri=\u5e7f\u64ad URI +label.brocade.vcs.address=Vcs \u4ea4\u6362\u673a\u5730\u5740 +label.brocade.vcs.details=Brocade Vcs \u4ea4\u6362\u673a\u8be6\u7ec6\u4fe1\u606f label.by.account=\u6309\u5e10\u6237 +label.by.alert.type=\u6309\u8b66\u62a5\u7c7b\u578b label.by.availability=\u6309\u53ef\u7528\u6027 +label.by.date.end=\u6309\u65e5\u671f(\u7ed3\u675f\u65e5\u671f) +label.by.date.start=\u6309\u65e5\u671f(\u5f00\u59cb\u65e5\u671f) label.by.domain=\u6309\u57df label.by.end.date=\u6309\u7ed3\u675f\u65e5\u671f +label.by.event.type=\u6309\u4e8b\u4ef6\u7c7b\u578b label.by.level=\u6309\u7ea7\u522b label.by.pod=\u6309\u63d0\u4f9b\u70b9 label.by.role=\u6309\u89d2\u8272 label.by.start.date=\u6309\u5f00\u59cb\u65e5\u671f label.by.state=\u6309\u72b6\u6001 +label.bytes.received=\u63a5\u6536\u7684\u5b57\u8282\u6570 +label.bytes.sent=\u53d1\u9001\u7684\u5b57\u8282\u6570 label.by.traffic.type=\u6309\u6d41\u91cf\u7c7b\u578b label.by.type.id=\u6309\u7c7b\u578b ID label.by.type=\u6309\u7c7b\u578b label.by.zone=\u6309\u8d44\u6e90\u57df -label.bytes.received=\u63a5\u6536\u7684\u5b57\u8282\u6570 -label.bytes.sent=\u53d1\u9001\u7684\u5b57\u8282\u6570 +label.cache.mode=\u5199\u5165\u7f13\u5b58\u7c7b\u578b label.cancel=\u53d6\u6d88 -label.capacity=\u5bb9\u91cf label.capacity.bytes=\u5bb9\u91cf(\u5b57\u8282) label.capacity.iops=\u5bb9\u91cf IOPS +label.capacity=\u5bb9\u91cf label.certificate=\u670d\u52a1\u5668\u8bc1\u4e66 +label.change.affinity=\u66f4\u6539\u5173\u8054\u6027 label.change.service.offering=\u66f4\u6539\u670d\u52a1\u65b9\u6848 label.change.value=\u66f4\u6539\u503c label.character=\u5b57\u7b26 -label.md5.checksum=MD5 \u6821\u9a8c\u548c +label.chassis=\u673a\u7bb1 label.cidr.account=CIDR \u6216\u5e10\u6237/\u5b89\u5168\u7ec4 +label.cidr=CIDR label.CIDR.list=CIDR \u5217\u8868 label.cidr.list=\u6e90 CIDR label.CIDR.of.destination.network=\u76ee\u7684\u5730\u7f51\u7edc\u7684 CIDR -label.cidr=CIDR +label.cisco.nexus1000v.ip.address=Nexus 1000v IP \u5730\u5740 +label.cisco.nexus1000v.password=Nexus 1000v \u5bc6\u7801 +label.cisco.nexus1000v.username=Nexus 1000v \u7528\u6237\u540d +label.ciscovnmc.resource.details=CiscoVNMC \u8d44\u6e90\u8be6\u7ec6\u4fe1\u606f label.clean.up=\u6e05\u7406 -label.make.redundant=\u8bbe\u4e3a\u5197\u4f59 label.clear.list=\u6e05\u9664\u5217\u8868 label.close=\u5173\u95ed label.cloud.console=\u4e91\u7ba1\u7406\u63a7\u5236\u53f0 label.cloud.managed=\u7531 Cloud.com \u7ba1\u7406 label.cluster.name=\u7fa4\u96c6\u540d\u79f0 +label.clusters=\u7fa4\u96c6 label.cluster.type=\u7fa4\u96c6\u7c7b\u578b label.cluster=\u7fa4\u96c6 -label.clusters=\u7fa4\u96c6 label.clvm=CLVM -label.rbd=RBD -label.rbd.monitor=Ceph \u76d1\u89c6\u5668 -label.rbd.pool=Ceph \u6c60 -label.rbd.id=Cephx \u7528\u6237 -label.rbd.secret=Cephx \u5bc6\u94a5 label.code=\u4ee3\u7801 label.community=\u793e\u533a label.compute.and.storage=\u8ba1\u7b97\u4e0e\u5b58\u50a8 -label.compute.offering=\u8ba1\u7b97\u65b9\u6848 label.compute.offerings=\u8ba1\u7b97\u65b9\u6848 +label.compute.offering=\u8ba1\u7b97\u65b9\u6848 label.compute=\u8ba1\u7b97 label.configuration=\u914d\u7f6e +label.configure.ldap=\u914d\u7f6e LDAP label.configure.network.ACLs=\u914d\u7f6e\u7f51\u7edc ACL -label.configure.vpc=\u914d\u7f6e VPC label.configure=\u914d\u7f6e -label.confirm.password=\u786e\u8ba4\u5bc6\u7801 +label.configure.vpc=\u914d\u7f6e VPC label.confirmation=\u786e\u8ba4 +label.confirm.password=\u786e\u8ba4\u5bc6\u7801 label.congratulations=\u795d\u8d3a\u60a8\! label.conserve.mode=\u4fdd\u62a4\u6a21\u5f0f label.console.proxy=\u63a7\u5236\u53f0\u4ee3\u7406 +label.console.proxy.vm=\u63a7\u5236\u53f0\u4ee3\u7406 VM label.continue.basic.install=\u7ee7\u7eed\u6267\u884c\u57fa\u672c\u5b89\u88c5 label.continue=\u7ee7\u7eed +label.copying.iso=\u6b63\u5728\u590d\u5236 ISO label.corrections.saved=\u5df2\u4fdd\u5b58\u4fee\u6b63 +label.counter=\u8ba1\u6570\u5668 label.cpu.allocated.for.VMs=\u5df2\u5206\u914d\u7ed9 VM \u7684 CPU label.cpu.allocated=\u5df2\u5206\u914d\u7684 CPU label.CPU.cap=CPU \u4e0a\u9650 +label.cpu=CPU label.cpu.limits=CPU \u9650\u5236 label.cpu.mhz=CPU (MHz) label.cpu.utilized=CPU \u5229\u7528\u7387 -label.cpu=CPU +label.created.by.system=\u7531\u7cfb\u7edf\u521b\u5efa +label.created=\u521b\u5efa\u65e5\u671f +label.create.nfs.secondary.staging.storage=\u521b\u5efa NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 +label.create.nfs.secondary.staging.store=\u521b\u5efa NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 label.create.project=\u521b\u5efa\u9879\u76ee label.create.template=\u521b\u5efa\u6a21\u677f label.create.VPN.connection=\u521b\u5efa VPN \u8fde\u63a5 -label.created.by.system=\u7531\u7cfb\u7edf\u521b\u5efa -label.created=\u521b\u5efa\u65e5\u671f label.cross.zones=\u8de8\u8d44\u6e90\u57df +label.custom.disk.iops=\u81ea\u5b9a\u4e49 IOPS label.custom.disk.size=\u81ea\u5b9a\u4e49\u78c1\u76d8\u5927\u5c0f +label.custom=\u81ea\u5b9a\u4e49 label.daily=\u6bcf\u5929 label.data.disk.offering=\u6570\u636e\u78c1\u76d8\u65b9\u6848 label.date=\u65e5\u671f label.day.of.month=\u65e5\u671f label.day.of.week=\u661f\u671f +label.dc.name=\u6570\u636e\u4e2d\u5fc3\u540d\u79f0 label.dead.peer.detection=\u5931\u6548\u5bf9\u7b49\u4f53\u68c0\u6d4b label.decline.invitation=\u62d2\u7edd\u9080\u8bf7 +label.dedicate.cluster=\u5c06\u7fa4\u96c6\u4e13\u7528 label.dedicated=\u4e13\u7528 +label.dedicated.vlan.vni.ranges=VLAN/VNI \u8303\u56f4\u5df2\u4e13\u7528 +label.dedicate.host=\u5c06\u4e3b\u673a\u4e13\u7528 +label.dedicate.pod=\u5c06\u63d0\u4f9b\u70b9\u4e13\u7528 +label.dedicate=\u4e13\u7528 +label.dedicate.vlan.vni.range=\u5c06 VLAN/VNI \u8303\u56f4\u4e13\u7528 +label.dedicate.zone=\u5c06\u8d44\u6e90\u57df\u4e13\u7528 +label.default.egress.policy=\u9ed8\u8ba4\u51fa\u53e3\u89c4\u5219 +label.default=\u9ed8\u8ba4\u8bbe\u7f6e label.default.use=\u9ed8\u8ba4\u4f7f\u7528 label.default.view=\u9ed8\u8ba4\u89c6\u56fe -label.default=\u9ed8\u8ba4\u8bbe\u7f6e +label.delete.acl.list=\u5220\u9664 ACL \u5217\u8868 label.delete.affinity.group=\u5220\u9664\u5173\u8054\u6027\u7ec4 -label.delete.BigSwitchBcf=\u5220\u9664 BigSwitch BCF \u63a7\u5236\u5668 +label.delete.alerts=\u5220\u9664\u8b66\u62a5 +label.delete.BrocadeVcs=\u5220\u9664 Brocade Vcs \u4ea4\u6362\u673a +label.delete.ciscoASA1000v=\u5220\u9664 CiscoASA1000v +label.delete.ciscovnmc.resource=\u5220\u9664 CiscoVNMC \u8d44\u6e90 +label.delete.events=\u5220\u9664\u4e8b\u4ef6 label.delete.F5=\u5220\u9664 F5 label.delete.gateway=\u5220\u9664\u7f51\u5173 +label.delete.internal.lb=\u5220\u9664\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 label.delete.NetScaler=\u5220\u9664 NetScaler label.delete.NiciraNvp=\u5220\u9664 Nvp \u63a7\u5236\u5668 label.delete.NuageVsp=\u5220\u9664 Nuage VSD -label.delete.BrocadeVcs=\u5220\u9664 Brocade Vcs \u4ea4\u6362\u673a -label.delete.project=\u5220\u9664\u9879\u76ee -label.delete.SRX=\u5220\u9664 SRX +label.delete.OpenDaylight.device=\u5220\u9664 OpenDaylight \u63a7\u5236\u5668 label.delete.PA=\u5220\u9664 Palo Alto +label.delete.portable.ip.range=\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4 +label.delete.profile=\u5220\u9664\u914d\u7f6e\u6587\u4ef6 +label.delete.project=\u5220\u9664\u9879\u76ee +label.delete.secondary.staging.store=\u5220\u9664\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 +label.delete.SRX=\u5220\u9664 SRX +label.delete=\u5220\u9664 +label.delete.ucs.manager=\u5220\u9664 UCS Manager label.delete.VPN.connection=\u5220\u9664 VPN \u8fde\u63a5 label.delete.VPN.customer.gateway=\u5220\u9664 VPN \u5ba2\u6237\u7f51\u5173 label.delete.VPN.gateway=\u5220\u9664 VPN \u7f51\u5173 label.delete.vpn.user=\u5220\u9664 VPN \u7528\u6237 -label.delete=\u5220\u9664 label.deleting.failed=\u5220\u9664\u5931\u8d25 label.deleting.processing=\u6b63\u5728\u5220\u9664... +label.deny=\u62d2\u7edd +label.deployment.planner=\u90e8\u7f72\u89c4\u5212\u5668 label.description=\u8bf4\u660e label.destination.physical.network.id=\u76ee\u6807\u7269\u7406\u7f51\u7edc ID label.destination.zone=\u76ee\u6807\u8d44\u6e90\u57df label.destroy.router=\u9500\u6bc1\u8def\u7531\u5668 label.destroy=\u9500\u6bc1 +label.destroy.vm.graceperiod=\u9500\u6bc1 VM \u5bbd\u9650\u671f label.detaching.disk=\u6b63\u5728\u53d6\u6d88\u9644\u52a0\u78c1\u76d8 label.details=\u8be6\u7ec6\u4fe1\u606f label.device.id=\u8bbe\u5907 ID label.devices=\u8bbe\u5907 -label.DHCP.server.type=DHCP \u670d\u52a1\u5668\u7c7b\u578b label.dhcp=DHCP +label.DHCP.server.type=DHCP \u670d\u52a1\u5668\u7c7b\u578b +label.direct.attached.public.ip=\u76f4\u8fde\u516c\u7528 IP label.direct.ips=\u5171\u4eab\u7f51\u7edc IP -label.disable.provider=\u7981\u7528\u63d0\u4f9b\u7a0b\u5e8f -label.disable.vpn=\u7981\u7528\u8fdc\u7a0b\u8bbf\u95ee VPN +label.disable.autoscale=\u7981\u7528\u81ea\u52a8\u7f29\u653e label.disabled=\u5df2\u7981\u7528 -label.disabling.vpn.access=\u7981\u7528 VPN \u8bbf\u95ee +label.disable.host=\u7981\u7528\u4e3b\u673a +label.disable.network.offering=\u7981\u7528\u7f51\u7edc\u65b9\u6848 +label.disable.provider=\u7981\u7528\u63d0\u4f9b\u7a0b\u5e8f +label.disable.vnmc.provider=\u7981\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f +label.disable.vpc.offering=\u7981\u7528 VPC \u65b9\u6848 +label.disable.vpn=\u7981\u7528\u8fdc\u7a0b\u8bbf\u95ee VPN +label.disabling.vpn.access=\u6b63\u5728\u7981\u7528 VPN \u8bbf\u95ee +label.disassociate.profile.blade=\u53d6\u6d88\u5c06\u914d\u7f6e\u6587\u4ef6\u4e0e\u5200\u7247\u5f0f\u670d\u52a1\u5668\u5173\u8054 +label.disbale.vnmc.device=\u7981\u7528 VNMC \u8bbe\u5907 label.disk.allocated=\u5df2\u5206\u914d\u7684\u78c1\u76d8 label.disk.bytes.read.rate=\u78c1\u76d8\u8bfb\u53d6\u901f\u5ea6(BPS) label.disk.bytes.write.rate=\u78c1\u76d8\u5199\u5165\u901f\u5ea6(BPS) +label.disk.iops.max=\u6700\u5927 IOPS +label.disk.iops.min=\u6700\u5c0f IOPS label.disk.iops.read.rate=\u78c1\u76d8\u8bfb\u53d6\u901f\u5ea6(IOPS) +label.disk.iops.total=\u603b IOPS label.disk.iops.write.rate=\u78c1\u76d8\u5199\u5165\u901f\u5ea6(IOPS) label.disk.offering=\u78c1\u76d8\u65b9\u6848 label.disk.provisioningtype=\u7f6e\u5907\u7c7b\u578b @@ -560,10 +595,11 @@ label.disk.write.io=\u78c1\u76d8\u5199\u5165(IO) label.display.text=\u663e\u793a\u6587\u672c label.dns.1=DNS 1 label.dns.2=DNS 2 -label.DNS.domain.for.guest.networks=\u6765\u5bbe\u7f51\u7edc\u7684 DNS \u57df label.dns=DNS +label.DNS.domain.for.guest.networks=\u6765\u5bbe\u7f51\u7edc\u7684 DNS \u57df label.domain.admin=\u57df\u7ba1\u7406\u5458 label.domain.id=\u57df ID +label.domain.lower=\u57df label.domain.name=\u57df\u540d label.domain.router=\u57df\u8def\u7531\u5668 label.domain.suffix=DNS \u57df\u540e\u7f00(\u4f8b\u5982 xyz.com) @@ -572,50 +608,65 @@ label.done=\u5b8c\u6210 label.double.quotes.are.not.allowed=\u4e0d\u5141\u8bb8\u4f7f\u7528\u53cc\u5f15\u53f7 label.download.progress=\u4e0b\u8f7d\u8fdb\u5ea6 label.drag.new.position=\u62d6\u52a8\u5230\u65b0\u4f4d\u7f6e +label.dynamically.scalable=\u53ef\u52a8\u6001\u6269\u5c55 +label.edit.acl.rule=\u7f16\u8f91 ACL \u89c4\u5219 label.edit.affinity.group=\u7f16\u8f91\u5173\u8054\u6027\u7ec4 label.edit.lb.rule=\u7f16\u8f91\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219 label.edit.network.details=\u7f16\u8f91\u7f51\u7edc\u8be6\u60c5 label.edit.project.details=\u7f16\u8f91\u9879\u76ee\u8be6\u60c5 +label.edit.region=\u7f16\u8f91\u5730\u7406\u533a\u57df label.edit.tags=\u7f16\u8f91\u6807\u7b7e label.edit.traffic.type=\u7f16\u8f91\u6d41\u91cf\u7c7b\u578b -label.edit.vpc=\u7f16\u8f91 VPC label.edit=\u7f16\u8f91 -label.egress.rule=\u51fa\u53e3\u89c4\u5219 +label.edit.vpc=\u7f16\u8f91 VPC +label.egress.default.policy=\u51fa\u53e3\u9ed8\u8ba4\u7b56\u7565 label.egress.rules=\u51fa\u53e3\u89c4\u5219 +label.egress.rule=\u51fa\u53e3\u89c4\u5219 label.elastic.IP=\u5f39\u6027 IP label.elastic.LB=\u5f39\u6027\u8d1f\u8f7d\u5e73\u8861\u5668 label.elastic=\u5f39\u6027 +label.email.lower=\u7535\u5b50\u90ae\u4ef6 label.email=\u7535\u5b50\u90ae\u4ef6 +label.enable.autoscale=\u542f\u7528\u81ea\u52a8\u7f29\u653e +label.enable.host=\u542f\u7528\u4e3b\u673a +label.enable.network.offering=\u542f\u7528\u7f51\u7edc\u65b9\u6848 label.enable.provider=\u542f\u7528\u63d0\u4f9b\u7a0b\u5e8f label.enable.s3=\u542f\u7528 S3 \u652f\u6301\u7684\u4e8c\u7ea7\u5b58\u50a8 label.enable.swift=\u542f\u7528 SWIFT +label.enable.vnmc.device=\u542f\u7528 VNMC \u8bbe\u5907 +label.enable.vnmc.provider=\u542f\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f +label.enable.vpc.offering=\u542f\u7528 VPC \u65b9\u6848 label.enable.vpn=\u542f\u7528\u8fdc\u7a0b\u8bbf\u95ee VPN -label.enabling.vpn.access=\u542f\u7528 VPN \u8bbf\u95ee -label.enabling.vpn=\u542f\u7528 VPN +label.enabling.vpn.access=\u6b63\u5728\u542f\u7528 VPN \u8bbf\u95ee +label.enabling.vpn=\u6b63\u5728\u542f\u7528 VPN label.end.IP=\u7ed3\u675f IP -label.end.port=\u7ed3\u675f\u7aef\u53e3 -label.end.reserved.system.IP=\u7ed3\u675f\u9884\u7559\u7cfb\u7edf IP -label.end.vlan=\u7ed3\u675f Vlan -label.end.vxlan=\u7ed3\u675f Vxlan label.endpoint.or.operation=\u7aef\u70b9\u6216\u64cd\u4f5c label.endpoint=\u7aef\u70b9 +label.end.port=\u7ed3\u675f\u7aef\u53e3 +label.end.reserved.system.IP=\u7ed3\u675f\u9884\u7559\u7cfb\u7edf IP label.enter.token=\u8f93\u5165\u4ee4\u724c label.error.code=\u9519\u8bef\u4ee3\u7801 label.error=\u9519\u8bef +label.error.upper=\u9519\u8bef label.ESP.encryption=ESP \u52a0\u5bc6\u7b97\u6cd5 label.ESP.hash=ESP \u54c8\u5e0c\u7b97\u6cd5 label.ESP.lifetime=ESP \u4f7f\u7528\u671f\u9650(\u7b2c\u4e8c\u9636\u6bb5) label.ESP.policy=ESP \u7b56\u7565 label.esx.host=ESX/ESXi \u4e3b\u673a +label.event.archived=\u4e8b\u4ef6\u5df2\u5b58\u6863 +label.event.deleted=\u4e8b\u4ef6\u5df2\u5220\u9664 label.example=\u793a\u4f8b label.expunge=\u5220\u9664 label.external.link=\u5916\u90e8\u94fe\u63a5 +label.extractable=\u53ef\u63d0\u53d6 +label.f5.details=F5 \u8be6\u7ec6\u4fe1\u606f label.f5=F5 label.failed=\u5931\u8d25 label.featured=\u7cbe\u9009 label.fetch.latest=\u63d0\u53d6\u6700\u65b0\u5185\u5bb9 label.filterBy=\u8fc7\u6ee4\u4f9d\u636e label.firewall=\u9632\u706b\u5899 +label.firstname.lower=\u540d\u5b57 label.first.name=\u540d\u5b57 label.format=\u683c\u5f0f label.friday=\u661f\u671f\u4e94 @@ -629,34 +680,63 @@ label.go.step.2=\u8f6c\u81f3\u6b65\u9aa4 2 label.go.step.3=\u8f6c\u81f3\u6b65\u9aa4 3 label.go.step.4=\u8f6c\u81f3\u6b65\u9aa4 4 label.go.step.5=\u8f6c\u81f3\u6b65\u9aa4 5 +label.gpu=GPU +label.group.by.account=\u6309\u5e10\u6237\u5206\u7ec4 +label.group.by.cluster=\u6309\u7fa4\u96c6\u5206\u7ec4 +label.group.by.pod=\u6309\u63d0\u4f9b\u70b9\u5206\u7ec4 +label.group.by.zone=\u6309\u8d44\u6e90\u57df\u5206\u7ec4 label.group.optional=\u7ec4(\u53ef\u9009) label.group=\u7ec4 +label.gslb.assigned.lb.more=\u5206\u914d\u66f4\u591a\u8d1f\u8f7d\u5e73\u8861 +label.gslb.assigned.lb=\u5df2\u5206\u914d\u8d1f\u8f7d\u5e73\u8861 +label.gslb.delete=\u5220\u9664 GSLB +label.gslb.details=GSLB \u8be6\u7ec6\u4fe1\u606f +label.gslb.domain.name=GSLB \u57df\u540d +label.gslb=GSLB +label.gslb.lb.details=\u8d1f\u8f7d\u5e73\u8861\u8be6\u7ec6\u4fe1\u606f +label.gslb.lb.remove=\u4ece\u6b64 GSLB \u4e2d\u5220\u9664\u8d1f\u8f7d\u5e73\u8861 +label.gslb.lb.rule=\u8d1f\u8f7d\u5e73\u8861\u89c4\u5219 +label.gslb.service=GSLB \u670d\u52a1 +label.gslb.service.private.ip=GSLB \u670d\u52a1\u4e13\u7528 IP +label.gslb.service.public.ip=GSLB \u670d\u52a1\u516c\u7528 IP +label.gslb.servicetype=\u670d\u52a1\u7c7b\u578b label.guest.cidr=\u6765\u5bbe CIDR label.guest.end.ip=\u6765\u5bbe\u7ed3\u675f IP label.guest.gateway=\u6765\u5bbe\u7f51\u5173 label.guest.ip.range=\u6765\u5bbe IP \u8303\u56f4 label.guest.ip=\u6765\u5bbe IP \u5730\u5740 label.guest.netmask=\u6765\u5bbe\u7f51\u7edc\u63a9\u7801 +label.guest.network.details=\u6765\u5bbe\u7f51\u7edc\u8be6\u7ec6\u4fe1\u606f label.guest.networks=\u6765\u5bbe\u7f51\u7edc label.guest.start.ip=\u6765\u5bbe\u8d77\u59cb IP label.guest.traffic=\u6765\u5bbe\u6d41\u91cf +label.guest.traffic.vswitch.name=\u6765\u5bbe\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u540d\u79f0 +label.guest.traffic.vswitch.type=\u6765\u5bbe\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u7c7b\u578b label.guest.type=\u6765\u5bbe\u7c7b\u578b label.guest=\u6765\u5bbe -label.ha.enabled=\u542f\u7528\u9ad8\u53ef\u7528\u6027 +label.ha.enabled=\u5df2\u542f\u7528\u9ad8\u53ef\u7528\u6027 +label.health.check.interval.in.sec=\u8fd0\u884c\u72b6\u51b5\u68c0\u67e5\u65f6\u95f4\u95f4\u9694(\u79d2) +label.health.check=\u8fd0\u884c\u72b6\u51b5\u68c0\u67e5 +label.healthy.threshold=\u6b63\u5e38\u9608\u503c label.help=\u5e2e\u52a9 label.hide.ingress.rule=\u9690\u85cf\u5165\u53e3\u89c4\u5219 label.hints=\u63d0\u793a +label.home=\u9996\u9875 label.host.alerts=\u4e3b\u673a\u8b66\u62a5 label.host.MAC=\u4e3b\u673a MAC label.host.name=\u4e3b\u673a\u540d\u79f0 +label.hosts=\u4e3b\u673a label.host.tags=\u4e3b\u673a\u6807\u7b7e label.host=\u4e3b\u673a -label.hosts=\u4e3b\u673a label.hourly=\u6bcf\u5c0f\u65f6 +label.hvm=HVM label.hypervisor.capabilities=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u529f\u80fd +label.hypervisor.snapshot.reserve=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5feb\u7167\u9884\u7559 +label.hypervisors=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f label.hypervisor.type=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7c7b\u578b -label.hypervisor.version=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7248\u672c label.hypervisor=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f +label.hypervisor.version=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7248\u672c +label.hyperv.traffic.label=HyperV \u6d41\u91cf\u6807\u7b7e label.id=ID label.IKE.DH=IKE DH \u7b97\u6cd5 label.IKE.encryption=IKE \u52a0\u5bc6\u7b97\u6cd5 @@ -664,8 +744,10 @@ label.IKE.hash=IKE \u54c8\u5e0c\u7b97\u6cd5 label.IKE.lifetime=IKE \u4f7f\u7528\u671f\u9650(\u7b2c\u4e8c\u9636\u6bb5) label.IKE.policy=IKE \u7b56\u7565 label.info=\u4fe1\u606f +label.info.upper=\u4fe1\u606f label.ingress.rule=\u5165\u53e3\u89c4\u5219 label.initiated.by=\u542f\u52a8\u8005 +label.inside.port.profile=\u5185\u90e8\u7aef\u53e3\u914d\u7f6e\u6587\u4ef6 label.installWizard.addClusterIntro.subtitle=\u4ec0\u4e48\u662f\u7fa4\u96c6? label.installWizard.addClusterIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u7fa4\u96c6 label.installWizard.addHostIntro.subtitle=\u4ec0\u4e48\u662f\u4e3b\u673a? @@ -676,53 +758,71 @@ label.installWizard.addPrimaryStorageIntro.subtitle=\u4ec0\u4e48\u662f\u4e3b\u5b label.installWizard.addPrimaryStorageIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u4e3b\u5b58\u50a8 label.installWizard.addSecondaryStorageIntro.subtitle=\u4ec0\u4e48\u662f\u4e8c\u7ea7\u5b58\u50a8? label.installWizard.addSecondaryStorageIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u4e8c\u7ea7\u5b58\u50a8 -label.installWizard.addZone.title=\u6dfb\u52a0\u8d44\u6e90\u57df label.installWizard.addZoneIntro.subtitle=\u4ec0\u4e48\u662f\u8d44\u6e90\u57df? label.installWizard.addZoneIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u8d44\u6e90\u57df +label.installWizard.addZone.title=\u6dfb\u52a0\u8d44\u6e90\u57df label.installWizard.click.launch=\u8bf7\u5355\u51fb\u201c\u542f\u52a8\u201d\u6309\u94ae\u3002 -label.installWizard.subtitle=\u672c\u6559\u7a0b\u5c06\u5e2e\u52a9\u60a8\u8bbe\u7f6e CloudStack&\#8482 \u5b89\u88c5 +label.installWizard.subtitle=\u6b64\u6559\u7a0b\u5c06\u5e2e\u52a9\u60a8\u8bbe\u7f6e CloudStack&\#8482 \u5b89\u88c5 label.installWizard.title=\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528 CloudStack&\#8482 label.instance.limits=\u5b9e\u4f8b\u9650\u5236 label.instance.name=\u5b9e\u4f8b\u540d\u79f0 -label.instance=\u5b9e\u4f8b +label.instance.port=\u5b9e\u4f8b\u7aef\u53e3 label.instances=\u5b9e\u4f8b +label.instance=\u5b9e\u4f8b +label.instanciate.template.associate.profile.blade=\u5c06\u6a21\u677f\u5b9e\u4f8b\u5316\u5e76\u5c06\u914d\u7f6e\u6587\u4ef6\u4e0e\u5200\u7247\u5f0f\u670d\u52a1\u5668\u5173\u8054 label.intermediate.certificate=\u4e2d\u95f4\u8bc1\u4e66 {0} label.internal.dns.1=\u5185\u90e8 DNS 1 label.internal.dns.2=\u5185\u90e8 DNS 2 +label.internal.lb.details=\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668\u8be6\u7ec6\u4fe1\u606f +label.internallbvm=InternalLbVm label.internal.name=\u5185\u90e8\u540d\u79f0 label.interval.type=\u95f4\u9694\u7c7b\u578b label.introduction.to.cloudstack=CloudStack&\#8482 \u7b80\u4ecb label.invalid.integer=\u65e0\u6548\u6574\u6570 label.invalid.number=\u65e0\u6548\u6570\u5b57 label.invitations=\u9080\u8bf7 +label.invited.accounts=\u5df2\u9080\u8bf7\u7684\u5e10\u6237 label.invite.to=\u9080\u8bf7\u52a0\u5165 label.invite=\u9080\u8bf7 -label.invited.accounts=\u5df2\u9080\u8bf7\u7684\u5e10\u6237 label.ip.address=IP \u5730\u5740 +label.ipaddress=IP \u5730\u5740 label.ip.allocations=IP \u5206\u914d +label.ip=IP label.ip.limits=\u516c\u7528 IP \u9650\u5236 label.ip.or.fqdn=IP \u6216 FQDN label.ip.range=IP \u8303\u56f4 label.ip.ranges=IP \u8303\u56f4 -label.ip=IP -label.ipaddress=IP \u5730\u5740 -label.ips=IP label.IPsec.preshared.key=IPsec \u9884\u5171\u4eab\u5bc6\u94a5 -label.is.default=\u662f\u5426\u4e3a\u9ed8\u8ba4\u8bbe\u7f6e -label.is.redundant.router=\u5197\u4f59 -label.is.shared=\u662f\u5426\u5171\u4eab -label.is.system=\u662f\u5426\u4e3a\u7cfb\u7edf +label.ips=IP +label.ipv4.cidr=IPv4 CIDR +label.ipv4.dns1=IPv4 DNS1 +label.ipv4.dns2=IPv4 DNS2 +label.ipv4.end.ip=IPv4 \u7ed3\u675f IP +label.ipv4.gateway=IPv4 \u7f51\u5173 +label.ipv4.netmask=IPv4 \u7f51\u7edc\u63a9\u7801 +label.ipv4.start.ip=IPv4 \u8d77\u59cb IP +label.ipv6.address=IPv6 IP \u5730\u5740 +label.ipv6.CIDR=IPv6 CIDR +label.ipv6.dns1=IPv6 DNS1 +label.ipv6.dns2=IPv6 DNS2 +label.ipv6.end.ip=IPv6 \u7ed3\u675f IP +label.ipv6.gateway=IPv6 \u7f51\u5173 +label.ipv6.start.ip=IPv6 \u8d77\u59cb IP label.iscsi=iSCSI +label.is.default=\u662f\u5426\u4e3a\u9ed8\u8ba4\u8bbe\u7f6e label.iso.boot=ISO \u542f\u52a8 label.iso=ISO label.isolated.networks=\u9694\u79bb\u7f51\u7edc label.isolation.method=\u9694\u79bb\u65b9\u6cd5 label.isolation.mode=\u9694\u79bb\u6a21\u5f0f label.isolation.uri=\u9694\u79bb URI +label.is.redundant.router=\u5197\u4f59 +label.is.shared=\u662f\u5426\u5171\u4eab +label.is.system=\u662f\u5426\u4e3a\u7cfb\u7edf label.item.listing=\u9879\u76ee\u5217\u8868 label.keep=\u4fdd\u7559 -label.key=\u5bc6\u94a5 label.keyboard.type=\u952e\u76d8\u7c7b\u578b +label.key=\u5bc6\u94a5 label.kvm.traffic.label=KVM \u6d41\u91cf\u6807\u7b7e label.label=\u6807\u7b7e label.lang.arabic=\u963f\u62c9\u4f2f\u8bed @@ -740,41 +840,45 @@ label.lang.norwegian=\u632a\u5a01\u8bed label.lang.polish=\u6ce2\u5170\u8bed label.lang.russian=\u4fc4\u8bed label.lang.spanish=\u897f\u73ed\u7259\u8bed -label.lang.hungarian=\u5308\u7259\u5229\u8bed label.last.disconnected=\u4e0a\u6b21\u65ad\u5f00\u8fde\u63a5\u65f6\u95f4 +label.lastname.lower=\u59d3\u6c0f label.last.name=\u59d3\u6c0f label.latest.events=\u6700\u65b0\u4e8b\u4ef6 +label.launch=\u542f\u52a8 label.launch.vm=\u542f\u52a8 VM label.launch.zone=\u542f\u52a8\u8d44\u6e90\u57df -label.launch=\u542f\u52a8 -label.lb.algorithm.leastconn=\u6700\u5c11\u8fde\u63a5 +label.lb.algorithm.leastconn=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5 label.lb.algorithm.roundrobin=\u8f6e\u5faa -label.lb.algorithm.source=\u6e90 +label.lb.algorithm.source=\u6e90\u7b97\u6cd5 label.LB.isolation=\u8d1f\u8f7d\u5e73\u8861\u5668\u9694\u79bb +label.ldap.configuration=LDAP \u914d\u7f6e +label.ldap.group.name=LDAP \u7ec4 +label.ldap.port=LDAP \u7aef\u53e3 label.level=\u7ea7\u522b label.linklocal.ip=\u94fe\u63a5\u672c\u5730 IP \u5730\u5740 +label.load.balancer.type=\u8d1f\u8f7d\u5e73\u8861\u5668\u7c7b\u578b label.load.balancer=\u8d1f\u8f7d\u5e73\u8861\u5668 label.load.balancing.policies=\u8d1f\u8f7d\u5e73\u8861\u7b56\u7565 label.load.balancing=\u8d1f\u8f7d\u5e73\u8861 label.loading=\u6b63\u5728\u52a0\u8f7d -label.local.storage.enabled=\u542f\u7528\u672c\u5730\u5b58\u50a8 -label.local.storage.enabled.system.vms=\u4e3a\u7cfb\u7edf VM \u542f\u7528\u672c\u5730\u5b58\u50a8 label.local.storage=\u672c\u5730\u5b58\u50a8 label.local=\u672c\u5730 label.login=\u767b\u5f55 label.logout=\u6ce8\u9500 -label.saml.login=SAML \u767b\u5f55 -label.LUN.number=LUN \u53f7 label.lun=LUN +label.LUN.number=LUN \u53f7 +label.lxc.traffic.label=LXC \u6d41\u91cf\u6807\u7b7e label.make.project.owner=\u8bbe\u4e3a\u5e10\u6237\u9879\u76ee\u6240\u6709\u8005 -label.manage.resources=\u7ba1\u7406\u8d44\u6e90 -label.management.server=\u7ba1\u7406\u670d\u52a1\u5668 -label.manage=\u6258\u7ba1 label.managed=\u6258\u7ba1 label.management.ips=\u7ba1\u7406\u7c7b IP \u5730\u5740 +label.management.server=\u7ba1\u7406\u670d\u52a1\u5668 label.management=\u7ba1\u7406 +label.manage.resources=\u7ba1\u7406\u8d44\u6e90 +label.manage=\u6258\u7ba1 label.max.cpus=\u6700\u5927 CPU \u5185\u6838\u6570 label.max.guest.limit=\u6700\u5927\u6765\u5bbe\u6570\u9650\u5236 +label.maximum=\u6700\u5927\u503c +label.max.instances=\u6700\u5927\u5b9e\u4f8b\u6570 label.max.memory=\u6700\u5927\u5185\u5b58(MiB) label.max.networks=\u6700\u5927\u7f51\u7edc\u6570 label.max.primary.storage=\u6700\u5927\u4e3b\u5b58\u50a8(GiB) @@ -785,14 +889,14 @@ label.max.templates=\u6700\u5927\u6a21\u677f\u6570 label.max.vms=\u6700\u5927\u7528\u6237 VM \u6570 label.max.volumes=\u6700\u5927\u5377\u6570 label.max.vpcs=\u6700\u5927 VPC \u6570 -label.maximum=\u6700\u5927\u503c label.may.continue=\u60a8\u73b0\u5728\u53ef\u4ee5\u7ee7\u7eed\u8fdb\u884c\u64cd\u4f5c\u3002 +label.md5.checksum=MD5 \u6821\u9a8c\u548c label.memory.allocated=\u5df2\u5206\u914d\u7684\u5185\u5b58 label.memory.limits=\u5185\u5b58\u9650\u5236(MiB) label.memory.mb=\u5185\u5b58(MB) label.memory.total=\u5185\u5b58\u603b\u91cf -label.memory.used=\u5df2\u4f7f\u7528\u7684\u5185\u5b58 label.memory=\u5185\u5b58 +label.memory.used=\u5df2\u4f7f\u7528\u7684\u5185\u5b58 label.menu.accounts=\u5e10\u6237 label.menu.alerts=\u8b66\u62a5 label.menu.all.accounts=\u6240\u6709\u5e10\u6237 @@ -827,24 +931,25 @@ label.menu.snapshots=\u5feb\u7167 label.menu.stopped.instances=\u5df2\u505c\u6b62\u7684\u5b9e\u4f8b label.menu.storage=\u5b58\u50a8 label.menu.system.service.offerings=\u7cfb\u7edf\u65b9\u6848 -label.menu.system.vms=\u7cfb\u7edf VM label.menu.system=\u7cfb\u7edf +label.menu.system.vms=\u7cfb\u7edf VM label.menu.templates=\u6a21\u677f label.menu.virtual.appliances=\u865a\u62df\u8bbe\u5907 label.menu.virtual.resources=\u865a\u62df\u8d44\u6e90 label.menu.volumes=\u5377 -label.menu.sshkeypair=SSH \u5bc6\u94a5\u5bf9 +label.menu.vpc.offerings=VPC \u65b9\u6848 label.migrate.instance.to.host=\u5c06\u5b9e\u4f8b\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u673a label.migrate.instance.to.ps=\u5c06\u5b9e\u4f8b\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u5b58\u50a8 label.migrate.instance.to=\u8fc1\u79fb\u5b9e\u4f8b\u81f3 +label.migrate.lb.vm=\u8fc1\u79fb LB VM label.migrate.router.to=\u8fc1\u79fb\u8def\u7531\u5668\u81f3 label.migrate.systemvm.to=\u8fc1\u79fb\u7cfb\u7edf VM \u81f3 label.migrate.to.host=\u8fc1\u79fb\u5230\u4e3b\u673a label.migrate.to.storage=\u8fc1\u79fb\u5230\u5b58\u50a8 label.migrate.volume.to.primary.storage=\u5c06\u5377\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u5b58\u50a8 -label.migrate.volume=\u8fc1\u79fb\u5377 label.minimum=\u6700\u5c0f\u503c -label.minute.past.hour=\u5206 +label.min.instances=\u6700\u5c0f\u5b9e\u4f8b\u6570 +label.mode=\u6a21\u5f0f label.monday=\u661f\u671f\u4e00 label.monthly=\u6bcf\u6708 label.more.templates=\u66f4\u591a\u6a21\u677f @@ -855,21 +960,26 @@ label.move.up.row=\u5411\u4e0a\u79fb\u52a8\u4e00\u884c label.my.account=\u6211\u7684\u5e10\u6237 label.my.network=\u6211\u7684\u7f51\u7edc label.my.templates=\u6211\u7684\u6a21\u677f -label.na=\u4e0d\u9002\u7528 +label.name.lower=\u540d\u79f0 label.name.optional=\u540d\u79f0(\u53ef\u9009) label.name=\u540d\u79f0 label.nat.port.range=NAT \u7aef\u53e3\u8303\u56f4 +label.na=\u65e0 label.netmask=\u7f51\u7edc\u63a9\u7801 +label.netscaler.details=NetScaler \u8be6\u7ec6\u4fe1\u606f label.netScaler=NetScaler +label.network.ACLs=\u7f51\u7edc ACL label.network.ACL.total=\u7f51\u7edc ACL \u603b\u6570 label.network.ACL=\u7f51\u7edc ACL -label.network.ACLs=\u7f51\u7edc ACL +label.network.addVM=\u5c06\u7f51\u7edc\u6dfb\u52a0\u5230 VM +label.network.cidr=\u7f51\u7edc CIDR label.network.desc=\u7f51\u7edc\u63cf\u8ff0 label.network.device.type=\u7f51\u7edc\u8bbe\u5907\u7c7b\u578b label.network.device=\u7f51\u7edc\u8bbe\u5907 label.network.domain.text=\u7f51\u7edc\u57df label.network.domain=\u7f51\u7edc\u57df label.network.id=\u7f51\u7edc ID +label.networking.and.security=\u7f51\u7edc\u8fde\u63a5\u4e0e\u5b89\u5168 label.network.label.display.for.blank.value=\u4f7f\u7528\u9ed8\u8ba4\u7f51\u5173 label.network.limits=\u7f51\u7edc\u9650\u5236 label.network.name=\u7f51\u7edc\u540d\u79f0 @@ -881,85 +991,108 @@ label.network.rate.megabytes=\u7f51\u7edc\u901f\u7387(MB/\u79d2) label.network.rate=\u7f51\u7edc\u901f\u7387(MB/\u79d2) label.network.read=\u7f51\u7edc\u8bfb\u53d6\u91cf label.network.service.providers=\u7f51\u7edc\u670d\u52a1\u63d0\u4f9b\u7a0b\u5e8f -label.network.type=\u7f51\u7edc\u7c7b\u578b -label.network.write=\u7f51\u7edc\u5199\u5165\u91cf -label.network=\u7f51\u7edc -label.networking.and.security=\u7f51\u7edc\u8fde\u63a5\u4e0e\u5b89\u5168 label.networks=\u7f51\u7edc +label.network.type=\u7f51\u7edc\u7c7b\u578b +label.network=\u7f51\u7edc +label.network.write=\u7f51\u7edc\u5199\u5165\u91cf label.new.password=\u65b0\u5bc6\u7801 label.new.project=\u65b0\u5efa\u9879\u76ee -label.new.vm=\u65b0\u5efa VM label.new=\u65b0\u5efa +label.new.vm=\u65b0\u5efa VM label.next=\u4e0b\u4e00\u6b65 label.nexusVswitch=Nexus 1000v +label.nfs=NFS label.nfs.server=NFS \u670d\u52a1\u5668 label.nfs.storage=NFS \u5b58\u50a8 -label.nfs=NFS label.nic.adapter.type=NIC \u9002\u914d\u5668\u7c7b\u578b label.nicira.controller.address=\u63a7\u5236\u5668\u5730\u5740 label.nicira.l3gatewayserviceuuid=L3 Gateway Service UUID +label.nicira.nvp.details=Nicira NVP \u8be6\u7ec6\u4fe1\u606f label.nicira.transportzoneuuid=\u4f20\u8f93\u8d44\u6e90\u57df UUID -label.brocade.vcs.address=Vcs \u4ea4\u6362\u673a\u5730\u5740 label.nics=NIC label.no.actions=\u65e0\u53ef\u7528\u64cd\u4f5c label.no.alerts=\u65e0\u6700\u8fd1\u53d1\u51fa\u7684\u8b66\u62a5 label.no.data=\u65e0\u53ef\u663e\u793a\u7684\u6570\u636e label.no.errors=\u65e0\u6700\u8fd1\u51fa\u73b0\u7684\u9519\u8bef +label.no.grouping=(\u672a\u5206\u7ec4) label.no.isos=\u65e0\u53ef\u7528 ISO label.no.items=\u65e0\u53ef\u7528\u9879\u76ee -label.no.security.groups=\u65e0\u53ef\u7528\u5b89\u5168\u7ec4 -label.no.thanks=\u4e0d\uff0c\u8c22\u8c22 -label.no=\u5426 label.none=\u65e0 +label.no.security.groups=\u65e0\u53ef\u7528\u5b89\u5168\u7ec4 label.not.found=\u672a\u627e\u5230 +label.no.thanks=\u4e0d\uff0c\u8c22\u8c22 label.notifications=\u901a\u77e5 -label.num.cpu.cores=CPU \u5185\u6838\u6570 +label.no=\u5426 label.number.of.clusters=\u7fa4\u96c6\u6570\u91cf +label.number.of.cpu.sockets=CPU \u63d2\u69fd\u6570 label.number.of.hosts=\u4e3b\u673a\u6570\u91cf label.number.of.pods=\u63d0\u4f9b\u70b9\u6570\u91cf label.number.of.system.vms=\u7cfb\u7edf VM \u6570 label.number.of.virtual.routers=\u865a\u62df\u8def\u7531\u5668\u6570 label.number.of.zones=\u8d44\u6e90\u57df\u6570\u91cf +label.num.cpu.cores=CPU \u5185\u6838\u6570 label.numretries=\u91cd\u8bd5\u6b21\u6570 label.ocfs2=OCFS2 label.offer.ha=\u63d0\u4f9b\u9ad8\u53ef\u7528\u6027 label.ok=\u786e\u5b9a +label.opendaylight.controllerdetail=OpenDaylight \u63a7\u5236\u5668\u8be6\u7ec6\u4fe1\u606f +label.opendaylight.controller=OpenDaylight \u63a7\u5236\u5668 +label.opendaylight.controllers=OpenDaylight \u63a7\u5236\u5668 +label.openDaylight=OpenDaylight +label.operator=\u8fd0\u7b97\u7b26 label.optional=\u53ef\u9009 label.order=\u6392\u5e8f label.os.preference=\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879 label.os.type=\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b -label.ovm3.vip=\u4e3b\u673a VIP IP -label.ovm3.pool=\u672c\u673a\u6c60 -label.ovm3.cluster=\u672c\u673a\u7fa4\u96c6 +label.other=\u5176\u4ed6 +label.override.guest.traffic=\u66ff\u4ee3\u6765\u5bbe\u6d41\u91cf +label.override.public.traffic=\u66ff\u4ee3\u516c\u5171\u6d41\u91cf +label.ovm.traffic.label=OVM \u6d41\u91cf\u6807\u7b7e +label.ovs=OVS label.owned.public.ips=\u62e5\u6709\u7684\u516c\u7528 IP \u5730\u5740\u6570 label.owner.account=\u6240\u6709\u8005\u5e10\u6237 label.owner.domain=\u6240\u6709\u8005\u57df +label.palo.alto.details=Palo Alto \u8be6\u7ec6\u4fe1\u606f label.PA.log.profile=Palo Alto \u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6 -label.PA.threat.profile=Palo Alto \u5a01\u80c1\u914d\u7f6e\u6587\u4ef6 +label.PA=Palo Alto label.parent.domain=\u7236\u57df -label.password.enabled=\u542f\u7528\u5bc6\u7801 +label.passive=\u88ab\u52a8 +label.password.enabled=\u5df2\u542f\u7528\u5bc6\u7801 +label.password.lower=\u5bc6\u7801 +label.password.reset.confirm=\u5bc6\u7801\u5df2\u91cd\u7f6e\u4e3a label.password=\u5bc6\u7801 +label.PA.threat.profile=Palo Alto \u5a01\u80c1\u914d\u7f6e\u6587\u4ef6 label.path=\u8def\u5f84 label.perfect.forward.secrecy=\u5b8c\u5168\u6b63\u5411\u4fdd\u5bc6 +label.persistent=\u6c38\u4e45 label.physical.network.ID=\u7269\u7406\u7f51\u7edc ID label.physical.network=\u7269\u7406\u7f51\u7edc label.PING.CIFS.password=PING CIFS \u5bc6\u7801 label.PING.CIFS.username=PING CIFS \u7528\u6237\u540d label.PING.dir=PING \u76ee\u5f55 +label.ping.path=Ping \u8def\u5f84 label.PING.storage.IP=PING \u5b58\u50a8 IP +label.planner.mode=\u89c4\u5212\u5668\u6a21\u5f0f label.please.specify.netscaler.info=\u8bf7\u6307\u5b9a NetScaler \u4fe1\u606f label.please.wait=\u8bf7\u7a0d\u5019 label.plugin.details=\u63d2\u4ef6\u8be6\u7ec6\u4fe1\u606f label.plugins=\u63d2\u4ef6 +label.pod.dedicated=\u63d0\u4f9b\u70b9\u5df2\u4e13\u7528 label.pod.name=\u63d0\u4f9b\u70b9\u540d\u79f0 -label.pod=\u63d0\u4f9b\u70b9 label.pods=\u63d0\u4f9b\u70b9 +label.pod=\u63d0\u4f9b\u70b9 +label.polling.interval.sec=\u8f6e\u8be2\u65f6\u95f4\u95f4\u9694(\u79d2) +label.portable.ip.range.details=\u53ef\u79fb\u690d IP \u8303\u56f4\u8be6\u7ec6\u4fe1\u606f +label.portable.ip.ranges=\u53ef\u79fb\u690d IP \u8303\u56f4 +label.portable.ips=\u53ef\u79fb\u690d IP +label.portable.ip=\u53ef\u79fb\u690d IP label.port.forwarding.policies=\u7aef\u53e3\u8f6c\u53d1\u7b56\u7565 label.port.forwarding=\u7aef\u53e3\u8f6c\u53d1 label.port.range=\u7aef\u53e3\u8303\u56f4 +label.port=\u7aef\u53e3 label.PreSetup=PreSetup -label.prev=\u4e0a\u4e00\u9875 label.previous=\u4e0a\u4e00\u6b65 +label.prev=\u4e0a\u4e00\u9875 label.primary.allocated=\u5df2\u5206\u914d\u7684\u4e3b\u5b58\u50a8 label.primary.network=\u4e3b\u7f51\u7edc label.primary.storage.count=\u4e3b\u5b58\u50a8\u6c60 @@ -969,48 +1102,73 @@ label.primary.used=\u5df2\u4f7f\u7528\u7684\u4e3b\u5b58\u50a8 label.private.Gateway=\u4e13\u7528\u7f51\u5173 label.private.interface=\u4e13\u7528\u63a5\u53e3 label.private.ip.range=\u4e13\u7528 IP \u8303\u56f4 -label.private.ip=\u4e13\u7528 IP \u5730\u5740 label.private.ips=\u4e13\u7528 IP \u5730\u5740 +label.private.ip=\u4e13\u7528 IP \u5730\u5740 +label.privatekey=PKCS\#8 \u79c1\u94a5 label.private.network=\u4e13\u7528\u7f51\u7edc label.private.port=\u4e13\u7528\u7aef\u53e3 label.private.zone=\u4e13\u7528\u8d44\u6e90\u57df -label.privatekey=PKCS\#8 \u79c1\u94a5 +label.profile=\u914d\u7f6e\u6587\u4ef6 label.project.dashboard=\u9879\u76ee\u63a7\u5236\u677f label.project.id=\u9879\u76ee ID label.project.invite=\u9080\u8bf7\u52a0\u5165\u9879\u76ee label.project.name=\u9879\u76ee\u540d\u79f0 -label.project.view=\u9879\u76ee\u89c6\u56fe -label.project=\u9879\u76ee label.projects=\u9879\u76ee +label.project=\u9879\u76ee +label.project.view=\u9879\u76ee\u89c6\u56fe +label.protocol.number=\u534f\u8bae\u7f16\u53f7 label.protocol=\u534f\u8bae -label.provider=\u63d0\u4f9b\u7a0b\u5e8f label.providers=\u63d0\u4f9b\u7a0b\u5e8f +label.provider=\u63d0\u4f9b\u7a0b\u5e8f label.public.interface=\u516c\u7528\u63a5\u53e3 -label.public.ip=\u516c\u7528 IP \u5730\u5740 label.public.ips=\u516c\u7528 IP \u5730\u5740 +label.public.ip=\u516c\u7528 IP \u5730\u5740 +label.public.load.balancer.provider=\u516c\u7528\u8d1f\u8f7d\u5e73\u8861\u5668\u63d0\u4f9b\u7a0b\u5e8f label.public.network=\u516c\u7528\u7f51\u7edc label.public.port=\u516c\u7528\u7aef\u53e3 label.public.traffic=\u516c\u5171\u6d41\u91cf -label.public.zone=\u516c\u7528\u8d44\u6e90\u57df +label.public.traffic.vswitch.name=\u516c\u5171\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u540d\u79f0 +label.public.traffic.vswitch.type=\u516c\u5171\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u7c7b\u578b label.public=\u516c\u7528 +label.public.zone=\u516c\u7528\u8d44\u6e90\u57df label.purpose=\u76ee\u7684 label.Pxe.server.type=Pxe \u670d\u52a1\u5668\u7c7b\u578b +label.qos.type=QoS \u7c7b\u578b label.quickview=\u5feb\u901f\u67e5\u770b +label.quiesce.vm=\u9759\u9ed8 VM +label.quiet.time.sec=\u5b89\u9759\u65f6\u95f4(\u79d2) +label.rbd.id=Cephx \u7528\u6237 +label.rbd.monitor=Ceph \u76d1\u89c6\u5668 +label.rbd.pool=Ceph \u6c60 +label.rbd=RBD +label.rbd.secret=Cephx \u5bc6\u94a5 label.reboot=\u91cd\u65b0\u542f\u52a8 label.recent.errors=\u6700\u8fd1\u51fa\u73b0\u7684\u9519\u8bef +label.recover.vm=\u6062\u590d VM label.redundant.router.capability=\u5197\u4f59\u8def\u7531\u5668\u529f\u80fd label.redundant.router=\u5197\u4f59\u8def\u7531\u5668 -label.redundant.vpc=\u5197\u4f59 VPC label.redundant.state=\u5197\u4f59\u72b6\u6001 +label.refresh.blades=\u5237\u65b0\u5200\u7247\u5f0f\u670d\u52a1\u5668 label.refresh=\u5237\u65b0 +label.regionlevelvpc=\u5730\u7406\u533a\u57df\u7ea7 VPC label.region=\u5730\u7406\u533a\u57df +label.reinstall.vm=\u91cd\u65b0\u5b89\u88c5 VM label.related=\u76f8\u5173\u8054 +label.release.account.lowercase=\u4ece\u5e10\u6237\u4e2d\u91ca\u653e +label.release.account=\u4ece\u5e10\u6237\u4e2d\u91ca\u653e +label.release.dedicated.cluster=\u91ca\u653e\u4e13\u7528\u7fa4\u96c6 +label.release.dedicated.host=\u91ca\u653e\u4e13\u7528\u4e3b\u673a +label.release.dedicated.pod=\u91ca\u653e\u4e13\u7528\u63d0\u4f9b\u70b9 +label.release.dedicated.vlan.range=\u91ca\u653e\u4e13\u7528 VLAN \u8303\u56f4 +label.release.dedicated.zone=\u91ca\u653e\u4e13\u7528\u8d44\u6e90\u57df label.remind.later=\u4ee5\u540e\u63d0\u9192\u6211 label.remove.ACL=\u5220\u9664 ACL label.remove.egress.rule=\u5220\u9664\u51fa\u53e3\u89c4\u5219 label.remove.from.load.balancer=\u6b63\u5728\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u4e2d\u5220\u9664\u5b9e\u4f8b label.remove.ingress.rule=\u5220\u9664\u5165\u53e3\u89c4\u5219 label.remove.ip.range=\u5220\u9664 IP \u8303\u56f4 +label.remove.ldap=\u5220\u9664 LDAP +label.remove.network.offering=\u5220\u9664\u7f51\u7edc\u65b9\u6848 label.remove.pf=\u5220\u9664\u7aef\u53e3\u8f6c\u53d1\u89c4\u5219 label.remove.project.account=\u4ece\u9879\u76ee\u4e2d\u5220\u9664\u5e10\u6237 label.remove.region=\u5220\u9664\u5730\u7406\u533a\u57df @@ -1019,25 +1177,35 @@ label.remove.static.nat.rule=\u5220\u9664\u9759\u6001 NAT \u89c4\u5219 label.remove.static.route=\u5220\u9664\u9759\u6001\u8def\u7531 label.remove.tier=\u5220\u9664\u5c42 label.remove.vm.from.lb=\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219\u4e2d\u5220\u9664 VM +label.remove.vm.load.balancer=\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u4e2d\u5220\u9664 VM +label.remove.vmware.datacenter=\u5220\u9664 VMware \u6570\u636e\u4e2d\u5fc3 +label.remove.vpc.offering=\u5220\u9664 VPC \u65b9\u6848 label.remove.vpc=\u5220\u9664 VPC -label.removing.user=\u6b63\u5728\u5220\u9664\u7528\u6237 label.removing=\u6b63\u5728\u5220\u9664 +label.removing.user=\u6b63\u5728\u5220\u9664\u7528\u6237 +label.reource.id=\u8d44\u6e90 ID +label.replace.acl.list=\u66ff\u6362 ACL \u5217\u8868 +label.replace.acl=\u66ff\u6362 ACL label.required=\u5fc5\u586b\u9879 +label.requires.upgrade=\u9700\u8981\u5347\u7ea7 +label.reserved.ip.range=\u9884\u7559 IP \u8303\u56f4 label.reserved.system.gateway=\u9884\u7559\u7684\u7cfb\u7edf\u7f51\u5173 label.reserved.system.ip=\u9884\u7559\u7684\u7cfb\u7edf IP label.reserved.system.netmask=\u9884\u7559\u7684\u7cfb\u7edf\u7f51\u7edc\u63a9\u7801 +label.resetVM=\u91cd\u7f6e VM label.reset.VPN.connection=\u91cd\u7f6e VPN \u8fde\u63a5 label.resize.new.offering.id=\u65b0\u65b9\u6848 -label.resize.new.size=\u65b0\u5927\u5c0f(GB) -label.resize.shrink.ok=\u5141\u8bb8\u7f29\u5c0f +label.resize.shrink.ok=\u662f\u5426\u786e\u5b9e\u8981\u7f29\u5c0f\u5377\u5927\u5c0f +label.resource.limit.exceeded=\u5df2\u8d85\u51fa\u8d44\u6e90\u9650\u5236 label.resource.limits=\u8d44\u6e90\u9650\u5236 +label.resource.name=\u8d44\u6e90\u540d\u79f0 label.resource.state=\u8d44\u6e90\u72b6\u6001 -label.resource=\u8d44\u6e90 label.resources=\u8d44\u6e90 +label.resource=\u8d44\u6e90 +label.response.timeout.in.sec=\u54cd\u5e94\u8d85\u65f6(\u79d2) label.restart.network=\u91cd\u65b0\u542f\u52a8\u7f51\u7edc label.restart.required=\u9700\u8981\u91cd\u65b0\u542f\u52a8 label.restart.vpc=\u91cd\u65b0\u542f\u52a8 VPC -message.restart.vpc.remark=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u91cd\u65b0\u542f\u52a8 VPC

\u5907\u6ce8: \u5c06\u975e\u5197\u4f59 VPC \u8bbe\u4e3a\u5197\u4f59\u4f1a\u5f3a\u5236\u6267\u884c\u6e05\u7406\u3002\u7f51\u7edc\u5c06\u5728\u51e0\u5206\u949f\u5185\u4e0d\u53ef\u7528.

label.restore=\u8fd8\u539f label.retry.interval=\u91cd\u8bd5\u65f6\u95f4\u95f4\u9694 label.review=\u6838\u5bf9 @@ -1046,6 +1214,11 @@ label.role=\u89d2\u8272 label.root.certificate=\u6839\u8bc1\u4e66 label.root.disk.controller=\u6839\u78c1\u76d8\u63a7\u5236\u5668 label.root.disk.offering=\u6839\u78c1\u76d8\u65b9\u6848 +label.root.disk.size=\u6839\u78c1\u76d8\u5927\u5c0f +label.router.vm.scaled.up=\u5df2\u6269\u5c55\u8def\u7531\u5668 VM +label.routing.host=\u6b63\u5728\u8def\u7531\u4e3b\u673a +label.routing=\u6b63\u5728\u8def\u7531 +label.rule.number=\u89c4\u5219\u7f16\u53f7 label.rules=\u89c4\u5219 label.running.vms=\u6b63\u5728\u8fd0\u884c\u7684 VM label.s3.access_key=\u8bbf\u95ee\u5bc6\u94a5 @@ -1053,6 +1226,8 @@ label.s3.bucket=\u5b58\u50a8\u6876 label.s3.connection_timeout=\u8fde\u63a5\u8d85\u65f6 label.s3.endpoint=\u7aef\u70b9 label.s3.max_error_retry=\u6700\u5927\u9519\u8bef\u91cd\u8bd5\u6b21\u6570 +label.s3.nfs.path=S3 NFS \u8def\u5f84 +label.s3.nfs.server=S3 NFS \u670d\u52a1\u5668 label.s3.secret_key=\u5bc6\u94a5 label.s3.socket_timeout=\u5957\u63a5\u5b57\u8d85\u65f6 label.s3.use_https=\u4f7f\u7528 HTTPS @@ -1060,19 +1235,23 @@ label.saturday=\u661f\u671f\u516d label.save.and.continue=\u4fdd\u5b58\u5e76\u7ee7\u7eed label.save=\u4fdd\u5b58 label.saving.processing=\u6b63\u5728\u4fdd\u5b58... +label.scale.up.policy=\u6269\u5c55\u7b56\u7565 label.scope=\u8303\u56f4 label.search=\u641c\u7d22 +label.secondary.isolated.vlan.id=\u4e8c\u7ea7\u9694\u79bb VLAN ID +label.secondary.staging.store.details=\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8\u8be6\u7ec6\u4fe1\u606f +label.secondary.staging.store=\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 label.secondary.storage.count=\u4e8c\u7ea7\u5b58\u50a8\u6c60 +label.secondary.storage.details=\u4e8c\u7ea7\u5b58\u50a8\u8be6\u7ec6\u4fe1\u606f label.secondary.storage.limits=\u4e8c\u7ea7\u5b58\u50a8\u9650\u5236(GiB) -label.secondary.storage.vm=\u4e8c\u7ea7\u5b58\u50a8 VM label.secondary.storage=\u4e8c\u7ea7\u5b58\u50a8 +label.secondary.storage.vm=\u4e8c\u7ea7\u5b58\u50a8 VM label.secondary.used=\u5df2\u4f7f\u7528\u7684\u4e8c\u7ea7\u5b58\u50a8 label.secret.key=\u5bc6\u94a5 label.security.group.name=\u5b89\u5168\u7ec4\u540d\u79f0 -label.security.group=\u5b89\u5168\u7ec4 -label.security.groups.enabled=\u542f\u7528\u5b89\u5168\u7ec4 +label.security.groups.enabled=\u5df2\u542f\u7528\u5b89\u5168\u7ec4 label.security.groups=\u5b89\u5168\u7ec4 -label.select-view=\u9009\u62e9\u89c6\u56fe +label.security.group=\u5b89\u5168\u7ec4 label.select.a.template=\u9009\u62e9\u4e00\u4e2a\u6a21\u677f label.select.a.zone=\u9009\u62e9\u4e00\u4e2a\u8d44\u6e90\u57df label.select.instance.to.attach.volume.to=\u9009\u62e9\u8981\u5c06\u5377\u9644\u52a0\u5230\u7684\u5b9e\u4f8b @@ -1080,48 +1259,61 @@ label.select.instance=\u9009\u62e9\u5b9e\u4f8b label.select.iso.or.template=\u9009\u62e9 ISO \u6216\u6a21\u677f label.select.offering=\u9009\u62e9\u65b9\u6848 label.select.project=\u9009\u62e9\u9879\u76ee +label.select.region=\u9009\u62e9\u5730\u7406\u533a\u57df +label.select.template=\u9009\u62e9\u6a21\u677f label.select.tier=\u9009\u62e9\u5c42 -label.select.vm.for.static.nat=\u4e3a\u9759\u6001 NAT \u9009\u62e9 VM label.select=\u9009\u62e9 +label.select-view=\u9009\u62e9\u89c6\u56fe +label.select.vm.for.static.nat=\u4e3a\u9759\u6001 NAT \u9009\u62e9 VM label.sent=\u5df2\u53d1\u9001 label.server=\u670d\u52a1\u5668 label.service.capabilities=\u670d\u52a1\u529f\u80fd label.service.offering=\u670d\u52a1\u65b9\u6848 +label.service.state=\u670d\u52a1\u72b6\u6001 +label.services=\u670d\u52a1 label.session.expired=\u4f1a\u8bdd\u5df2\u8fc7\u671f -label.set.up.zone.type=\u8bbe\u7f6e\u8d44\u6e90\u57df\u7c7b\u578b -label.setup.network=\u8bbe\u7f6e\u7f51\u7edc -label.setup.zone=\u8bbe\u7f6e\u8d44\u6e90\u57df +label.set.default.NIC=\u8bbe\u7f6e\u9ed8\u8ba4 NIC +label.settings=\u8bbe\u7f6e label.setup=\u8bbe\u7f6e -label.shared=\u5df2\u5171\u4eab +label.set.up.zone.type=\u8bbe\u7f6e\u8d44\u6e90\u57df\u7c7b\u578b label.SharedMountPoint=SharedMountPoint +label.shared=\u5df2\u5171\u4eab +label.show.advanced.settings=\u663e\u793a\u9ad8\u7ea7\u8bbe\u7f6e label.show.ingress.rule=\u663e\u793a\u5165\u53e3\u89c4\u5219 label.shutdown.provider=\u5173\u95ed\u63d0\u4f9b\u7a0b\u5e8f label.site.to.site.VPN=\u70b9\u5bf9\u70b9 VPN label.size=\u5927\u5c0f label.skip.guide=\u6211\u4ee5\u524d\u4f7f\u7528\u8fc7 CloudStack\uff0c\u8df3\u8fc7\u6b64\u6307\u5357 +label.smb.domain=SMB \u57df +label.smb.password=SMB \u5bc6\u7801 +label.smb.username=SMB \u7528\u6237\u540d label.snapshot.limits=\u5feb\u7167\u9650\u5236 label.snapshot.name=\u5feb\u7167\u540d\u79f0 label.snapshot.s=\u5feb\u7167 -label.snapshot.schedule=\u8bbe\u7f6e\u91cd\u73b0\u5feb\u7167 -label.snapshot=\u5feb\u7167 label.snapshots=\u5feb\u7167 +label.snapshot=\u5feb\u7167 +label.SNMP.community=SNMP \u793e\u533a +label.SNMP.port=SNMP \u7aef\u53e3 +label.sockets=CPU \u63d2\u69fd +label.source.ip.address=\u6e90 IP \u5730\u5740 +label.source.nat.supported=\u652f\u6301 SourceNAT label.source.nat=\u6e90 NAT +label.source.port=\u6e90\u7aef\u53e3 label.specify.IP.ranges=\u6307\u5b9a IP \u8303\u56f4 label.specify.vlan=\u6307\u5b9a VLAN label.specify.vxlan=\u6307\u5b9a VXLAN label.SR.name=SR \u540d\u79f0\u6807\u7b7e +label.srx.details=SRX \u8be6\u7ec6\u4fe1\u606f label.srx=SRX -label.PA=Palo Alto label.start.IP=\u8d77\u59cb IP +label.start.lb.vm=\u542f\u52a8 LB VM label.start.port=\u8d77\u59cb\u7aef\u53e3 label.start.reserved.system.IP=\u8d77\u59cb\u9884\u7559\u7cfb\u7edf IP -label.start.vlan=\u542f\u52a8 Vlan -label.start.vxlan=\u542f\u52a8 Vxlan label.state=\u72b6\u6001 -label.static.nat.enabled=\u542f\u7528\u9759\u6001 NAT +label.static.nat.enabled=\u5df2\u542f\u7528\u9759\u6001 NAT label.static.nat.to=\u9759\u6001 NAT \u76ee\u6807 -label.static.nat.vm.details=\u9759\u6001 NAT VM \u8be6\u60c5 label.static.nat=\u9759\u6001 NAT +label.static.nat.vm.details=\u9759\u6001 NAT VM \u8be6\u60c5 label.statistics=\u7edf\u8ba1\u6570\u636e label.status=\u72b6\u6001 label.step.1.title=\u6b65\u9aa4 1\: \u9009\u62e9\u4e00\u4e2a\u6a21\u677f @@ -1134,6 +1326,7 @@ label.step.4.title=\u6b65\u9aa4 4\: \u7f51\u7edc label.step.4=\u6b65\u9aa4 4 label.step.5.title=\u6b65\u9aa4 5\: \u6838\u5bf9 label.step.5=\u6b65\u9aa4 5 +label.stickiness.method=\u7c98\u6027\u65b9\u6cd5 label.stickiness=\u7c98\u6027 label.sticky.cookie-name=Cookie \u540d\u79f0 label.sticky.domain=\u57df @@ -1142,84 +1335,105 @@ label.sticky.holdtime=\u6301\u7eed\u65f6\u95f4 label.sticky.indirect=indirect label.sticky.length=\u957f\u5ea6 label.sticky.mode=\u6a21\u5f0f +label.sticky.name=\u7c98\u6027\u540d\u79f0 label.sticky.nocache=nocache label.sticky.postonly=postonly label.sticky.prefix=prefix label.sticky.request-learn=request-learn label.sticky.tablesize=\u8868\u5927\u5c0f -label.stop=\u505c\u6b62 +label.stop.lb.vm=\u505c\u6b62 LB VM label.stopped.vms=\u5df2\u505c\u6b62\u7684 VM +label.stop=\u505c\u6b62 +label.storage.pool=\u5b58\u50a8\u6c60 label.storage.tags=\u5b58\u50a8\u6807\u7b7e label.storage.traffic=\u5b58\u50a8\u6d41\u91cf label.storage.type=\u5b58\u50a8\u7c7b\u578b -label.qos.type=QoS \u7c7b\u578b -label.cache.mode=\u5199\u5165\u7f13\u5b58\u7c7b\u578b label.storage=\u5b58\u50a8 label.subdomain.access=\u5b50\u57df\u8bbf\u95ee -label.submit=\u63d0\u4ea4 label.submitted.by=[\u63d0\u4ea4\u8005\: ] +label.submit=\u63d0\u4ea4 label.succeeded=\u6210\u529f label.sunday=\u661f\u671f\u65e5 label.super.cidr.for.guest.networks=\u6765\u5bbe\u7f51\u7edc\u7684\u8d85\u7ea7 CIDR label.supported.services=\u652f\u6301\u7684\u670d\u52a1 label.supported.source.NAT.type=\u652f\u6301\u7684\u6e90 NAT \u7c7b\u578b +label.supportsstrechedl2subnet=\u652f\u6301\u6269\u5c55\u4e8c\u7ea7\u5b50\u7f51 label.suspend.project=\u6682\u505c\u9879\u76ee +label.switch.type=\u4ea4\u6362\u673a\u7c7b\u578b label.system.capacity=\u7cfb\u7edf\u5bb9\u91cf +label.system.offering.for.router=\u8def\u7531\u5668\u7684\u7cfb\u7edf\u65b9\u6848 label.system.offering=\u7cfb\u7edf\u65b9\u6848 label.system.service.offering=\u7cfb\u7edf\u670d\u52a1\u65b9\u6848 +label.system.vm.details=\u7cfb\u7edf VM \u8be6\u7ec6\u4fe1\u606f +label.system.vm.scaled.up=\u5df2\u6269\u5c55\u7cfb\u7edf VM +label.system.vms=\u7cfb\u7edf VM label.system.vm.type=\u7cfb\u7edf VM \u7c7b\u578b label.system.vm=\u7cfb\u7edf VM -label.system.vms=\u7cfb\u7edf VM label.system.wide.capacity=\u6574\u4e2a\u7cfb\u7edf\u7684\u5bb9\u91cf label.tagged=\u5df2\u6807\u8bb0 +label.tag.key=\u6807\u8bb0\u5bc6\u94a5 label.tags=\u6807\u7b7e +label.tag.value=\u6807\u8bb0\u503c label.target.iqn=\u76ee\u6807 IQN label.task.completed=\u5df2\u5b8c\u6210\u4efb\u52a1 label.template.limits=\u6a21\u677f\u9650\u5236 label.template=\u6a21\u677f label.TFTP.dir=TFTP \u76ee\u5f55 +label.tftp.root.directory=Tftp \u6839\u76ee\u5f55 label.theme.default=\u9ed8\u8ba4\u4e3b\u9898 label.theme.grey=\u81ea\u5b9a\u4e49 - \u7070\u8272 label.theme.lightblue=\u81ea\u5b9a\u4e49 - \u6de1\u84dd\u8272 +label.threshold=\u9608\u503c label.thursday=\u661f\u671f\u56db label.tier.details=\u5c42\u8be6\u7ec6\u4fe1\u606f label.tier=\u5c42 -label.time.zone=\u65f6\u533a -label.time=\u65f6\u95f4 -label.timeout.in.second = \u8d85\u65f6(\u79d2) label.timeout=\u8d85\u65f6 +label.time=\u65f6\u95f4 +label.time.zone=\u65f6\u533a label.timezone=\u65f6\u533a label.token=\u4ee4\u724c +label.total.cpu=CPU \u603b\u91cf label.total.CPU=CPU \u603b\u91cf -label.total.cpu=\u603b CPU label.total.hosts=\u603b\u4e3b\u673a\u6570 label.total.memory=\u5185\u5b58\u603b\u91cf -label.total.of.ip=\u603b IP \u5730\u5740\u6570 label.total.of.vm=\u603b VM \u6570 label.total.storage=\u5b58\u50a8\u603b\u91cf +label.total.virtual.routers=\u865a\u62df\u8def\u7531\u5668\u603b\u6570 +label.total.virtual.routers.upgrade=\u9700\u8981\u5347\u7ea7\u7684\u865a\u62df\u8def\u7531\u5668\u603b\u6570 label.total.vms=\u603b VM \u6570 label.traffic.label=\u6d41\u91cf\u6807\u7b7e -label.traffic.type=\u6d41\u91cf\u7c7b\u578b label.traffic.types=\u6d41\u91cf\u7c7b\u578b +label.traffic.type=\u6d41\u91cf\u7c7b\u578b label.tuesday=\u661f\u671f\u4e8c label.type.id=\u7c7b\u578b ID +label.type.lower=\u7c7b\u578b label.type=\u7c7b\u578b +label.ucs=UCS label.unavailable=\u4e0d\u53ef\u7528 +label.unhealthy.threshold=\u4e0d\u6b63\u5e38\u9608\u503c label.unlimited=\u65e0\u9650\u5236 label.untagged=\u5df2\u53d6\u6d88\u6807\u8bb0 label.update.project.resources=\u66f4\u65b0\u9879\u76ee\u8d44\u6e90 label.update.ssl.cert= SSL \u8bc1\u4e66 label.update.ssl= SSL \u8bc1\u4e66 label.updating=\u6b63\u5728\u66f4\u65b0 -label.upload.volume=\u4e0a\u8f7d\u5377 +label.upgrade.required=\u9700\u8981\u5347\u7ea7 +label.upgrade.router.newer.template=\u5347\u7ea7\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f label.upload=\u4e0a\u8f7d +label.upload.volume=\u4e0a\u8f7d\u5377 label.url=URL label.usage.interface=\u4f7f\u7528\u754c\u9762 -label.use.vm.ip=\u4f7f\u7528 VM IP\: +label.usage.sanity.result=\u4f7f\u7528\u5065\u5168\u6027\u68c0\u67e5\u7ed3\u679c +label.usage.server=\u4f7f\u7528\u670d\u52a1\u5668 label.used=\u5df2\u4f7f\u7528 -label.user=\u7528\u6237 +label.user.data=\u7528\u6237\u6570\u636e +label.username.lower=\u7528\u6237\u540d label.username=\u7528\u6237\u540d label.users=\u7528\u6237 +label.user=\u7528\u6237 +label.user.vm=\u7528\u6237 VM +label.use.vm.ips=\u4f7f\u7528 VM IP +label.use.vm.ip=\u4f7f\u7528 VM IP\: label.value=\u503c label.vcdcname=vCenter DC \u540d\u79f0 label.vcenter.cluster=vCenter \u7fa4\u96c6 @@ -1228,396 +1442,132 @@ label.vcenter.datastore=vCenter \u6570\u636e\u5b58\u50a8 label.vcenter.host=vCenter \u4e3b\u673a label.vcenter.password=vCenter \u5bc6\u7801 label.vcenter.username=vCenter \u7528\u6237\u540d +label.vcenter=vCenter label.vcipaddress=vCenter IP \u5730\u5740 label.version=\u7248\u672c +label.vgpu.max.resolution=\u6700\u5927\u5206\u8fa8\u7387 +label.vgpu.max.vgpu.per.gpu=\u6bcf\u4e2a GPU \u7684 vGPU \u6570 +label.vgpu.remaining.capacity=\u5269\u4f59\u5bb9\u91cf +label.vgpu.type=vGPU \u7c7b\u578b +label.vgpu=VGPU +label.vgpu.video.ram=\u89c6\u9891 RAM label.view.all=\u67e5\u770b\u5168\u90e8 label.view.console=\u67e5\u770b\u63a7\u5236\u53f0 -label.view.more=\u67e5\u770b\u66f4\u591a -label.view=\u67e5\u770b label.viewing=\u67e5\u770b -label.virtual.appliance=\u865a\u62df\u8bbe\u5907 +label.view.more=\u67e5\u770b\u66f4\u591a +label.view.secondary.ips=\u67e5\u770b\u4e8c\u7ea7 IP +label.view=\u67e5\u770b +label.virtual.appliance.details=\u865a\u62df\u8bbe\u5907\u8be6\u7ec6\u4fe1\u606f label.virtual.appliances=\u865a\u62df\u8bbe\u5907 +label.virtual.appliance=\u865a\u62df\u8bbe\u5907 label.virtual.machines=\u865a\u62df\u673a -label.virtual.machine=\u865a\u62df\u673a +label.virtual.networking=\u865a\u62df\u7f51\u7edc\u8fde\u63a5 label.virtual.network=\u865a\u62df\u7f51\u7edc -label.virtual.router=\u865a\u62df\u8def\u7531\u5668 +label.virtual.routers.group.account=\u865a\u62df\u8def\u7531\u5668(\u6309\u5e10\u6237\u5206\u7ec4) +label.virtual.routers.group.cluster=\u865a\u62df\u8def\u7531\u5668(\u6309\u7fa4\u96c6\u5206\u7ec4) +label.virtual.routers.group.pod=\u865a\u62df\u8def\u7531\u5668(\u6309\u63d0\u4f9b\u70b9\u5206\u7ec4) +label.virtual.routers.group.zone=\u865a\u62df\u8def\u7531\u5668(\u6309\u8d44\u6e90\u57df\u5206\u7ec4) label.virtual.routers=\u865a\u62df\u8def\u7531\u5668 +label.virtual.router=\u865a\u62df\u8def\u7531\u5668 label.vlan.id=VLAN/VNI ID +label.vlan.only=VLAN +label.vlan.range.details=VLAN \u8303\u56f4\u8be6\u7ec6\u4fe1\u606f +label.vlan.ranges=VLAN \u8303\u56f4 label.vlan.range=VLAN/VNI \u8303\u56f4 label.vlan=VLAN -label.vnet=VLAN/VNI -label.vnet.id=VLAN/VNI ID -label.vxlan.id=VXLAN ID -label.vxlan.range=VXLAN \u8303\u56f4 -label.vxlan=VXLAN +label.vlan.vni.ranges=VLAN/VNI \u8303\u56f4 +label.vlan.vni.range=VLAN/VNI \u8303\u56f4 label.vm.add=\u6dfb\u52a0\u5b9e\u4f8b label.vm.destroy=\u9500\u6bc1 label.vm.display.name=VM \u663e\u793a\u540d\u79f0 -label.vm.name=VM \u540d\u79f0 -label.vm.reboot=\u91cd\u65b0\u542f\u52a8 -label.vm.start=\u542f\u52a8 -label.vm.state=VM \u72b6\u6001 -label.vm.stop=\u505c\u6b62 label.VMFS.datastore=VMFS \u6570\u636e\u5b58\u50a8 label.vmfs=VMFS +label.vm.id=VM ID +label.vm.ip=VM IP \u5730\u5740 +label.vm.name=VM \u540d\u79f0 +label.vm.password=VM \u7684\u5bc6\u7801 +label.vm.reboot=\u91cd\u65b0\u542f\u52a8 label.VMs.in.tier=\u5c42\u4e2d\u7684 VM -label.vms=VM label.vmsnapshot.current=\u6700\u65b0\u7248\u672c label.vmsnapshot.memory=\u5feb\u7167\u5185\u5b58 label.vmsnapshot.parentname=\u7236\u540d\u79f0 label.vmsnapshot.type=\u7c7b\u578b label.vmsnapshot=VM \u5feb\u7167 +label.vm.start=\u542f\u52a8 +label.vm.state=VM \u72b6\u6001 +label.vm.stop=\u505c\u6b62 +label.vms=VM +label.vmware.datacenter.id=VMware \u6570\u636e\u4e2d\u5fc3 ID +label.vmware.datacenter.name=VMware \u6570\u636e\u4e2d\u5fc3\u540d\u79f0 +label.vmware.datacenter.vcenter=VMware \u6570\u636e\u4e2d\u5fc3 vCenter label.vmware.traffic.label=VMware \u6d41\u91cf\u6807\u7b7e +label.vnet.id=VLAN/VNI ID +label.vnet=VLAN/VNI +label.vnmc.devices=VNMC \u8bbe\u5907 +label.vnmc=VNMC +label.volatile=\u53ef\u53d8 label.volgroup=\u5377\u7ec4 +label.volume.details=\u5377\u8be6\u7ec6\u4fe1\u606f label.volume.limits=\u5377\u9650\u5236 +label.volume.migrated=\u5377\u5df2\u8fc1\u79fb label.volume.name=\u5377\u540d\u79f0 -label.volume=\u5377 label.volumes=\u5377 +label.volume=\u5377 +label.vpc.distributedvpcrouter=\u5206\u5e03\u5f0f VPC \u8def\u7531\u5668 label.vpc.id=VPC ID +label.VPC.limits=VPC \u9650\u5236 +label.vpc.offering.details=VPC \u65b9\u6848\u8be6\u7ec6\u4fe1\u606f +label.vpc.offering=VPC \u65b9\u6848 label.VPC.router.details=VPC \u8def\u7531\u5668\u8be6\u7ec6\u4fe1\u606f +label.vpc.supportsregionlevelvpc=\u652f\u6301\u5730\u7406\u533a\u57df\u7ea7 VPC +label.vpc.virtual.router=VPC \u865a\u62df\u8def\u7531\u5668 label.vpc=VPC label.VPN.connection=VPN \u8fde\u63a5 -label.VPN.customer.gateway=VPN \u5ba2\u6237\u7f51\u5173 label.vpn.customer.gateway=VPN \u5ba2\u6237\u7f51\u5173 +label.VPN.customer.gateway=VPN \u5ba2\u6237\u7f51\u5173 label.VPN.gateway=VPN \u7f51\u5173 label.vpn=VPN label.vsmctrlvlanid=\u63a7\u5236 VLAN ID label.vsmpktvlanid=\u6570\u636e\u5305 VLAN ID label.vsmstoragevlanid=\u5b58\u50a8 VLAN ID label.vsphere.managed=\u7531 vSphere \u7ba1\u7406 +label.vswitch.name=vSwitch \u540d\u79f0 +label.vSwitch.type=vSwitch \u7c7b\u578b +label.vxlan.id=VXLAN ID +label.vxlan.range=VXLAN \u8303\u56f4 +label.vxlan=VXLAN label.waiting=\u6b63\u5728\u7b49\u5f85 label.warn=\u8b66\u544a -label.warning=\u8b66\u544a +label.warn.upper=\u8b66\u544a label.wednesday=\u661f\u671f\u4e09 label.weekly=\u6bcf\u5468 label.welcome.cloud.console=\u6b22\u8fce\u4f7f\u7528\u7ba1\u7406\u63a7\u5236\u53f0 label.welcome=\u6b22\u8fce label.what.is.cloudstack=\u4ec0\u4e48\u662f CloudStack&\#8482? +label.xenserver.tools.version.61.plus=\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+ +label.Xenserver.Tools.Version61plus=\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+ label.xenserver.traffic.label=XenServer \u6d41\u91cf\u6807\u7b7e label.yes=\u662f +label.zone.dedicated=\u8d44\u6e90\u57df\u5df2\u4e13\u7528 label.zone.details=\u8d44\u6e90\u57df\u8be6\u7ec6\u4fe1\u606f label.zone.id=\u8d44\u6e90\u57df ID +label.zone.lower=\u8d44\u6e90\u57df label.zone.step.1.title=\u6b65\u9aa4 1\: \u9009\u62e9\u4e00\u4e2a\u7f51\u7edc label.zone.step.2.title=\u6b65\u9aa4 2\: \u6dfb\u52a0\u4e00\u4e2a\u8d44\u6e90\u57df label.zone.step.3.title=\u6b65\u9aa4 3\: \u6dfb\u52a0\u4e00\u4e2a\u63d0\u4f9b\u70b9 label.zone.step.4.title=\u6b65\u9aa4 4\: \u6dfb\u52a0\u4e00\u4e2a IP \u8303\u56f4 -label.zone.type=\u8d44\u6e90\u57df\u7c7b\u578b -label.zone.wide=\u6574\u4e2a\u8d44\u6e90\u57df -label.zone=\u8d44\u6e90\u57df label.zones=\u8d44\u6e90\u57df +label.zone.type=\u8d44\u6e90\u57df\u7c7b\u578b +label.zone=\u8d44\u6e90\u57df +label.zone.wide=\u6574\u4e2a\u8d44\u6e90\u57df label.zoneWizard.trafficType.guest=\u6765\u5bbe\: \u6700\u7ec8\u7528\u6237\u865a\u62df\u673a\u4e4b\u95f4\u7684\u6d41\u91cf label.zoneWizard.trafficType.management=\u7ba1\u7406\: CloudStack \u7684\u5185\u90e8\u8d44\u6e90(\u5305\u62ec\u4e0e\u7ba1\u7406\u670d\u52a1\u5668\u901a\u4fe1\u7684\u4efb\u4f55\u7ec4\u4ef6\uff0c\u4f8b\u5982\u4e3b\u673a\u548c CloudStack \u7cfb\u7edf VM)\u4e4b\u95f4\u7684\u6d41\u91cf label.zoneWizard.trafficType.public=\u516c\u7528\: \u4e91\u4e2d Internet \u4e0e\u865a\u62df\u673a\u4e4b\u95f4\u7684\u6d41\u91cf\u3002 label.zoneWizard.trafficType.storage=\u5b58\u50a8\: \u4e3b\u5b58\u50a8\u670d\u52a1\u5668\u4e0e\u4e8c\u7ea7\u5b58\u50a8\u670d\u52a1\u5668(\u4f8b\u5982 VM \u6a21\u677f\u4e0e\u5feb\u7167)\u4e4b\u95f4\u7684\u6d41\u91cf -label.ldap.group.name=LDAP \u7ec4 -label.password.reset.confirm=\u5bc6\u7801\u5df2\u91cd\u7f6e\u4e3a -label.provider=\u63d0\u4f9b\u7a0b\u5e8f -label.resetVM=\u91cd\u7f6e VM -label.openDaylight=OpenDaylight -label.assign.instance.another=\u5c06\u5b9e\u4f8b\u5206\u914d\u7ed9\u5176\u4ed6\u5e10\u6237 -label.network.addVM=\u4e3a VM \u6dfb\u52a0\u7f51\u7edc -label.set.default.NIC=\u8bbe\u7f6e\u9ed8\u8ba4 NIC -label.Xenserver.Tools.Version61plus=\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+ -label.supportsstrechedl2subnet=\u652f\u6301\u6269\u5c55\u4e8c\u7ea7\u5b50\u7f51 -label.menu.vpc.offerings=VPC \u65b9\u6848 -label.vpc.offering=VPC \u65b9\u6848 -label.regionlevelvpc=\u5730\u7406\u533a\u57df\u7ea7 VPC -label.add.vpc.offering=\u6dfb\u52a0 VPC \u65b9\u6848 -label.distributedrouter=\u5206\u5e03\u5f0f\u8def\u7531\u5668 -label.vpc.offering.details=VPC \u65b9\u6848\u8be6\u7ec6\u4fe1\u606f -label.disable.vpc.offering=\u7981\u7528 VPC \u65b9\u6848 -label.enable.vpc.offering=\u542f\u7528 VPC \u65b9\u6848 -label.remove.vpc.offering=\u5220\u9664 VPC \u65b9\u6848 -label.vpc.distributedvpcrouter=\u5206\u5e03\u5f0f VPC \u8def\u7531\u5668 -label.vpc.supportsregionlevelvpc=\u652f\u6301\u5730\u7406\u533a\u57df\u7ea7 VPC -label.dynamically.scalable=\u53ef\u52a8\u6001\u6269\u5c55 -label.instance.scaled.up=\u5df2\u6269\u5c55\u5b9e\u4f8b -label.tag.key=\u6807\u8bb0\u5bc6\u94a5 -label.tag.value=\u6807\u8bb0\u503c -label.ipv6.address=IPv6 IP \u5730\u5740 -label.ipv6.gateway=IPv6 \u7f51\u5173 -label.ipv6.CIDR=IPv6 CIDR -label.VPC.limits=VPC \u9650\u5236 -label.edit.region=\u7f16\u8f91\u5730\u7406\u533a\u57df -label.gslb.domain.name=GSLB \u57df\u540d -label.add.gslb=\u6dfb\u52a0 GSLB -label.gslb.servicetype=\u670d\u52a1\u7c7b\u578b -label.gslb.details=GSLB \u8be6\u7ec6\u4fe1\u606f -label.gslb.delete=\u5220\u9664 GSLB -label.opendaylight.controller=OpenDaylight \u63a7\u5236\u5668 -label.opendaylight.controllers=OpenDaylight \u63a7\u5236\u5668 -label.portable.ip.ranges=\u53ef\u79fb\u690d IP \u8303\u56f4 -label.add.portable.ip.range=\u6dfb\u52a0\u53ef\u79fb\u690d IP \u8303\u56f4 -label.delete.portable.ip.range=\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4 -label.opendaylight.controllerdetail=OpenDaylight \u63a7\u5236\u5668\u8be6\u7ec6\u4fe1\u606f -label.portable.ip.range.details=\u53ef\u79fb\u690d IP \u8303\u56f4\u8be6\u7ec6\u4fe1\u606f -label.portable.ips=\u53ef\u79fb\u690d IP -label.gslb.assigned.lb=\u5df2\u5206\u914d\u8d1f\u8f7d\u5e73\u8861 -label.gslb.assigned.lb.more=\u5206\u914d\u66f4\u591a\u8d1f\u8f7d\u5e73\u8861 -label.gslb.lb.rule=\u8d1f\u8f7d\u5e73\u8861\u89c4\u5219 -label.gslb.lb.details=\u8d1f\u8f7d\u5e73\u8861\u8be6\u7ec6\u4fe1\u606f -label.gslb.lb.remove=\u4ece\u6b64 GSLB \u4e2d\u5220\u9664\u8d1f\u8f7d\u5e73\u8861 -label.enable.autoscale=\u542f\u7528\u81ea\u52a8\u7f29\u653e -label.disable.autoscale=\u7981\u7528\u81ea\u52a8\u7f29\u653e -label.min.instances=\u6700\u5c0f\u5b9e\u4f8b\u6570 -label.max.instances=\u6700\u5927\u5b9e\u4f8b\u6570 -label.add.OpenDaylight.device=\u6dfb\u52a0 OpenDaylight \u63a7\u5236\u5668 -label.show.advanced.settings=\u663e\u793a\u9ad8\u7ea7\u8bbe\u7f6e -label.delete.OpenDaylight.device=\u5220\u9664 OpenDaylight \u63a7\u5236\u5668 -label.polling.interval.sec=\u8f6e\u8be2\u65f6\u95f4\u95f4\u9694(\u79d2) -label.quiet.time.sec=\u5b89\u9759\u65f6\u95f4(\u79d2) -label.destroy.vm.graceperiod=\u9500\u6bc1 VM \u5bbd\u9650\u671f -label.SNMP.community=SNMP \u793e\u533a -label.SNMP.port=SNMP \u7aef\u53e3 -label.add.ucs.manager=\u6dfb\u52a0 UCS \u7ba1\u7406\u5668 -label.ovm.traffic.label=OVM \u6d41\u91cf\u6807\u7b7e -label.lxc.traffic.label=LXC \u6d41\u91cf\u6807\u7b7e -label.hyperv.traffic.label=HyperV \u6d41\u91cf\u6807\u7b7e -label.resource.name=\u8d44\u6e90\u540d\u79f0 -label.reource.id=\u8d44\u6e90 ID -label.vnmc.devices=VNMC \u8bbe\u5907 -label.add.vnmc.provider=\u6dfb\u52a0 VNMC \u63d0\u4f9b\u7a0b\u5e8f -label.enable.vnmc.provider=\u542f\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f -label.add.vnmc.device=\u6dfb\u52a0 VNMC \u8bbe\u5907 -label.ciscovnmc.resource.details=CiscoVNMC \u8d44\u6e90\u8be6\u7ec6\u4fe1\u606f -label.delete.ciscovnmc.resource=\u5220\u9664 CiscoVNMC \u8d44\u6e90 -label.enable.vnmc.device=\u542f\u7528 VNMC \u8bbe\u5907 -label.disbale.vnmc.device=\u7981\u7528 VNMC \u8bbe\u5907 -label.disable.vnmc.provider=\u7981\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f -label.services=\u670d\u52a1 -label.secondary.staging.store=\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 -label.release.account=\u4ece\u5e10\u6237\u4e2d\u91ca\u653e -label.release.account.lowercase=\u4ece\u5e10\u6237\u4e2d\u91ca\u653e -label.vlan.vni.ranges=VLAN/VNI \u8303\u56f4 -label.dedicated.vlan.vni.ranges=VLAN/VNI \u8303\u56f4\u5df2\u4e13\u7528 -label.dedicate.vlan.vni.range=\u5c06 VLAN/VNI \u8303\u56f4\u4e13\u7528 -label.vlan.vni.range=VLAN/VNI \u8303\u56f4 -label.vlan.range.details=VLAN \u8303\u56f4\u8be6\u7ec6\u4fe1\u606f -label.release.dedicated.vlan.range=\u91ca\u653e\u4e13\u7528 VLAN \u8303\u56f4 -label.broadcat.uri=\u5e7f\u64ad URI -label.ipv4.cidr=IPv4 CIDR -label.guest.network.details=\u6765\u5bbe\u7f51\u7edc\u8be6\u7ec6\u4fe1\u606f -label.ipv4.gateway=IPv4 \u7f51\u5173 -label.release.dedicated.vlan.range=\u91ca\u653e\u4e13\u7528 VLAN \u8303\u56f4 -label.vlan.ranges=VLAN \u8303\u56f4 -label.virtual.appliance.details=\u865a\u62df\u8bbe\u5907\u8be6\u7ec6\u4fe1\u606f -label.start.lb.vm=\u542f\u52a8 LB VM -label.stop.lb.vm=\u505c\u6b62 LB VM -label.migrate.lb.vm=\u8fc1\u79fb LB VM -label.vpc.virtual.router=VPC \u865a\u62df\u8def\u7531\u5668 -label.ovs=OVS -label.gslb.service=GSLB \u670d\u52a1 -label.gslb.service.public.ip=GSLB \u670d\u52a1\u516c\u7528 IP -label.gslb.service.private.ip=GSLB \u670d\u52a1\u4e13\u7528 IP -label.baremetal.dhcp.provider=\u88f8\u673a DHCP \u63d0\u4f9b\u7a0b\u5e8f -label.add.baremetal.dhcp.device=\u6dfb\u52a0\u88f8\u673a DHCP \u8bbe\u5907 -label.baremetal.pxe.provider=\u88f8\u673a PXE \u63d0\u4f9b\u7a0b\u5e8f -label.baremetal.pxe.device=\u6dfb\u52a0\u88f8\u673a PXE \u8bbe\u5907 -label.tftp.root.directory=Tftp \u6839\u76ee\u5f55 -label.add.vmware.datacenter=\u6dfb\u52a0 VMware \u6570\u636e\u4e2d\u5fc3 -label.remove.vmware.datacenter=\u5220\u9664 VMware \u6570\u636e\u4e2d\u5fc3 -label.dc.name=\u6570\u636e\u4e2d\u5fc3\u540d\u79f0 -label.vcenter=vCenter -label.dedicate.zone=\u5c06\u8d44\u6e90\u57df\u4e13\u7528 -label.zone.dedicated=\u8d44\u6e90\u57df\u5df2\u4e13\u7528 -label.release.dedicated.zone=\u91ca\u653e\u4e13\u7528\u8d44\u6e90\u57df -label.ipv6.dns1=IPv6 DNS1 -label.ipv6.dns2=IPv6 DNS2 -label.vmware.datacenter.name=VMware \u6570\u636e\u4e2d\u5fc3\u540d\u79f0 -label.vmware.datacenter.vcenter=VMware \u6570\u636e\u4e2d\u5fc3 vCenter -label.vmware.datacenter.id=VMware \u6570\u636e\u4e2d\u5fc3 ID -label.system.vm.details=\u7cfb\u7edf VM \u8be6\u7ec6\u4fe1\u606f -label.system.vm.scaled.up=\u5df2\u6269\u5c55\u7cfb\u7edf VM -label.console.proxy.vm=\u63a7\u5236\u53f0\u4ee3\u7406 VM -label.settings=\u8bbe\u7f6e -label.requires.upgrade=\u9700\u8981\u5347\u7ea7 -label.upgrade.router.newer.template=\u5347\u7ea7\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -label.router.vm.scaled.up=\u5df2\u6269\u5c55\u8def\u7531\u5668 VM -label.total.virtual.routers=\u865a\u62df\u8def\u7531\u5668\u603b\u6570 -label.upgrade.required=\u9700\u8981\u5347\u7ea7 -label.virtual.routers.group.zone=\u865a\u62df\u8def\u7531\u5668(\u6309\u8d44\u6e90\u57df\u5206\u7ec4) -label.total.virtual.routers.upgrade=\u9700\u8981\u5347\u7ea7\u7684\u865a\u62df\u8def\u7531\u5668\u603b\u6570 -label.virtual.routers.group.pod=\u865a\u62df\u8def\u7531\u5668(\u6309\u63d0\u4f9b\u70b9\u5206\u7ec4) -label.virtual.routers.group.cluster=\u865a\u62df\u8def\u7531\u5668(\u6309\u7fa4\u96c6\u5206\u7ec4) -label.zone.lower=\u8d44\u6e90\u57df -label.virtual.routers.group.account=\u865a\u62df\u8def\u7531\u5668(\u6309\u5e10\u6237\u5206\u7ec4) -label.netscaler.details=NetScaler \u8be6\u7ec6\u4fe1\u606f -label.baremetal.dhcp.devices=\u88f8\u673a DHCP \u8bbe\u5907 -label.baremetal.pxe.devices=\u88f8\u673a PXE \u8bbe\u5907 -label.addes.new.f5=\u5df2\u6dfb\u52a0\u65b0 F5 -label.f5.details=F5 \u8be6\u7ec6\u4fe1\u606f -label.srx.details=SRX \u8be6\u7ec6\u4fe1\u606f -label.palo.alto.details=Palo Alto \u8be6\u7ec6\u4fe1\u606f -label.added.nicira.nvp.controller=\u5df2\u6dfb\u52a0\u65b0 Nicira NVP \u63a7\u5236\u5668 -label.nicira.nvp.details=Nicira NVP \u8be6\u7ec6\u4fe1\u606f -label.added.brocade.vcs.switch=\u5df2\u6dfb\u52a0\u65b0 Brocade Vcs \u4ea4\u6362\u673a -label.brocade.vcs.details=Brocade Vcs \u4ea4\u6362\u673a\u8be6\u7ec6\u4fe1\u606f -label.added.new.bigswitch.bcf.controller=\u5df2\u6dfb\u52a0\u65b0 BigSwitch BCF \u63a7\u5236\u5668 -label.bigswitch.bcf.details=BigSwitch BCF \u8be6\u7ec6\u4fe1\u606f -label.bigswitch.bcf.nat=\u5df2\u542f\u7528 BigSwitch BCF NAT -label.dedicate=\u4e13\u7528 -label.dedicate.pod=\u5c06\u63d0\u4f9b\u70b9\u4e13\u7528 -label.pod.dedicated=\u63d0\u4f9b\u70b9\u5df2\u4e13\u7528 -label.release.dedicated.pod=\u91ca\u653e\u4e13\u7528\u63d0\u4f9b\u70b9 -label.override.public.traffic=\u66ff\u4ee3\u516c\u5171\u6d41\u91cf -label.public.traffic.vswitch.type=\u516c\u5171\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u7c7b\u578b -label.public.traffic.vswitch.name=\u516c\u5171\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u540d\u79f0 -label.override.guest.traffic=\u66ff\u4ee3\u6765\u5bbe\u6d41\u91cf -label.guest.traffic.vswitch.type=\u6765\u5bbe\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u7c7b\u578b -label.guest.traffic.vswitch.name=\u6765\u5bbe\u6d41\u91cf\u865a\u62df\u4ea4\u6362\u673a\u540d\u79f0 -label.cisco.nexus1000v.ip.address=Nexus 1000v IP \u5730\u5740 -label.cisco.nexus1000v.username=Nexus 1000v \u7528\u6237\u540d -label.cisco.nexus1000v.password=Nexus 1000v \u5bc6\u7801 -label.dedicate.cluster=\u5c06\u7fa4\u96c6\u4e13\u7528 -label.release.dedicated.cluster=\u91ca\u653e\u4e13\u7528\u7fa4\u96c6 -label.dedicate.host=\u5c06\u4e3b\u673a\u4e13\u7528 -label.release.dedicated.host=\u91ca\u653e\u4e13\u7528\u4e3b\u673a -label.number.of.cpu.sockets=CPU \u63d2\u69fd\u6570 -label.delete.ucs.manager=\u5220\u9664 UCS Manager -label.blades=\u5200\u7247\u5f0f\u670d\u52a1\u5668 -label.chassis=\u673a\u7bb1 -label.blade.id=\u5200\u7247\u5f0f\u670d\u52a1\u5668 ID -label.associated.profile=\u5df2\u5173\u8054\u914d\u7f6e\u6587\u4ef6 -label.refresh.blades=\u5237\u65b0\u5200\u7247\u5f0f\u670d\u52a1\u5668 -label.instanciate.template.associate.profile.blade=\u5c06\u6a21\u677f\u5b9e\u4f8b\u5316\u5e76\u5c06\u914d\u7f6e\u6587\u4ef6\u4e0e\u5200\u7247\u5f0f\u670d\u52a1\u5668\u5173\u8054 -label.select.template=\u9009\u62e9\u6a21\u677f -label.profile=\u914d\u7f6e\u6587\u4ef6 -label.delete.profile=\u5220\u9664\u914d\u7f6e\u6587\u4ef6 -label.disassociate.profile.blade=\u53d6\u6d88\u5c06\u914d\u7f6e\u6587\u4ef6\u4e0e\u5200\u7247\u5f0f\u670d\u52a1\u5668\u5173\u8054 -label.secondary.storage.details=\u4e8c\u7ea7\u5b58\u50a8\u8be6\u7ec6\u4fe1\u606f -label.secondary.staging.store.details=\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8\u8be6\u7ec6\u4fe1\u606f -label.add.nfs.secondary.staging.store=\u6dfb\u52a0 NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 -label.delete.secondary.staging.store=\u5220\u9664\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 -label.ipv4.start.ip=IPv4 \u8d77\u59cb IP -label.ipv4.end.ip=IPv4 \u7ed3\u675f IP -label.ipv6.start.ip=IPv6 \u8d77\u59cb IP -label.ipv6.end.ip=IPv6 \u7ed3\u675f IP -label.vm.password=VM \u7684\u5bc6\u7801 -label.group.by.zone=\u6309\u8d44\u6e90\u57df\u5206\u7ec4 -label.group.by.pod=\u6309\u63d0\u4f9b\u70b9\u5206\u7ec4 -label.group.by.cluster=\u6309\u7fa4\u96c6\u5206\u7ec4 -label.group.by.account=\u6309\u5e10\u6237\u5206\u7ec4 -label.no.grouping=(\u672a\u5206\u7ec4) -label.create.nfs.secondary.staging.storage=\u521b\u5efa NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8 -label.username.lower=\u7528\u6237\u540d -label.password.lower=\u5bc6\u7801 -label.email.lower=\u7535\u5b50\u90ae\u4ef6 -label.firstname.lower=\u540d\u5b57 -label.lastname.lower=\u59d3\u6c0f -label.domain.lower=\u57df -label.account.lower=\u5e10\u6237 -label.type.lower=\u7c7b\u578b -label.rule.number=\u89c4\u5219\u7f16\u53f7 -label.action=\u64cd\u4f5c -label.name.lower=\u540d\u79f0 -label.ucs=UCS -label.change.affinity=\u66f4\u6539\u5173\u8054\u6027 -label.persistent=\u6c38\u4e45 -label.broadcasturi=\u5e7f\u64ad URI -label.network.cidr=\u7f51\u7edc CIDR -label.reserved.ip.range=\u9884\u7559 IP \u8303\u56f4 -label.autoscale=\u81ea\u52a8\u6269\u5c55 -label.health.check=\u8fd0\u884c\u72b6\u51b5\u68c0\u67e5 -label.public.load.balancer.provider=\u516c\u7528\u8d1f\u8f7d\u5e73\u8861\u5668\u63d0\u4f9b\u7a0b\u5e8f -label.add.isolated.network=\u6dfb\u52a0\u9694\u79bb\u7f51\u7edc -label.add.isolated.guest.network=\u6dfb\u52a0\u9694\u79bb\u7684\u6765\u5bbe\u7f51\u7edc -label.vlan.only=VLAN -label.secondary.isolated.vlan.id=\u4e8c\u7ea7\u9694\u79bb VLAN ID -label.ipv4.netmask=IPv4 \u7f51\u7edc\u63a9\u7801 -label.custom=\u81ea\u5b9a\u4e49 -label.disable.network.offering=\u7981\u7528\u7f51\u7edc\u65b9\u6848 -label.enable.network.offering=\u542f\u7528\u7f51\u7edc\u65b9\u6848 -label.remove.network.offering=\u5220\u9664\u7f51\u7edc\u65b9\u6848 -label.system.offering.for.router=\u8def\u7531\u5668\u7684\u7cfb\u7edf\u65b9\u6848 -label.mode=\u6a21\u5f0f -label.associate.public.ip=\u5173\u8054\u516c\u7528 IP -label.acl=ACL -label.user.data=\u7528\u6237\u6570\u636e -label.virtual.networking=\u865a\u62df\u7f51\u7edc\u8fde\u63a5 -label.allow=\u5141\u8bb8 -label.deny=\u62d2\u7edd -label.default.egress.policy=\u9ed8\u8ba4\u51fa\u53e3\u89c4\u5219 -label.xenserver.tools.version.61.plus=\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+ -label.gpu=GPU -label.vgpu.type=vGPU \u7c7b\u578b -label.vgpu.video.ram=\u89c6\u9891 RAM -label.vgpu.max.resolution=\u6700\u5927\u5206\u8fa8\u7387 -label.vgpu.max.vgpu.per.gpu=\u6bcf\u4e2a GPU \u7684 vGPU \u6570 -label.vgpu.remaining.capacity=\u5269\u4f59\u5bb9\u91cf -label.routing.host=\u6b63\u5728\u8def\u7531\u4e3b\u673a -label.usage.server=\u4f7f\u7528\u670d\u52a1\u5668 -label.user.vm=\u7528\u6237 VM -label.resource.limit.exceeded=\u5df2\u8d85\u51fa\u8d44\u6e90\u9650\u5236 -label.direct.attached.public.ip=\u76f4\u8fde\u516c\u7528 IP -label.usage.sanity.result=\u4f7f\u7528\u5065\u5168\u6027\u68c0\u67e5\u7ed3\u679c -label.select.region=\u9009\u62e9\u5730\u7406\u533a\u57df -label.info.upper=\u4fe1\u606f -label.warn.upper=\u8b66\u544a -label.error.upper=\u9519\u8bef -label.event.deleted=\u4e8b\u4ef6\u5df2\u5220\u9664 -label.add.ciscoASA1000v=\u6dfb\u52a0 CiscoASA1000v \u8d44\u6e90 -label.delete.ciscoASA1000v=\u5220\u9664 CiscoASA1000v -label.inside.port.profile=\u5185\u90e8\u7aef\u53e3\u914d\u7f6e\u6587\u4ef6 -label.archive=\u5b58\u6863 -label.event.archived=\u4e8b\u4ef6\u5df2\u5b58\u6863 -label.alert.details=\u8b66\u62a5\u8be6\u7ec6\u4fe1\u606f -label.alert.deleted=\u8b66\u62a5\u5df2\u5220\u9664 -label.alert.archived=\u8b66\u62a5\u5df2\u5b58\u6863 -label.volume.details=\u5377\u8be6\u7ec6\u4fe1\u606f -label.volume.migrated=\u5377\u5df2\u8fc1\u79fb -label.storage.pool=\u5b58\u50a8\u6c60 -label.enable.host=\u542f\u7528\u4e3b\u673a -label.disable.host=\u7981\u7528\u4e3b\u673a -label.copying.iso=\u6b63\u5728\u590d\u5236 ISO -label.add.internal.lb=\u6dfb\u52a0\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 -label.internal.lb.details=\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668\u8be6\u7ec6\u4fe1\u606f -label.delete.internal.lb=\u5220\u9664\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 -label.remove.vm.load.balancer=\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u4e2d\u5220\u9664 VM -label.add.acl.list=\u6dfb\u52a0 ACL \u5217\u8868 -label.add.list.name=ACL \u5217\u8868\u540d\u79f0 -label.add.network.acl.list=\u6dfb\u52a0\u7f51\u7edc ACL \u5217\u8868 -label.delete.acl.list=\u5220\u9664 ACL \u5217\u8868 -label.acl.replaced=ACL \u5df2\u66ff\u6362 -label.ipv4.dns1=IPv4 DNS1 -label.ipv4.dns2=IPv4 DNS2 -label.protocol.number=\u534f\u8bae\u7f16\u53f7 -label.edit.acl.rule=\u7f16\u8f91 ACL \u89c4\u5219 -label.source.ip.address=\u6e90 IP \u5730\u5740 -label.source.port=\u6e90\u7aef\u53e3 -label.instance.port=\u5b9e\u4f8b\u7aef\u53e3 -label.assigned.vms=\u5df2\u5206\u914d\u7684 VM -label.replace.acl=\u66ff\u6362 ACL -label.source.nat.supported=\u652f\u6301 SourceNAT -label.acl.name=ACL \u540d\u79f0 -label.acl.id=ACL ID -label.passive=\u88ab\u52a8 -label.replace.acl.list=\u66ff\u6362 ACL \u5217\u8868 -label.vswitch.name=vSwitch \u540d\u79f0 -label.vSwitch.type=vSwitch \u7c7b\u578b -label.ping.path=Ping \u8def\u5f84 -label.response.timeout.in.sec=\u54cd\u5e94\u8d85\u65f6(\u79d2) -label.health.check.interval.in.sec=\u8fd0\u884c\u72b6\u51b5\u68c0\u67e5\u65f6\u95f4\u95f4\u9694(\u79d2) -label.healthy.threshold=\u6b63\u5e38\u9608\u503c -label.unhealthy.threshold=\u4e0d\u6b63\u5e38\u9608\u503c -label.other=\u5176\u4ed6 -label.vm.id=VM ID -label.vnmc=VNMC -label.scale.up.policy=\u6269\u5c55\u7b56\u7565 -label.counter=\u8ba1\u6570\u5668 -label.operator=\u8fd0\u7b97\u7b26 -label.threshold=\u9608\u503c -label.load.balancer.type=\u8d1f\u8f7d\u5e73\u8861\u5668\u7c7b\u578b -label.vgpu=VGPU -label.sticky.name=\u7c98\u6027\u540d\u79f0 -label.stickiness.method=\u7c98\u6027\u65b9\u6cd5 -label.gslb=GSLB -label.portable.ip=\u53ef\u79fb\u690d IP -label.internallbvm=InternalLbVm -label.agent.state=\u4ee3\u7406\u72b6\u6001 -label.duration.in.sec=\u6301\u7eed\u65f6\u95f4(\u79d2) managed.state=\u6258\u7ba1\u72b6\u6001 -message.acquire.new.ip.vpc=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64 VPC \u83b7\u53d6\u4e00\u4e2a\u65b0 IP\u3002 +message.acquire.ip.nic=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u83b7\u53d6\u6b64 NIC \u7684\u65b0\u4e8c\u7ea7 IP\u3002
\u6ce8\u610f\: \u60a8\u9700\u8981\u5728\u865a\u62df\u673a\u5185\u90e8\u624b\u52a8\u914d\u7f6e\u65b0\u83b7\u53d6\u7684\u4e8c\u7ea7 IP\u3002 message.acquire.new.ip=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64\u7f51\u7edc\u83b7\u53d6\u4e00\u4e2a\u65b0 IP\u3002 +message.acquire.new.ip.vpc=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64 VPC \u83b7\u53d6\u4e00\u4e2a\u65b0 IP\u3002 message.acquire.public.ip=\u8bf7\u9009\u62e9\u4e00\u4e2a\u8981\u4ece\u4e2d\u83b7\u53d6\u65b0 IP \u7684\u8d44\u6e90\u57df\u3002 message.action.cancel.maintenance.mode=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u53d6\u6d88\u6b64\u7ef4\u62a4\u6a21\u5f0f\u3002 message.action.cancel.maintenance=\u5df2\u6210\u529f\u53d6\u6d88\u7ef4\u62a4\u60a8\u7684\u4e3b\u673a\u3002\u6b64\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u957f\u8fbe\u51e0\u5206\u949f\u65f6\u95f4\u3002 @@ -1633,6 +1583,7 @@ message.action.delete.ISO.for.all.zones=\u6b64 ISO \u7531\u6240\u6709\u8d44\u6e9 message.action.delete.ISO=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 ISO\u3002 message.action.delete.network=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u7f51\u7edc\u3002 message.action.delete.nexusVswitch=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 Nexus 1000v +message.action.delete.nic=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u79fb\u9664\u6b64 NIC\uff0c\u6b64\u64cd\u4f5c\u8fd8\u5c06\u4ece VM \u4e2d\u79fb\u9664\u5173\u8054\u7684\u7f51\u7edc\u3002 message.action.delete.physical.network=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u7269\u7406\u7f51\u7edc message.action.delete.pod=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u63d0\u4f9b\u70b9\u3002 message.action.delete.primary.storage=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u4e3b\u5b58\u50a8\u3002 @@ -1653,6 +1604,7 @@ message.action.disable.physical.network=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u89 message.action.disable.pod=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u6b64\u63d0\u4f9b\u70b9\u3002 message.action.disable.static.NAT=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u9759\u6001 NAT\u3002 message.action.disable.zone=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u6b64\u8d44\u6e90\u57df\u3002 +message.action.downloading.template=\u6b63\u5728\u4e0b\u8f7d\u6a21\u677f\u3002 message.action.download.iso=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e0b\u8f7d\u6b64 ISO\u3002 message.action.download.template=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e0b\u8f7d\u6b64\u6a21\u677f\u3002 message.action.enable.cluster=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u6b64\u7fa4\u96c6\u3002 @@ -1675,6 +1627,7 @@ message.action.remove.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u966 message.action.reset.password.off=\u60a8\u7684\u5b9e\u4f8b\u5f53\u524d\u4e0d\u652f\u6301\u6b64\u529f\u80fd\u3002 message.action.reset.password.warning=\u5fc5\u987b\u5148\u505c\u6b62\u60a8\u7684\u5b9e\u4f8b\uff0c\u7136\u540e\u518d\u5c1d\u8bd5\u66f4\u6539\u5176\u5f53\u524d\u7684\u5bc6\u7801\u3002 message.action.restore.instance=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u8fd8\u539f\u6b64\u5b9e\u4f8b\u3002 +message.action.revert.snapshot=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u62e5\u6709\u7684\u5377\u8fd8\u539f\u4e3a\u6b64\u5feb\u7167\u3002 message.action.start.instance=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u52a8\u6b64\u5b9e\u4f8b\u3002 message.action.start.router=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u52a8\u6b64\u8def\u7531\u5668\u3002 message.action.start.systemvm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u52a8\u6b64\u7cfb\u7edf VM\u3002 @@ -1682,23 +1635,26 @@ message.action.stop.instance=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u505c\u6 message.action.stop.router=\u6b64\u865a\u62df\u8def\u7531\u5668\u63d0\u4f9b\u7684\u6240\u6709\u670d\u52a1\u90fd\u5c06\u4e2d\u65ad\u3002\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u505c\u6b62\u6b64\u8def\u7531\u5668\u3002 message.action.stop.systemvm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u505c\u6b62\u6b64\u7cfb\u7edf VM\u3002 message.action.take.snapshot=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u521b\u5efa\u6b64\u5377\u7684\u5feb\u7167\u3002 -message.action.revert.snapshot=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u62e5\u6709\u7684\u5377\u8fd8\u539f\u4e3a\u6b64\u5feb\u7167\u3002 message.action.unmanage.cluster=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u53d6\u6d88\u6258\u7ba1\u6b64\u7fa4\u96c6\u3002 message.action.vmsnapshot.delete=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 VM \u5feb\u7167\u3002 message.action.vmsnapshot.revert=\u8fd8\u539f VM \u5feb\u7167 message.activate.project=\u662f\u5426\u786e\u5b9e\u8981\u6fc0\u6d3b\u6b64\u9879\u76ee? -message.add.cluster.zone=\u5411\u8d44\u6e90\u57df \u4e2d\u6dfb\u52a0\u4e00\u4e2a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u6258\u7ba1\u7684\u7fa4\u96c6 message.add.cluster=\u5411\u8d44\u6e90\u57df \u3001\u63d0\u4f9b\u70b9 \u4e2d\u6dfb\u52a0\u4e00\u4e2a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u6258\u7ba1\u7684\u7fa4\u96c6 +message.add.cluster.zone=\u5411\u8d44\u6e90\u57df \u4e2d\u6dfb\u52a0\u4e00\u4e2a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u6258\u7ba1\u7684\u7fa4\u96c6 message.add.disk.offering=\u8bf7\u6307\u5b9a\u4ee5\u4e0b\u53c2\u6570\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u78c1\u76d8\u65b9\u6848 message.add.domain=\u8bf7\u6307\u5b9a\u8981\u5728\u6b64\u57df\u4e0b\u521b\u5efa\u7684\u5b50\u57df message.add.firewall=\u5411\u8d44\u6e90\u57df\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u9632\u706b\u5899 message.add.guest.network=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6dfb\u52a0\u4e00\u4e2a\u6765\u5bbe\u7f51\u7edc message.add.host=\u8bf7\u6307\u5b9a\u4ee5\u4e0b\u53c2\u6570\u4ee5\u6dfb\u52a0\u4e00\u53f0\u65b0\u4e3b\u673a +message.adding.host=\u6b63\u5728\u6dfb\u52a0\u4e3b\u673a +message.adding.Netscaler.device=\u6b63\u5728\u6dfb\u52a0 NetScaler \u8bbe\u5907 +message.adding.Netscaler.provider=\u6b63\u5728\u6dfb\u52a0 NetScaler \u63d0\u4f9b\u7a0b\u5e8f message.add.ip.range.direct.network=\u5411\u8d44\u6e90\u57df \u4e2d\u7684\u76f4\u63a5\u7f51\u7edc \u6dfb\u52a0\u4e00\u4e2a IP \u8303\u56f4 message.add.ip.range.to.pod=

\u5411\u63d0\u4f9b\u70b9\u6dfb\u52a0\u4e00\u4e2a IP \u8303\u56f4\:

message.add.ip.range=\u5411\u8d44\u6e90\u57df\u4e2d\u7684\u516c\u7528\u7f51\u7edc\u6dfb\u52a0\u4e00\u4e2a IP \u8303\u56f4 -message.add.load.balancer.under.ip=\u5df2\u5728\u4ee5\u4e0b IP \u4e0b\u6dfb\u52a0\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219\: +message.additional.networks.desc=\u8bf7\u9009\u62e9\u865a\u62df\u673a\u8981\u8fde\u63a5\u5230\u7684\u5176\u4ed6\u7f51\u7edc\u3002 message.add.load.balancer=\u5411\u8d44\u6e90\u57df\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u8d1f\u8f7d\u5e73\u8861\u5668 +message.add.load.balancer.under.ip=\u5df2\u5728\u4ee5\u4e0b IP \u4e0b\u6dfb\u52a0\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219\: message.add.network=\u4e3a\u8d44\u6e90\u57df \u6dfb\u52a0\u4e00\u4e2a\u65b0\u7f51\u7edc message.add.new.gateway.to.vpc=\u8bf7\u6307\u5b9a\u5c06\u65b0\u7f51\u5173\u6dfb\u52a0\u5230\u6b64 VPC \u6240\u9700\u7684\u4fe1\u606f\u3002 message.add.pod.during.zone.creation=\u6bcf\u4e2a\u8d44\u6e90\u57df\u4e2d\u5fc5\u987b\u5305\u542b\u4e00\u4e2a\u6216\u591a\u4e2a\u63d0\u4f9b\u70b9\uff0c\u73b0\u5728\u6211\u4eec\u5c06\u6dfb\u52a0\u7b2c\u4e00\u4e2a\u63d0\u4f9b\u70b9\u3002\u63d0\u4f9b\u70b9\u4e2d\u5305\u542b\u4e3b\u673a\u548c\u4e3b\u5b58\u50a8\u670d\u52a1\u5668\uff0c\u60a8\u5c06\u5728\u968f\u540e\u7684\u67d0\u4e2a\u6b65\u9aa4\u4e2d\u6dfb\u52a0\u8fd9\u4e9b\u4e3b\u673a\u548c\u670d\u52a1\u5668\u3002\u9996\u5148\uff0c\u8bf7\u4e3a CloudStack \u7684\u5185\u90e8\u7ba1\u7406\u6d41\u91cf\u914d\u7f6e\u4e00\u4e2a\u9884\u7559 IP \u5730\u5740\u8303\u56f4\u3002\u9884\u7559\u7684 IP \u8303\u56f4\u5bf9\u4e91\u4e2d\u7684\u6bcf\u4e2a\u8d44\u6e90\u57df\u6765\u8bf4\u5fc5\u987b\u552f\u4e00\u3002 @@ -1712,10 +1668,7 @@ message.add.system.service.offering=\u8bf7\u586b\u5199\u4ee5\u4e0b\u6570\u636e\u message.add.template=\u8bf7\u8f93\u5165\u4ee5\u4e0b\u6570\u636e\u4ee5\u521b\u5efa\u65b0\u6a21\u677f message.add.volume=\u8bf7\u586b\u5199\u4ee5\u4e0b\u6570\u636e\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u65b0\u5377\u3002 message.add.VPN.gateway=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6dfb\u52a0 VPN \u7f51\u5173 -message.adding.host=\u6b63\u5728\u6dfb\u52a0\u4e3b\u673a -message.adding.Netscaler.device=\u6b63\u5728\u6dfb\u52a0 NetScaler \u8bbe\u5907 -message.adding.Netscaler.provider=\u6b63\u5728\u6dfb\u52a0 NetScaler \u63d0\u4f9b\u7a0b\u5e8f -message.additional.networks.desc=\u8bf7\u9009\u62e9\u865a\u62df\u673a\u8981\u8fde\u63a5\u5230\u7684\u5176\u4ed6\u7f51\u7edc\u3002 +message.admin.guide.read=\u5bf9\u4e8e\u57fa\u4e8e VMware \u7684 VM\uff0c\u8bf7\u5148\u9605\u8bfb\u7ba1\u7406\u6307\u5357\u4e2d\u7684\u52a8\u6001\u6269\u5c55\u90e8\u5206\uff0c\u7136\u540e\u518d\u8fdb\u884c\u6269\u5c55\u3002\u662f\u5426\u8981\u7ee7\u7eed?\\, message.advanced.mode.desc=\u5982\u679c\u8981\u542f\u7528 VLAN \u652f\u6301\uff0c\u8bf7\u9009\u62e9\u6b64\u7f51\u7edc\u6a21\u5f0f\u3002\u6b64\u7f51\u7edc\u6a21\u5f0f\u5728\u5141\u8bb8\u7ba1\u7406\u5458\u63d0\u4f9b\u9632\u706b\u5899\u3001VPN \u6216\u8d1f\u8f7d\u5e73\u8861\u5668\u652f\u6301\u7b49\u81ea\u5b9a\u4e49\u7f51\u7edc\u65b9\u6848\u4ee5\u53ca\u542f\u7528\u76f4\u63a5\u7f51\u7edc\u8fde\u63a5\u4e0e\u865a\u62df\u7f51\u7edc\u8fde\u63a5\u7b49\u65b9\u9762\u63d0\u4f9b\u4e86\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002 message.advanced.security.group=\u5982\u679c\u8981\u4f7f\u7528\u5b89\u5168\u7ec4\u63d0\u4f9b\u6765\u5bbe VM \u9694\u79bb\uff0c\u8bf7\u9009\u62e9\u6b64\u6a21\u5f0f\u3002 message.advanced.virtual=\u5982\u679c\u8981\u4f7f\u7528\u6574\u4e2a\u8d44\u6e90\u57df\u7684 VLAN \u63d0\u4f9b\u6765\u5bbe VM \u9694\u79bb\uff0c\u8bf7\u9009\u62e9\u6b64\u6a21\u5f0f\u3002 @@ -1729,57 +1682,94 @@ message.attach.volume=\u8bf7\u586b\u5199\u4ee5\u4e0b\u6570\u636e\u4ee5\u9644\u52 message.basic.mode.desc=\u5982\u679c\u60a8*\u4e0d*\u5e0c\u671b\u542f\u7528\u4efb\u4f55 VLAN \u652f\u6301\uff0c\u8bf7\u9009\u62e9\u6b64\u7f51\u7edc\u6a21\u5f0f\u3002\u5c06\u76f4\u63a5\u4ece\u6b64\u7f51\u7edc\u4e2d\u4e3a\u5728\u6b64\u7f51\u7edc\u6a21\u5f0f\u4e0b\u521b\u5efa\u7684\u6240\u6709\u865a\u62df\u673a\u5b9e\u4f8b\u5206\u914d\u4e00\u4e2a IP\uff0c\u5e76\u4f7f\u7528\u5b89\u5168\u7ec4\u63d0\u4f9b\u5b89\u5168\u6027\u548c\u9694\u79bb\u3002 message.change.offering.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u66f4\u6539\u6b64\u865a\u62df\u5b9e\u4f8b\u7684\u670d\u52a1\u65b9\u6848\u3002 message.change.password=\u8bf7\u66f4\u6539\u60a8\u7684\u5bc6\u7801\u3002 +message.cluster.dedicated=\u7fa4\u96c6\u5df2\u4e13\u7528 +message.cluster.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u7fa4\u96c6 message.configure.all.traffic.types=\u60a8\u6709\u591a\u4e2a\u7269\u7406\u7f51\u7edc\uff0c\u8bf7\u5355\u51fb\u201c\u7f16\u8f91\u201d\u6309\u94ae\u4e3a\u6bcf\u79cd\u6d41\u91cf\u7c7b\u578b\u914d\u7f6e\u6807\u7b7e\u3002 +message.configure.ldap=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u914d\u7f6e LDAP\u3002 message.configuring.guest.traffic=\u6b63\u5728\u914d\u7f6e\u6765\u5bbe\u6d41\u91cf message.configuring.physical.networks=\u6b63\u5728\u914d\u7f6e\u7269\u7406\u7f51\u7edc message.configuring.public.traffic=\u6b63\u5728\u914d\u7f6e\u516c\u5171\u6d41\u91cf message.configuring.storage.traffic=\u6b63\u5728\u914d\u7f6e\u5b58\u50a8\u6d41\u91cf message.confirm.action.force.reconnect=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5f3a\u5236\u91cd\u65b0\u8fde\u63a5\u6b64\u4e3b\u673a\u3002 -message.confirm.delete.F5=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 F5 -message.confirm.delete.BigSwitchBcf=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 BigSwitch BCF \u63a7\u5236\u5668 -message.confirm.delete.BrocadeVcs=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Brocade Vcs \u4ea4\u6362\u673a -message.confirm.delete.NetScaler=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 NetScaler -message.confirm.delete.NuageVsp=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Nuage \u865a\u62df\u670d\u52a1\u76ee\u5f55 -message.confirm.delete.SRX=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 SRX -message.confirm.delete.PA=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Palo Alto -message.confirm.destroy.router=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u9500\u6bc1\u6b64\u8def\u7531\u5668 -message.confirm.disable.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u6b64\u63d0\u4f9b\u7a0b\u5e8f -message.confirm.enable.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u6b64\u63d0\u4f9b\u7a0b\u5e8f -message.confirm.join.project=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u52a0\u5165\u6b64\u9879\u76ee\u3002 -message.confirm.remove.IP.range=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 IP \u8303\u56f4\u3002 -message.confirm.shutdown.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5173\u95ed\u6b64\u63d0\u4f9b\u7a0b\u5e8f -message.confirm.current.guest.CIDR.unchanged=\u662f\u5426\u8981\u4f7f\u5f53\u524d\u6765\u5bbe\u7f51\u7edc CIDR \u4fdd\u6301\u4e0d\u53d8? -message.confirm.delete.ciscoASA1000v=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 CiscoASA1000v -message.confirm.remove.selected.events=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u9009\u5b9a\u4e8b\u4ef6 -message.confirm.archive.selected.events=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u9009\u5b9a\u4e8b\u4ef6 -message.confirm.remove.event=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u4e8b\u4ef6? -message.confirm.archive.event=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u6b64\u4e8b\u4ef6\u3002 -message.confirm.remove.selected.alerts=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u9009\u5b9a\u8b66\u62a5 -message.confirm.archive.selected.alerts=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u9009\u5b9a\u8b66\u62a5 -message.confirm.delete.alert=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u8b66\u62a5? +message.confirm.add.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6dfb\u52a0 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 message.confirm.archive.alert=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u6b64\u8b66\u62a5\u3002 -message.confirm.migrate.volume=\u662f\u5426\u8981\u8fc1\u79fb\u6b64\u5377? +message.confirm.archive.event=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u6b64\u4e8b\u4ef6\u3002 +message.confirm.archive.selected.alerts=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u9009\u5b9a\u8b66\u62a5 +message.confirm.archive.selected.events=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5b58\u6863\u9009\u5b9a\u4e8b\u4ef6 message.confirm.attach.disk=\u662f\u5426\u786e\u5b9e\u8981\u9644\u52a0\u78c1\u76d8? message.confirm.create.volume=\u662f\u5426\u786e\u5b9e\u8981\u521b\u5efa\u5377? -message.confirm.enable.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u4e3b\u673a -message.confirm.disable.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u4e3b\u673a -message.confirm.delete.internal.lb=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 -message.confirm.remove.load.balancer=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u4e2d\u5220\u9664 VM +message.confirm.current.guest.CIDR.unchanged=\u662f\u5426\u8981\u4f7f\u5f53\u524d\u6765\u5bbe\u7f51\u7edc CIDR \u4fdd\u6301\u4e0d\u53d8? +message.confirm.dedicate.cluster.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u7fa4\u96c6\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? +message.confirm.dedicate.host.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u4e3b\u673a\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? +message.confirm.dedicate.pod.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u63d0\u4f9b\u70b9\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? +message.confirm.dedicate.zone=\u662f\u5426\u8981\u5c06\u6b64\u8d44\u6e90\u57df\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? message.confirm.delete.acl.list=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64 ACL \u5217\u8868? +message.confirm.delete.alert=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u8b66\u62a5? +message.confirm.delete.BrocadeVcs=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Brocade Vcs \u4ea4\u6362\u673a +message.confirm.delete.ciscoASA1000v=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 CiscoASA1000v +message.confirm.delete.ciscovnmc.resource=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Cisco VNMC \u8d44\u6e90 +message.confirm.delete.F5=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 F5 +message.confirm.delete.internal.lb=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u5185\u90e8\u8d1f\u8f7d\u5e73\u8861\u5668 +message.confirm.delete.NetScaler=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 NetScaler +message.confirm.delete.NuageVsp=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Nuage \u865a\u62df\u670d\u52a1\u76ee\u5f55 +message.confirm.delete.PA=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Palo Alto +message.confirm.delete.secondary.staging.store=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8\u3002 +message.confirm.delete.SRX=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 SRX +message.confirm.delete.ucs.manager=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 UCS Manager +message.confirm.destroy.router=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u9500\u6bc1\u6b64\u8def\u7531\u5668 +message.confirm.disable.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u4e3b\u673a +message.confirm.disable.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u7981\u7528\u6b64\u7f51\u7edc\u65b9\u6848? +message.confirm.disable.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u6b64\u63d0\u4f9b\u7a0b\u5e8f +message.confirm.disable.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 +message.confirm.disable.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u7981\u7528\u6b64 VPC \u65b9\u6848? +message.confirm.enable.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u4e3b\u673a +message.confirm.enable.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u542f\u7528\u6b64\u7f51\u7edc\u65b9\u6848? +message.confirm.enable.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u6b64\u63d0\u4f9b\u7a0b\u5e8f +message.confirm.enable.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 +message.confirm.enable.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u542f\u7528\u6b64 VPC \u65b9\u6848? +message.confirm.join.project=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u52a0\u5165\u6b64\u9879\u76ee\u3002 +message.confirm.migrate.volume=\u662f\u5426\u8981\u8fc1\u79fb\u6b64\u5377? +message.confirm.refresh.blades=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5237\u65b0\u5200\u7247\u5f0f\u670d\u52a1\u5668\u3002 +message.confirm.release.dedicated.cluster=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u7fa4\u96c6? +message.confirm.release.dedicated.host=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u4e3b\u673a? +message.confirm.release.dedicated.pod=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u63d0\u4f9b\u70b9? +message.confirm.release.dedicated.zone=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u8d44\u6e90\u57df? +message.confirm.release.dedicate.vlan.range=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u91ca\u653e\u4e13\u7528 VLAN \u8303\u56f4 +message.confirm.remove.event=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u4e8b\u4ef6? +message.confirm.remove.IP.range=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 IP \u8303\u56f4\u3002 +message.confirm.remove.load.balancer=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4ece\u8d1f\u8f7d\u5e73\u8861\u5668\u4e2d\u5220\u9664 VM +message.confirm.remove.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u7f51\u7edc\u65b9\u6848? +message.confirm.remove.selected.alerts=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u9009\u5b9a\u8b66\u62a5 +message.confirm.remove.selected.events=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u9009\u5b9a\u4e8b\u4ef6 +message.confirm.remove.vmware.datacenter=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 VMware \u6570\u636e\u4e2d\u5fc3 +message.confirm.remove.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64 VPC \u65b9\u6848? message.confirm.replace.acl.new.one=\u662f\u5426\u8981\u5c06\u6b64 ACL \u66ff\u6362\u4e3a\u65b0 ACL? +message.confirm.scale.up.router.vm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u8def\u7531\u5668 VM? +message.confirm.scale.up.system.vm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u7cfb\u7edf VM? +message.confirm.shutdown.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5173\u95ed\u6b64\u63d0\u4f9b\u7a0b\u5e8f +message.confirm.start.lb.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u52a8 LB VM +message.confirm.stop.lb.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u505c\u6b62 LB VM +message.confirm.upgrade.router.newer.template=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f +message.confirm.upgrade.routers.account.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u5e10\u6237\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f +message.confirm.upgrade.routers.cluster.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u7fa4\u96c6\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f +message.confirm.upgrade.routers.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u8d44\u6e90\u57df\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f +message.confirm.upgrade.routers.pod.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u63d0\u4f9b\u70b9\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f message.copy.iso.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06 ISO \u590d\u5236\u5230 +message.copy.template.confirm=\u662f\u5426\u786e\u5b9e\u8981\u590d\u5236\u6a21\u677f? message.copy.template=\u5c06\u6a21\u677f XXX \u4ece\u8d44\u6e90\u57df \u590d\u5236\u5230 +message.create.template=\u662f\u5426\u786e\u5b9e\u8981\u521b\u5efa\u6a21\u677f? message.create.template.vm=\u57fa\u4e8e\u6a21\u677f \u521b\u5efa VM message.create.template.volume=\u8bf7\u5148\u6307\u5b9a\u4ee5\u4e0b\u4fe1\u606f\uff0c\u7136\u540e\u518d\u521b\u5efa\u78c1\u76d8\u5377 \u7684\u6a21\u677f\u3002\u521b\u5efa\u6a21\u677f\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u5230\u66f4\u957f\u7684\u65f6\u95f4\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u78c1\u76d8\u5377\u7684\u5927\u5c0f\u3002 -message.create.template=\u662f\u5426\u786e\u5b9e\u8981\u521b\u5efa\u6a21\u677f? message.creating.cluster=\u6b63\u5728\u521b\u5efa\u7fa4\u96c6 message.creating.guest.network=\u6b63\u5728\u521b\u5efa\u6765\u5bbe\u7f51\u7edc message.creating.physical.networks=\u6b63\u5728\u521b\u5efa\u7269\u7406\u7f51\u7edc message.creating.pod=\u6b63\u5728\u521b\u5efa\u63d0\u4f9b\u70b9 message.creating.primary.storage=\u6b63\u5728\u521b\u5efa\u4e3b\u5b58\u50a8 message.creating.secondary.storage=\u6b63\u5728\u521b\u5efa\u4e8c\u7ea7\u5b58\u50a8 +message.creating.systemVM=\u6b63\u5728\u521b\u5efa\u7cfb\u7edf VM (\u6b64\u64cd\u4f5c\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u65f6\u95f4) message.creating.zone=\u6b63\u5728\u521b\u5efa\u8d44\u6e90\u57df message.decline.invitation=\u662f\u5426\u786e\u5b9e\u8981\u62d2\u7edd\u6b64\u9879\u76ee\u9080\u8bf7? +message.dedicated.zone.released=\u5df2\u91ca\u653e\u4e13\u7528\u8d44\u6e90\u57df message.dedicate.zone=\u6b63\u5728\u5c06\u8d44\u6e90\u57df\u4e13\u7528 message.delete.account=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u5e10\u6237\u3002 message.delete.affinity.group=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64\u5173\u8054\u6027\u7ec4\u3002 @@ -1803,26 +1793,36 @@ message.disable.snapshot.policy=\u60a8\u5df2\u6210\u529f\u7981\u7528\u5f53\u524d message.disable.user=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u6b64\u7528\u6237\u3002 message.disable.vpn.access=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528\u8fdc\u7a0b\u8bbf\u95ee VPN\u3002 message.disable.vpn=\u662f\u5426\u786e\u5b9e\u8981\u7981\u7528 VPN? +message.disabling.network.offering=\u6b63\u5728\u7981\u7528\u7f51\u7edc\u65b9\u6848 +message.disabling.vpc.offering=\u6b63\u5728\u7981\u7528 VPC \u65b9\u6848 +message.disallowed.characters=\u7981\u7528\u5b57\u7b26\: <,> message.download.ISO=\u8bf7\u5355\u51fb 00000 \u4e0b\u8f7d ISO message.download.template=\u8bf7\u5355\u51fb 00000 \u4e0b\u8f7d\u6a21\u677f -message.download.volume.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e0b\u8f7d\u6b64\u5377 message.download.volume=\u8bf7\u5355\u51fb 00000 \u4e0b\u8f7d\u5377 message.edit.account=\u7f16\u8f91(\u201c-1\u201d\u8868\u793a\u5bf9\u8981\u521b\u5efa\u7684\u8d44\u6e90\u6570\u91cf\u6ca1\u6709\u4efb\u4f55\u9650\u5236) message.edit.confirm=\u8bf7\u5148\u786e\u8ba4\u60a8\u6240\u505a\u7684\u66f4\u6539\uff0c\u7136\u540e\u5355\u51fb\u201c\u4fdd\u5b58\u201d\u3002 message.edit.limits=\u8bf7\u6307\u5b9a\u5bf9\u4ee5\u4e0b\u8d44\u6e90\u7684\u9650\u5236\u3002\u201c-1\u201d\u8868\u793a\u4e0d\u9650\u5236\u8981\u521b\u5efa\u7684\u8d44\u6e90\u6570\u3002 message.edit.traffic.type=\u8bf7\u6307\u5b9a\u60a8\u5e0c\u671b\u4e0e\u6b64\u6d41\u91cf\u7c7b\u578b\u5173\u8054\u7684\u6d41\u91cf\u6807\u7b7e\u3002 message.enable.account=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u6b64\u5e10\u6237\u3002 +message.enabled.vpn.ip.sec=\u60a8\u7684 IPSec \u9884\u5171\u4eab\u5bc6\u94a5 +message.enabled.vpn=\u60a8\u7684\u8fdc\u7a0b\u8bbf\u95ee VPN \u5f53\u524d\u5df2\u542f\u7528\uff0c\u53ef\u4ee5\u901a\u8fc7 IP \u8fdb\u884c\u8bbf\u95ee message.enable.user=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528\u6b64\u7528\u6237\u3002 message.enable.vpn.access=\u5f53\u524d\u5df2\u5bf9\u6b64 IP \u5730\u5740\u7981\u7528\u4e86 VPN\u3002\u662f\u5426\u8981\u542f\u7528 VPN \u8bbf\u95ee? message.enable.vpn=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5bf9\u6b64 IP \u5730\u5740\u542f\u7528\u8fdc\u7a0b\u8bbf\u95ee VPN\u3002 -message.enabled.vpn.ip.sec=\u60a8\u7684 IPSec \u9884\u5171\u4eab\u5bc6\u94a5 -message.enabled.vpn=\u60a8\u7684\u8fdc\u7a0b\u8bbf\u95ee VPN \u5f53\u524d\u5df2\u542f\u7528\uff0c\u53ef\u4ee5\u901a\u8fc7 IP \u8fdb\u884c\u8bbf\u95ee -message.enabling.security.group.provider=\u542f\u7528\u5b89\u5168\u7ec4\u63d0\u4f9b\u7a0b\u5e8f -message.enabling.zone=\u542f\u7528\u8d44\u6e90\u57df +message.enabling.network.offering=\u6b63\u5728\u542f\u7528\u7f51\u7edc\u65b9\u6848 +message.enabling.security.group.provider=\u6b63\u5728\u542f\u7528\u5b89\u5168\u7ec4\u63d0\u4f9b\u7a0b\u5e8f +message.enabling.vpc.offering=\u6b63\u5728\u542f\u7528 VPC \u65b9\u6848 +message.enabling.zone.dots=\u6b63\u5728\u542f\u7528\u8d44\u6e90\u57df... +message.enabling.zone=\u6b63\u5728\u542f\u7528\u8d44\u6e90\u57df +message.enter.seperated.list.multiple.cidrs=\u5982\u679c\u5b58\u5728\u591a\u4e2a CIDR\uff0c\u8bf7\u8f93\u5165\u7528\u9017\u53f7\u5206\u9694\u7684 CIDR \u5217\u8868 message.enter.token=\u8bf7\u8f93\u5165\u60a8\u5728\u9080\u8bf7\u7535\u5b50\u90ae\u4ef6\u4e2d\u6536\u5230\u7684\u4ee4\u724c\u3002 message.generate.keys=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64\u7528\u6237\u751f\u6210\u65b0\u5bc6\u94a5\u3002 +message.gslb.delete.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 GSLB +message.gslb.lb.remove.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4ece GSLB \u4e2d\u5220\u9664\u8d1f\u8f7d\u5e73\u8861 message.guest.traffic.in.advanced.zone=\u6765\u5bbe\u7f51\u7edc\u6d41\u91cf\u662f\u6307\u6700\u7ec8\u7528\u6237\u865a\u62df\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u6307\u5b9a\u4e00\u4e2a VLAN ID \u8303\u56f4\u53ef\u4f20\u9001\u6bcf\u4e2a\u7269\u7406\u7f51\u7edc\u7684\u6765\u5bbe\u6d41\u91cf\u3002 message.guest.traffic.in.basic.zone=\u6765\u5bbe\u7f51\u7edc\u6d41\u91cf\u662f\u6307\u6700\u7ec8\u7528\u6237\u865a\u62df\u673a\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u5e94\u6307\u5b9a\u4e00\u4e2a CloudStack \u53ef\u4ee5\u5206\u914d\u7ed9\u6765\u5bbe VM \u7684 IP \u5730\u5740\u8303\u56f4\u3002\u8bf7\u786e\u4fdd\u6b64\u8303\u56f4\u4e0e\u9884\u7559\u7684\u7cfb\u7edf IP \u8303\u56f4\u4e0d\u91cd\u53e0\u3002 +message.host.dedicated=\u4e3b\u673a\u5df2\u4e13\u7528 +message.host.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u4e3b\u673a message.installWizard.click.retry=\u8bf7\u5355\u51fb\u6b64\u6309\u94ae\u91cd\u65b0\u5c1d\u8bd5\u542f\u52a8\u3002 message.installWizard.copy.whatIsACluster=\u7fa4\u96c6\u63d0\u4f9b\u4e86\u4e00\u79cd\u7f16\u7ec4\u4e3b\u673a\u7684\u65b9\u6cd5\u3002\u7fa4\u96c6\u4e2d\u7684\u6240\u6709\u4e3b\u673a\u90fd\u5177\u6709\u76f8\u540c\u7684\u786c\u4ef6\uff0c\u8fd0\u884c\u76f8\u540c\u7684\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\uff0c\u4f4d\u4e8e\u540c\u4e00\u5b50\u7f51\u4e2d\uff0c\u5e76\u8bbf\u95ee\u76f8\u540c\u7684\u5171\u4eab\u5b58\u50a8\u3002\u53ef\u4ee5\u5b9e\u65f6\u5c06\u865a\u62df\u673a\u5b9e\u4f8b(VM)\u4ece\u4e00\u53f0\u4e3b\u673a\u8fc1\u79fb\u5230\u540c\u4e00\u7fa4\u96c6\u5185\u7684\u5176\u4ed6\u4e3b\u673a\uff0c\u800c\u65e0\u9700\u4e2d\u65ad\u5411\u7528\u6237\u63d0\u4f9b\u670d\u52a1\u3002\u7fa4\u96c6\u662f CloudStack&\#8482; \u90e8\u7f72\u4e2d\u7684\u7b2c\u4e09\u5927\u7ec4\u7ec7\u5355\u4f4d\u3002\u7fa4\u96c6\u5305\u542b\u5728\u63d0\u4f9b\u70b9\u4e2d\uff0c\u63d0\u4f9b\u70b9\u5305\u542b\u5728\u8d44\u6e90\u57df\u4e2d\u3002

CloudStack&\#8482; \u5141\u8bb8\u4e91\u90e8\u7f72\u4e2d\u5b58\u5728\u591a\u4e2a\u7fa4\u96c6\uff0c\u4f46\u5bf9\u4e8e\u57fa\u672c\u5b89\u88c5\uff0c\u6211\u4eec\u53ea\u9700\u8981\u4e00\u4e2a\u7fa4\u96c6\u3002 message.installWizard.copy.whatIsAHost=\u4e3b\u673a\u662f\u6307\u4e00\u53f0\u8ba1\u7b97\u673a\u3002\u4e3b\u673a\u63d0\u4f9b\u8fd0\u884c\u6765\u5bbe\u865a\u62df\u673a\u7684\u8ba1\u7b97\u8d44\u6e90\u3002\u6bcf\u53f0\u4e3b\u673a\u4e0a\u90fd\u5b89\u88c5\u6709\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u8f6f\u4ef6\uff0c\u7528\u4e8e\u7ba1\u7406\u6765\u5bbe VM (\u88f8\u673a\u4e3b\u673a\u9664\u5916\uff0c\u5c06\u5728\u201c\u9ad8\u7ea7\u5b89\u88c5\u6307\u5357\u201d\u4e2d\u8ba8\u8bba\u8fd9\u4e00\u7279\u6b8a\u6848\u4f8b)\u3002\u4f8b\u5982\uff0c\u542f\u7528\u4e86 KVM \u7684 Linux \u670d\u52a1\u5668\u3001Citrix XenServer \u670d\u52a1\u5668\u548c ESXi \u670d\u52a1\u5668\u90fd\u53ef\u7528\u4f5c\u4e3b\u673a\u3002\u5728\u57fa\u672c\u5b89\u88c5\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u53f0\u8fd0\u884c XenServer \u7684\u4e3b\u673a\u3002

\u4e3b\u673a\u662f CloudStack&\#8482; \u90e8\u7f72\u4e2d\u6700\u5c0f\u7684\u7ec4\u7ec7\u5355\u4f4d\u3002\u4e3b\u673a\u5305\u542b\u5728\u7fa4\u96c6\u4e2d\uff0c\u7fa4\u96c6\u5305\u542b\u5728\u63d0\u4f9b\u70b9\u4e2d\uff0c\u63d0\u4f9b\u70b9\u5305\u542b\u5728\u8d44\u6e90\u57df\u4e2d\u3002 @@ -1857,12 +1857,14 @@ message.installWizard.tooltip.configureGuestTraffic.guestGateway=\u6765\u5bbe\u5 message.installWizard.tooltip.configureGuestTraffic.guestNetmask=\u6765\u5bbe\u5e94\u4f7f\u7528\u7684\u5b50\u7f51\u4e0a\u6b63\u5728\u4f7f\u7528\u7684\u7f51\u7edc\u63a9\u7801 message.installWizard.tooltip.configureGuestTraffic.guestStartIp=\u80fd\u591f\u5206\u914d\u7ed9\u6b64\u8d44\u6e90\u57df\u4e2d\u7684\u6765\u5bbe\u7684 IP \u5730\u5740\u8303\u56f4\u3002\u5982\u679c\u4f7f\u7528\u4e00\u4e2a NIC\uff0c\u8fd9\u4e9b IP \u5e94\u4f4d\u4e8e\u4e0e\u63d0\u4f9b\u70b9 CIDR \u76f8\u540c\u7684 CIDR \u4e2d\u3002 message.installWizard.tooltip.configureGuestTraffic.name=\u60a8\u7684\u7f51\u7edc\u540d\u79f0 +message.instance.scaled.up.confirm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u60a8\u7684\u5b9e\u4f8b? message.instanceWizard.noTemplates=\u60a8\u6ca1\u6709\u4efb\u4f55\u53ef\u7528\u6a21\u677f\uff1b\u8bf7\u6dfb\u52a0\u4e00\u4e2a\u517c\u5bb9\u7684\u6a21\u677f\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b\u5411\u5bfc\u3002 message.ip.address.changed=\u60a8\u7684 IP \u5730\u5740\u53ef\u80fd\u5df2\u53d1\u751f\u53d8\u5316\uff1b\u662f\u5426\u8981\u5237\u65b0\u6b64\u5217\u8868? \u8bf7\u6ce8\u610f\uff0c\u5237\u65b0\u6b64\u5217\u8868\u65f6\uff0c\u201c\u8be6\u7ec6\u4fe1\u606f\u201d\u7a97\u683c\u5c06\u5173\u95ed\u3002 message.iso.desc=\u78c1\u76d8\u6620\u50cf\uff0c\u5176\u4e2d\u5305\u542b\u64cd\u4f5c\u7cfb\u7edf\u7684\u6570\u636e\u6216\u53ef\u542f\u52a8\u4ecb\u8d28 message.join.project=\u60a8\u73b0\u5728\u5df2\u52a0\u5165\u4e86\u4e00\u4e2a\u9879\u76ee\u3002\u8bf7\u5207\u6362\u5230\u201c\u9879\u76ee\u89c6\u56fe\u201d\u4ee5\u67e5\u770b\u9879\u76ee\u3002 message.launch.vm.on.private.network=\u662f\u5426\u8981\u5728\u60a8\u7684\u79c1\u4eba\u4e13\u7528\u7f51\u7edc\u4e2d\u542f\u52a8\u5b9e\u4f8b? message.launch.zone=\u8d44\u6e90\u57df\u5df2\u51c6\u5907\u5c31\u7eea\uff0c\u53ef\u968f\u65f6\u542f\u52a8\uff1b\u8bf7\u7ee7\u7eed\u6267\u884c\u4e0b\u4e00\u6b65\u9aa4\u3002 +message.listView.subselect.multi=(\u6309\u4f4f Ctrl/Cmd \u5e76\u5355\u51fb) message.lock.account=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u9501\u5b9a\u6b64\u5e10\u6237\u3002\u901a\u8fc7\u9501\u5b9a\u6b64\u5e10\u6237\uff0c\u6b64\u5e10\u6237\u7684\u6240\u6709\u7528\u6237\u5c06\u4e0d\u518d\u80fd\u591f\u7ba1\u7406\u5404\u81ea\u7684\u4e91\u8d44\u6e90\uff0c\u4f46\u4ecd\u7136\u53ef\u4ee5\u8bbf\u95ee\u73b0\u6709\u8d44\u6e90\u3002 message.migrate.instance.confirm=\u8bf7\u786e\u8ba4\u8981\u5c06\u865a\u62df\u5b9e\u4f8b\u8fc1\u79fb\u5230\u7684\u4e3b\u673a\u3002 message.migrate.instance.to.host=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u5b9e\u4f8b\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u673a\u3002 @@ -1870,7 +1872,11 @@ message.migrate.instance.to.ps=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\ message.migrate.router.confirm=\u8bf7\u786e\u8ba4\u60a8\u8981\u5c06\u8def\u7531\u5668\u8fc1\u79fb\u5230\u7684\u4e3b\u673a\: message.migrate.systemvm.confirm=\u8bf7\u786e\u8ba4\u60a8\u8981\u5c06\u7cfb\u7edf VM \u8fc1\u79fb\u5230\u7684\u4e3b\u673a\: message.migrate.volume=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u5377\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u5b58\u50a8\u3002 +message.network.addVM.desc=\u8bf7\u6307\u5b9a\u8981\u5c06\u6b64 VM \u6dfb\u52a0\u5230\u7684\u7f51\u7edc\u3002\u5c06\u4e3a\u6b64\u7f51\u7edc\u6dfb\u52a0\u4e00\u4e2a\u65b0 NIC\u3002 +message.network.addVMNIC=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64\u7f51\u7edc\u6dfb\u52a0\u4e00\u4e2a\u65b0 VM NIC\u3002 message.new.user=\u8bf7\u6307\u5b9a\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u5411\u5e10\u6237\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7528\u6237 +message.no.affinity.groups=\u60a8\u6ca1\u6709\u4efb\u4f55\u5173\u8054\u6027\u7ec4\u3002\u8bf7\u7ee7\u7eed\u6267\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c\u3002 +message.no.host.available=\u6ca1\u6709\u53ef\u7528\u4e8e\u8fc1\u79fb\u7684\u4e3b\u673a message.no.network.support.configuration.not.true=\u60a8\u7684\u6240\u6709\u8d44\u6e90\u57df\u90fd\u672a\u542f\u7528\u5b89\u5168\u7ec4\uff0c\u56e0\u6b64\u65e0\u5176\u4ed6\u7f51\u7edc\u529f\u80fd\u3002\u8bf7\u7ee7\u7eed\u6267\u884c\u6b65\u9aa4 5\u3002 message.no.network.support=\u60a8\u9009\u62e9\u7684\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f vSphere \u6ca1\u6709\u4efb\u4f55\u5176\u4ed6\u7f51\u7edc\u529f\u80fd\u3002\u8bf7\u7ee7\u7eed\u6267\u884c\u6b65\u9aa4 5\u3002 message.no.projects.adminOnly=\u60a8\u6ca1\u6709\u4efb\u4f55\u9879\u76ee\u3002
\u8bf7\u8981\u6c42\u7ba1\u7406\u5458\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\u3002 @@ -1888,10 +1894,16 @@ message.please.select.a.configuration.for.your.zone=\u8bf7\u4e3a\u60a8\u7684\u8d message.please.select.a.different.public.and.management.network.before.removing=\u8bf7\u5148\u9009\u62e9\u5176\u4ed6\u516c\u7528\u7ba1\u7406\u7f51\u7edc\uff0c\u7136\u540e\u518d\u5220\u9664 message.please.select.networks=\u8bf7\u4e3a\u60a8\u7684\u865a\u62df\u673a\u9009\u62e9\u7f51\u7edc\u3002 message.please.wait.while.zone.is.being.created=\u6b63\u5728\u521b\u5efa\u8d44\u6e90\u57df\uff0c\u8bf7\u7a0d\u5019\uff1b\u6b64\u64cd\u4f5c\u53ef\u80fd\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\u624d\u80fd\u5b8c\u6210... +message.pod.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u63d0\u4f9b\u70b9 +message.portable.ip.delete.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4 message.project.invite.sent=\u53d1\u9001\u7ed9\u7528\u6237\u7684\u9080\u8bf7\uff1b\u7528\u6237\u63a5\u53d7\u9080\u8bf7\u540e\uff0c\u5c06\u52a0\u5165\u5230\u9879\u76ee\u4e2d message.public.traffic.in.advanced.zone=\u4e91\u4e2d\u7684 VM \u8bbf\u95ee Internet \u65f6\u5c06\u751f\u6210\u516c\u5171\u6d41\u91cf\uff0c\u4f46\u5fc5\u987b\u5206\u914d\u53ef\u516c\u5f00\u8bbf\u95ee\u7684 IP \u624d\u80fd\u5b9e\u73b0\u3002\u6700\u7ec8\u7528\u6237\u53ef\u4ee5\u4f7f\u7528 CloudStack UI \u83b7\u53d6\u8fd9\u4e9b IP\uff0c\u4ee5\u5728\u5176\u6765\u5bbe\u7f51\u7edc\u4e0e\u516c\u7528\u7f51\u7edc\u4e4b\u95f4\u6267\u884c NAT\u3002

\u8bf7\u81f3\u5c11\u4e3a Internet \u6d41\u91cf\u63d0\u4f9b\u4e00\u4e2a IP \u5730\u5740\u8303\u56f4\u3002 message.public.traffic.in.basic.zone=\u4e91\u4e2d\u7684 VM \u8bbf\u95ee Internet \u6216\u901a\u8fc7 Internet \u5411\u5ba2\u6237\u7aef\u63d0\u4f9b\u670d\u52a1\u65f6\u5c06\u751f\u6210\u516c\u5171\u6d41\u91cf\uff0c\u4f46\u5fc5\u987b\u5206\u914d\u53ef\u516c\u5f00\u8bbf\u95ee\u7684 IP \u624d\u80fd\u5b9e\u73b0\u3002\u521b\u5efa\u5b9e\u4f8b\u65f6\uff0c\u5c06\u628a\u8fd9\u4e00\u7ec4\u516c\u7528 IP \u4e2d\u7684 IP (\u6765\u5bbe IP \u5730\u5740\u9664\u5916)\u5206\u914d\u7ed9\u6b64\u5b9e\u4f8b\u3002\u9759\u6001 1-1 NAT \u5c06\u5728\u516c\u7528 IP \u4e0e\u6765\u5bbe IP \u4e4b\u95f4\u81ea\u52a8\u8bbe\u7f6e\u3002\u6700\u7ec8\u7528\u6237\u8fd8\u53ef\u4ee5\u4f7f\u7528 CloudStack UI \u83b7\u53d6\u5176\u4ed6 IP\uff0c\u4ee5\u5728\u5176\u5b9e\u4f8b\u4e0e\u516c\u7528 IP \u4e4b\u95f4\u6267\u884c\u9759\u6001 NAT\u3002 +message.read.admin.guide.scaling.up=\u5f00\u59cb\u6269\u5c55\u4e4b\u524d\uff0c\u8bf7\u9605\u8bfb\u7ba1\u7406\u6307\u5357\u4e2d\u7684\u52a8\u6001\u6269\u5c55\u90e8\u5206\u3002 +message.recover.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6062\u590d\u6b64 VM\u3002 message.redirecting.region=\u6b63\u5728\u91cd\u5b9a\u5411\u5230\u5730\u7406\u533a\u57df... +message.reinstall.vm=\u6ce8\u610f\: \u8bf7\u8c28\u614e\u64cd\u4f5c\u3002\u8fd9\u5c06\u5bfc\u81f4\u4ece\u6a21\u677f\u91cd\u65b0\u5b89\u88c5 VM\uff0c\u5e76\u4e14\u5f15\u5bfc\u78c1\u76d8\u4e0a\u5b58\u50a8\u7684\u6570\u636e\u5c06\u4e22\u5931\u3002\u989d\u5916\u7684\u6570\u636e\u5377(\u5982\u679c\u5b58\u5728)\u5c06\u65e0\u6cd5\u8bbf\u95ee\u3002 +message.remove.ldap=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664 LDAP \u914d\u7f6e? message.remove.region=\u662f\u5426\u786e\u5b9e\u8981\u4ece\u6b64\u7ba1\u7406\u670d\u52a1\u5668\u4e2d\u5220\u9664\u6b64\u5730\u7406\u533a\u57df? message.remove.vpc=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 VPC message.remove.vpn.access=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u4ee5\u4e0b\u7528\u6237\u7684 VPN \u8bbf\u95ee\u3002 @@ -1902,17 +1914,22 @@ message.restart.mgmt.server=\u8bf7\u91cd\u65b0\u542f\u52a8\u7ba1\u7406\u670d\u52 message.restart.mgmt.usage.server=\u8bf7\u91cd\u65b0\u542f\u52a8\u7ba1\u7406\u670d\u52a1\u5668\u548c\u4f7f\u7528\u670d\u52a1\u5668\u4ee5\u4f7f\u60a8\u7684\u65b0\u8bbe\u7f6e\u751f\u6548\u3002 message.restart.network=\u6b64\u7f51\u7edc\u63d0\u4f9b\u7684\u6240\u6709\u670d\u52a1\u90fd\u5c06\u4e2d\u65ad\u3002\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u91cd\u65b0\u542f\u52a8\u6b64\u7f51\u7edc\u3002 message.restart.vpc=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u91cd\u65b0\u542f\u52a8 VPC +message.restoreVM=\u662f\u5426\u8981\u8fd8\u539f\u6b64 VM? message.security.group.usage=(\u6309\u4f4f Ctrl \u952e\u5e76\u5355\u51fb\u9f20\u6807\u53ef\u9009\u62e9\u6240\u6709\u9002\u7528\u7684\u5b89\u5168\u7ec4) +message.select.affinity.groups=\u8bf7\u9009\u62e9\u60a8\u5e0c\u671b\u6b64 VM \u6240\u5c5e\u7684\u4efb\u4f55\u5173\u8054\u6027\u7ec4\: message.select.a.zone=\u4e00\u4e2a\u8d44\u6e90\u57df\u901a\u5e38\u4e0e\u4e00\u4e2a\u6570\u636e\u4e2d\u5fc3\u76f8\u5bf9\u5e94\u3002\u591a\u4e2a\u8d44\u6e90\u57df\u53ef\u4ee5\u63d0\u4f9b\u7269\u7406\u9694\u79bb\u548c\u5197\u4f59\uff0c\u6709\u52a9\u4e8e\u4f7f\u4e91\u66f4\u52a0\u53ef\u9760\u3002 message.select.instance=\u8bf7\u9009\u62e9\u4e00\u4e2a\u5b9e\u4f8b\u3002 message.select.iso=\u8bf7\u4e3a\u60a8\u7684\u65b0\u865a\u62df\u5b9e\u4f8b\u9009\u62e9\u4e00\u4e2a ISO\u3002 message.select.item=\u8bf7\u9009\u62e9\u4e00\u4e2a\u9879\u76ee\u3002 message.select.security.groups=\u8bf7\u4e3a\u60a8\u7684\u65b0 VM \u9009\u62e9\u5b89\u5168\u7ec4 message.select.template=\u8bf7\u4e3a\u60a8\u7684\u65b0\u865a\u62df\u5b9e\u4f8b\u9009\u62e9\u4e00\u4e2a\u6a21\u677f\u3002 +message.select.tier=\u8bf7\u9009\u62e9\u4e00\u4e2a\u5c42 +message.set.default.NIC.manual=\u8bf7\u7acb\u5373\u624b\u52a8\u66f4\u65b0\u6b64 VM \u4e0a\u7684\u9ed8\u8ba4 NIC\u3002 +message.set.default.NIC=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u6b64 NIC \u8bbe\u7f6e\u4e3a\u6b64 VM \u7684\u9ed8\u8ba4 NIC\u3002 message.setup.physical.network.during.zone.creation.basic=\u6dfb\u52a0\u57fa\u7840\u8d44\u6e90\u57df\u65f6\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e2a\u7269\u7406\u7f51\u7edc\uff0c\u6b64\u7f51\u7edc\u5e94\u4e0e\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u4e2d\u7684 NIC \u76f8\u5bf9\u5e94\u3002\u6b64\u7f51\u7edc\u53ef\u4ee5\u627f\u8f7d\u591a\u79cd\u6d41\u91cf\u7c7b\u578b\u3002

\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u5c06\u5176\u4ed6\u6d41\u91cf\u7c7b\u578b\u62d6\u653e\u5230\u6b64\u7269\u7406\u7f51\u7edc\u3002 message.setup.physical.network.during.zone.creation=\u6dfb\u52a0\u9ad8\u7ea7\u8d44\u6e90\u57df\u65f6\uff0c\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u6216\u591a\u4e2a\u7269\u7406\u7f51\u7edc\u3002\u6bcf\u4e2a\u7f51\u7edc\u90fd\u4e0e\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u4e2d\u7684\u4e00\u4e2a NIC \u76f8\u5bf9\u5e94\u3002\u6bcf\u4e2a\u7269\u7406\u7f51\u7edc\u4e2d\u53ef\u4ee5\u5305\u542b\u4e00\u79cd\u6216\u591a\u79cd\u6d41\u91cf\u7c7b\u578b\uff0c\u5e76\u5bf9\u8fd9\u4e9b\u6d41\u91cf\u7c7b\u578b\u53ef\u80fd\u7684\u7ec4\u5408\u65b9\u5f0f\u8bbe\u7f6e\u4e86\u67d0\u4e9b\u9650\u5236\u3002

\u53ef\u4ee5\u5c06\u4e00\u79cd\u6216\u591a\u79cd\u6d41\u91cf\u7c7b\u578b\u62d6\u653e\u5230\u6bcf\u4e2a\u7269\u7406\u7f51\u7edc\u4e2d\u3002 message.setup.successful=\u5df2\u6210\u529f\u8bbe\u7f6e\u4e91\! -message.snapshot.schedule=\u53ef\u4ee5\u901a\u8fc7\u4ece\u4ee5\u4e0b\u53ef\u7528\u9009\u9879\u4e2d\u8fdb\u884c\u9009\u62e9\u5e76\u5e94\u7528\u60a8\u7684\u7b56\u7565\u9996\u9009\u9879\u6765\u8bbe\u7f6e\u91cd\u73b0\u5feb\u7167\u8ba1\u5212 +message.specifiy.tag.key.value=\u8bf7\u6307\u5b9a\u6807\u8bb0\u5bc6\u94a5\u548c\u503c message.specify.url=\u8bf7\u6307\u5b9a URL message.step.1.continue=\u8bf7\u9009\u62e9\u4e00\u4e2a\u6a21\u677f\u6216 ISO \u4ee5\u7ee7\u7eed message.step.1.desc=\u8bf7\u4e3a\u60a8\u7684\u65b0\u865a\u62df\u5b9e\u4f8b\u9009\u62e9\u4e00\u4e2a\u6a21\u677f\u3002\u8fd8\u53ef\u4ee5\u9009\u62e9\u4e00\u4e2a\u53ef\u5c06 ISO \u6620\u50cf\u5b89\u88c5\u5230\u5176\u4e2d\u7684\u7a7a\u6a21\u677f\u3002 @@ -1922,7 +1939,10 @@ message.step.4.continue=\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u4e2a\u7f51\u7edc\u message.step.4.desc=\u8bf7\u9009\u62e9\u865a\u62df\u5b9e\u4f8b\u8981\u8fde\u63a5\u5230\u7684\u4e3b\u7f51\u7edc\u3002 message.storage.traffic=CloudStack \u5185\u90e8\u8d44\u6e90(\u5305\u62ec\u4e0e\u7ba1\u7406\u670d\u52a1\u5668\u901a\u4fe1\u7684\u4efb\u4f55\u7ec4\u4ef6\uff0c\u4f8b\u5982\u4e3b\u673a\u548c CloudStack \u7cfb\u7edf VM)\u4e4b\u95f4\u7684\u6d41\u91cf\u3002\u8bf7\u5728\u6b64\u5904\u914d\u7f6e\u5b58\u50a8\u6d41\u91cf\u3002 message.suspend.project=\u662f\u5426\u786e\u5b9e\u8981\u6682\u505c\u6b64\u9879\u76ee? +message.systems.vms.ready=\u7cfb\u7edf VM \u5df2\u5c31\u7eea\u3002 +message.template.copying=\u6b63\u5728\u590d\u5236\u6a21\u677f\u3002 message.template.desc=\u64cd\u4f5c\u7cfb\u7edf\u6620\u50cf\uff0c\u53ef\u7528\u4e8e\u542f\u52a8 VM +message.tier.required=\u201c\u5c42\u201d\u4e3a\u5fc5\u586b\u9879 message.tooltip.dns.1=\u4f9b\u8d44\u6e90\u57df\u4e2d\u7684 VM \u4f7f\u7528\u7684 DNS \u670d\u52a1\u5668\u540d\u79f0\u3002\u8d44\u6e90\u57df\u7684\u516c\u7528 IP \u5730\u5740\u5fc5\u987b\u8def\u7531\u5230\u6b64\u670d\u52a1\u5668\u3002 message.tooltip.dns.2=\u4f9b\u8d44\u6e90\u57df\u4e2d\u7684 VM \u4f7f\u7528\u7684\u4e8c\u7ea7 DNS \u670d\u52a1\u5668\u540d\u79f0\u3002\u8d44\u6e90\u57df\u7684\u516c\u7528 IP \u5730\u5740\u5fc5\u987b\u8def\u7531\u5230\u6b64\u670d\u52a1\u5668\u3002 message.tooltip.internal.dns.1=\u4f9b\u8d44\u6e90\u57df\u4e2d\u7684 CloudStack \u5185\u90e8\u7cfb\u7edf VM \u4f7f\u7528\u7684 DNS \u670d\u52a1\u5668\u540d\u79f0\u3002\u63d0\u4f9b\u70b9\u7684\u4e13\u7528 IP \u5730\u5740\u5fc5\u987b\u8def\u7531\u5230\u6b64\u670d\u52a1\u5668\u3002 @@ -1934,111 +1954,45 @@ message.tooltip.reserved.system.netmask=\u7528\u4e8e\u5b9a\u4e49\u63d0\u4f9b\u70 message.tooltip.zone.name=\u8d44\u6e90\u57df\u540d\u79f0\u3002 message.update.os.preference=\u8bf7\u4e3a\u6b64\u4e3b\u673a\u9009\u62e9\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879\u3002\u9996\u5148\u5c06\u5177\u6709\u76f8\u4f3c\u9996\u9009\u9879\u7684\u6240\u6709\u865a\u62df\u5b9e\u4f8b\u5206\u914d\u81f3\u6b64\u4e3b\u673a\uff0c\u7136\u540e\u518d\u9009\u62e9\u5176\u4ed6\u5b9e\u4f8b\u3002 message.update.resource.count=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u66f4\u65b0\u6b64\u5e10\u6237\u7684\u8d44\u6e90\u6570\u3002 -message.update.ssl=\u8bf7\u63d0\u4ea4\u4e00\u4e2a X.509 \u517c\u5bb9\u7684\u65b0 SSL \u8bc1\u4e66\uff0c\u4ee5\u4fbf\u5c06\u5176\u66f4\u65b0\u5230\u6bcf\u4e2a\u63a7\u5236\u53f0\u4ee3\u7406\u548c\u4e8c\u7ea7\u5b58\u50a8\u865a\u62df\u5b9e\u4f8b\: -message.update.ssl.succeeded=\u5df2\u6210\u529f\u66f4\u65b0 SSL \u8bc1\u4e66 message.update.ssl.failed=\u65e0\u6cd5\u66f4\u65b0 SSL \u8bc1\u4e66\u3002 +message.update.ssl.succeeded=\u5df2\u6210\u529f\u66f4\u65b0 SSL \u8bc1\u4e66 +message.update.ssl=\u8bf7\u63d0\u4ea4\u4e00\u4e2a X.509 \u517c\u5bb9\u7684\u65b0 SSL \u8bc1\u4e66\uff0c\u4ee5\u4fbf\u5c06\u5176\u66f4\u65b0\u5230\u6bcf\u4e2a\u63a7\u5236\u53f0\u4ee3\u7406\u548c\u4e8c\u7ea7\u5b58\u50a8\u865a\u62df\u5b9e\u4f8b\: +message.validate.accept=\u8bf7\u8f93\u5165\u4e00\u4e2a\u5e26\u6709\u6709\u6548\u6269\u5c55\u540d\u7684\u503c\u3002 +message.validate.creditcard=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u4fe1\u7528\u5361\u5361\u53f7\u3002 +message.validate.date.ISO=\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f(ISO)\u3002 +message.validate.date=\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f\u3002 +message.validate.digits=\u8bf7\u4ec5\u8f93\u5165\u6570\u5b57\u3002 +message.validate.email.address=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002 +message.validate.equalto=\u8bf7\u91cd\u65b0\u8f93\u5165\u76f8\u540c\u7684\u503c\u3002 +message.validate.fieldrequired=\u6b64\u5b57\u6bb5\u4e3a\u5fc5\u586b\u5b57\u6bb5\u3002 +message.validate.fixfield=\u8bf7\u4fee\u590d\u6b64\u5b57\u6bb5\u3002 message.validate.instance.name=\u5b9e\u4f8b\u540d\u79f0\u4e0d\u5f97\u8d85\u8fc7 63 \u4e2a\u5b57\u7b26\u3002\u4ec5\u5141\u8bb8\u4f7f\u7528 ASCII \u5b57\u6bcd a - z \u6216 A - Z\u3001\u6570\u5b57 0 - 9 \u4ee5\u53ca\u8fde\u5b57\u7b26\u3002\u5b9e\u4f8b\u540d\u79f0\u5fc5\u987b\u4ee5\u5b57\u6bcd\u5f00\u5934\u5e76\u4ee5\u5b57\u6bcd\u6216\u6570\u5b57\u7ed3\u675f\u3002 +message.validate.invalid.characters=\u67e5\u627e\u5230\u65e0\u6548\u5b57\u7b26\uff0c\u8bf7\u66f4\u6b63\u3002 +message.validate.maxlength=\u8bf7\u6700\u591a\u8f93\u5165 {0} \u4e2a\u5b57\u7b26\u3002 +message.validate.max=\u8bf7\u8f93\u5165\u4e00\u4e2a\u5c0f\u4e8e\u6216\u7b49\u4e8e {0} \u7684\u503c\u3002 +message.validate.minlength=\u8bf7\u81f3\u5c11\u8f93\u5165 {0} \u4e2a\u5b57\u7b26\u3002 +message.validate.number=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u6570\u5b57\u3002 +message.validate.range.length=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u4ecb\u4e8e {0} \u5230 {1} \u4e4b\u95f4\u7684\u503c\u3002 +message.validate.range=\u8bf7\u8f93\u5165\u4e00\u4e2a\u4ecb\u4e8e {0} \u5230 {1} \u4e4b\u95f4\u7684\u503c\u3002 +message.validate.URL=\u8bf7\u8f93\u5165\u6709\u6548\u7684 URL\u3002 message.virtual.network.desc=\u60a8\u7684\u5e10\u6237\u7684\u4e13\u7528\u865a\u62df\u7f51\u7edc\u3002\u5e7f\u64ad\u57df\u5305\u542b\u5728 VLAN \u4e2d\uff0c\u5e76\u4e14\u6240\u6709\u516c\u7528\u7f51\u7edc\u8bbf\u95ee\u90fd\u7531\u865a\u62df\u8def\u7531\u5668\u8def\u7531\u51fa\u53bb\u3002 message.vm.create.template.confirm=\u521b\u5efa\u6a21\u677f\u5c06\u81ea\u52a8\u91cd\u65b0\u542f\u52a8 VM\u3002 message.vm.review.launch=\u8bf7\u5148\u6838\u5bf9\u4ee5\u4e0b\u4fe1\u606f\uff0c\u786e\u8ba4\u60a8\u7684\u865a\u62df\u5b9e\u4f8b\u6b63\u786e\u65e0\u8bef\uff0c\u7136\u540e\u518d\u542f\u52a8\u3002 +message.vnmc.available.list=\u63d0\u4f9b\u7a0b\u5e8f\u5217\u8868\u4e2d\u672a\u63d0\u4f9b VNMC\u3002 +message.vnmc.not.available.list=\u63d0\u4f9b\u7a0b\u5e8f\u5217\u8868\u4e2d\u672a\u63d0\u4f9b VNMC\u3002 message.volume.create.template.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64\u78c1\u76d8\u5377\u521b\u5efa\u4e00\u4e2a\u6a21\u677f\u3002\u521b\u5efa\u6a21\u677f\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u5230\u66f4\u957f\u7684\u65f6\u95f4\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u5377\u7684\u5927\u5c0f\u3002 +message.waiting.for.builtin.templates.to.load=\u6b63\u5728\u7b49\u5f85\u52a0\u8f7d\u5185\u7f6e\u6a21\u677f... +message.XSTools61plus.update.failed=\u65e0\u6cd5\u66f4\u65b0\u201c\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+\u201d\u5b57\u6bb5\u3002\u9519\u8bef\: message.you.must.have.at.least.one.physical.network=\u60a8\u5fc5\u987b\u81f3\u5c11\u62e5\u6709\u4e00\u4e2a\u7269\u7406\u7f51\u7edc -message.zone.creation.complete.would.you.like.to.enable.this.zone=\u5df2\u5b8c\u6210\u521b\u5efa\u8d44\u6e90\u57df\u3002\u662f\u5426\u8981\u542f\u7528\u6b64\u8d44\u6e90\u57df? +message.your.cloudstack.is.ready=\u60a8\u7684 CloudStack \u5df2\u5c31\u7eea\! message.Zone.creation.complete=\u5df2\u5b8c\u6210\u521b\u5efa\u8d44\u6e90\u57df +message.zone.creation.complete.would.you.like.to.enable.this.zone=\u5df2\u5b8c\u6210\u521b\u5efa\u8d44\u6e90\u57df\u3002\u662f\u5426\u8981\u542f\u7528\u6b64\u8d44\u6e90\u57df? message.zone.no.network.selection=\u6240\u9009\u8d44\u6e90\u57df\u65e0\u4efb\u4f55\u7f51\u7edc\u9009\u9879\u3002 message.zone.step.1.desc=\u8bf7\u4e3a\u60a8\u7684\u8d44\u6e90\u57df\u9009\u62e9\u4e00\u79cd\u7f51\u7edc\u6a21\u5f0f\u3002 message.zone.step.2.desc=\u8bf7\u8f93\u5165\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u65b0\u8d44\u6e90\u57df message.zone.step.3.desc=\u8bf7\u8f93\u5165\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u65b0\u63d0\u4f9b\u70b9 message.zoneWizard.enable.local.storage=\u8b66\u544a\: \u5982\u679c\u4e3a\u6b64\u8d44\u6e90\u57df\u542f\u7528\u4e86\u672c\u5730\u5b58\u50a8\uff0c\u5219\u5fc5\u987b\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u60a8\u5e0c\u671b\u542f\u52a8\u7cfb\u7edf VM \u7684\u4f4d\u7f6e\:

1. \u5982\u679c\u9700\u8981\u5728\u5171\u4eab\u4e3b\u5b58\u50a8\u4e2d\u542f\u52a8\u7cfb\u7edf VM\uff0c\u5219\u5fc5\u987b\u5728\u5b8c\u6210\u521b\u5efa\u540e\u5c06\u5171\u4eab\u4e3b\u5b58\u50a8\u6dfb\u52a0\u5230\u6b64\u8d44\u6e90\u57df\u3002

2. \u5982\u679c\u9700\u8981\u5728\u672c\u5730\u4e3b\u5b58\u50a8\u4e2d\u542f\u52a8\u7cfb\u7edf VM\uff0c\u5219\u5fc5\u987b\u5728\u542f\u7528\u6b64\u8d44\u6e90\u57df\u4e4b\u524d\u5c06 system.vm.use.local.storage \u8bbe\u7f6e\u4e3a true\u3002


\u662f\u5426\u8981\u7ee7\u7eed? -message.validate.fieldrequired=\u6b64\u5b57\u6bb5\u4e3a\u5fc5\u586b\u5b57\u6bb5\u3002 -message.validate.fixfield=\u8bf7\u4fee\u590d\u6b64\u5b57\u6bb5\u3002 -message.validate.email.address=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002 -message.validate.URL=\u8bf7\u8f93\u5165\u6709\u6548\u7684 URL\u3002 -message.validate.date=\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f\u3002 -message.validate.date.ISO=\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f(ISO)\u3002 -message.validate.number=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u6570\u5b57\u3002 -message.validate.digits=\u8bf7\u4ec5\u8f93\u5165\u6570\u5b57\u3002 -message.validate.creditcard=\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u4fe1\u7528\u5361\u5361\u53f7\u3002 -message.validate.equalto=\u8bf7\u91cd\u65b0\u8f93\u5165\u76f8\u540c\u7684\u503c\u3002 -message.validate.accept=\u8bf7\u8f93\u5165\u4e00\u4e2a\u5e26\u6709\u6709\u6548\u6269\u5c55\u540d\u7684\u503c\u3002 -message.validate.maxlength=\u8bf7\u6700\u591a\u8f93\u5165 {0} \u4e2a\u5b57\u7b26\u3002 -message.validate.minlength=\u8bf7\u81f3\u5c11\u8f93\u5165 {0} \u4e2a\u5b57\u7b26\u3002 -message.validate.range.length=\u8bf7\u8f93\u5165\u4e00\u4e2a\u957f\u5ea6\u4ecb\u4e8e {0} \u5230 {1} \u4e4b\u95f4\u7684\u503c\u3002 -message.validate.range=\u8bf7\u8f93\u5165\u4e00\u4e2a\u4ecb\u4e8e {0} \u5230 {1} \u4e4b\u95f4\u7684\u503c\u3002 -message.validate.max=\u8bf7\u8f93\u5165\u4e00\u4e2a\u5c0f\u4e8e\u6216\u7b49\u4e8e {0} \u7684\u503c\u3002 messgae.validate.min=\u8bf7\u8f93\u5165\u4e00\u4e2a\u5927\u4e8e\u6216\u7b49\u4e8e {0} \u7684\u503c\u3002 -message.creating.systemVM=\u6b63\u5728\u521b\u5efa\u7cfb\u7edf VM (\u6b64\u64cd\u4f5c\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u65f6\u95f4) -message.enabling.zone.dots=\u6b63\u5728\u542f\u7528\u8d44\u6e90\u57df... -message.restoreVM=\u662f\u5426\u8981\u8fd8\u539f\u6b64 VM? -message.no.host.available=\u6ca1\u6709\u53ef\u7528\u4e8e\u8fc1\u79fb\u7684\u4e3b\u673a -message.network.addVM.desc=\u8bf7\u6307\u5b9a\u8981\u5c06\u6b64 VM \u6dfb\u52a0\u5230\u7684\u7f51\u7edc\u3002\u5c06\u4e3a\u6b64\u7f51\u7edc\u6dfb\u52a0\u4e00\u4e2a\u65b0 NIC\u3002 -message.network.addVMNIC=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4e3a\u6b64\u7f51\u7edc\u6dfb\u52a0\u4e00\u4e2a\u65b0 VM NIC\u3002 -message.set.default.NIC=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5c06\u6b64 NIC \u8bbe\u7f6e\u4e3a\u6b64 VM \u7684\u9ed8\u8ba4 NIC\u3002 -message.set.default.NIC.manual=\u8bf7\u7acb\u5373\u624b\u52a8\u66f4\u65b0\u6b64 VM \u4e0a\u7684\u9ed8\u8ba4 NIC\u3002 -message.instance.scaled.up.confirm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u60a8\u7684\u5b9e\u4f8b? -message.copy.template.confirm=\u662f\u5426\u786e\u5b9e\u8981\u590d\u5236\u6a21\u677f? -message.template.copying=\u6b63\u5728\u590d\u5236\u6a21\u677f\u3002 -message.XSTools61plus.update.failed=\u65e0\u6cd5\u66f4\u65b0\u201c\u539f\u59cb XS \u7248\u672c\u4e3a 6.1+\u201d\u5b57\u6bb5\u3002\u9519\u8bef\: -message.gslb.delete.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u6b64 GSLB -message.portable.ip.delete.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4 -message.gslb.lb.remove.confirm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u4ece GSLB \u4e2d\u5220\u9664\u8d1f\u8f7d\u5e73\u8861 -message.admin.guide.read=\u5bf9\u4e8e\u57fa\u4e8e VMware \u7684 VM\uff0c\u8bf7\u5148\u9605\u8bfb\u7ba1\u7406\u6307\u5357\u4e2d\u7684\u52a8\u6001\u6269\u5c55\u90e8\u5206\uff0c\u7136\u540e\u518d\u8fdb\u884c\u6269\u5c55\u3002\u662f\u5426\u8981\u7ee7\u7eed?, -message.tier.required=\u201c\u5c42\u201d\u4e3a\u5fc5\u586b\u9879 -message.remove.ldap=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664 LDAP \u914d\u7f6e? -message.action.downloading.template=\u6b63\u5728\u4e0b\u8f7d\u6a21\u677f\u3002 -message.configure.ldap=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u914d\u7f6e LDAP\u3002 -message.confirm.delete.ciscovnmc.resource=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Cisco VNMC \u8d44\u6e90 -message.confirm.add.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u6dfb\u52a0 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 -message.confirm.enable.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 -message.confirm.disable.vnmc.provider=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u7981\u7528 VNMC \u63d0\u4f9b\u7a0b\u5e8f\u3002 -message.vnmc.available.list=\u63d0\u4f9b\u7a0b\u5e8f\u5217\u8868\u4e2d\u672a\u63d0\u4f9b VNMC\u3002 -message.vnmc.not.available.list=\u63d0\u4f9b\u7a0b\u5e8f\u5217\u8868\u4e2d\u672a\u63d0\u4f9b VNMC\u3002 -message.confirm.release.dedicate.vlan.range=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u91ca\u653e\u4e13\u7528 VLAN \u8303\u56f4 -message.confirm.start.lb.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u542f\u52a8 LB VM -message.confirm.stop.lb.vm=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u505c\u6b62 LB VM -message.confirm.remove.vmware.datacenter=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 VMware \u6570\u636e\u4e2d\u5fc3 -message.confirm.dedicate.zone=\u662f\u5426\u8981\u5c06\u6b64\u8d44\u6e90\u57df\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? -message.confirm.release.dedicated.zone=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u8d44\u6e90\u57df? -message.dedicated.zone.released=\u5df2\u91ca\u653e\u4e13\u7528\u8d44\u6e90\u57df -message.read.admin.guide.scaling.up=\u5f00\u59cb\u6269\u5c55\u4e4b\u524d\uff0c\u8bf7\u9605\u8bfb\u7ba1\u7406\u6307\u5357\u4e2d\u7684\u52a8\u6001\u6269\u5c55\u90e8\u5206\u3002 -message.confirm.scale.up.system.vm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u7cfb\u7edf VM? -message.confirm.upgrade.router.newer.template=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -message.confirm.scale.up.router.vm=\u662f\u5426\u786e\u5b9e\u8981\u6269\u5c55\u8def\u7531\u5668 VM? -message.confirm.upgrade.routers.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u8d44\u6e90\u57df\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -message.confirm.upgrade.routers.pod.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u63d0\u4f9b\u70b9\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -message.confirm.upgrade.routers.cluster.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u7fa4\u96c6\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -message.confirm.upgrade.routers.account.newtemplate=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5347\u7ea7\u6b64\u5e10\u6237\u4e2d\u7684\u6240\u6709\u8def\u7531\u5668\u4ee5\u4f7f\u7528\u66f4\u65b0\u7684\u6a21\u677f -message.confirm.dedicate.pod.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u63d0\u4f9b\u70b9\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? -message.confirm.release.dedicated.pod=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u63d0\u4f9b\u70b9? -message.pod.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u63d0\u4f9b\u70b9 -message.confirm.dedicate.cluster.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u7fa4\u96c6\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? -message.cluster.dedicated=\u7fa4\u96c6\u5df2\u4e13\u7528 -message.confirm.release.dedicated.cluster=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u7fa4\u96c6? -message.cluster.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u7fa4\u96c6 -message.confirm.dedicate.host.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06\u6b64\u4e3b\u673a\u4e13\u7528\u4e8e\u57df/\u5e10\u6237? -message.host.dedicated=\u4e3b\u673a\u5df2\u4e13\u7528 -message.confirm.release.dedicated.host=\u662f\u5426\u8981\u91ca\u653e\u6b64\u4e13\u7528\u4e3b\u673a? -message.host.dedication.released=\u5df2\u91ca\u653e\u4e13\u7528\u4e3b\u673a -message.confirm.delete.ucs.manager=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 UCS Manager -message.confirm.refresh.blades=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5237\u65b0\u5200\u7247\u5f0f\u670d\u52a1\u5668\u3002 -message.confirm.delete.secondary.staging.store=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8\u3002 -message.select.tier=\u8bf7\u9009\u62e9\u4e00\u4e2a\u5c42 -message.disallowed.characters=\u7981\u7528\u5b57\u7b26\: <,> -message.waiting.for.builtin.templates.to.load=\u6b63\u5728\u7b49\u5f85\u52a0\u8f7d\u5185\u7f6e\u6a21\u677f... -message.systems.vms.ready=\u7cfb\u7edf VM \u5df2\u5c31\u7eea\u3002 -message.your.cloudstack.is.ready=\u60a8\u7684 CloudStack \u5df2\u5c31\u7eea\! -message.specifiy.tag.key.value=\u8bf7\u6307\u5b9a\u6807\u8bb0\u5bc6\u94a5\u548c\u503c -message.enter.seperated.list.multiple.cidrs=\u5982\u679c\u5b58\u5728\u591a\u4e2a CIDR\uff0c\u8bf7\u8f93\u5165\u7528\u9017\u53f7\u5206\u9694\u7684 CIDR \u5217\u8868 -message.disabling.network.offering=\u7981\u7528\u7f51\u7edc\u65b9\u6848 -message.confirm.enable.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u542f\u7528\u6b64\u7f51\u7edc\u65b9\u6848? -message.enabling.network.offering=\u542f\u7528\u7f51\u7edc\u65b9\u6848 -message.confirm.remove.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64\u7f51\u7edc\u65b9\u6848? -message.confirm.disable.network.offering=\u662f\u5426\u786e\u5b9e\u8981\u7981\u7528\u6b64\u7f51\u7edc\u65b9\u6848? -message.disabling.vpc.offering=\u7981\u7528 VPC \u65b9\u6848 -message.confirm.enable.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u542f\u7528\u6b64 VPC \u65b9\u6848? -message.enabling.vpc.offering=\u542f\u7528 VPC \u65b9\u6848 -message.confirm.remove.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u5220\u9664\u6b64 VPC \u65b9\u6848? -message.confirm.disable.vpc.offering=\u662f\u5426\u786e\u5b9e\u8981\u7981\u7528\u6b64 VPC \u65b9\u6848? mode=\u6a21\u5f0f network.rate=\u7f51\u7edc\u901f\u7387 notification.reboot.instance=\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b @@ -2070,45 +2024,3 @@ state.Stopping=\u6b63\u5728\u505c\u6b62 state.Suspended=\u5df2\u6682\u505c ui.listView.filters.all=\u5168\u90e8 ui.listView.filters.mine=\u672c\u7528\u6237 -label.na=\u4e0d\u9002\u7528 -label.added.network.offering=\u5df2\u6dfb\u52a0\u7f51\u7edc\u65b9\u6848 -hint.type.part.storage.tag=\u8bf7\u952e\u5165\u5b58\u50a8\u6807\u8bb0\u7684\u4e00\u90e8\u5206 -hint.type.part.host.tag=\u8bf7\u952e\u5165\u4e3b\u673a\u6807\u8bb0\u7684\u4e00\u90e8\u5206 -hint.no.storage.tags=\u627e\u4e0d\u5230\u5b58\u50a8\u6807\u8bb0 -hint.no.host.tags=\u627e\u4e0d\u5230\u4e3b\u673a\u6807\u8bb0 -label.availabilityZone=\u53ef\u7528\u6027\u533a\u57df -label.diskoffering=\u78c1\u76d8\u65b9\u6848 -title.upload.volume=\u4e0a\u8f7d\u5377 -label.format.lower=\u683c\u5f0f -label.checksum=\u6821\u9a8c\u548c -label.assign.vms=\u5206\u914d VM -label.extractable.lower=\u53ef\u63d0\u53d6 -label.globo.dns=GloboDNS -label.add.globo.dns=\u6dfb\u52a0 GloboDNS -label.globo.dns.configuration=GloboDNS \u914d\u7f6e -label.region.details=\u5730\u7406\u533a\u57df\u8be6\u7ec6\u4fe1\u606f -label.baremetal.rack.configuration=\u88f8\u673a\u673a\u67b6\u914d\u7f6e -label.add.baremetal.rack.configuration=\u6dfb\u52a0\u88f8\u673a\u673a\u67b6\u914d\u7f6e -label.delete.baremetal.rack.configuration=\u5220\u9664\u88f8\u673a\u673a\u67b6\u914d\u7f6e -message.confirm.delete.baremetal.rack.configuration=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664\u88f8\u673a\u673a\u67b6\u914d\u7f6e\u3002 -message.added.new.nuage.vsp.controller=\u5df2\u6dfb\u52a0\u65b0 Nuage Vsp \u63a7\u5236\u5668 -message.added.vpc.offering=\u5df2\u6dfb\u52a0 VPC \u65b9\u6848 -label.keyboard.language=\u952e\u76d8\u8bed\u8a00 -label.standard.us.keyboard=\u6807\u51c6\u7f8e\u5f0f\u952e\u76d8 -label.uk.keyboard=\u82f1\u5f0f\u952e\u76d8 -label.japanese.keyboard=\u65e5\u5f0f\u952e\u76d8 -label.simplified.chinese.keyboard=\u7b80\u4f53\u4e2d\u6587\u952e\u76d8 -label.display.name=\u663e\u793a\u540d\u79f0 -label.zone.name=\u8d44\u6e90\u57df\u540d\u79f0 -label.instances=\u5b9e\u4f8b -label.event=\u4e8b\u4ef6 -label.minutes.past.hour=\u5206(\u6bcf\u5c0f\u65f6) -label.snapshots=\u5feb\u7167 -label.time.colon=\u65f6\u95f4\: -label.min.past.the.hr=\u5206(\u6bcf\u5c0f\u65f6) -label.timezone.colon=\u65f6\u533a\: -label.keep.colon=\u4fdd\u7559\u6570\u91cf\: -label.every=\u6bcf -label.day=\u6bcf\u6708 -label.of.month=\u65e5 -label.add.private.gateway=\u6dfb\u52a0\u4e13\u7528\u7f51\u5173 diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 29752c62995..473c6354a8f 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -29,6 +29,7 @@ getSPMetadata=15 listIdps=15 authorizeSamlSso=7 listSamlAuthorization=7 +listAndSwitchSamlAccount=15 ### Account commands createAccount=7 @@ -82,8 +83,8 @@ scaleVirtualMachine=15 assignVirtualMachine=7 migrateVirtualMachine=1 migrateVirtualMachineWithVolume=1 -recoverVirtualMachine=7 -expungeVirtualMachine=7 +recoverVirtualMachine=15 +expungeVirtualMachine=15 getVirtualMachineUserData=15 #### snapshot commands @@ -770,6 +771,7 @@ deleteLdapConfiguration=3 listLdapUsers=3 ldapCreateAccount=3 importLdapUsers=3 +linkDomainToLdap=3 #### juniper-contrail commands diff --git a/core/src/com/cloud/agent/api/AttachVolumeAnswer.java b/core/src/com/cloud/agent/api/AttachVolumeAnswer.java deleted file mode 100644 index 3e869abba0d..00000000000 --- a/core/src/com/cloud/agent/api/AttachVolumeAnswer.java +++ /dev/null @@ -1,64 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.agent.api; - -public class AttachVolumeAnswer extends Answer { - private Long deviceId; - private String vdiUuid; - private String chainInfo; - - public AttachVolumeAnswer(AttachVolumeCommand cmd, String result) { - super(cmd, false, result); - this.deviceId = null; - } - - public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId) { - super(cmd); - this.deviceId = deviceId; - this.vdiUuid = ""; - } - - public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId, String vdiUuid) { - super(cmd); - this.deviceId = deviceId; - this.vdiUuid = vdiUuid; - } - - public AttachVolumeAnswer(AttachVolumeCommand cmd) { - super(cmd); - this.deviceId = null; - } - - public Long getDeviceId() { - return deviceId; - } - - public String getVdiUuid() { - return vdiUuid; - } - - public void setChainInfo(String chainInfo) { - this.chainInfo = chainInfo; - } - - public String getChainInfo() { - return chainInfo; - } -} diff --git a/core/src/com/cloud/agent/api/AttachVolumeCommand.java b/core/src/com/cloud/agent/api/AttachVolumeCommand.java deleted file mode 100644 index af44d728591..00000000000 --- a/core/src/com/cloud/agent/api/AttachVolumeCommand.java +++ /dev/null @@ -1,216 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.agent.api; - -import com.cloud.storage.Storage.StoragePoolType; - -public class AttachVolumeCommand extends Command { - private boolean attach; - private boolean _managed; - private String vmName; - private StoragePoolType pooltype; - private String volumePath; - private String volumeName; - private Long volumeSize; - private Long deviceId; - private String chainInfo; - private String poolUuid; - private String _storageHost; - private int _storagePort; - private String _iScsiName; - private String _chapInitiatorUsername; - private String _chapInitiatorPassword; - private String _chapTargetUsername; - private String _chapTargetPassword; - private Long bytesReadRate; - private Long bytesWriteRate; - private Long iopsReadRate; - private Long iopsWriteRate; - private String cacheMode; - - protected AttachVolumeCommand() { - } - - public AttachVolumeCommand(boolean attach, boolean managed, String vmName, StoragePoolType pooltype, String volumePath, String volumeName, Long volumeSize, - Long deviceId, String chainInfo) { - this.attach = attach; - this._managed = managed; - this.vmName = vmName; - this.pooltype = pooltype; - this.volumePath = volumePath; - this.volumeName = volumeName; - this.volumeSize = volumeSize; - this.deviceId = deviceId; - this.chainInfo = chainInfo; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public boolean getAttach() { - return attach; - } - - public String getVmName() { - return vmName; - } - - public StoragePoolType getPooltype() { - return pooltype; - } - - public void setPooltype(StoragePoolType pooltype) { - this.pooltype = pooltype; - } - - public String getVolumePath() { - return volumePath; - } - - public String getVolumeName() { - return volumeName; - } - - public Long getVolumeSize() { - return volumeSize; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public String getPoolUuid() { - return poolUuid; - } - - public void setPoolUuid(String poolUuid) { - this.poolUuid = poolUuid; - } - - public String getChainInfo() { - return chainInfo; - } - - public void setStorageHost(String storageHost) { - _storageHost = storageHost; - } - - public String getStorageHost() { - return _storageHost; - } - - public void setStoragePort(int storagePort) { - _storagePort = storagePort; - } - - public int getStoragePort() { - return _storagePort; - } - - public boolean isManaged() { - return _managed; - } - - public void set_iScsiName(String iScsiName) { - this._iScsiName = iScsiName; - } - - public String get_iScsiName() { - return _iScsiName; - } - - public void setChapInitiatorUsername(String chapInitiatorUsername) { - _chapInitiatorUsername = chapInitiatorUsername; - } - - public String getChapInitiatorUsername() { - return _chapInitiatorUsername; - } - - public void setChapInitiatorPassword(String chapInitiatorPassword) { - _chapInitiatorPassword = chapInitiatorPassword; - } - - public String getChapInitiatorPassword() { - return _chapInitiatorPassword; - } - - public void setChapTargetUsername(String chapTargetUsername) { - _chapTargetUsername = chapTargetUsername; - } - - public String getChapTargetUsername() { - return _chapTargetUsername; - } - - public void setChapTargetPassword(String chapTargetPassword) { - _chapTargetPassword = chapTargetPassword; - } - - public String getChapTargetPassword() { - return _chapTargetPassword; - } - - public void setBytesReadRate(Long bytesReadRate) { - this.bytesReadRate = bytesReadRate; - } - - public Long getBytesReadRate() { - return bytesReadRate; - } - - public void setBytesWriteRate(Long bytesWriteRate) { - this.bytesWriteRate = bytesWriteRate; - } - - public Long getBytesWriteRate() { - return bytesWriteRate; - } - - public void setIopsReadRate(Long iopsReadRate) { - this.iopsReadRate = iopsReadRate; - } - - public Long getIopsReadRate() { - return iopsReadRate; - } - - public void setIopsWriteRate(Long iopsWriteRate) { - this.iopsWriteRate = iopsWriteRate; - } - - public Long getIopsWriteRate() { - return iopsWriteRate; - } - - public void setCacheMode(String cacheMode) { - this.cacheMode = cacheMode; - } - - public String getCacheMode() { - return cacheMode; - } -} diff --git a/core/src/com/cloud/agent/api/CreateVMSnapshotCommand.java b/core/src/com/cloud/agent/api/CreateVMSnapshotCommand.java index ab4edafa484..1455145be0a 100644 --- a/core/src/com/cloud/agent/api/CreateVMSnapshotCommand.java +++ b/core/src/com/cloud/agent/api/CreateVMSnapshotCommand.java @@ -25,8 +25,14 @@ import org.apache.cloudstack.storage.to.VolumeObjectTO; public class CreateVMSnapshotCommand extends VMSnapshotBaseCommand { + private String vmUuid; - public CreateVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { + public CreateVMSnapshotCommand(String vmName, String vmUuid, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { super(vmName, snapshot, volumeTOs, guestOSType); + this.vmUuid = vmUuid; + } + + public String getVmUuid() { + return vmUuid; } } diff --git a/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java b/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java index c5c6215a917..b92bb720823 100644 --- a/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java +++ b/core/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java @@ -26,6 +26,7 @@ import com.cloud.storage.template.TemplateProp; public class ModifyStoragePoolAnswer extends Answer { StoragePoolInfo poolInfo; Map templateInfo; + String localDatastoreName = null; protected ModifyStoragePoolAnswer() { } @@ -55,4 +56,12 @@ public class ModifyStoragePoolAnswer extends Answer { this.templateInfo = templateInfo; } + public String getLocalDatastoreName() { + return localDatastoreName; + } + + public void setLocalDatastoreName(String localDatastoreName) { + this.localDatastoreName = localDatastoreName; + } + } diff --git a/core/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java b/core/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java index 7a7d3d43cb2..fc8ba08433c 100644 --- a/core/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java +++ b/core/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java @@ -25,16 +25,18 @@ import org.apache.cloudstack.storage.to.VolumeObjectTO; public class RevertToVMSnapshotCommand extends VMSnapshotBaseCommand { - public RevertToVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { + public RevertToVMSnapshotCommand(String vmName, String vmUuid, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { super(vmName, snapshot, volumeTOs, guestOSType); + this.vmUuid = vmUuid; } - public RevertToVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType, boolean reloadVm) { - this(vmName, snapshot, volumeTOs, guestOSType); + public RevertToVMSnapshotCommand(String vmName, String vmUuid, VMSnapshotTO snapshot, List volumeTOs, String guestOSType, boolean reloadVm) { + this(vmName, vmUuid, snapshot, volumeTOs, guestOSType); setReloadVm(reloadVm); } private boolean reloadVm = false; + private String vmUuid; public boolean isReloadVm() { return reloadVm; @@ -43,4 +45,8 @@ public class RevertToVMSnapshotCommand extends VMSnapshotBaseCommand { public void setReloadVm(boolean reloadVm) { this.reloadVm = reloadVm; } + + public String getVmUuid() { + return vmUuid; + } } diff --git a/core/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java b/core/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java index 3db3e863c5c..5e7200add13 100644 --- a/core/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java +++ b/core/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java @@ -24,6 +24,7 @@ import com.cloud.agent.api.Command; public class MigrateVolumeAnswer extends Answer { private String volumePath; + private String volumeChain; public MigrateVolumeAnswer(Command command, boolean success, String details, String volumePath) { super(command, success, details); @@ -38,4 +39,12 @@ public class MigrateVolumeAnswer extends Answer { public String getVolumePath() { return volumePath; } + + public void setVolumeChainInfo(String chainInfo) { + this.volumeChain = chainInfo; + } + + public String getVolumeChainInfo() { + return volumeChain; + } } \ No newline at end of file diff --git a/core/src/com/cloud/storage/template/LocalTemplateDownloader.java b/core/src/com/cloud/storage/template/LocalTemplateDownloader.java index 0edfb13d1ec..3d33a214276 100644 --- a/core/src/com/cloud/storage/template/LocalTemplateDownloader.java +++ b/core/src/com/cloud/storage/template/LocalTemplateDownloader.java @@ -123,6 +123,7 @@ public class LocalTemplateDownloader extends TemplateDownloaderBase implements T try { fic.close(); } catch (IOException e) { + s_logger.info("[ignore] error while closing file input channel."); } } @@ -130,6 +131,7 @@ public class LocalTemplateDownloader extends TemplateDownloaderBase implements T try { foc.close(); } catch (IOException e) { + s_logger.info("[ignore] error while closing file output channel."); } } @@ -137,6 +139,7 @@ public class LocalTemplateDownloader extends TemplateDownloaderBase implements T try { fis.close(); } catch (IOException e) { + s_logger.info("[ignore] error while closing file input stream."); } } @@ -144,6 +147,7 @@ public class LocalTemplateDownloader extends TemplateDownloaderBase implements T try { fos.close(); } catch (IOException e) { + s_logger.info("[ignore] error while closing file output stream."); } } @@ -155,16 +159,4 @@ public class LocalTemplateDownloader extends TemplateDownloaderBase implements T } } } - - public static void main(String[] args) { - String url = "file:///home/ahuang/Download/E3921_P5N7A-VM_manual.zip"; - TemplateDownloader td = new LocalTemplateDownloader(null, url, "/tmp/mysql", TemplateDownloader.DEFAULT_MAX_TEMPLATE_SIZE_IN_BYTES, null); - long bytes = td.download(true, null); - if (bytes > 0) { - System.out.println("Downloaded (" + bytes + " bytes)" + " in " + td.getDownloadTime() / 1000 + " secs"); - } else { - System.out.println("Failed download"); - } - - } } diff --git a/core/src/com/cloud/storage/template/OVAProcessor.java b/core/src/com/cloud/storage/template/OVAProcessor.java index 78825ced8ac..3d7f7a23bd7 100644 --- a/core/src/com/cloud/storage/template/OVAProcessor.java +++ b/core/src/com/cloud/storage/template/OVAProcessor.java @@ -91,7 +91,8 @@ public class OVAProcessor extends AdapterBase implements Processor { long size = getTemplateVirtualSize(file.getParent(), file.getName()); return size; } catch (Exception e) { - + s_logger.info("[ignored]" + + "failed to get virtual template size for ova: " + e.getLocalizedMessage()); } return file.length(); } diff --git a/core/src/com/cloud/storage/template/S3TemplateDownloader.java b/core/src/com/cloud/storage/template/S3TemplateDownloader.java index ec44d8d70ee..ac47decefc6 100644 --- a/core/src/com/cloud/storage/template/S3TemplateDownloader.java +++ b/core/src/com/cloud/storage/template/S3TemplateDownloader.java @@ -27,6 +27,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.Date; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.cloudstack.storage.command.DownloadCommand.ResourceType; import org.apache.commons.httpclient.ChunkedInputStream; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.Header; @@ -50,10 +52,6 @@ import com.amazonaws.services.s3.model.ProgressEvent; import com.amazonaws.services.s3.model.ProgressListener; import com.amazonaws.services.s3.model.PutObjectRequest; import com.amazonaws.services.s3.model.StorageClass; - -import org.apache.cloudstack.managed.context.ManagedContextRunnable; -import org.apache.cloudstack.storage.command.DownloadCommand.ResourceType; - import com.cloud.agent.api.storage.Proxy; import com.cloud.agent.api.to.S3TO; import com.cloud.utils.Pair; @@ -61,46 +59,48 @@ import com.cloud.utils.S3Utils; import com.cloud.utils.UriUtils; /** - * Download a template file using HTTP - * + * Download a template file using HTTP(S) */ public class S3TemplateDownloader extends ManagedContextRunnable implements TemplateDownloader { - public static final Logger s_logger = Logger.getLogger(S3TemplateDownloader.class.getName()); + private static final Logger s_logger = Logger.getLogger(S3TemplateDownloader.class.getName()); private static final MultiThreadedHttpConnectionManager s_httpClientManager = new MultiThreadedHttpConnectionManager(); private String downloadUrl; private String installPath; private String s3Key; private String fileName; - public TemplateDownloader.Status status = TemplateDownloader.Status.NOT_STARTED; - public String errorString = " "; - private long remoteSize = 0; - public long downloadTime = 0; - public long totalBytes; + private String fileExtension; + private String errorString = " "; + + private TemplateDownloader.Status status = TemplateDownloader.Status.NOT_STARTED; + private ResourceType resourceType = ResourceType.TEMPLATE; private final HttpClient client; + private final HttpMethodRetryHandler myretryhandler; private GetMethod request; - private boolean resume = false; private DownloadCompleteCallback completionCallback; - private S3TO s3; + private S3TO s3to; + + private long remoteSize = 0; + private long downloadTime = 0; + private long totalBytes; + private long maxTemplateSizeInByte; + + private boolean resume = false; private boolean inited = true; - private long maxTemplateSizeInByte; - private ResourceType resourceType = ResourceType.TEMPLATE; - private final HttpMethodRetryHandler myretryhandler; - - public S3TemplateDownloader(S3TO storageLayer, String downloadUrl, String installPath, DownloadCompleteCallback callback, long maxTemplateSizeInBytes, String user, - String password, Proxy proxy, ResourceType resourceType) { - s3 = storageLayer; + public S3TemplateDownloader(S3TO s3to, String downloadUrl, String installPath, DownloadCompleteCallback callback, + long maxTemplateSizeInBytes, String user, String password, Proxy proxy, ResourceType resourceType) { + this.s3to = s3to; this.downloadUrl = downloadUrl; this.installPath = installPath; - status = TemplateDownloader.Status.NOT_STARTED; + this.status = TemplateDownloader.Status.NOT_STARTED; this.resourceType = resourceType; - maxTemplateSizeInByte = maxTemplateSizeInBytes; + this.maxTemplateSizeInByte = maxTemplateSizeInBytes; - totalBytes = 0; - client = new HttpClient(s_httpClientManager); + this.totalBytes = 0; + this.client = new HttpClient(s_httpClientManager); - myretryhandler = new HttpMethodRetryHandler() { + this.myretryhandler = new HttpMethodRetryHandler() { @Override public boolean retryMethod(final HttpMethod method, final IOException exception, int executionCount) { if (executionCount >= 2) { @@ -128,6 +128,7 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp Pair hostAndPort = UriUtils.validateUrl(downloadUrl); fileName = StringUtils.substringAfterLast(downloadUrl, "/"); + fileExtension = StringUtils.substringAfterLast(fileName, "."); if (proxy != null) { client.getHostConfiguration().setProxy(proxy.getHost(), proxy.getPort()); @@ -139,8 +140,10 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp if ((user != null) && (password != null)) { client.getParams().setAuthenticationPreemptive(true); Credentials defaultcreds = new UsernamePasswordCredentials(user, password); - client.getState().setCredentials(new AuthScope(hostAndPort.first(), hostAndPort.second(), AuthScope.ANY_REALM), defaultcreds); - s_logger.info("Added username=" + user + ", password=" + password + "for host " + hostAndPort.first() + ":" + hostAndPort.second()); + client.getState().setCredentials( + new AuthScope(hostAndPort.first(), hostAndPort.second(), AuthScope.ANY_REALM), defaultcreds); + s_logger.info("Added username=" + user + ", password=" + password + "for host " + hostAndPort.first() + + ":" + hostAndPort.second()); } else { s_logger.info("No credentials configured for host=" + hostAndPort.first() + ":" + hostAndPort.second()); } @@ -160,11 +163,11 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp @Override public long download(boolean resume, DownloadCompleteCallback callback) { switch (status) { - case ABORTED: - case UNRECOVERABLE_ERROR: - case DOWNLOAD_FINISHED: - return 0; - default: + case ABORTED: + case UNRECOVERABLE_ERROR: + case DOWNLOAD_FINISHED: + return 0; + default: } @@ -215,10 +218,11 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp contentType = contentTypeHeader.getValue(); } - InputStream in = !chunked ? new BufferedInputStream(request.getResponseBodyAsStream()) : new ChunkedInputStream(request.getResponseBodyAsStream()); + InputStream in = !chunked ? new BufferedInputStream(request.getResponseBodyAsStream()) + : new ChunkedInputStream(request.getResponseBodyAsStream()); - s_logger.info("Starting download from " + getDownloadUrl() + " to s3 bucket " + s3.getBucketName() + " remoteSize=" + remoteSize + " , max size=" + - maxTemplateSizeInByte); + s_logger.info("Starting download from " + getDownloadUrl() + " to s3 bucket " + s3to.getBucketName() + + " remoteSize=" + remoteSize + " , max size=" + maxTemplateSizeInByte); Date start = new Date(); // compute s3 key @@ -230,9 +234,9 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp if (contentType != null) { metadata.setContentType(contentType); } - PutObjectRequest putObjectRequest = new PutObjectRequest(s3.getBucketName(), s3Key, in, metadata); + PutObjectRequest putObjectRequest = new PutObjectRequest(s3to.getBucketName(), s3Key, in, metadata); // check if RRS is enabled - if (s3.getEnableRRS()) { + if (s3to.getEnableRRS()) { putObjectRequest = putObjectRequest.withStorageClass(StorageClass.ReducedRedundancy); } // register progress listenser @@ -257,14 +261,15 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp }); - if (!s3.getSingleUpload(remoteSize)) { + if (!s3to.getSingleUpload(remoteSize)) { // use TransferManager to do multipart upload - S3Utils.mputObject(s3, putObjectRequest); + S3Utils.mputObject(s3to, putObjectRequest); } else { // single part upload, with 5GB limit in Amazon - S3Utils.putObject(s3, putObjectRequest); - while (status != TemplateDownloader.Status.DOWNLOAD_FINISHED && status != TemplateDownloader.Status.UNRECOVERABLE_ERROR && - status != TemplateDownloader.Status.ABORTED) { + S3Utils.putObject(s3to, putObjectRequest); + while (status != TemplateDownloader.Status.DOWNLOAD_FINISHED + && status != TemplateDownloader.Status.UNRECOVERABLE_ERROR + && status != TemplateDownloader.Status.ABORTED) { // wait for completion } } @@ -324,32 +329,59 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp return totalBytes; } + /** + * Returns an InputStream only when the status is DOWNLOAD_FINISHED. + * + * The caller of this method must close the InputStream to prevent resource leaks! + * + * @return S3ObjectInputStream of the object. + */ + public InputStream getS3ObjectInputStream() { + // Check if the download is finished + if (status != Status.DOWNLOAD_FINISHED) { + return null; + } + + return S3Utils.getObjectStream(s3to, s3to.getBucketName(), s3Key); + } + + public void cleanupAfterError() { + if (status != Status.UNRECOVERABLE_ERROR) { + s_logger.debug("S3Template downloader does not have state UNRECOVERABLE_ERROR, no cleanup neccesarry."); + return; + } + + s_logger.info("Cleanup after UNRECOVERABLE_ERROR, trying to remove object: " + s3Key); + + S3Utils.deleteObject(s3to, s3to.getBucketName(), s3Key); + } + @Override @SuppressWarnings("fallthrough") public boolean stopDownload() { switch (getStatus()) { - case IN_PROGRESS: - if (request != null) { - request.abort(); - } - status = TemplateDownloader.Status.ABORTED; - return true; - case UNKNOWN: - case NOT_STARTED: - case RECOVERABLE_ERROR: - case UNRECOVERABLE_ERROR: - case ABORTED: - status = TemplateDownloader.Status.ABORTED; - case DOWNLOAD_FINISHED: - try { - S3Utils.deleteObject(s3, s3.getBucketName(), s3Key); - } catch (Exception ex) { - // ignore delete exception if it is not there - } - return true; + case IN_PROGRESS: + if (request != null) { + request.abort(); + } + status = TemplateDownloader.Status.ABORTED; + return true; + case UNKNOWN: + case NOT_STARTED: + case RECOVERABLE_ERROR: + case UNRECOVERABLE_ERROR: + case ABORTED: + status = TemplateDownloader.Status.ABORTED; + case DOWNLOAD_FINISHED: + try { + S3Utils.deleteObject(s3to, s3to.getBucketName(), s3Key); + } catch (Exception ex) { + // ignore delete exception if it is not there + } + return true; - default: - return true; + default: + return true; } } @@ -359,7 +391,7 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp return 0; } - return (int)(100.0 * totalBytes / remoteSize); + return (int) (100.0 * totalBytes / remoteSize); } @Override @@ -417,4 +449,11 @@ public class S3TemplateDownloader extends ManagedContextRunnable implements Temp return resourceType; } -} + public long getTotalBytes() { + return totalBytes; + } + + public String getFileExtension() { + return fileExtension; + } +} \ No newline at end of file diff --git a/core/src/com/cloud/storage/template/TemplateLocation.java b/core/src/com/cloud/storage/template/TemplateLocation.java index 87f56b8a79b..ea785b206bd 100644 --- a/core/src/com/cloud/storage/template/TemplateLocation.java +++ b/core/src/com/cloud/storage/template/TemplateLocation.java @@ -94,17 +94,10 @@ public class TemplateLocation { } public boolean load() throws IOException { - FileInputStream strm = null; - try { - strm = new FileInputStream(_file); + try (FileInputStream strm = new FileInputStream(_file);) { _props.load(strm); - } finally { - if (strm != null) { - try { - strm.close(); - } catch (IOException e) { - } - } + } catch (IOException e) { + s_logger.warn("Unable to load the template properties", e); } for (ImageFormat format : ImageFormat.values()) { @@ -142,20 +135,11 @@ public class TemplateLocation { _props.setProperty(info.format.getFileExtension() + ".size", Long.toString(info.size)); _props.setProperty(info.format.getFileExtension() + ".virtualsize", Long.toString(info.virtualSize)); } - FileOutputStream strm = null; - try { - strm = new FileOutputStream(_file); + try (FileOutputStream strm = new FileOutputStream(_file);) { _props.store(strm, ""); } catch (IOException e) { s_logger.warn("Unable to save the template properties ", e); return false; - } finally { - if (strm != null) { - try { - strm.close(); - } catch (IOException e) { - } - } } return true; } diff --git a/core/src/com/cloud/storage/template/VmdkProcessor.java b/core/src/com/cloud/storage/template/VmdkProcessor.java index 6903b74a674..3d399f5791b 100644 --- a/core/src/com/cloud/storage/template/VmdkProcessor.java +++ b/core/src/com/cloud/storage/template/VmdkProcessor.java @@ -77,7 +77,8 @@ public class VmdkProcessor extends AdapterBase implements Processor { long size = getTemplateVirtualSize(file.getParent(), file.getName()); return size; } catch (Exception e) { - + s_logger.info("[ignored]" + + "failed to get template virtual size for vmdk: " + e.getLocalizedMessage()); } return file.length(); } @@ -86,9 +87,10 @@ public class VmdkProcessor extends AdapterBase implements Processor { long virtualSize = 0; String templateFileFullPath = templatePath.endsWith(File.separator) ? templatePath : templatePath + File.separator; templateFileFullPath += templateName.endsWith(ImageFormat.VMDK.getFileExtension()) ? templateName : templateName + "." + ImageFormat.VMDK.getFileExtension(); - try { - FileReader fileReader = new FileReader(templateFileFullPath); - BufferedReader bufferedReader = new BufferedReader(fileReader); + try ( + FileReader fileReader = new FileReader(templateFileFullPath); + BufferedReader bufferedReader = new BufferedReader(fileReader); + ) { Pattern regex = Pattern.compile("(RW|RDONLY|NOACCESS) (\\d+) (FLAT|SPARSE|ZERO|VMFS|VMFSSPARSE|VMFSDRM|VMFSRAW)"); String line = null; while((line = bufferedReader.readLine()) != null) { @@ -99,7 +101,6 @@ public class VmdkProcessor extends AdapterBase implements Processor { break; } } - bufferedReader.close(); } catch(FileNotFoundException ex) { String msg = "Unable to open file '" + templateFileFullPath + "' " + ex.toString(); s_logger.error(msg); diff --git a/core/src/org/apache/cloudstack/storage/command/RevertSnapshotCommand.java b/core/src/org/apache/cloudstack/storage/command/RevertSnapshotCommand.java new file mode 100644 index 00000000000..1a4403b3baf --- /dev/null +++ b/core/src/org/apache/cloudstack/storage/command/RevertSnapshotCommand.java @@ -0,0 +1,49 @@ +/* + * 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.storage.command; + +import org.apache.cloudstack.storage.to.SnapshotObjectTO; + +public final class RevertSnapshotCommand extends StorageSubSystemCommand { + private SnapshotObjectTO data; + private boolean _executeInSequence = false; + + public RevertSnapshotCommand(SnapshotObjectTO data) { + super(); + this.data = data; + } + + protected RevertSnapshotCommand() { + super(); + } + + public SnapshotObjectTO getData() { + return this.data; + } + + @Override + public void setExecuteInSequence(final boolean executeInSequence) { + _executeInSequence = executeInSequence; + } + + @Override + public boolean executeInSequence() { + return _executeInSequence; + } +} diff --git a/core/test/com/cloud/storage/template/LocalTemplateDownloaderTest.java b/core/test/com/cloud/storage/template/LocalTemplateDownloaderTest.java new file mode 100644 index 00000000000..74d1adc3c58 --- /dev/null +++ b/core/test/com/cloud/storage/template/LocalTemplateDownloaderTest.java @@ -0,0 +1,41 @@ +// +// 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.storage.template; + +import static org.junit.Assert.fail; + +import java.io.File; + +import org.junit.Test; + + +public class LocalTemplateDownloaderTest { + + @Test + public void localTemplateDownloaderTest() { + String url = "file://" + new File("pom.xml").getAbsolutePath(); + TemplateDownloader td = new LocalTemplateDownloader(null, url, "/tmp", TemplateDownloader.DEFAULT_MAX_TEMPLATE_SIZE_IN_BYTES, null); + long bytes = td.download(true, null); + if (!(bytes > 0)) { + fail("Failed download"); + } + } + +} diff --git a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java deleted file mode 100644 index 3390fd1884d..00000000000 --- a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java +++ /dev/null @@ -1,66 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package org.apache.cloudstack.api.agent.test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; -import com.cloud.storage.Storage.StoragePoolType; - -public class AttachVolumeAnswerTest { - AttachVolumeCommand avc = new AttachVolumeCommand(true, false, "vmname", StoragePoolType.Filesystem, "vPath", "vName", 1073741824L, 123456789L, "chainInfo"); - AttachVolumeAnswer ava1 = new AttachVolumeAnswer(avc); - String results = ""; - AttachVolumeAnswer ava2 = new AttachVolumeAnswer(avc, results); - Long deviceId = 10L; - AttachVolumeAnswer ava3 = new AttachVolumeAnswer(avc, deviceId); - - @Test - public void testGetDeviceId() { - Long dId = ava1.getDeviceId(); - assertTrue(dId == null); - - dId = ava2.getDeviceId(); - assertTrue(dId == null); - - dId = ava3.getDeviceId(); - Long expected = 10L; - assertEquals(expected, dId); - } - - @Test - public void testGetChainInfo() { - ava1.setChainInfo("chainInfo"); - String chainInfo = ava1.getChainInfo(); - assertTrue(chainInfo.equals("chainInfo")); - - ava2.setChainInfo("chainInfo"); - chainInfo = ava2.getChainInfo(); - assertTrue(chainInfo.equals("chainInfo")); - - ava3.setChainInfo("chainInfo"); - chainInfo = ava3.getChainInfo(); - assertTrue(chainInfo.equals("chainInfo")); - } -} diff --git a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java deleted file mode 100644 index 17dab239d78..00000000000 --- a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java +++ /dev/null @@ -1,115 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package org.apache.cloudstack.api.agent.test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.cloud.agent.api.AttachVolumeCommand; -import com.cloud.storage.Storage.StoragePoolType; - -public class AttachVolumeCommandTest { - AttachVolumeCommand avc = new AttachVolumeCommand(true, false, "vmname", StoragePoolType.Filesystem, "vPath", "vName", 1073741824L, 123456789L, "chainInfo"); - - @Test - public void testExecuteInSequence() { - boolean b = avc.executeInSequence(); - assertTrue(b); - } - - @Test - public void testGetAttach() { - boolean b = avc.getAttach(); - assertTrue(b); - } - - @Test - public void testGetVmName() { - String vmName = avc.getVmName(); - assertTrue(vmName.equals("vmname")); - } - - @Test - public void testGetPooltype() { - StoragePoolType pt = avc.getPooltype(); - assertTrue(pt.equals(StoragePoolType.Filesystem)); - - avc.setPooltype(StoragePoolType.NetworkFilesystem); - pt = avc.getPooltype(); - assertTrue(pt.equals(StoragePoolType.NetworkFilesystem)); - - avc.setPooltype(StoragePoolType.IscsiLUN); - pt = avc.getPooltype(); - assertTrue(pt.equals(StoragePoolType.IscsiLUN)); - - avc.setPooltype(StoragePoolType.Iscsi); - pt = avc.getPooltype(); - assertTrue(pt.equals(StoragePoolType.Iscsi)); - } - - @Test - public void testGetVolumePath() { - String vPath = avc.getVolumePath(); - assertTrue(vPath.equals("vPath")); - } - - @Test - public void testGetVolumeName() { - String vName = avc.getVolumeName(); - assertTrue(vName.equals("vName")); - } - - @Test - public void testGetDeviceId() { - Long dId = avc.getDeviceId(); - Long expected = 123456789L; - assertEquals(expected, dId); - - avc.setDeviceId(5L); - dId = avc.getDeviceId(); - expected = 5L; - assertEquals(expected, dId); - - avc.setDeviceId(0L); - dId = avc.getDeviceId(); - expected = 0L; - assertEquals(expected, dId); - - avc.setDeviceId(-5L); - dId = avc.getDeviceId(); - expected = -5L; - assertEquals(expected, dId); - } - - @Test - public void testGetPoolUuid() { - avc.setPoolUuid("420fa39c-4ef1-a83c-fd93-46dc1ff515ae"); - String pUuid = avc.getPoolUuid(); - assertTrue(pUuid.equals("420fa39c-4ef1-a83c-fd93-46dc1ff515ae")); - } - - @Test - public void testGetWait() { - String cInfo = avc.getChainInfo(); - assertTrue(cInfo.equals("chainInfo")); - } -} diff --git a/debian/changelog b/debian/changelog index d8babba627e..8d5fa5dba89 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ cloudstack (4.6.0-SNAPSHOT) unstable; urgency=low [ Rafael da Fonseca ] * Switch to dpkg-source 3.0 (native) format - -- Rafael da Fonseca Fri, 22 May 2015 16:03:55 +0200 + -- the Apache CloudStack project Thu, 18 Jun 2015 11:17:09 +0200 cloudstack (4.5.0-snapshot) unstable; urgency=low diff --git a/debian/cloudstack-common.install b/debian/cloudstack-common.install index 01d0957a222..accc6fadfa2 100644 --- a/debian/cloudstack-common.install +++ b/debian/cloudstack-common.install @@ -24,6 +24,7 @@ /usr/share/cloudstack-common/scripts/vm/systemvm/* /usr/share/cloudstack-common/scripts/vm/pingtest.sh /usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/* +/usr/share/cloudstack-common/scripts/vm/hypervisor/update_host_passwd.sh /usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/* /usr/share/cloudstack-common/lib/* diff --git a/debian/control b/debian/control index 86bf55e2349..6720595b4e0 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: cloudstack Section: libs Priority: extra Maintainer: Wido den Hollander -Build-Depends: debhelper (>= 7), openjdk-7-jdk | openjdk-8-jdk, genisoimage, - python-mysqldb, maven (>= 3) | maven3, python (>= 2.6.6-3~) +Build-Depends: debhelper (>= 9), openjdk-8-jdk | openjdk-7-jdk, genisoimage, + python-mysqldb, maven (>= 3) | maven3, python (>= 2.7) Standards-Version: 3.8.1 Homepage: http://www.cloudstack.org/ @@ -15,14 +15,14 @@ Description: A common package which contains files which are shared by several C Package: cloudstack-management Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, cloudstack-common (= ${source:Version}), tomcat6 | tomcat7 | tomcat8, sudo, jsvc, python-mysqldb, libmysql-java, python-paramiko, augeas-tools, mysql-client, adduser +Depends: ${misc:Depends}, ${python:Depends}, cloudstack-common (= ${source:Version}), tomcat8 | tomcat7 | tomcat6, sudo, jsvc, python-mysqldb, libmysql-java, augeas-tools, mysql-client, adduser Conflicts: cloud-server, cloud-client, cloud-client-ui Description: CloudStack server library The CloudStack management server Package: cloudstack-agent Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, openjdk-7-jre-headless | openjdk-8-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), libcommons-daemon-java, openssh-client, libvirt0, qemu-system-x86 | qemu-kvm, libvirt-bin, uuid-runtime, rsync, iproute, perl-modules, ebtables, vlan, wget, jsvc, ipset, python-libvirt, ethtool, iptables +Depends: ${misc:Depends}, ${python:Depends}, openjdk-8-jre-headless | openjdk-7-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 4.0), libcommons-daemon-java, openssh-client, qemu-kvm (>= 1.0), libvirt-bin (>= 0.9.8), uuid-runtime, iproute, ebtables, vlan, jsvc, ipset, python-libvirt, ethtool, iptables 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 @@ -31,7 +31,7 @@ Description: CloudStack agent Package: cloudstack-usage Architecture: all -Depends: ${misc:Depends}, openjdk-7-jre-headless | openjdk-8-jre-headless, cloudstack-common (= ${source:Version}), jsvc, libmysql-java +Depends: ${misc:Depends}, openjdk-8-jre-headless | openjdk-7-jre-headless, cloudstack-common (= ${source:Version}), jsvc, libmysql-java Description: CloudStack usage monitor The CloudStack usage monitor provides usage accounting across the entire cloud for cloud operators to charge based on usage parameters. diff --git a/debian/rules b/debian/rules index b06f929a5a8..4a95c6d3768 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f # -*- makefile -*- -VERSION := $(shell mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v "\[") +VERSION := $(shell grep '^ ' pom.xml| cut -d'>' -f2 |cut -d'<' -f1) PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1) SYSCONFDIR = "/etc" DESTDIR = "debian/tmp" diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java index 8db4101ffc0..82ba8b6105b 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java @@ -18,8 +18,10 @@ */ package org.apache.cloudstack.engine.subsystem.api.storage; +import com.cloud.exception.StorageConflictException; + public interface HypervisorHostListener { - boolean hostConnect(long hostId, long poolId); + boolean hostConnect(long hostId, long poolId) throws StorageConflictException; boolean hostDisconnected(long hostId, long poolId); } diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java index 5e7090d321d..0c6bd93982a 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java @@ -48,5 +48,5 @@ public interface PrimaryDataStoreDriver extends DataStoreDriver { public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback); - public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback); + public void revertSnapshot(SnapshotInfo snapshotOnImageStore, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback); } diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java index 4edeb55ab12..322de77503a 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotService.java @@ -24,7 +24,7 @@ public interface SnapshotService { boolean deleteSnapshot(SnapshotInfo snapshot); - boolean revertSnapshot(Long snapshotId); + boolean revertSnapshot(SnapshotInfo snapshot); void syncVolumeSnapshotsToRegionStore(long volumeId, DataStore store); diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java index 0af9b0971a6..fbf60041ac9 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java @@ -29,7 +29,7 @@ public interface SnapshotStrategy { boolean deleteSnapshot(Long snapshotId); - boolean revertSnapshot(Long snapshotId); + boolean revertSnapshot(SnapshotInfo snapshot); StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op); } diff --git a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java index 64aaf48ae87..ef8a373e269 100644 --- a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java @@ -103,6 +103,8 @@ import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.TransactionLegacy; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.HypervisorVersionChangedException; +import com.cloud.utils.exception.NioConnectionException; +import com.cloud.utils.exception.TaskExecutionException; import com.cloud.utils.fsm.NoTransitionException; import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.nio.HandlerFactory; @@ -593,7 +595,11 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl startDirectlyConnectedHosts(); if (_connection != null) { - _connection.start(); + try { + _connection.start(); + } catch (final NioConnectionException e) { + s_logger.error("Error when connecting to the NioServer!", e); + } } _monitorExecutor.scheduleWithFixedDelay(new MonitorTask(), PingInterval.value(), PingInterval.value(), TimeUnit.SECONDS); @@ -824,25 +830,30 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl /* OK, we are going to the bad status, let's see what happened */ s_logger.info("Investigating why host " + hostId + " has disconnected with event " + event); - final Status determinedState = investigate(attache); + Status determinedState = investigate(attache); // if state cannot be determined do nothing and bail out if (determinedState == null) { - s_logger.warn("Agent state cannot be determined, do nothing"); - return false; + if ((System.currentTimeMillis() >> 10) - host.getLastPinged() > AlertWait.value()) { + s_logger.warn("Agent " + hostId + " state cannot be determined for more than " + AlertWait + "(" + AlertWait.value() + ") seconds, will go to Alert state"); + determinedState = Status.Alert; + } else { + s_logger.warn("Agent " + hostId + " state cannot be determined, do nothing"); + return false; + } } final Status currentStatus = host.getStatus(); - s_logger.info("The state determined is " + determinedState); + s_logger.info("The agent " + hostId + " state determined is " + determinedState); if (determinedState == Status.Down) { - s_logger.error("Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs"); + final String message = "Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs"; + s_logger.error(message); if (host.getType() != Host.Type.SecondaryStorage && host.getType() != Host.Type.ConsoleProxy) { - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host disconnected, " + host.getId(), - "Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs"); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host down, " + host.getId(), message); } event = Status.Event.HostDown; } else if (determinedState == Status.Up) { - /* Got ping response from host, bring it back*/ + /* Got ping response from host, bring it back */ s_logger.info("Agent is determined to be up and running"); agentStatusTransitTo(host, Status.Event.Ping, _nodeId); return false; @@ -850,10 +861,10 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl s_logger.warn("Agent is disconnected but the host is still up: " + host.getId() + "-" + host.getName()); if (currentStatus == Status.Disconnected) { if ((System.currentTimeMillis() >> 10) - host.getLastPinged() > AlertWait.value()) { - s_logger.warn("Host " + host.getId() + " has been disconnected pass the time it should be disconnected."); + s_logger.warn("Host " + host.getId() + " has been disconnected past the wait time it should be disconnected."); event = Status.Event.WaitedTooLong; } else { - s_logger.debug("Host has been determined to be disconnected but it hasn't passed the wait time yet."); + s_logger.debug("Host " + host.getId() + " has been determined to be disconnected but it hasn't passed the wait time yet."); return false; } } else if (currentStatus == Status.Up) { @@ -862,7 +873,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl final String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName(); if (host.getType() != Host.Type.SecondaryStorage && host.getType() != Host.Type.ConsoleProxy) { _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host disconnected, " + hostDesc, - "If the agent for host [" + hostDesc + "] is not restarted within " + AlertWait + " seconds, HA will begin on the VMs"); + "If the agent for host [" + hostDesc + "] is not restarted within " + AlertWait + " seconds, host will go to Alert state"); } event = Status.Event.AgentDisconnected; } @@ -872,11 +883,10 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl final HostPodVO podVO = _podDao.findById(host.getPodId()); final String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName(); _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host in ALERT state, " + hostDesc, - "In availability zone " + host.getDataCenterId() + ", " + host.getId() + "-" + host.getName() - + " disconnect due to event " + event + ", ms can't determine the host status" ); + "In availability zone " + host.getDataCenterId() + ", host is in alert state: " + host.getId() + "-" + host.getName()); } } else { - s_logger.debug("The next status of Agent " + host.getId() + " is not Alert, no need to investigate what happened"); + s_logger.debug("The next status of agent " + host.getId() + " is not Alert, no need to investigate what happened"); } } handleDisconnectWithoutInvestigation(attache, event, true, true); @@ -1295,7 +1305,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl } @Override - protected void doTask(final Task task) throws Exception { + protected void doTask(final Task task) throws TaskExecutionException { final TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); try { final Type type = task.getType(); @@ -1311,6 +1321,10 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl } catch (final UnsupportedVersionException e) { s_logger.warn(e.getMessage()); // upgradeAgent(task.getLink(), data, e.getReason()); + } catch (final ClassNotFoundException e) { + final String message = String.format("Exception occured when executing taks! Error '%s'", e.getMessage()); + s_logger.error(message); + throw new TaskExecutionException(message, e); } } else if (type == Task.Type.CONNECT) { } else if (type == Task.Type.DISCONNECT) { diff --git a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java index ba82938fcdc..04be1ab7ee4 100644 --- a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java +++ b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java @@ -43,10 +43,6 @@ import javax.naming.ConfigurationException; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; -import org.apache.log4j.Logger; - -import com.google.gson.Gson; - import org.apache.cloudstack.framework.config.ConfigDepot; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; @@ -54,6 +50,7 @@ import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.managed.context.ManagedContextTimerTask; import org.apache.cloudstack.utils.identity.ManagementServerNode; import org.apache.cloudstack.utils.security.SSLUtils; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -93,8 +90,10 @@ import com.cloud.utils.db.QueryBuilder; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.TransactionLegacy; import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.exception.TaskExecutionException; import com.cloud.utils.nio.Link; import com.cloud.utils.nio.Task; +import com.google.gson.Gson; @Local(value = {AgentManager.class, ClusteredAgentRebalanceService.class}) public class ClusteredAgentManagerImpl extends AgentManagerImpl implements ClusterManagerListener, ClusteredAgentRebalanceService { @@ -139,7 +138,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust "Interval between scans to load agents", false, ConfigKey.Scope.Global, 1000); @Override - public boolean configure(String name, Map xmlParams) throws ConfigurationException { + public boolean configure(final String name, final Map xmlParams) throws ConfigurationException { _peers = new HashMap(7); _sslEngines = new HashMap(7); _nodeId = ManagementServerNode.getManagementServerId(); @@ -192,17 +191,17 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } // for agents that are self-managed, threshold to be considered as disconnected after pingtimeout - long cutSeconds = (System.currentTimeMillis() >> 10) - getTimeout(); - List hosts = _hostDao.findAndUpdateDirectAgentToLoad(cutSeconds, LoadSize.value().longValue(), _nodeId); - List appliances = _hostDao.findAndUpdateApplianceToLoad(cutSeconds, _nodeId); + final long cutSeconds = (System.currentTimeMillis() >> 10) - getTimeout(); + final List hosts = _hostDao.findAndUpdateDirectAgentToLoad(cutSeconds, LoadSize.value().longValue(), _nodeId); + final List appliances = _hostDao.findAndUpdateApplianceToLoad(cutSeconds, _nodeId); - if (hosts != null) { + if (hosts != null) { hosts.addAll(appliances); if (hosts.size() > 0) { s_logger.debug("Found " + hosts.size() + " unmanaged direct hosts, processing connect for them..."); - for (HostVO host : hosts) { + for (final HostVO host : hosts) { try { - AgentAttache agentattache = findAttache(host.getId()); + final AgentAttache agentattache = findAttache(host.getId()); if (agentattache != null) { // already loaded, skip if (agentattache.forForward()) { @@ -219,7 +218,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.debug("Loading directly connected host " + host.getId() + "(" + host.getName() + ")"); } loadDirectlyConnectedHost(host, false); - } catch (Throwable e) { + } catch (final Throwable e) { s_logger.warn(" can not load directly connected host " + host.getId() + "(" + host.getName() + ") due to ", e); } } @@ -235,20 +234,20 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust protected void runInContext() { try { runDirectAgentScanTimerTask(); - } catch (Throwable e) { + } catch (final Throwable e) { s_logger.error("Unexpected exception " + e.getMessage(), e); } } } @Override - public Task create(Task.Type type, Link link, byte[] data) { + public Task create(final Task.Type type, final Link link, final byte[] data) { return new ClusteredAgentHandler(type, link, data); } - protected AgentAttache createAttache(long id) { + protected AgentAttache createAttache(final long id) { s_logger.debug("create forwarding ClusteredAgentAttache for " + id); - HostVO host = _hostDao.findById(id); + final HostVO host = _hostDao.findById(id); final AgentAttache attache = new ClusteredAgentAttache(this, id, host.getName()); AgentAttache old = null; synchronized (_agents) { @@ -265,7 +264,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - protected AgentAttache createAttacheForConnect(HostVO host, Link link) { + protected AgentAttache createAttacheForConnect(final HostVO host, final Link link) { s_logger.debug("create ClusteredAgentAttache for " + host.getId()); final AgentAttache attache = new ClusteredAgentAttache(this, host.getId(), host.getName(), link, host.isInMaintenanceStates()); link.attach(attache); @@ -281,7 +280,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - protected AgentAttache createAttacheForDirectConnect(Host host, ServerResource resource) { + protected AgentAttache createAttacheForDirectConnect(final Host host, final ServerResource resource) { s_logger.debug("create ClusteredDirectAgentAttache for " + host.getId()); final DirectAgentAttache attache = new ClusteredDirectAgentAttache(this, host.getId(), host.getName(), _nodeId, resource, host.isInMaintenanceStates()); AgentAttache old = null; @@ -296,16 +295,16 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - protected boolean handleDisconnectWithoutInvestigation(AgentAttache attache, Status.Event event, boolean transitState, boolean removeAgent) { + protected boolean handleDisconnectWithoutInvestigation(final AgentAttache attache, final Status.Event event, final boolean transitState, final boolean removeAgent) { return handleDisconnect(attache, event, false, true, removeAgent); } @Override - protected boolean handleDisconnectWithInvestigation(AgentAttache attache, Status.Event event) { + protected boolean handleDisconnectWithInvestigation(final AgentAttache attache, final Status.Event event) { return handleDisconnect(attache, event, true, true, true); } - protected boolean handleDisconnect(AgentAttache agent, Status.Event event, boolean investigate, boolean broadcast, boolean removeAgent) { + protected boolean handleDisconnect(final AgentAttache agent, final Status.Event event, final boolean investigate, final boolean broadcast, final boolean removeAgent) { boolean res; if (!investigate) { res = super.handleDisconnectWithoutInvestigation(agent, event, true, removeAgent); @@ -324,16 +323,16 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - public boolean executeUserRequest(long hostId, Event event) throws AgentUnavailableException { + public boolean executeUserRequest(final long hostId, final Event event) throws AgentUnavailableException { if (event == Event.AgentDisconnected) { if (s_logger.isDebugEnabled()) { s_logger.debug("Received agent disconnect event for host " + hostId); } - AgentAttache attache = findAttache(hostId); + final AgentAttache attache = findAttache(hostId); if (attache != null) { // don't process disconnect if the host is being rebalanced if (isAgentRebalanceEnabled()) { - HostTransferMapVO transferVO = _hostTransferDao.findById(hostId); + final HostTransferMapVO transferVO = _hostTransferDao.findById(hostId); if (transferVO != null) { if (transferVO.getFutureOwner() == _nodeId && transferVO.getState() == HostTransferState.TransferStarted) { s_logger.debug("Not processing " + Event.AgentDisconnected + " event for the host id=" + hostId + " as the host is being connected to " + @@ -368,7 +367,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (result != null) { return result; } - } catch (AgentUnavailableException e) { + } catch (final AgentUnavailableException e) { s_logger.debug("cannot propagate agent reconnect because agent is not available", e); return false; } @@ -376,9 +375,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return super.reconnect(hostId); } - public void notifyNodesInCluster(AgentAttache attache) { + public void notifyNodesInCluster(final AgentAttache attache) { s_logger.debug("Notifying other nodes of to disconnect"); - Command[] cmds = new Command[] {new ChangeAgentCommand(attache.getId(), Event.AgentDisconnected)}; + final Command[] cmds = new Command[] {new ChangeAgentCommand(attache.getId(), Event.AgentDisconnected)}; _clusterMgr.broadcast(attache.getId(), _gson.toJson(cmds)); } @@ -387,26 +386,26 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (s_logger.isDebugEnabled()) { s_logger.debug("Notifying other MS nodes to run host scan task"); } - Command[] cmds = new Command[] {new ScheduleHostScanTaskCommand()}; + final Command[] cmds = new Command[] {new ScheduleHostScanTaskCommand()}; _clusterMgr.broadcast(0, _gson.toJson(cmds)); } - protected static void logT(byte[] bytes, final String msg) { + protected static void logT(final byte[] bytes, final String msg) { s_logger.trace("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } - protected static void logD(byte[] bytes, final String msg) { + protected static void logD(final byte[] bytes, final String msg) { s_logger.debug("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } - protected static void logI(byte[] bytes, final String msg) { + protected static void logI(final byte[] bytes, final String msg) { s_logger.info("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } - public boolean routeToPeer(String peer, byte[] bytes) { + public boolean routeToPeer(final String peer, final byte[] bytes) { int i = 0; SocketChannel ch = null; SSLEngine sslEngine = null; @@ -432,7 +431,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } Link.write(ch, new ByteBuffer[] {ByteBuffer.wrap(bytes)}, sslEngine); return true; - } catch (IOException e) { + } catch (final IOException e) { try { logI(bytes, "Unable to route to peer: " + Request.parse(bytes).toString() + " due to " + e.getMessage()); } catch (ClassNotFoundException | UnsupportedVersionException ex) { @@ -445,28 +444,28 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return false; } - public String findPeer(long hostId) { + public String findPeer(final long hostId) { return getPeerName(hostId); } - public SSLEngine getSSLEngine(String peerName) { + public SSLEngine getSSLEngine(final String peerName) { return _sslEngines.get(peerName); } - public void cancel(String peerName, long hostId, long sequence, String reason) { - CancelCommand cancel = new CancelCommand(sequence, reason); - Request req = new Request(hostId, _nodeId, cancel, true); + public void cancel(final String peerName, final long hostId, final long sequence, final String reason) { + final CancelCommand cancel = new CancelCommand(sequence, reason); + final Request req = new Request(hostId, _nodeId, cancel, true); req.setControl(true); routeToPeer(peerName, req.getBytes()); } - public void closePeer(String peerName) { + public void closePeer(final String peerName) { synchronized (_peers) { - SocketChannel ch = _peers.get(peerName); + final SocketChannel ch = _peers.get(peerName); if (ch != null) { try { ch.close(); - } catch (IOException e) { + } catch (final IOException e) { s_logger.warn("Unable to close peer socket connection to " + peerName); } } @@ -475,27 +474,29 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } - public SocketChannel connectToPeer(String peerName, SocketChannel prevCh) { + public SocketChannel connectToPeer(final String peerName, final SocketChannel prevCh) { synchronized (_peers) { - SocketChannel ch = _peers.get(peerName); + final SocketChannel ch = _peers.get(peerName); SSLEngine sslEngine = null; if (prevCh != null) { try { prevCh.close(); - } catch (Exception e) { + } catch (final Exception e) { + s_logger.info("[ignored]" + + "failed to get close resource for previous channel Socket: " + e.getLocalizedMessage()); } } if (ch == null || ch == prevCh) { - ManagementServerHost ms = _clusterMgr.getPeer(peerName); + final ManagementServerHost ms = _clusterMgr.getPeer(peerName); if (ms == null) { s_logger.info("Unable to find peer: " + peerName); return null; } - String ip = ms.getServiceIP(); + final String ip = ms.getServiceIP(); InetAddress addr; try { addr = InetAddress.getByName(ip); - } catch (UnknownHostException e) { + } catch (final UnknownHostException e) { throw new CloudRuntimeException("Unable to resolve " + ip); } SocketChannel ch1 = null; @@ -505,14 +506,14 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust ch1.socket().setKeepAlive(true); ch1.socket().setSoTimeout(60 * 1000); try { - SSLContext sslContext = Link.initSSLContext(true); + final SSLContext sslContext = Link.initSSLContext(true); sslEngine = sslContext.createSSLEngine(ip, Port.value()); sslEngine.setUseClientMode(true); sslEngine.setEnabledProtocols(SSLUtils.getSupportedProtocols(sslEngine.getEnabledProtocols())); Link.doHandshake(ch1, sslEngine, true); s_logger.info("SSL: Handshake done"); - } catch (Exception e) { + } catch (final Exception e) { ch1.close(); throw new IOException("SSL: Fail to init SSL! " + e); } @@ -522,10 +523,10 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust _peers.put(peerName, ch1); _sslEngines.put(peerName, sslEngine); return ch1; - } catch (IOException e) { + } catch (final IOException e) { try { ch1.close(); - } catch (IOException ex) { + } catch (final IOException ex) { s_logger.error("failed to close failed peer socket: " + ex); } s_logger.warn("Unable to connect to peer management server: " + peerName + ", ip: " + ip + " due to " + e.getMessage(), e); @@ -540,8 +541,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } - public SocketChannel connectToPeer(long hostId, SocketChannel prevCh) { - String peerName = getPeerName(hostId); + public SocketChannel connectToPeer(final long hostId, final SocketChannel prevCh) { + final String peerName = getPeerName(hostId); if (peerName == null) { return null; } @@ -551,8 +552,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust @Override protected AgentAttache getAttache(final Long hostId) throws AgentUnavailableException { - assert (hostId != null) : "Who didn't check their id value?"; - HostVO host = _hostDao.findById(hostId); + assert hostId != null : "Who didn't check their id value?"; + final HostVO host = _hostDao.findById(hostId); if (host == null) { throw new AgentUnavailableException("Can't find the host ", hostId); } @@ -567,7 +568,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } if (agent == null) { - AgentUnavailableException ex = new AgentUnavailableException("Host with specified id is not in the right state: " + host.getStatus(), hostId); + final AgentUnavailableException ex = new AgentUnavailableException("Host with specified id is not in the right state: " + host.getStatus(), hostId); ex.addProxyObject(_entityMgr.findById(Host.class, hostId).getUuid()); throw ex; } @@ -578,11 +579,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust @Override public boolean stop() { if (_peers != null) { - for (SocketChannel ch : _peers.values()) { + for (final SocketChannel ch : _peers.values()) { try { s_logger.info("Closing: " + ch.toString()); ch.close(); - } catch (IOException e) { + } catch (final IOException e) { + s_logger.info("[ignored] error on closing channel: " +ch.toString(), e); } } } @@ -603,13 +605,13 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust public class ClusteredAgentHandler extends AgentHandler { - public ClusteredAgentHandler(Task.Type type, Link link, byte[] data) { + public ClusteredAgentHandler(final Task.Type type, final Link link, final byte[] data) { super(type, link, data); } @Override - protected void doTask(final Task task) throws Exception { - TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); + protected void doTask(final Task task) throws TaskExecutionException { + final TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); try { if (task.getType() != Task.Type.DATA) { super.doTask(task); @@ -617,37 +619,37 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } final byte[] data = task.getData(); - Version ver = Request.getVersion(data); + final Version ver = Request.getVersion(data); if (ver.ordinal() != Version.v1.ordinal() && ver.ordinal() != Version.v3.ordinal()) { s_logger.warn("Wrong version for clustered agent request"); super.doTask(task); return; } - long hostId = Request.getAgentId(data); - Link link = task.getLink(); + final long hostId = Request.getAgentId(data); + final Link link = task.getLink(); if (Request.fromServer(data)) { - AgentAttache agent = findAttache(hostId); + final AgentAttache agent = findAttache(hostId); if (Request.isControl(data)) { if (agent == null) { logD(data, "No attache to process cancellation"); return; } - Request req = Request.parse(data); - Command[] cmds = req.getCommands(); - CancelCommand cancel = (CancelCommand)cmds[0]; + final Request req = Request.parse(data); + final Command[] cmds = req.getCommands(); + final CancelCommand cancel = (CancelCommand)cmds[0]; if (s_logger.isDebugEnabled()) { logD(data, "Cancel request received"); } agent.cancel(cancel.getSequence()); final Long current = agent._currentSequence; // if the request is the current request, always have to trigger sending next request in -// sequence, + // sequence, // otherwise the agent queue will be blocked - if (req.executeInSequence() && (current != null && current == Request.getSequence(data))) { + if (req.executeInSequence() && current != null && current == Request.getSequence(data)) { agent.sendNext(Request.getSequence(data)); } return; @@ -662,29 +664,29 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust // route it to the agent. // But we have the serialize the control commands here so we have // to deserialize this and send it through the agent attache. - Request req = Request.parse(data); + final Request req = Request.parse(data); agent.send(req, null); return; } else { if (agent instanceof Routable) { - Routable cluster = (Routable)agent; + final Routable cluster = (Routable)agent; cluster.routeToAgent(data); } else { agent.send(Request.parse(data)); } return; } - } catch (AgentUnavailableException e) { + } catch (final AgentUnavailableException e) { logD(data, e.getMessage()); cancel(Long.toString(Request.getManagementServerId(data)), hostId, Request.getSequence(data), e.getMessage()); } } else { - long mgmtId = Request.getManagementServerId(data); + final long mgmtId = Request.getManagementServerId(data); if (mgmtId != -1 && mgmtId != _nodeId) { routeToPeer(Long.toString(mgmtId), data); if (Request.requiresSequentialExecution(data)) { - AgentAttache attache = (AgentAttache)link.attachment(); + final AgentAttache attache = (AgentAttache)link.attachment(); if (attache != null) { attache.sendNext(Request.getSequence(data)); } else if (s_logger.isDebugEnabled()) { @@ -698,7 +700,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } else { // received an answer. final Response response = Response.parse(data); - AgentAttache attache = findAttache(response.getAgentId()); + final AgentAttache attache = findAttache(response.getAgentId()); if (attache == null) { s_logger.info("SeqA " + response.getAgentId() + "-" + response.getSequence() + "Unable to find attache to forward " + response.toString()); return; @@ -710,6 +712,14 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return; } } + } catch (final ClassNotFoundException e) { + final String message = String.format("ClassNotFoundException occured when executing taks! Error '%s'", e.getMessage()); + s_logger.error(message); + throw new TaskExecutionException(message, e); + } catch (final UnsupportedVersionException e) { + final String message = String.format("UnsupportedVersionException occured when executing taks! Error '%s'", e.getMessage()); + s_logger.error(message); + throw new TaskExecutionException(message, e); } finally { txn.close(); } @@ -717,14 +727,14 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - public void onManagementNodeJoined(List nodeList, long selfNodeId) { + public void onManagementNodeJoined(final List nodeList, final long selfNodeId) { } @Override - public void onManagementNodeLeft(List nodeList, long selfNodeId) { - for (ManagementServerHost vo : nodeList) { + public void onManagementNodeLeft(final List nodeList, final long selfNodeId) { + for (final ManagementServerHost vo : nodeList) { s_logger.info("Marking hosts as disconnected on Management server" + vo.getMsid()); - long lastPing = (System.currentTimeMillis() >> 10) - getTimeout(); + final long lastPing = (System.currentTimeMillis() >> 10) - getTimeout(); _hostDao.markHostsAsDisconnected(vo.getMsid(), lastPing); s_logger.info("Deleting entries from op_host_transfer table for Management server " + vo.getMsid()); cleanupTransferMap(vo.getMsid()); @@ -736,7 +746,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - public void removeAgent(AgentAttache attache, Status nextState) { + public void removeAgent(final AgentAttache attache, final Status nextState) { if (attache == null) { return; } @@ -745,7 +755,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - public boolean executeRebalanceRequest(long agentId, long currentOwnerId, long futureOwnerId, Event event) throws AgentUnavailableException, + public boolean executeRebalanceRequest(final long agentId, final long currentOwnerId, final long futureOwnerId, final Event event) throws AgentUnavailableException, OperationTimedoutException { boolean result = false; if (event == Event.RequestAgentRebalance) { @@ -753,7 +763,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } else if (event == Event.StartAgentRebalance) { try { result = rebalanceHost(agentId, currentOwnerId, futureOwnerId); - } catch (Exception e) { + } catch (final Exception e) { s_logger.warn("Unable to rebalance host id=" + agentId, e); } } @@ -792,7 +802,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } cancelled = true; } - } catch (Throwable e) { + } catch (final Throwable e) { s_logger.error("Unexpected exception " + e.toString(), e); } } @@ -800,11 +810,11 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust public void startRebalanceAgents() { s_logger.debug("Management server " + _nodeId + " is asking other peers to rebalance their agents"); - List allMS = _mshostDao.listBy(ManagementServerHost.State.Up); - QueryBuilder sc = QueryBuilder.create(HostVO.class); + final List allMS = _mshostDao.listBy(ManagementServerHost.State.Up); + final QueryBuilder sc = QueryBuilder.create(HostVO.class); sc.and(sc.entity().getManagementServerId(), Op.NNULL); sc.and(sc.entity().getType(), Op.EQ, Host.Type.Routing); - List allManagedAgents = sc.list(); + final List allManagedAgents = sc.list(); int avLoad = 0; @@ -825,11 +835,11 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust avLoad = 1; } - for (ManagementServerHostVO node : allMS) { + for (final ManagementServerHostVO node : allMS) { if (node.getMsid() != _nodeId) { List hostsToRebalance = new ArrayList(); - for (AgentLoadBalancerPlanner lbPlanner : _lbPlanners) { + for (final AgentLoadBalancerPlanner lbPlanner : _lbPlanners) { hostsToRebalance = lbPlanner.getHostsToRebalance(node.getMsid(), avLoad); if (hostsToRebalance != null && !hostsToRebalance.isEmpty()) { break; @@ -840,8 +850,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (hostsToRebalance != null && !hostsToRebalance.isEmpty()) { s_logger.debug("Found " + hostsToRebalance.size() + " hosts to rebalance from management server " + node.getMsid()); - for (HostVO host : hostsToRebalance) { - long hostId = host.getId(); + for (final HostVO host : hostsToRebalance) { + final long hostId = host.getId(); s_logger.debug("Asking management server " + node.getMsid() + " to give away host id=" + hostId); boolean result = true; @@ -853,23 +863,23 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust HostTransferMapVO transfer = null; try { transfer = _hostTransferDao.startAgentTransfering(hostId, node.getMsid(), _nodeId); - Answer[] answer = sendRebalanceCommand(node.getMsid(), hostId, node.getMsid(), _nodeId, Event.RequestAgentRebalance); + final Answer[] answer = sendRebalanceCommand(node.getMsid(), hostId, node.getMsid(), _nodeId, Event.RequestAgentRebalance); if (answer == null) { s_logger.warn("Failed to get host id=" + hostId + " from management server " + node.getMsid()); result = false; } - } catch (Exception ex) { + } catch (final Exception ex) { s_logger.warn("Failed to get host id=" + hostId + " from management server " + node.getMsid(), ex); result = false; } finally { if (transfer != null) { - HostTransferMapVO transferState = _hostTransferDao.findByIdAndFutureOwnerId(transfer.getId(), _nodeId); + final HostTransferMapVO transferState = _hostTransferDao.findByIdAndFutureOwnerId(transfer.getId(), _nodeId); if (!result && transferState != null && transferState.getState() == HostTransferState.TransferRequested) { if (s_logger.isDebugEnabled()) { s_logger.debug("Removing mapping from op_host_transfer as it failed to be set to transfer mode"); } // just remove the mapping (if exists) as nothing was done on the peer management -// server yet + // server yet _hostTransferDao.remove(transfer.getId()); } } @@ -882,31 +892,31 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } - private Answer[] sendRebalanceCommand(long peer, long agentId, long currentOwnerId, long futureOwnerId, Event event) { - TransferAgentCommand transfer = new TransferAgentCommand(agentId, currentOwnerId, futureOwnerId, event); - Commands commands = new Commands(Command.OnError.Stop); + private Answer[] sendRebalanceCommand(final long peer, final long agentId, final long currentOwnerId, final long futureOwnerId, final Event event) { + final TransferAgentCommand transfer = new TransferAgentCommand(agentId, currentOwnerId, futureOwnerId, event); + final Commands commands = new Commands(Command.OnError.Stop); commands.addCommand(transfer); - Command[] cmds = commands.toCommands(); + final Command[] cmds = commands.toCommands(); try { if (s_logger.isDebugEnabled()) { s_logger.debug("Forwarding " + cmds[0].toString() + " to " + peer); } - String peerName = Long.toString(peer); - String cmdStr = _gson.toJson(cmds); - String ansStr = _clusterMgr.execute(peerName, agentId, cmdStr, true); - Answer[] answers = _gson.fromJson(ansStr, Answer[].class); + final String peerName = Long.toString(peer); + final String cmdStr = _gson.toJson(cmds); + final String ansStr = _clusterMgr.execute(peerName, agentId, cmdStr, true); + final Answer[] answers = _gson.fromJson(ansStr, Answer[].class); return answers; - } catch (Exception e) { + } catch (final Exception e) { s_logger.warn("Caught exception while talking to " + currentOwnerId, e); return null; } } - public String getPeerName(long agentHostId) { + public String getPeerName(final long agentHostId) { - HostVO host = _hostDao.findById(agentHostId); + final HostVO host = _hostDao.findById(agentHostId); if (host != null && host.getManagementServerId() != null) { if (_clusterMgr.getSelfPeerName().equals(Long.toString(host.getManagementServerId()))) { return null; @@ -917,7 +927,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return null; } - public Boolean propagateAgentEvent(long agentId, Event event) throws AgentUnavailableException { + public Boolean propagateAgentEvent(final long agentId, final Event event) throws AgentUnavailableException { final String msPeer = getPeerName(agentId); if (msPeer == null) { return null; @@ -926,15 +936,15 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (s_logger.isDebugEnabled()) { s_logger.debug("Propagating agent change request event:" + event.toString() + " to agent:" + agentId); } - Command[] cmds = new Command[1]; + final Command[] cmds = new Command[1]; cmds[0] = new ChangeAgentCommand(agentId, event); - String ansStr = _clusterMgr.execute(msPeer, agentId, _gson.toJson(cmds), true); + final String ansStr = _clusterMgr.execute(msPeer, agentId, _gson.toJson(cmds), true); if (ansStr == null) { throw new AgentUnavailableException(agentId); } - Answer[] answers = _gson.fromJson(ansStr, Answer[].class); + final Answer[] answers = _gson.fromJson(ansStr, Answer[].class); if (s_logger.isDebugEnabled()) { s_logger.debug("Result for agent change is " + answers[0].getResult()); @@ -955,9 +965,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (_agentToTransferIds.size() > 0) { s_logger.debug("Found " + _agentToTransferIds.size() + " agents to transfer"); // for (Long hostId : _agentToTransferIds) { - for (Iterator iterator = _agentToTransferIds.iterator(); iterator.hasNext();) { - Long hostId = iterator.next(); - AgentAttache attache = findAttache(hostId); + for (final Iterator iterator = _agentToTransferIds.iterator(); iterator.hasNext();) { + final Long hostId = iterator.next(); + final AgentAttache attache = findAttache(hostId); // if the thread: // 1) timed out waiting for the host to reconnect @@ -965,8 +975,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust // 3) if the management server doesn't own the host any more // remove the host from re-balance list and delete from op_host_transfer DB // no need to do anything with the real attache as we haven't modified it yet - Date cutTime = DateUtil.currentGMTTime(); - HostTransferMapVO transferMap = + final Date cutTime = DateUtil.currentGMTTime(); + final HostTransferMapVO transferMap = _hostTransferDao.findActiveHostTransferMapByHostId(hostId, new Date(cutTime.getTime() - rebalanceTimeOut)); if (transferMap == null) { @@ -983,7 +993,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust continue; } - ManagementServerHostVO ms = _mshostDao.findByMsid(transferMap.getFutureOwner()); + final ManagementServerHostVO ms = _mshostDao.findByMsid(transferMap.getFutureOwner()); if (ms != null && ms.getState() != ManagementServerHost.State.Up) { s_logger.debug("Can't transfer host " + hostId + " as it's future owner is not in UP state: " + ms + ", skipping rebalance for the host"); @@ -996,7 +1006,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust iterator.remove(); try { _executor.execute(new RebalanceTask(hostId, transferMap.getInitialOwner(), transferMap.getFutureOwner())); - } catch (RejectedExecutionException ex) { + } catch (final RejectedExecutionException ex) { s_logger.warn("Failed to submit rebalance task for host id=" + hostId + "; postponing the execution"); continue; } @@ -1013,21 +1023,21 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } - } catch (Throwable e) { + } catch (final Throwable e) { s_logger.error("Problem with the clustered agent transfer scan check!", e); } } }; } - private boolean setToWaitForRebalance(final long hostId, long currentOwnerId, long futureOwnerId) { + private boolean setToWaitForRebalance(final long hostId, final long currentOwnerId, final long futureOwnerId) { s_logger.debug("Adding agent " + hostId + " to the list of agents to transfer"); synchronized (_agentToTransferIds) { return _agentToTransferIds.add(hostId); } } - protected boolean rebalanceHost(final long hostId, long currentOwnerId, long futureOwnerId) throws AgentUnavailableException { + protected boolean rebalanceHost(final long hostId, final long currentOwnerId, final long futureOwnerId) throws AgentUnavailableException { boolean result = true; if (currentOwnerId == _nodeId) { @@ -1037,12 +1047,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return false; } try { - Answer[] answer = sendRebalanceCommand(futureOwnerId, hostId, currentOwnerId, futureOwnerId, Event.StartAgentRebalance); + final Answer[] answer = sendRebalanceCommand(futureOwnerId, hostId, currentOwnerId, futureOwnerId, Event.StartAgentRebalance); if (answer == null || !answer[0].getResult()) { result = false; } - } catch (Exception ex) { + } catch (final Exception ex) { s_logger.warn("Host " + hostId + " failed to connect to the management server " + futureOwnerId + " as a part of rebalance process", ex); result = false; } @@ -1056,13 +1066,13 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } else if (futureOwnerId == _nodeId) { - HostVO host = _hostDao.findById(hostId); + final HostVO host = _hostDao.findById(hostId); try { if (s_logger.isDebugEnabled()) { s_logger.debug("Disconnecting host " + host.getId() + "(" + host.getName() + " as a part of rebalance process without notification"); } - AgentAttache attache = findAttache(hostId); + final AgentAttache attache = findAttache(hostId); if (attache != null) { result = handleDisconnect(attache, Event.AgentDisconnected, false, false, true); } @@ -1077,7 +1087,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.warn("Failed to disconnect " + host.getId() + "(" + host.getName() + " as a part of rebalance process without notification"); } - } catch (Exception ex) { + } catch (final Exception ex) { s_logger.warn("Failed to load directly connected host " + host.getId() + "(" + host.getName() + ") to the management server " + _nodeId + " as a part of rebalance process due to:", ex); result = false; @@ -1095,21 +1105,21 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return result; } - protected void finishRebalance(final long hostId, long futureOwnerId, Event event) { + protected void finishRebalance(final long hostId, final long futureOwnerId, final Event event) { - boolean success = (event == Event.RebalanceCompleted) ? true : false; + final boolean success = event == Event.RebalanceCompleted ? true : false; if (s_logger.isDebugEnabled()) { s_logger.debug("Finishing rebalancing for the agent " + hostId + " with event " + event); } - AgentAttache attache = findAttache(hostId); + final AgentAttache attache = findAttache(hostId); if (attache == null || !(attache instanceof ClusteredAgentAttache)) { s_logger.debug("Unable to find forward attache for the host id=" + hostId + ", assuming that the agent disconnected already"); _hostTransferDao.completeAgentTransfer(hostId); return; } - ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)attache; + final ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)attache; if (success) { @@ -1121,7 +1131,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust while (requestToTransfer != null) { s_logger.debug("Forwarding request " + requestToTransfer.getSequence() + " held in transfer attache " + hostId + " from the management server " + _nodeId + " to " + futureOwnerId); - boolean routeResult = routeToPeer(Long.toString(futureOwnerId), requestToTransfer.getBytes()); + final boolean routeResult = routeToPeer(Long.toString(futureOwnerId), requestToTransfer.getBytes()); if (!routeResult) { logD(requestToTransfer.getBytes(), "Failed to route request to peer"); } @@ -1144,13 +1154,13 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.debug("Management server " + _nodeId + " failed to rebalance agent " + hostId); _hostTransferDao.completeAgentTransfer(hostId); handleDisconnectWithoutInvestigation(findAttache(hostId), Event.RebalanceFailed, true, true); - } catch (Exception ex) { + } catch (final Exception ex) { s_logger.warn("Failed to reconnect host id=" + hostId + " as a part of failed rebalance task cleanup"); } } protected boolean startRebalance(final long hostId) { - HostVO host = _hostDao.findById(hostId); + final HostVO host = _hostDao.findById(hostId); if (host == null || host.getRemoved() != null) { s_logger.warn("Unable to find host record, fail start rebalancing process"); @@ -1158,10 +1168,10 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } synchronized (_agents) { - ClusteredDirectAgentAttache attache = (ClusteredDirectAgentAttache)_agents.get(hostId); + final ClusteredDirectAgentAttache attache = (ClusteredDirectAgentAttache)_agents.get(hostId); if (attache != null && attache.getQueueSize() == 0 && attache.getNonRecurringListenersSize() == 0) { handleDisconnectWithoutInvestigation(attache, Event.StartAgentRebalance, true, true); - ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)createAttache(hostId); + final ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)createAttache(hostId); if (forwardAttache == null) { s_logger.warn("Unable to create a forward attache for the host " + hostId + " as a part of rebalance process"); return false; @@ -1183,15 +1193,15 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return true; } - protected void cleanupTransferMap(long msId) { - List hostsJoingingCluster = _hostTransferDao.listHostsJoiningCluster(msId); + protected void cleanupTransferMap(final long msId) { + final List hostsJoingingCluster = _hostTransferDao.listHostsJoiningCluster(msId); - for (HostTransferMapVO hostJoingingCluster : hostsJoingingCluster) { + for (final HostTransferMapVO hostJoingingCluster : hostsJoingingCluster) { _hostTransferDao.remove(hostJoingingCluster.getId()); } - List hostsLeavingCluster = _hostTransferDao.listHostsLeavingCluster(msId); - for (HostTransferMapVO hostLeavingCluster : hostsLeavingCluster) { + final List hostsLeavingCluster = _hostTransferDao.listHostsLeavingCluster(msId); + for (final HostTransferMapVO hostLeavingCluster : hostsLeavingCluster) { _hostTransferDao.remove(hostLeavingCluster.getId()); } } @@ -1201,7 +1211,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust Long currentOwnerId = null; Long futureOwnerId = null; - public RebalanceTask(long hostId, long currentOwnerId, long futureOwnerId) { + public RebalanceTask(final long hostId, final long currentOwnerId, final long futureOwnerId) { this.hostId = hostId; this.currentOwnerId = currentOwnerId; this.futureOwnerId = futureOwnerId; @@ -1214,20 +1224,20 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.debug("Rebalancing host id=" + hostId); } rebalanceHost(hostId, currentOwnerId, futureOwnerId); - } catch (Exception e) { + } catch (final Exception e) { s_logger.warn("Unable to rebalance host id=" + hostId, e); } } } - private String handleScheduleHostScanTaskCommand(ScheduleHostScanTaskCommand cmd) { + private String handleScheduleHostScanTaskCommand(final ScheduleHostScanTaskCommand cmd) { if (s_logger.isDebugEnabled()) { s_logger.debug("Intercepting resource manager command: " + _gson.toJson(cmd)); } try { scheduleHostScanTask(); - } catch (Exception e) { + } catch (final Exception e) { // Scheduling host scan task in peer MS is a best effort operation during host add, regular host scan // happens at fixed intervals anyways. So handling any exceptions that may be thrown s_logger.warn("Exception happened while trying to schedule host scan task on mgmt server " + _clusterMgr.getSelfPeerName() + @@ -1235,14 +1245,14 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return null; } - Answer[] answers = new Answer[1]; + final Answer[] answers = new Answer[1]; answers[0] = new Answer(cmd, true, null); return _gson.toJson(answers); } - public Answer[] sendToAgent(Long hostId, Command[] cmds, boolean stopOnError) throws AgentUnavailableException, OperationTimedoutException { - Commands commands = new Commands(stopOnError ? Command.OnError.Stop : Command.OnError.Continue); - for (Command cmd : cmds) { + public Answer[] sendToAgent(final Long hostId, final Command[] cmds, final boolean stopOnError) throws AgentUnavailableException, OperationTimedoutException { + final Commands commands = new Commands(stopOnError ? Command.OnError.Stop : Command.OnError.Continue); + for (final Command cmd : cmds) { commands.addCommand(cmd); } return send(hostId, commands); @@ -1255,7 +1265,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } @Override - public String dispatch(ClusterServicePdu pdu) { + public String dispatch(final ClusterServicePdu pdu) { if (s_logger.isDebugEnabled()) { s_logger.debug("Dispatch ->" + pdu.getAgentId() + ", json: " + pdu.getJsonPackage()); @@ -1264,13 +1274,13 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust Command[] cmds = null; try { cmds = _gson.fromJson(pdu.getJsonPackage(), Command[].class); - } catch (Throwable e) { - assert (false); + } catch (final Throwable e) { + assert false; s_logger.error("Excection in gson decoding : ", e); } if (cmds.length == 1 && cmds[0] instanceof ChangeAgentCommand) { // intercepted - ChangeAgentCommand cmd = (ChangeAgentCommand)cmds[0]; + final ChangeAgentCommand cmd = (ChangeAgentCommand)cmds[0]; if (s_logger.isDebugEnabled()) { s_logger.debug("Intercepting command for agent change: agent " + cmd.getAgentId() + " event: " + cmd.getEvent()); @@ -1282,16 +1292,16 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.debug("Result is " + result); } - } catch (AgentUnavailableException e) { + } catch (final AgentUnavailableException e) { s_logger.warn("Agent is unavailable", e); return null; } - Answer[] answers = new Answer[1]; + final Answer[] answers = new Answer[1]; answers[0] = new ChangeAgentAnswer(cmd, result); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof TransferAgentCommand) { - TransferAgentCommand cmd = (TransferAgentCommand)cmds[0]; + final TransferAgentCommand cmd = (TransferAgentCommand)cmds[0]; if (s_logger.isDebugEnabled()) { s_logger.debug("Intercepting command for agent rebalancing: agent " + cmd.getAgentId() + " event: " + cmd.getEvent()); @@ -1303,18 +1313,18 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.debug("Result is " + result); } - } catch (AgentUnavailableException e) { + } catch (final AgentUnavailableException e) { s_logger.warn("Agent is unavailable", e); return null; - } catch (OperationTimedoutException e) { + } catch (final OperationTimedoutException e) { s_logger.warn("Operation timed out", e); return null; } - Answer[] answers = new Answer[1]; + final Answer[] answers = new Answer[1]; answers[0] = new Answer(cmd, result, null); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof PropagateResourceEventCommand) { - PropagateResourceEventCommand cmd = (PropagateResourceEventCommand)cmds[0]; + final PropagateResourceEventCommand cmd = (PropagateResourceEventCommand)cmds[0]; s_logger.debug("Intercepting command to propagate event " + cmd.getEvent().name() + " for host " + cmd.getHostId()); @@ -1322,29 +1332,29 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust try { result = _resourceMgr.executeUserRequest(cmd.getHostId(), cmd.getEvent()); s_logger.debug("Result is " + result); - } catch (AgentUnavailableException ex) { + } catch (final AgentUnavailableException ex) { s_logger.warn("Agent is unavailable", ex); return null; } - Answer[] answers = new Answer[1]; + final Answer[] answers = new Answer[1]; answers[0] = new Answer(cmd, result, null); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof ScheduleHostScanTaskCommand) { - ScheduleHostScanTaskCommand cmd = (ScheduleHostScanTaskCommand)cmds[0]; - String response = handleScheduleHostScanTaskCommand(cmd); + final ScheduleHostScanTaskCommand cmd = (ScheduleHostScanTaskCommand)cmds[0]; + final String response = handleScheduleHostScanTaskCommand(cmd); return response; } try { - long startTick = System.currentTimeMillis(); + final long startTick = System.currentTimeMillis(); if (s_logger.isDebugEnabled()) { s_logger.debug("Dispatch -> " + pdu.getAgentId() + ", json: " + pdu.getJsonPackage()); } - Answer[] answers = sendToAgent(pdu.getAgentId(), cmds, pdu.isStopOnError()); + final Answer[] answers = sendToAgent(pdu.getAgentId(), cmds, pdu.isStopOnError()); if (answers != null) { - String jsonReturn = _gson.toJson(answers); + final String jsonReturn = _gson.toJson(answers); if (s_logger.isDebugEnabled()) { s_logger.debug("Completed dispatching -> " + pdu.getAgentId() + ", json: " + pdu.getJsonPackage() + " in " + @@ -1358,9 +1368,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust (System.currentTimeMillis() - startTick) + " ms, return null result"); } } - } catch (AgentUnavailableException e) { + } catch (final AgentUnavailableException e) { s_logger.warn("Agent is unavailable", e); - } catch (OperationTimedoutException e) { + } catch (final OperationTimedoutException e) { s_logger.warn("Timed Out", e); } @@ -1369,11 +1379,11 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } - public boolean executeAgentUserRequest(long agentId, Event event) throws AgentUnavailableException { + public boolean executeAgentUserRequest(final long agentId, final Event event) throws AgentUnavailableException { return executeUserRequest(agentId, event); } - public boolean rebalanceAgent(long agentId, Event event, long currentOwnerId, long futureOwnerId) throws AgentUnavailableException, OperationTimedoutException { + public boolean rebalanceAgent(final long agentId, final Event event, final long currentOwnerId, final long futureOwnerId) throws AgentUnavailableException, OperationTimedoutException { return executeRebalanceRequest(agentId, currentOwnerId, futureOwnerId, event); } @@ -1390,20 +1400,20 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.trace("Agent rebalance task check, management server id:" + _nodeId); } // initiate agent lb task will be scheduled and executed only once, and only when number of agents -// loaded exceeds _connectedAgentsThreshold + // loaded exceeds _connectedAgentsThreshold if (!_agentLbHappened) { QueryBuilder sc = QueryBuilder.create(HostVO.class); sc.and(sc.entity().getManagementServerId(), Op.NNULL); sc.and(sc.entity().getType(), Op.EQ, Host.Type.Routing); - List allManagedRoutingAgents = sc.list(); + final List allManagedRoutingAgents = sc.list(); sc = QueryBuilder.create(HostVO.class); sc.and(sc.entity().getType(), Op.EQ, Host.Type.Routing); - List allAgents = sc.list(); - double allHostsCount = allAgents.size(); - double managedHostsCount = allManagedRoutingAgents.size(); + final List allAgents = sc.list(); + final double allHostsCount = allAgents.size(); + final double managedHostsCount = allManagedRoutingAgents.size(); if (allHostsCount > 0.0) { - double load = managedHostsCount / allHostsCount; + final double load = managedHostsCount / allHostsCount; if (load >= ConnectedAgentThreshold.value()) { s_logger.debug("Scheduling agent rebalancing task as the average agent load " + load + " is more than the threshold " + ConnectedAgentThreshold.value()); @@ -1415,7 +1425,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } } } - } catch (Throwable e) { + } catch (final Throwable e) { s_logger.error("Problem with the clustered agent transfer scan check!", e); } } @@ -1437,9 +1447,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust @Override public ConfigKey[] getConfigKeys() { - ConfigKey[] keys = super.getConfigKeys(); + final ConfigKey[] keys = super.getConfigKeys(); - List> keysLst = new ArrayList>(); + final List> keysLst = new ArrayList>(); keysLst.addAll(Arrays.asList(keys)); keysLst.add(EnableLB); keysLst.add(ConnectedAgentThreshold); diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 30184890051..9dea90a41d1 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -4297,7 +4297,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac workJob = new VmWorkJobVO(context.getContextId()); workJob.setDispatcher(VmWorkConstants.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkMigrate.class.getName()); + workJob.setCmd(VmWorkMigrateWithStorage.class.getName()); workJob.setAccountId(account.getId()); workJob.setUserId(user.getId()); @@ -4340,7 +4340,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac workJob = new VmWorkJobVO(context.getContextId()); workJob.setDispatcher(VmWorkConstants.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkMigrate.class.getName()); + workJob.setCmd(VmWorkMigrateForScale.class.getName()); workJob.setAccountId(account.getId()); workJob.setUserId(user.getId()); diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java index 0dd4d88c218..2147a54a4ca 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java @@ -18,30 +18,18 @@ package com.cloud.vm; import com.cloud.deploy.DeployDestination; -public class VmWorkMigrateForScale extends VmWork { +public class VmWorkMigrateForScale extends VmWorkMigrate { private static final long serialVersionUID = 6854870395568389613L; - long srcHostId; - DeployDestination deployDestination; Long newSvcOfferingId; public VmWorkMigrateForScale(long userId, long accountId, long vmId, String handlerName, long srcHostId, DeployDestination dest, Long newSvcOfferingId) { - super(userId, accountId, vmId, handlerName); - this.srcHostId = srcHostId; - deployDestination = dest; + super(userId, accountId, vmId, handlerName, srcHostId, dest); this.newSvcOfferingId = newSvcOfferingId; } - public long getSrcHostId() { - return srcHostId; - } - - public DeployDestination getDeployDestination() { - return deployDestination; - } - public Long getNewServiceOfferringId() { return newSvcOfferingId; } diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java index fd68c5450b0..3a45976877d 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java @@ -611,7 +611,10 @@ public class EngineHostDaoImpl extends GenericDaoBase implem l.add(info); } } catch (SQLException e) { + s_logger.error("sql exception while getting running hosts: " + e.getLocalizedMessage()); } catch (Throwable e) { + s_logger.info("[ignored]" + + "caught something while getting running hosts: " + e.getLocalizedMessage()); } return l; } diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index d4cdd9de58a..50ddc5915ca 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -37,9 +37,6 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.network.Networks; - -import org.apache.log4j.Logger; import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO; @@ -47,13 +44,14 @@ import org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDao; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; import org.apache.cloudstack.framework.config.ConfigDepot; import org.apache.cloudstack.framework.config.ConfigKey; -import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.ConfigKey.Scope; +import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.framework.messagebus.MessageBus; import org.apache.cloudstack.framework.messagebus.PublishScope; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.region.PortableIpDao; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.Listener; @@ -111,6 +109,7 @@ import com.cloud.network.NetworkMigrationResponder; import com.cloud.network.NetworkModel; import com.cloud.network.NetworkProfile; import com.cloud.network.NetworkStateListener; +import com.cloud.network.Networks; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.TrafficType; import com.cloud.network.PhysicalNetwork; @@ -839,7 +838,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra vo.setDefaultNic(profile.isDefaultNic()); - vo.setIp4Address(profile.getIp4Address()); + vo.setIPv4Address(profile.getIPv4Address()); vo.setAddressFormat(profile.getFormat()); if (profile.getMacAddress() != null) { @@ -847,8 +846,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } vo.setMode(profile.getMode()); - vo.setNetmask(profile.getNetmask()); - vo.setGateway(profile.getGateway()); + vo.setIPv4Netmask(profile.getIPv4Netmask()); + vo.setIPv4Gateway(profile.getIPv4Gateway()); if (profile.getBroadCastUri() != null) { vo.setBroadcastUri(profile.getBroadCastUri()); @@ -860,25 +859,25 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra vo.setState(Nic.State.Allocated); - vo.setIp6Address(profile.getIp6Address()); - vo.setIp6Gateway(profile.getIp6Gateway()); - vo.setIp6Cidr(profile.getIp6Cidr()); + vo.setIPv6Address(profile.getIPv6Address()); + vo.setIPv6Gateway(profile.getIPv6Gateway()); + vo.setIPv6Cidr(profile.getIPv6Cidr()); return deviceId; } protected void applyProfileToNicForRelease(NicVO vo, NicProfile profile) { - vo.setGateway(profile.getGateway()); + vo.setIPv4Gateway(profile.getIPv4Gateway()); vo.setAddressFormat(profile.getFormat()); - vo.setIp4Address(profile.getIp4Address()); - vo.setIp6Address(profile.getIp6Address()); + vo.setIPv4Address(profile.getIPv4Address()); + vo.setIPv6Address(profile.getIPv6Address()); vo.setMacAddress(profile.getMacAddress()); if (profile.getReservationStrategy() != null) { vo.setReservationStrategy(profile.getReservationStrategy()); } vo.setBroadcastUri(profile.getBroadCastUri()); vo.setIsolationUri(profile.getIsolationUri()); - vo.setNetmask(profile.getNetmask()); + vo.setIPv4Netmask(profile.getIPv4Netmask()); } protected void applyProfileToNetwork(NetworkVO network, NetworkProfile profile) { @@ -893,13 +892,13 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra to.setDeviceId(nic.getDeviceId()); to.setBroadcastType(config.getBroadcastDomainType()); to.setType(config.getTrafficType()); - to.setIp(nic.getIp4Address()); - to.setNetmask(nic.getNetmask()); + to.setIp(nic.getIPv4Address()); + to.setNetmask(nic.getIPv4Netmask()); to.setMac(nic.getMacAddress()); - to.setDns1(profile.getDns1()); - to.setDns2(profile.getDns2()); - if (nic.getGateway() != null) { - to.setGateway(nic.getGateway()); + to.setDns1(profile.getIPv4Dns1()); + to.setDns2(profile.getIPv4Dns2()); + if (nic.getIPv4Gateway() != null) { + to.setGateway(nic.getIPv4Gateway()); } else { to.setGateway(config.getGateway()); } @@ -910,8 +909,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra to.setBroadcastUri(nic.getBroadcastUri()); to.setIsolationuri(nic.getIsolationUri()); if (profile != null) { - to.setDns1(profile.getDns1()); - to.setDns2(profile.getDns2()); + to.setDns1(profile.getIPv4Dns1()); + to.setDns2(profile.getIPv4Dns2()); } Integer networkRate = _networkModel.getNetworkRate(config.getId(), null); @@ -1240,7 +1239,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra DhcpServiceProvider sp = (DhcpServiceProvider)element; Map dhcpCapabilities = element.getCapabilities().get(Service.Dhcp); String supportsMultipleSubnets = dhcpCapabilities.get(Capability.DhcpAccrossMultipleSubnets); - if ((supportsMultipleSubnets != null && Boolean.valueOf(supportsMultipleSubnets)) && profile.getIp6Address() == null) { + if ((supportsMultipleSubnets != null && Boolean.valueOf(supportsMultipleSubnets)) && profile.getIPv6Address() == null) { if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) { return false; } @@ -1333,19 +1332,19 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vmProfile.getHypervisorType(), network)); guru.reserve(profile, network, vmProfile, dest, context); - nic.setIp4Address(profile.getIp4Address()); + nic.setIPv4Address(profile.getIPv4Address()); nic.setAddressFormat(profile.getFormat()); - nic.setIp6Address(profile.getIp6Address()); + nic.setIPv6Address(profile.getIPv6Address()); nic.setMacAddress(profile.getMacAddress()); nic.setIsolationUri(profile.getIsolationUri()); nic.setBroadcastUri(profile.getBroadCastUri()); nic.setReserver(guru.getName()); nic.setState(Nic.State.Reserved); - nic.setNetmask(profile.getNetmask()); - nic.setGateway(profile.getGateway()); + nic.setIPv4Netmask(profile.getIPv4Netmask()); + nic.setIPv4Gateway(profile.getIPv4Gateway()); - if (profile.getStrategy() != null) { - nic.setReservationStrategy(profile.getStrategy()); + if (profile.getReservationStrategy() != null) { + nic.setReservationStrategy(profile.getReservationStrategy()); } updateNic(nic, network.getId(), 1); @@ -1478,9 +1477,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicProfile profile = new NicProfile(); profile.setDeviceId(255); //dummyId - profile.setIp4Address(userIp.getAddress().toString()); - profile.setNetmask(publicIp.getNetmask()); - profile.setGateway(publicIp.getGateway()); + profile.setIPv4Address(userIp.getAddress().toString()); + profile.setIPv4Netmask(publicIp.getNetmask()); + profile.setIPv4Gateway(publicIp.getGateway()); profile.setMacAddress(publicIp.getMacAddress()); profile.setBroadcastType(network.getBroadcastDomainType()); profile.setTrafficType(network.getTrafficType()); @@ -1742,7 +1741,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } private boolean isLastNicInSubnet(NicVO nic) { - if (_nicDao.listByNetworkIdTypeAndGatewayAndBroadcastUri(nic.getNetworkId(), VirtualMachine.Type.User, nic.getGateway(), nic.getBroadcastUri()).size() > 1) { + if (_nicDao.listByNetworkIdTypeAndGatewayAndBroadcastUri(nic.getNetworkId(), VirtualMachine.Type.User, nic.getIPv4Gateway(), nic.getBroadcastUri()).size() > 1) { return false; } return true; @@ -1754,7 +1753,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra Network network = _networksDao.findById(nic.getNetworkId()); DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network); try { - final NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(nic.getGateway(), network.getId(), NicIpAlias.state.active); + final NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(nic.getIPv4Gateway(), network.getId(), NicIpAlias.state.active); if (ipAlias != null) { ipAlias.setState(NicIpAlias.state.revoked); Transaction.execute(new TransactionCallbackNoReturn() { @@ -3116,10 +3115,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NicProfile nic = null; if (requested != null && requested.getBroadCastUri() != null) { String broadcastUri = requested.getBroadCastUri().toString(); - String ipAddress = requested.getIp4Address(); + String ipAddress = requested.getIPv4Address(); NicVO nicVO = _nicDao.findByNetworkIdInstanceIdAndBroadcastUri(network.getId(), vm.getId(), broadcastUri); if (nicVO != null) { - if (ipAddress == null || nicVO.getIp4Address().equals(ipAddress)) { + if (ipAddress == null || nicVO.getIPv4Address().equals(ipAddress)) { nic = _networkModel.getNicProfile(vm, network.getId(), broadcastUri); } } @@ -3316,8 +3315,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra @Override public NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType) { NicVO nic = new NicVO(null, null, network.getId(), null); - nic.setIp4Address(ip4Address); - nic.setIp6Address(ip6Address); + nic.setIPv4Address(ip4Address); + nic.setIPv6Address(ip6Address); nic.setReservationStrategy(ReservationStrategy.PlaceHolder); nic.setState(Nic.State.Reserved); nic.setVmType(vmType); diff --git a/engine/orchestration/test/org/apache/cloudstack/engine/orchestration/NetworkOrchestratorTest.java b/engine/orchestration/test/org/apache/cloudstack/engine/orchestration/NetworkOrchestratorTest.java index 04233df5dbb..2d15403a865 100644 --- a/engine/orchestration/test/org/apache/cloudstack/engine/orchestration/NetworkOrchestratorTest.java +++ b/engine/orchestration/test/org/apache/cloudstack/engine/orchestration/NetworkOrchestratorTest.java @@ -17,44 +17,42 @@ package org.apache.cloudstack.engine.orchestration; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.ArrayList; import java.util.Map; -import junit.framework.TestCase; - import org.apache.log4j.Logger; import org.junit.Before; import org.junit.Test; import org.mockito.Matchers; import com.cloud.network.Network; - -import com.cloud.network.NetworkModel; import com.cloud.network.Network.GuestType; import com.cloud.network.Network.Service; +import com.cloud.network.NetworkModel; import com.cloud.network.Networks.TrafficType; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.NetworkServiceMapDao; import com.cloud.network.dao.NetworkVO; import com.cloud.network.element.DhcpServiceProvider; import com.cloud.network.guru.NetworkGuru; - import com.cloud.vm.Nic; import com.cloud.vm.NicVO; import com.cloud.vm.VirtualMachine; -import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.VirtualMachine.Type; +import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; import com.cloud.vm.dao.NicIpAliasDao; import com.cloud.vm.dao.NicSecondaryIpDao; +import junit.framework.TestCase; + /** * NetworkManagerImpl implements NetworkManager. */ @@ -106,7 +104,7 @@ public class NetworkOrchestratorTest extends TestCase { when(testOrchastrator._networkModel.areServicesSupportedInNetwork(network.getId(), Service.Dhcp)).thenReturn(true); when(network.getTrafficType()).thenReturn(TrafficType.Guest); when(network.getGuestType()).thenReturn(GuestType.Shared); - when(testOrchastrator._nicDao.listByNetworkIdTypeAndGatewayAndBroadcastUri(nic.getNetworkId(), VirtualMachine.Type.User, nic.getGateway(), nic.getBroadcastUri())).thenReturn(new ArrayList()); + when(testOrchastrator._nicDao.listByNetworkIdTypeAndGatewayAndBroadcastUri(nic.getNetworkId(), VirtualMachine.Type.User, nic.getIPv4Gateway(), nic.getBroadcastUri())).thenReturn(new ArrayList()); diff --git a/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java b/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java index a2ec67bf838..978fee04401 100644 --- a/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java +++ b/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java @@ -16,9 +16,6 @@ // under the License. package com.cloud.certificate.dao; -import java.io.BufferedInputStream; -import java.io.IOException; - import javax.ejb.Local; import org.apache.log4j.Logger; @@ -41,7 +38,6 @@ public class CertificateDaoImpl extends GenericDaoBase impl @Override public Long persistCustomCertToDb(String certStr, CertificateVO cert, Long managementServerId) { - BufferedInputStream f = null; try { cert.setCertificate(certStr); cert.setUpdated("Y"); @@ -50,12 +46,6 @@ public class CertificateDaoImpl extends GenericDaoBase impl } catch (Exception e) { s_logger.warn("Unable to read the certificate: " + e); return new Long(0); - } finally { - if (f != null) - try { - f.close(); - } catch (IOException ignored) { - } } } } diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java index 9bc373f8f3e..ca79eedd529 100644 --- a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java +++ b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java @@ -116,7 +116,6 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase implements HostDao @DB @Override public List findLostHosts(long timeout) { - TransactionLegacy txn = TransactionLegacy.currentTxn(); - PreparedStatement pstmt = null; List result = new ArrayList(); - ResultSet rs = null; - try { - String sql = + String sql = "select h.id from host h left join cluster c on h.cluster_id=c.id where h.mgmt_server_id is not null and h.last_ping < ? and h.status in ('Up', 'Updating', 'Disconnected', 'Connecting') and h.type not in ('ExternalFirewall', 'ExternalLoadBalancer', 'TrafficMonitor', 'SecondaryStorage', 'LocalSecondaryStorage', 'L2Networking') and (h.cluster_id is null or c.managed_state = 'Managed') ;"; - pstmt = txn.prepareStatement(sql); + try ( + TransactionLegacy txn = TransactionLegacy.currentTxn(); + PreparedStatement pstmt = txn.prepareStatement(sql);) { pstmt.setLong(1, timeout); - rs = pstmt.executeQuery(); - while (rs.next()) { - long id = rs.getLong(1); //ID column - result.add(findById(id)); + try (ResultSet rs = pstmt.executeQuery();) { + while (rs.next()) { + long id = rs.getLong(1); //ID column + result.add(findById(id)); + } } - } catch (Exception e) { + } catch (SQLException e) { s_logger.warn("Exception: ", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } return result; } diff --git a/engine/schema/src/com/cloud/network/dao/VpnUserDao.java b/engine/schema/src/com/cloud/network/dao/VpnUserDao.java index bc9fbd73652..83da918b6e1 100644 --- a/engine/schema/src/com/cloud/network/dao/VpnUserDao.java +++ b/engine/schema/src/com/cloud/network/dao/VpnUserDao.java @@ -24,7 +24,7 @@ import com.cloud.utils.db.GenericDao; public interface VpnUserDao extends GenericDao { List listByAccount(Long accountId); - VpnUserVO findByAccountAndUsername(Long acccountId, String userName); + VpnUserVO findByAccountAndUsername(Long accountId, String userName); long getVpnUserCount(Long accountId); } diff --git a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java index 90f8349349d..8fe9375c051 100644 --- a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java +++ b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java @@ -104,7 +104,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase im try { Thread.sleep(delayMs); } catch (InterruptedException ie) { - + s_logger.debug("[ignored] interupted while inserting security group rule log."); } } else s_logger.warn("Caught another deadlock exception while retrying inserting security group rule log, giving up"); diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java index 84a92d7bf0d..ccca9444406 100644 --- a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java +++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java @@ -41,12 +41,12 @@ import com.cloud.utils.db.DB; import com.cloud.utils.db.Filter; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.GenericSearchBuilder; -import com.cloud.utils.db.UpdateBuilder; import com.cloud.utils.db.JoinBuilder.JoinType; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.SearchCriteria.Func; import com.cloud.utils.db.TransactionLegacy; +import com.cloud.utils.db.UpdateBuilder; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.dao.VMInstanceDao; @@ -208,6 +208,8 @@ public class SnapshotDaoImpl extends GenericDaoBase implements return rs.getLong(1); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "caught something while getting sec. host id: " + ex.getLocalizedMessage()); } return null; } @@ -276,7 +278,7 @@ public class SnapshotDaoImpl extends GenericDaoBase implements @Override public List listByInstanceId(long instanceId, Snapshot.State... status) { - SearchCriteria sc = this.InstanceIdSearch.create(); + SearchCriteria sc = InstanceIdSearch.create(); if (status != null && status.length != 0) { sc.setParameters("status", (Object[])status); @@ -289,7 +291,7 @@ public class SnapshotDaoImpl extends GenericDaoBase implements @Override public List listByStatus(long volumeId, Snapshot.State... status) { - SearchCriteria sc = this.StatusSearch.create(); + SearchCriteria sc = StatusSearch.create(); sc.setParameters("volumeId", volumeId); sc.setParameters("status", (Object[])status); return listBy(sc, null); @@ -311,7 +313,7 @@ public class SnapshotDaoImpl extends GenericDaoBase implements @Override public List listAllByStatus(Snapshot.State... status) { - SearchCriteria sc = this.StatusSearch.create(); + SearchCriteria sc = StatusSearch.create(); sc.setParameters("status", (Object[])status); return listBy(sc, null); } diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java index a3adffc8b26..dccc902e912 100644 --- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java +++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java @@ -54,8 +54,12 @@ public interface VMTemplateDao extends GenericDao, StateDao< public List listAllInZone(long dataCenterId); + public List listInZoneByState(long dataCenterId, VirtualMachineTemplate.State... states); + public List listAllActive(); + public List listByState(VirtualMachineTemplate.State... states); + public List listByHypervisorType(List hyperTypes); public List publicIsoSearch(Boolean bootable, boolean listRemoved, Map tags); diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java index 90196a8b3d5..02fb4b466ed 100644 --- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java +++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java @@ -372,7 +372,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase implem tmpltZoneSearch.and("zoneId", tmpltZoneSearch.entity().getZoneId(), SearchCriteria.Op.EQ); TmpltsInZoneSearch = createSearchBuilder(); - TmpltsInZoneSearch.and("state", TmpltsInZoneSearch.entity().getState(), SearchCriteria.Op.EQ); + TmpltsInZoneSearch.and("state", TmpltsInZoneSearch.entity().getState(), SearchCriteria.Op.IN); TmpltsInZoneSearch.and().op("avoidtype", TmpltsInZoneSearch.entity().getTemplateType(), SearchCriteria.Op.NEQ); TmpltsInZoneSearch.or("templateType", TmpltsInZoneSearch.entity().getTemplateType(), SearchCriteria.Op.NULL); TmpltsInZoneSearch.cp(); @@ -381,7 +381,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase implem TmpltsInZoneSearch.done(); ActiveTmpltSearch = createSearchBuilder(); - ActiveTmpltSearch.and("state", ActiveTmpltSearch.entity().getState(), SearchCriteria.Op.EQ); + ActiveTmpltSearch.and("state", ActiveTmpltSearch.entity().getState(), SearchCriteria.Op.IN); CountTemplatesByAccount = createSearchBuilder(Long.class); CountTemplatesByAccount.select(null, Func.COUNT, null); @@ -792,6 +792,15 @@ public class VMTemplateDaoImpl extends GenericDaoBase implem return listBy(sc); } + @Override + public List listInZoneByState(long dataCenterId, VirtualMachineTemplate.State... states) { + SearchCriteria sc = TmpltsInZoneSearch.create(); + sc.setParameters("avoidtype", TemplateType.PERHOST.toString()); + sc.setParameters("state", (Object[])states); + sc.setJoinParameters("tmpltzone", "zoneId", dataCenterId); + return listBy(sc); + } + @Override public List listAllActive() { SearchCriteria sc = ActiveTmpltSearch.create(); @@ -799,6 +808,13 @@ public class VMTemplateDaoImpl extends GenericDaoBase implem return listBy(sc); } + @Override + public List listByState(VirtualMachineTemplate.State... states) { + SearchCriteria sc = ActiveTmpltSearch.create(); + sc.setParameters("state", (Object[])states); + return listBy(sc); + } + @Override public List listDefaultBuiltinTemplates() { SearchCriteria sc = tmpltTypeSearch.create(); diff --git a/engine/schema/src/com/cloud/upgrade/dao/LegacyDbUpgrade.java b/engine/schema/src/com/cloud/upgrade/dao/LegacyDbUpgrade.java new file mode 100644 index 00000000000..e43f1eb35cd --- /dev/null +++ b/engine/schema/src/com/cloud/upgrade/dao/LegacyDbUpgrade.java @@ -0,0 +1,42 @@ +// 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.upgrade.dao; + +import org.apache.log4j.Logger; + +public abstract class LegacyDbUpgrade implements DbUpgrade{ + + final static Logger s_logger = Logger.getLogger(LegacyDbUpgrade.class); + + public LegacyDbUpgrade() { + super(); + } + + /** + * @param closable + */ + protected void closeAutoCloseable(AutoCloseable closable) { + if (closable != null) { + try { + closable.close(); + } catch (Exception e) { + s_logger.info("[ignored]",e); + } + } + } + +} \ No newline at end of file diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java index 3f19c5445bb..dd9ff5e39af 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java @@ -61,11 +61,8 @@ public class Upgrade218to22 implements DbUpgrade { } protected void upgradeStoragePools(Connection conn) { - PreparedStatement pstmt; - try { - pstmt = conn.prepareStatement("UPDATE storage_pool SET status='Up'"); + try (PreparedStatement pstmt = conn.prepareStatement("UPDATE storage_pool SET status='Up'");) { pstmt.executeUpdate(); - pstmt.close(); } catch (SQLException e) { throw new CloudRuntimeException("Can't upgrade storage pool ", e); } @@ -77,8 +74,7 @@ public class Upgrade218to22 implements DbUpgrade { String insertSql = "INSERT INTO network_offerings (name, display_text, nw_rate, mc_rate, concurrent_connections, traffic_type, tags, system_only, specify_vlan, service_offering_id, created, removed, `default`, availability, dnsService, gatewayService, firewallService, lbService, userdataService, vpnService, dhcpService) " + "VALUES (?, ?, NULL, NULL, NULL, ?, NULL, ?, 0, NULL, now(), NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - try { - PreparedStatement pstmt = conn.prepareStatement(insertSql, Statement.RETURN_GENERATED_KEYS); + try (PreparedStatement pstmt = conn.prepareStatement(insertSql, Statement.RETURN_GENERATED_KEYS);) { int i = 1; pstmt.setString(i++, name); pstmt.setString(i++, displayText); @@ -94,32 +90,30 @@ public class Upgrade218to22 implements DbUpgrade { pstmt.setBoolean(i++, vpnService); pstmt.setBoolean(i++, dhcpService); pstmt.executeUpdate(); - ResultSet rs = pstmt.getGeneratedKeys(); - rs.next(); - long id = rs.getLong(1); - rs.close(); - pstmt.close(); - return id; + try (ResultSet rs = pstmt.getGeneratedKeys();) { + rs.next(); + long id = rs.getLong(1); + return id; + } } catch (SQLException e) { throw new CloudRuntimeException("Unable to insert network offering ", e); } } protected void upgradeInstanceGroups(Connection conn) { - try { + try ( + PreparedStatement globalSelect = conn.prepareStatement("SELECT DISTINCT v.group, v.account_id from vm_instance v where v.group is not null"); + ResultSet globalResult = globalSelect.executeQuery(); + ) { // Create instance groups - duplicated names are allowed across accounts - PreparedStatement pstmt = conn.prepareStatement("SELECT DISTINCT v.group, v.account_id from vm_instance v where v.group is not null"); - ResultSet rs = pstmt.executeQuery(); ArrayList groups = new ArrayList(); - while (rs.next()) { + while (globalResult.next()) { Object[] group = new Object[10]; - group[0] = rs.getString(1); // group name - group[1] = rs.getLong(2); // accountId + group[0] = globalResult.getString(1); // group name + group[1] = globalResult.getLong(2); // accountId groups.add(group); } - rs.close(); - pstmt.close(); for (Object[] group : groups) { String groupName = (String)group[0]; @@ -128,24 +122,25 @@ public class Upgrade218to22 implements DbUpgrade { } // update instance_group_vm_map - pstmt = + try ( + PreparedStatement detailSelect = conn.prepareStatement("SELECT g.id, v.id from vm_instance v, instance_group g where g.name=v.group and g.account_id=v.account_id and v.group is not null"); - rs = pstmt.executeQuery(); - ArrayList groupVmMaps = new ArrayList(); - while (rs.next()) { - Object[] groupMaps = new Object[10]; - groupMaps[0] = rs.getLong(1); // vmId - groupMaps[1] = rs.getLong(2); // groupId - groupVmMaps.add(groupMaps); + ResultSet detailResult = detailSelect.executeQuery(); + ) { + ArrayList groupVmMaps = new ArrayList(); + while (detailResult.next()) { + Object[] groupMaps = new Object[10]; + groupMaps[0] = detailResult.getLong(1); // vmId + groupMaps[1] = detailResult.getLong(2); // groupId + groupVmMaps.add(groupMaps); + } + for (Object[] groupMap : groupVmMaps) { + Long groupId = (Long)groupMap[0]; + Long instanceId = (Long)groupMap[1]; + createInstanceGroupVmMaps(conn, groupId, instanceId); + } } - rs.close(); - pstmt.close(); - for (Object[] groupMap : groupVmMaps) { - Long groupId = (Long)groupMap[0]; - Long instanceId = (Long)groupMap[1]; - createInstanceGroupVmMaps(conn, groupId, instanceId); - } } catch (SQLException e) { throw new CloudRuntimeException("Can't update instance groups ", e); } @@ -153,375 +148,371 @@ public class Upgrade218to22 implements DbUpgrade { } protected void createInstanceGroups(Connection conn, String groupName, long accountId) throws SQLException { - PreparedStatement pstmt = conn.prepareStatement("INSERT INTO instance_group (account_id, name, created) values (?, ?, now()) "); - pstmt.setLong(1, accountId); - pstmt.setString(2, groupName); - pstmt.executeUpdate(); - pstmt.close(); + try (PreparedStatement pstmt = conn.prepareStatement("INSERT INTO instance_group (account_id, name, created) values (?, ?, now()) ");) { + pstmt.setLong(1, accountId); + pstmt.setString(2, groupName); + pstmt.executeUpdate(); + } } protected void createInstanceGroupVmMaps(Connection conn, long groupId, long instanceId) throws SQLException { - PreparedStatement pstmt = conn.prepareStatement("INSERT INTO instance_group_vm_map (group_id, instance_id) values (?, ?) "); - pstmt.setLong(1, groupId); - pstmt.setLong(2, instanceId); - pstmt.executeUpdate(); - pstmt.close(); + try (PreparedStatement pstmt = conn.prepareStatement("INSERT INTO instance_group_vm_map (group_id, instance_id) values (?, ?) ");) { + pstmt.setLong(1, groupId); + pstmt.setLong(2, instanceId); + pstmt.executeUpdate(); + } } protected long insertNic(Connection conn, long networkId, long instanceId, boolean running, String macAddress, String ipAddress, String netmask, String strategy, String gateway, String vnet, String guru, boolean defNic, int deviceId, String mode, String reservationId) throws SQLException { - PreparedStatement pstmt = - conn.prepareStatement( + try ( + PreparedStatement pstmt = conn.prepareStatement( "INSERT INTO nics (instance_id, network_id, mac_address, ip4_address, netmask, strategy, ip_type, broadcast_uri, mode, reserver_name, reservation_id, device_id, update_time, isolation_uri, ip6_address, default_nic, created, removed, state, gateway) " + "VALUES (?, ?, ?, ?, ?, ?, 'Ip4', ?, ?, ?, ?, ?, now(), ?, NULL, ?, now(), NULL, ?, ?)", Statement.RETURN_GENERATED_KEYS); - int i = 1; - String isolationUri = null; + ) { + int i = 1; + String isolationUri = null; - String broadcast = null; - if (vnet != null) { - broadcast = "vlan://" + vnet; - if (vnet.equalsIgnoreCase("untagged")) { - isolationUri = "ec2://" + vnet; - } else { - isolationUri = broadcast; + String broadcast = null; + if (vnet != null) { + broadcast = "vlan://" + vnet; + if (vnet.equalsIgnoreCase("untagged")) { + isolationUri = "ec2://" + vnet; + } else { + isolationUri = broadcast; + } + } + pstmt.setLong(i++, instanceId); + pstmt.setLong(i++, networkId); + pstmt.setString(i++, macAddress); + pstmt.setString(i++, ipAddress); + pstmt.setString(i++, netmask); + pstmt.setString(i++, strategy); + pstmt.setString(i++, broadcast); + pstmt.setString(i++, mode); + pstmt.setString(i++, guru); + pstmt.setString(i++, reservationId); + pstmt.setInt(i++, deviceId); + pstmt.setString(i++, isolationUri); + pstmt.setBoolean(i++, defNic); + pstmt.setString(i++, running ? "Reserved" : "Allocated"); + pstmt.setString(i++, gateway); + pstmt.executeUpdate(); + try (ResultSet rs = pstmt.getGeneratedKeys();) { + long nicId = 0; + if (!rs.next()) { + throw new CloudRuntimeException("Unable to get id for nic"); + } + nicId = rs.getLong(1); + return nicId; } } - pstmt.setLong(i++, instanceId); - pstmt.setLong(i++, networkId); - pstmt.setString(i++, macAddress); - pstmt.setString(i++, ipAddress); - pstmt.setString(i++, netmask); - pstmt.setString(i++, strategy); - pstmt.setString(i++, broadcast); - pstmt.setString(i++, mode); - pstmt.setString(i++, guru); - pstmt.setString(i++, reservationId); - pstmt.setInt(i++, deviceId); - pstmt.setString(i++, isolationUri); - pstmt.setBoolean(i++, defNic); - pstmt.setString(i++, running ? "Reserved" : "Allocated"); - pstmt.setString(i++, gateway); - pstmt.executeUpdate(); - ResultSet rs = pstmt.getGeneratedKeys(); - long nicId = 0; - if (!rs.next()) { - throw new CloudRuntimeException("Unable to get id for nic"); - } - nicId = rs.getLong(1); - rs.close(); - pstmt.close(); - return nicId; } protected void upgradeDomR(Connection conn, long dcId, long domrId, Long publicNetworkId, long guestNetworkId, long controlNetworkId, String zoneType, String vnet) throws SQLException { s_logger.debug("Upgrading domR" + domrId); - PreparedStatement pstmt = + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT vm_instance.id, vm_instance.state, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, domain_router.public_mac_address, domain_router.public_ip_address, domain_router.public_netmask, domain_router.guest_mac_address, domain_router.guest_ip_address, domain_router.guest_netmask, domain_router.vnet, domain_router.gateway FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed is NULL AND vm_instance.id=?"); - pstmt.setLong(1, domrId); - ResultSet rs = pstmt.executeQuery(); + ) { + pstmt.setLong(1, domrId); + try (ResultSet rs = pstmt.executeQuery();) { - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find router " + domrId); + if (!rs.next()) { + throw new CloudRuntimeException("Unable to find router " + domrId); + } + // long id = rs.getLong(1); + String state = rs.getString(2); + boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); + String privateMac = rs.getString(3); + String privateIp = rs.getString(4); + String privateNetmask = rs.getString(5); + String publicMac = rs.getString(6); + String publicIp = rs.getString(7); + String publicNetmask = rs.getString(8); + String guestMac = rs.getString(9); + String guestIp = rs.getString(10); + String guestNetmask = rs.getString(11); + String gateway = rs.getString(13); + try (PreparedStatement vlanStatement = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?");) { + vlanStatement.setString(1, publicIp); + try (ResultSet vlanResult = vlanStatement.executeQuery();) { + String publicVlan = null; + while (vlanResult.next()) { + publicVlan = vlanResult.getString(1); + } + // Control nic is the same for all types of networks + long controlNicId = + insertNic(conn, controlNetworkId, domrId, running, privateMac, privateIp, privateNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 1, + "Static", privateIp != null ? (domrId + privateIp) : null); + if (privateIp != null) { + try (PreparedStatement updateStatement = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?");) { + updateStatement.setLong(1, controlNicId); + updateStatement.setString(2, privateIp); + updateStatement.setLong(3, dcId); + updateStatement.executeUpdate(); + } + } + if (zoneType.equalsIgnoreCase("Basic")) { + insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Create", gateway, vnet, "DirectPodBasedNetworkGuru", true, 0, "Dhcp", null); + } else if (publicIp != null) { + // update virtual domR + insertNic(conn, publicNetworkId, domrId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", + null); + insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Start", null, vnet, "ExternalGuestNetworkGuru", false, 0, "Dhcp", null); + } else { + // update direct domR - dhcp case + insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Create", gateway, vnet, "DirectNetworkGuru", true, 0, "Dhcp", null); + } + } + } + } } - - // long id = rs.getLong(1); - String state = rs.getString(2); - boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); - String privateMac = rs.getString(3); - String privateIp = rs.getString(4); - String privateNetmask = rs.getString(5); - String publicMac = rs.getString(6); - String publicIp = rs.getString(7); - String publicNetmask = rs.getString(8); - String guestMac = rs.getString(9); - String guestIp = rs.getString(10); - String guestNetmask = rs.getString(11); - String gateway = rs.getString(13); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?"); - pstmt.setString(1, publicIp); - rs = pstmt.executeQuery(); - - String publicVlan = null; - while (rs.next()) { - publicVlan = rs.getString(1); - } - - // Control nic is the same for all types of networks - long controlNicId = - insertNic(conn, controlNetworkId, domrId, running, privateMac, privateIp, privateNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 1, - "Static", privateIp != null ? (domrId + privateIp) : null); - if (privateIp != null) { - pstmt = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?"); - pstmt.setLong(1, controlNicId); - pstmt.setString(2, privateIp); - pstmt.setLong(3, dcId); - pstmt.executeUpdate(); - pstmt.close(); - } - - if (zoneType.equalsIgnoreCase("Basic")) { - insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Create", gateway, vnet, "DirectPodBasedNetworkGuru", true, 0, "Dhcp", null); - } else if (publicIp != null) { - // update virtual domR - insertNic(conn, publicNetworkId, domrId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", - null); - insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Start", null, vnet, "ExternalGuestNetworkGuru", false, 0, "Dhcp", null); - } else { - // update direct domR - dhcp case - insertNic(conn, guestNetworkId, domrId, running, guestMac, guestIp, guestNetmask, "Create", gateway, vnet, "DirectNetworkGuru", true, 0, "Dhcp", null); - } - } protected void upgradeSsvm(Connection conn, long dataCenterId, long publicNetworkId, long managementNetworkId, long controlNetworkId, String zoneType) throws SQLException { s_logger.debug("Upgrading ssvm in " + dataCenterId); - PreparedStatement pstmt = + //select instance + try ( + PreparedStatement selectInstance = conn.prepareStatement("SELECT vm_instance.id, vm_instance.state, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, secondary_storage_vm.public_mac_address, secondary_storage_vm.public_ip_address, secondary_storage_vm.public_netmask, secondary_storage_vm.guest_mac_address, secondary_storage_vm.guest_ip_address, secondary_storage_vm.guest_netmask, secondary_storage_vm.gateway, vm_instance.type FROM vm_instance INNER JOIN secondary_storage_vm ON vm_instance.id=secondary_storage_vm.id WHERE vm_instance.removed is NULL AND vm_instance.data_center_id=? AND vm_instance.type='SecondaryStorageVm'"); - pstmt.setLong(1, dataCenterId); - ResultSet rs = pstmt.executeQuery(); + ) { + selectInstance.setLong(1, dataCenterId); + try (ResultSet instanceResult = selectInstance.executeQuery();) { - if (!rs.next()) { - s_logger.debug("Unable to find ssvm in data center " + dataCenterId); - return; - } + if (!instanceResult.next()) { + s_logger.debug("Unable to find ssvm in data center " + dataCenterId); + return; + } - long ssvmId = rs.getLong(1); - String state = rs.getString(2); - boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); - String privateMac = rs.getString(3); - String privateIp = rs.getString(4); - String privateNetmask = rs.getString(5); - String publicMac = rs.getString(6); - String publicIp = rs.getString(7); - String publicNetmask = rs.getString(8); - String guestMac = rs.getString(9); - String guestIp = rs.getString(10); - String guestNetmask = rs.getString(11); - String gateway = rs.getString(12); - String type = rs.getString(13); - rs.close(); - pstmt.close(); + long ssvmId = instanceResult.getLong(1); + String state = instanceResult.getString(2); + boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); + String privateMac = instanceResult.getString(3); + String privateIp = instanceResult.getString(4); + String privateNetmask = instanceResult.getString(5); + String publicMac = instanceResult.getString(6); + String publicIp = instanceResult.getString(7); + String publicNetmask = instanceResult.getString(8); + String guestMac = instanceResult.getString(9); + String guestIp = instanceResult.getString(10); + String guestNetmask = instanceResult.getString(11); + String gateway = instanceResult.getString(12); +// String type = instanceResult.getString(13); + // select host + try (PreparedStatement selectHost = + conn.prepareStatement("SELECT host_pod_ref.gateway from host_pod_ref INNER JOIN vm_instance ON vm_instance.pod_id=host_pod_ref.id WHERE vm_instance.removed is NULL AND vm_instance.data_center_id=? AND vm_instance.type='SecondaryStorageVm'");) { + selectHost.setLong(1, dataCenterId); + try (ResultSet hostResult = selectHost.executeQuery();) { - pstmt = - conn.prepareStatement("SELECT host_pod_ref.gateway from host_pod_ref INNER JOIN vm_instance ON vm_instance.pod_id=host_pod_ref.id WHERE vm_instance.removed is NULL AND vm_instance.data_center_id=? AND vm_instance.type='SecondaryStorageVm'"); - pstmt.setLong(1, dataCenterId); - rs = pstmt.executeQuery(); + if (!hostResult.next()) { + s_logger.debug("Unable to find ssvm in data center " + dataCenterId); + return; + } - if (!rs.next()) { - s_logger.debug("Unable to find ssvm in data center " + dataCenterId); - return; - } + String podGateway = hostResult.getString(1); + // select vlan + try (PreparedStatement selectVlan = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?");) { + selectVlan.setString(1, publicIp); + try (ResultSet vlanResult = selectVlan.executeQuery();) { + String publicVlan = null; + while (vlanResult.next()) { + publicVlan = vlanResult.getString(1); + } + if (zoneType.equalsIgnoreCase("Basic")) { + insertNic(conn, publicNetworkId, ssvmId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "DirectPodBasedNetworkGuru", true, 2, + "Dhcp", null); - String podGateway = rs.getString(1); - rs.close(); - pstmt.close(); + } else { + insertNic(conn, publicNetworkId, ssvmId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", + null); + } + } + } - pstmt = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?"); - pstmt.setString(1, publicIp); - rs = pstmt.executeQuery(); - String publicVlan = null; - while (rs.next()) { - publicVlan = rs.getString(1); - } + long controlNicId = + insertNic(conn, controlNetworkId, ssvmId, running, guestMac, guestIp, guestNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 0, "Static", + guestIp != null ? (ssvmId + guestIp) : null); + if (guestIp != null) { + try (PreparedStatement updateLinkLocal = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?");) { + updateLinkLocal.setLong(1, controlNicId); + updateLinkLocal.setString(2, guestIp); + updateLinkLocal.setLong(3, dataCenterId); + updateLinkLocal.executeUpdate(); + } + } - rs.close(); - pstmt.close(); - - if (zoneType.equalsIgnoreCase("Basic")) { - insertNic(conn, publicNetworkId, ssvmId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "DirectPodBasedNetworkGuru", true, 2, - "Dhcp", null); - - } else { - insertNic(conn, publicNetworkId, ssvmId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", - null); - } - - long controlNicId = - insertNic(conn, controlNetworkId, ssvmId, running, guestMac, guestIp, guestNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 0, "Static", - guestIp != null ? (ssvmId + guestIp) : null); - if (guestIp != null) { - pstmt = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?"); - pstmt.setLong(1, controlNicId); - pstmt.setString(2, guestIp); - pstmt.setLong(3, dataCenterId); - pstmt.executeUpdate(); - pstmt.close(); - } - - long mgmtNicId = - insertNic(conn, managementNetworkId, ssvmId, running, privateMac, privateIp, privateNetmask, "Start", podGateway, null, "PodBasedNetworkGuru", false, 1, - "Static", null); - if (privateIp != null) { - pstmt = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?"); - pstmt.setLong(1, mgmtNicId); - pstmt.setString(2, privateIp); - pstmt.setLong(3, dataCenterId); - pstmt.executeUpdate(); - pstmt.close(); + long mgmtNicId = + insertNic(conn, managementNetworkId, ssvmId, running, privateMac, privateIp, privateNetmask, "Start", podGateway, null, "PodBasedNetworkGuru", false, 1, + "Static", null); + if (privateIp != null) { + try (PreparedStatement updateIp = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?");) { + updateIp.setLong(1, mgmtNicId); + updateIp.setString(2, privateIp); + updateIp.setLong(3, dataCenterId); + updateIp.executeUpdate(); + } + } + } + } + } } } protected void upgradeConsoleProxy(Connection conn, long dcId, long cpId, long publicNetworkId, long managementNetworkId, long controlNetworkId, String zoneType) throws SQLException { s_logger.debug("Upgrading cp" + cpId); - PreparedStatement pstmt = - conn.prepareStatement("SELECT vm_instance.id, vm_instance.state, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, console_proxy.public_mac_address, console_proxy.public_ip_address, console_proxy.public_netmask, console_proxy.guest_mac_address, console_proxy.guest_ip_address, console_proxy.guest_netmask, console_proxy.gateway, vm_instance.type FROM vm_instance INNER JOIN console_proxy ON vm_instance.id=console_proxy.id WHERE vm_instance.removed is NULL AND vm_instance.id=?"); - pstmt.setLong(1, cpId); - ResultSet rs = pstmt.executeQuery(); + try (PreparedStatement pstmt = + conn.prepareStatement("SELECT vm_instance.id, vm_instance.state, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, console_proxy.public_mac_address, console_proxy.public_ip_address, console_proxy.public_netmask, console_proxy.guest_mac_address, console_proxy.guest_ip_address, console_proxy.guest_netmask, console_proxy.gateway, vm_instance.type FROM vm_instance INNER JOIN console_proxy ON vm_instance.id=console_proxy.id WHERE vm_instance.removed is NULL AND vm_instance.id=?");) { + pstmt.setLong(1, cpId); + try (ResultSet rs = pstmt.executeQuery();) { - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find cp " + cpId); - } + if (!rs.next()) { + throw new CloudRuntimeException("Unable to find cp " + cpId); + } - long id = rs.getLong(1); - String state = rs.getString(2); - boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); - String privateMac = rs.getString(3); - String privateIp = rs.getString(4); - String privateNetmask = rs.getString(5); - String publicMac = rs.getString(6); - String publicIp = rs.getString(7); - String publicNetmask = rs.getString(8); - String guestMac = rs.getString(9); - String guestIp = rs.getString(10); - String guestNetmask = rs.getString(11); - String gateway = rs.getString(12); - String type = rs.getString(13); - rs.close(); - pstmt.close(); +// long id = rs.getLong(1); + String state = rs.getString(2); + boolean running = state.equals("Running") | state.equals("Starting") | state.equals("Stopping"); + String privateMac = rs.getString(3); + String privateIp = rs.getString(4); + String privateNetmask = rs.getString(5); + String publicMac = rs.getString(6); + String publicIp = rs.getString(7); + String publicNetmask = rs.getString(8); + String guestMac = rs.getString(9); + String guestIp = rs.getString(10); + String guestNetmask = rs.getString(11); + String gateway = rs.getString(12); +// String type = rs.getString(13); + try ( + PreparedStatement selectHost = + conn.prepareStatement("SELECT host_pod_ref.gateway from host_pod_ref INNER JOIN vm_instance ON vm_instance.pod_id=host_pod_ref.id WHERE vm_instance.id=?"); + ) { + selectHost.setLong(1, cpId); + try (ResultSet hostResult = selectHost.executeQuery();) { - pstmt = - conn.prepareStatement("SELECT host_pod_ref.gateway from host_pod_ref INNER JOIN vm_instance ON vm_instance.pod_id=host_pod_ref.id WHERE vm_instance.id=?"); - pstmt.setLong(1, cpId); - rs = pstmt.executeQuery(); + if (!hostResult.next()) { + throw new CloudRuntimeException("Unable to find cp " + cpId); + } - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find cp " + cpId); - } + String podGateway = hostResult.getString(1); + try (PreparedStatement selectVlan = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?");) { + selectVlan.setString(1, publicIp); + try (ResultSet vlanResult = selectVlan.executeQuery();) { - String podGateway = rs.getString(1); - rs.close(); - pstmt.close(); + String publicVlan = null; + while (vlanResult.next()) { + publicVlan = vlanResult.getString(1); + } + if (zoneType.equalsIgnoreCase("Basic")) { + insertNic(conn, publicNetworkId, cpId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "DirectPodBasedNetworkGuru", true, 2, + "Dhcp", null); + } else { + insertNic(conn, publicNetworkId, cpId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", + null); + } - pstmt = conn.prepareStatement("SELECT v.vlan_id from vlan v, user_ip_address u where v.id=u.vlan_db_id and u.public_ip_address=?"); - pstmt.setString(1, publicIp); - rs = pstmt.executeQuery(); - - String publicVlan = null; - while (rs.next()) { - publicVlan = rs.getString(1); - } - - rs.close(); - pstmt.close(); - - if (zoneType.equalsIgnoreCase("Basic")) { - insertNic(conn, publicNetworkId, cpId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "DirectPodBasedNetworkGuru", true, 2, - "Dhcp", null); - } else { - insertNic(conn, publicNetworkId, cpId, running, publicMac, publicIp, publicNetmask, "Create", gateway, publicVlan, "PublicNetworkGuru", true, 2, "Static", - null); - } - - long controlNicId = - insertNic(conn, controlNetworkId, cpId, running, guestMac, guestIp, guestNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 0, "Static", - guestIp != null ? (cpId + guestIp) : null); - if (guestIp != null) { - pstmt = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?"); - pstmt.setLong(1, controlNicId); - pstmt.setString(2, guestIp); - pstmt.setLong(3, dcId); - pstmt.executeUpdate(); - pstmt.close(); - } - long mgmtNicId = - insertNic(conn, managementNetworkId, cpId, running, privateMac, privateIp, privateNetmask, "Start", podGateway, null, "PodBasedNetworkGuru", false, 1, - "Static", privateIp != null ? (cpId + privateIp) : null); - if (privateIp != null) { - pstmt = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?"); - pstmt.setLong(1, mgmtNicId); - pstmt.setString(2, privateIp); - pstmt.setLong(3, dcId); - pstmt.executeUpdate(); - pstmt.close(); + long controlNicId = + insertNic(conn, controlNetworkId, cpId, running, guestMac, guestIp, guestNetmask, "Start", "169.254.0.1", null, "ControlNetworkGuru", false, 0, "Static", + guestIp != null ? (cpId + guestIp) : null); + if (guestIp != null) { + try (PreparedStatement update = conn.prepareStatement("UPDATE op_dc_link_local_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?");) { + update.setLong(1, controlNicId); + update.setString(2, guestIp); + update.setLong(3, dcId); + update.executeUpdate(); + } + } + long mgmtNicId = + insertNic(conn, managementNetworkId, cpId, running, privateMac, privateIp, privateNetmask, "Start", podGateway, null, "PodBasedNetworkGuru", false, 1, + "Static", privateIp != null ? (cpId + privateIp) : null); + if (privateIp != null) { + try (PreparedStatement update = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET instance_id=? WHERE ip_address=? AND data_center_id=?");) { + update.setLong(1, mgmtNicId); + update.setString(2, privateIp); + update.setLong(3, dcId); + update.executeUpdate(); + } + } + } + } + } + } + } } } protected void upgradeUserVms(Connection conn, long domainRouterId, long networkId, String gateway, String vnet, String guruName, String strategy) throws SQLException { - PreparedStatement pstmt = - conn.prepareStatement("SELECT vm_instance.id, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, vm_instance.state, vm_instance.type FROM vm_instance INNER JOIN user_vm ON vm_instance.id=user_vm.id WHERE user_vm.domain_router_id=? and vm_instance.removed IS NULL"); - pstmt.setLong(1, domainRouterId); - ResultSet rs = pstmt.executeQuery(); - List vms = new ArrayList(); - while (rs.next()) { - Object[] vm = new Object[10]; - vm[0] = rs.getLong(1); // vm id - vm[1] = rs.getString(2); // mac address - vm[2] = rs.getString(3); // ip address - vm[3] = rs.getString(4); // netmask - vm[4] = rs.getString(5); // vm state - vms.add(vm); - } - rs.close(); - pstmt.close(); - - s_logger.debug("Upgrading " + vms.size() + " vms for router " + domainRouterId); - int count = 0; - for (Object[] vm : vms) { - String state = (String)vm[4]; + try( + PreparedStatement pstmt = + conn.prepareStatement("SELECT vm_instance.id, vm_instance.private_mac_address, vm_instance.private_ip_address, vm_instance.private_netmask, vm_instance.state, vm_instance.type FROM vm_instance INNER JOIN user_vm ON vm_instance.id=user_vm.id WHERE user_vm.domain_router_id=? and vm_instance.removed IS NULL"); + ) { + pstmt.setLong(1, domainRouterId); + try (ResultSet rs = pstmt.executeQuery();) { + List vms = new ArrayList(); + while (rs.next()) { + Object[] vm = new Object[10]; + vm[0] = rs.getLong(1); // vm id + vm[1] = rs.getString(2); // mac address + vm[2] = rs.getString(3); // ip address + vm[3] = rs.getString(4); // netmask + vm[4] = rs.getString(5); // vm state + vms.add(vm); + } + s_logger.debug("Upgrading " + vms.size() + " vms for router " + domainRouterId); + for (Object[] vm : vms) { + String state = (String)vm[4]; - boolean running = false; - if (state.equals("Running") || state.equals("Starting") || state.equals("Stopping")) { - running = true; - count++; + boolean running = false; + if (state.equals("Running") || state.equals("Starting") || state.equals("Stopping")) { + running = true; + count++; + } + + insertNic(conn, networkId, (Long)vm[0], running, (String)vm[1], (String)vm[2], (String)vm[3], strategy, gateway, vnet, guruName, true, 0, "Dhcp", null); + } } - - insertNic(conn, networkId, (Long)vm[0], running, (String)vm[1], (String)vm[2], (String)vm[3], strategy, gateway, vnet, guruName, true, 0, "Dhcp", null); } - - pstmt = conn.prepareStatement("SELECT state FROM vm_instance WHERE id=?"); - pstmt.setLong(1, domainRouterId); - rs = pstmt.executeQuery(); - rs.next(); - String state = rs.getString(1); - if (state.equals("Running") || state.equals("Starting") || state.equals("Stopping")) { - count++; + try (PreparedStatement pstmt = conn.prepareStatement("SELECT state FROM vm_instance WHERE id=?");) { + pstmt.setLong(1, domainRouterId); + try (ResultSet rs = pstmt.executeQuery();) { + rs.next(); + String state = rs.getString(1); + if (state.equals("Running") || state.equals("Starting") || state.equals("Stopping")) { + count++; + } + } } - rs.close(); - pstmt.close(); Long originalNicsCount = 0L; - pstmt = conn.prepareStatement("SELECT nics_count from op_networks where id=?"); - pstmt.setLong(1, networkId); - ResultSet originalCountRs = pstmt.executeQuery(); + try (PreparedStatement selectNicsCount = conn.prepareStatement("SELECT nics_count from op_networks where id=?");) { + selectNicsCount.setLong(1, networkId); + try (ResultSet originalCountRs = selectNicsCount.executeQuery();) { - if (originalCountRs.next()) { - originalNicsCount = originalCountRs.getLong(1); + if (originalCountRs.next()) { + originalNicsCount = originalCountRs.getLong(1); + } + + Long resultCount = originalNicsCount + count; + try (PreparedStatement updateNetworks = conn.prepareStatement("UPDATE op_networks SET nics_count=?, check_for_gc=? WHERE id=?");) { + updateNetworks.setLong(1, resultCount); + if (count == 0) { + updateNetworks.setBoolean(2, false); + } else { + updateNetworks.setBoolean(2, true); + } + updateNetworks.setLong(3, networkId); + updateNetworks.executeUpdate(); + } + } } - - Long resultCount = originalNicsCount + count; - originalCountRs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE op_networks SET nics_count=?, check_for_gc=? WHERE id=?"); - pstmt.setLong(1, resultCount); - if (count == 0) { - pstmt.setBoolean(2, false); - } else { - pstmt.setBoolean(2, true); - } - pstmt.setLong(3, networkId); - pstmt.executeUpdate(); - pstmt.close(); } protected long insertNetwork(Connection conn, String name, String displayText, String trafficType, String broadcastDomainType, String broadcastUri, String gateway, @@ -532,62 +523,59 @@ public class Upgrade218to22 implements DbUpgrade { String insertNetworkSql = "INSERT INTO networks(id, name, display_text, traffic_type, broadcast_domain_type, gateway, cidr, mode, network_offering_id, data_center_id, guru_name, state, domain_id, account_id, dns1, dns2, guest_type, shared, is_default, created, network_domain, related, reservation_id, broadcast_uri) " + "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?)"; - try { - PreparedStatement pstmt = conn.prepareStatement(getNextNetworkSequenceSql); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement getNextNetworkSequence = conn.prepareStatement(getNextNetworkSequenceSql); + ResultSet rs = getNextNetworkSequence.executeQuery(); + ) { rs.next(); long seq = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement(advanceNetworkSequenceSql); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = conn.prepareStatement(insertNetworkSql); - int i = 1; - pstmt.setLong(i++, seq); - pstmt.setString(i++, name); - pstmt.setString(i++, displayText); - pstmt.setString(i++, trafficType); - pstmt.setString(i++, broadcastDomainType); - pstmt.setString(i++, gateway); - pstmt.setString(i++, cidr); - pstmt.setString(i++, mode); - pstmt.setLong(i++, networkOfferingId); - pstmt.setLong(i++, dataCenterId); - pstmt.setString(i++, guruName); - pstmt.setString(i++, state); - pstmt.setLong(i++, domainId); - pstmt.setLong(i++, accountId); - pstmt.setString(i++, dns1); - pstmt.setString(i++, dns2); - pstmt.setString(i++, guestType); - pstmt.setBoolean(i++, shared); - pstmt.setBoolean(i++, isDefault); - pstmt.setString(i++, networkDomain); - pstmt.setLong(i++, seq); - pstmt.setString(i++, reservationId); - pstmt.setString(i++, broadcastUri); - pstmt.executeUpdate(); - - pstmt = conn.prepareStatement("INSERT INTO op_networks(id, mac_address_seq, nics_count, gc, check_for_gc) VALUES(?, ?, ?, ?, ?)"); - pstmt.setLong(1, seq); - pstmt.setLong(2, 0); - pstmt.setLong(3, 0); - if (trafficType.equals("Guest")) { - pstmt.setBoolean(4, true); - } else { - pstmt.setBoolean(4, false); + try (PreparedStatement insertNetworkSequence = conn.prepareStatement(advanceNetworkSequenceSql);) { + insertNetworkSequence.executeUpdate(); + } + try (PreparedStatement insertNetwork = conn.prepareStatement(insertNetworkSql);) { + int i = 1; + insertNetwork.setLong(i++, seq); + insertNetwork.setString(i++, name); + insertNetwork.setString(i++, displayText); + insertNetwork.setString(i++, trafficType); + insertNetwork.setString(i++, broadcastDomainType); + insertNetwork.setString(i++, gateway); + insertNetwork.setString(i++, cidr); + insertNetwork.setString(i++, mode); + insertNetwork.setLong(i++, networkOfferingId); + insertNetwork.setLong(i++, dataCenterId); + insertNetwork.setString(i++, guruName); + insertNetwork.setString(i++, state); + insertNetwork.setLong(i++, domainId); + insertNetwork.setLong(i++, accountId); + insertNetwork.setString(i++, dns1); + insertNetwork.setString(i++, dns2); + insertNetwork.setString(i++, guestType); + insertNetwork.setBoolean(i++, shared); + insertNetwork.setBoolean(i++, isDefault); + insertNetwork.setString(i++, networkDomain); + insertNetwork.setLong(i++, seq); + insertNetwork.setString(i++, reservationId); + insertNetwork.setString(i++, broadcastUri); + insertNetwork.executeUpdate(); + } + try (PreparedStatement insertNetworks = conn.prepareStatement("INSERT INTO op_networks(id, mac_address_seq, nics_count, gc, check_for_gc) VALUES(?, ?, ?, ?, ?)");) { + insertNetworks.setLong(1, seq); + insertNetworks.setLong(2, 0); + insertNetworks.setLong(3, 0); + if (trafficType.equals("Guest")) { + insertNetworks.setBoolean(4, true); + } else { + insertNetworks.setBoolean(4, false); + } + insertNetworks.setBoolean(5, false); + insertNetworks.executeUpdate(); + } + try (PreparedStatement insertAccountNetworkRef = conn.prepareStatement("INSERT INTO account_network_ref (account_id, network_id, is_owner) VALUES (?, ?, 1)");) { + insertAccountNetworkRef.setLong(1, accountId); + insertAccountNetworkRef.setLong(2, seq); + insertAccountNetworkRef.executeUpdate(); } - pstmt.setBoolean(5, false); - pstmt.executeUpdate(); - - pstmt = conn.prepareStatement("INSERT INTO account_network_ref (account_id, network_id, is_owner) VALUES (?, ?, 1)"); - pstmt.setLong(1, accountId); - pstmt.setLong(2, seq); - pstmt.executeUpdate(); - return seq; } catch (SQLException e) { throw new CloudRuntimeException("Unable to create network", e); @@ -595,518 +583,182 @@ public class Upgrade218to22 implements DbUpgrade { } protected void upgradeManagementIpAddress(Connection conn, long dcId) throws SQLException { - PreparedStatement pstmt = conn.prepareStatement("SELECT op_dc_ip_address_alloc.id FROM op_dc_ip_address_alloc WHERE data_center_id=?"); - pstmt.setLong(1, dcId); - ResultSet rs = pstmt.executeQuery(); ArrayList allocatedIps = new ArrayList(); - while (rs.next()) { - Object[] ip = new Object[10]; - ip[0] = rs.getLong(1); // id - allocatedIps.add(ip); - } - rs.close(); - pstmt.close(); - - for (Object[] allocatedIp : allocatedIps) { - pstmt = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?"); + try (PreparedStatement pstmt = conn.prepareStatement("SELECT op_dc_ip_address_alloc.id FROM op_dc_ip_address_alloc WHERE data_center_id=?");) { pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); + try (ResultSet rs = pstmt.executeQuery();) { + while (rs.next()) { + Object[] ip = new Object[10]; + ip[0] = rs.getLong(1); // id + allocatedIps.add(ip); + } + } + } + for (Object[] allocatedIp : allocatedIps) { + try (PreparedStatement pstmt = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?");) { + pstmt.setLong(1, dcId); + try (ResultSet rs = pstmt.executeQuery();) { + if (!rs.next()) { + throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); + } + long mac = rs.getLong(1); + try (PreparedStatement updateDcMacAddress = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?");) { + updateDcMacAddress.setLong(1, dcId); + updateDcMacAddress.executeUpdate(); + } + try(PreparedStatement updateDcIp = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET mac_address=? WHERE id=?");) { + updateDcIp.setLong(1, mac); + updateDcIp.setLong(2, (Long)allocatedIp[0]); + updateDcIp.executeUpdate(); + } + } } - long mac = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?"); - pstmt.setLong(1, dcId); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE op_dc_ip_address_alloc SET mac_address=? WHERE id=?"); - pstmt.setLong(1, mac); - pstmt.setLong(2, (Long)allocatedIp[0]); - pstmt.executeUpdate(); - pstmt.close(); } - } protected void upgradeDirectUserIpAddress(Connection conn, long dcId, long networkId, String vlanType) throws SQLException { s_logger.debug("Upgrading user ip address for data center " + dcId + " network " + networkId + " vlan type " + vlanType); - PreparedStatement pstmt = - conn.prepareStatement("UPDATE user_ip_address INNER JOIN vlan ON user_ip_address.vlan_db_id=vlan.id SET user_ip_address.source_network_id=vlan.network_id WHERE user_ip_address.data_center_id=? AND vlan.vlan_type=?"); - pstmt.setLong(1, dcId); - pstmt.setString(2, vlanType); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = - conn.prepareStatement("SELECT user_ip_address.id, user_ip_address.public_ip_address, user_ip_address.account_id, user_ip_address.allocated FROM user_ip_address INNER JOIN vlan ON vlan.id=user_ip_address.vlan_db_id WHERE user_ip_address.data_center_id = ? AND vlan.vlan_type=?"); - pstmt.setLong(1, dcId); - pstmt.setString(2, vlanType); - ResultSet rs = pstmt.executeQuery(); - ArrayList allocatedIps = new ArrayList(); - while (rs.next()) { - Object[] ip = new Object[10]; - ip[0] = rs.getLong(1); // id - ip[1] = rs.getString(2); // ip address - ip[2] = rs.getLong(3); // account id - ip[3] = rs.getDate(4); // allocated - allocatedIps.add(ip); + try (PreparedStatement pstmt = + conn.prepareStatement("UPDATE user_ip_address INNER JOIN vlan ON user_ip_address.vlan_db_id=vlan.id SET user_ip_address.source_network_id=vlan.network_id WHERE user_ip_address.data_center_id=? AND vlan.vlan_type=?");) { + pstmt.setLong(1, dcId); + pstmt.setString(2, vlanType); + pstmt.executeUpdate(); } - rs.close(); - pstmt.close(); - - s_logger.debug("Marking " + allocatedIps.size() + " ip addresses to belong to network " + networkId); - s_logger.debug("Updating mac addresses for data center id=" + dcId + ". Found " + allocatedIps.size() + " ip addresses to update"); - - for (Object[] allocatedIp : allocatedIps) { - pstmt = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?"); + try (PreparedStatement pstmt = + conn.prepareStatement("SELECT user_ip_address.id, user_ip_address.public_ip_address, user_ip_address.account_id, user_ip_address.allocated FROM user_ip_address INNER JOIN vlan ON vlan.id=user_ip_address.vlan_db_id WHERE user_ip_address.data_center_id = ? AND vlan.vlan_type=?");) { pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); + pstmt.setString(2, vlanType); + try (ResultSet rs = pstmt.executeQuery();) { + ArrayList allocatedIps = new ArrayList(); + while (rs.next()) { + Object[] ip = new Object[10]; + ip[0] = rs.getLong(1); // id + ip[1] = rs.getString(2); // ip address + ip[2] = rs.getLong(3); // account id + ip[3] = rs.getDate(4); // allocated + allocatedIps.add(ip); + } + s_logger.debug("Marking " + allocatedIps.size() + " ip addresses to belong to network " + networkId); + s_logger.debug("Updating mac addresses for data center id=" + dcId + ". Found " + allocatedIps.size() + " ip addresses to update"); + for (Object[] allocatedIp : allocatedIps) { + try (PreparedStatement selectMacAdresses = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?");) { + selectMacAdresses.setLong(1, dcId); + try (ResultSet selectedMacAdresses = selectMacAdresses.executeQuery();) { + if (!selectedMacAdresses.next()) { + throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); + } + long mac = selectedMacAdresses.getLong(1); + try (PreparedStatement updateDataCenter = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?");) { + updateDataCenter.setLong(1, dcId); + updateDataCenter.executeUpdate(); + } + try (PreparedStatement updateUserIpAddress = conn.prepareStatement("UPDATE user_ip_address SET mac_address=? WHERE id=?");) { + updateUserIpAddress.setLong(1, mac); + updateUserIpAddress.setLong(2, (Long)allocatedIp[0]); + updateUserIpAddress.executeUpdate(); + } + } + } + } } - long mac = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?"); - pstmt.setLong(1, dcId); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE user_ip_address SET mac_address=? WHERE id=?"); - pstmt.setLong(1, mac); - pstmt.setLong(2, (Long)allocatedIp[0]); - pstmt.executeUpdate(); - pstmt.close(); } } protected void upgradePublicUserIpAddress(Connection conn, long dcId, long networkId, String vlanType) throws SQLException { s_logger.debug("Upgrading user ip address for data center " + dcId + " network " + networkId + " vlan type " + vlanType); - PreparedStatement pstmt = - conn.prepareStatement("UPDATE user_ip_address INNER JOIN vlan ON user_ip_address.vlan_db_id=vlan.id SET source_network_id=? WHERE user_ip_address.data_center_id=? AND vlan.vlan_type=?"); - pstmt.setLong(1, networkId); - pstmt.setLong(2, dcId); - pstmt.setString(3, vlanType); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE vlan SET network_id = ? WHERE data_center_id=? AND vlan_type=?"); - pstmt.setLong(1, networkId); - pstmt.setLong(2, dcId); - pstmt.setString(3, vlanType); - pstmt.executeUpdate(); - pstmt.close(); - - pstmt = - conn.prepareStatement("SELECT user_ip_address.id, user_ip_address.public_ip_address, user_ip_address.account_id, user_ip_address.allocated FROM user_ip_address INNER JOIN vlan ON vlan.id=user_ip_address.vlan_db_id WHERE user_ip_address.data_center_id = ? AND vlan.vlan_type='VirtualNetwork'"); - pstmt.setLong(1, dcId); - ResultSet rs = pstmt.executeQuery(); - ArrayList allocatedIps = new ArrayList(); - while (rs.next()) { - Object[] ip = new Object[10]; - ip[0] = rs.getLong(1); // id - ip[1] = rs.getString(2); // ip address - ip[2] = rs.getLong(3); // account id - ip[3] = rs.getDate(4); // allocated - allocatedIps.add(ip); - } - rs.close(); - pstmt.close(); - - for (Object[] allocatedIp : allocatedIps) { - pstmt = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); - } - long mac = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?"); - pstmt.setLong(1, dcId); + try (PreparedStatement pstmt = + conn.prepareStatement("UPDATE user_ip_address INNER JOIN vlan ON user_ip_address.vlan_db_id=vlan.id SET source_network_id=? WHERE user_ip_address.data_center_id=? AND vlan.vlan_type=?");) { + pstmt.setLong(1, networkId); + pstmt.setLong(2, dcId); + pstmt.setString(3, vlanType); pstmt.executeUpdate(); - pstmt.close(); - - Long associatedNetworkId = null; - if (allocatedIp[3] != null && allocatedIp[2] != null) { - pstmt = conn.prepareStatement("SELECT id FROM networks WHERE data_center_id=? AND account_id=?"); - pstmt.setLong(1, dcId); - pstmt.setLong(2, (Long)allocatedIp[2]); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find a network for account " + allocatedIp[2] + " in dc " + dcId); + } + try (PreparedStatement pstmt = conn.prepareStatement("UPDATE vlan SET network_id = ? WHERE data_center_id=? AND vlan_type=?");) { + pstmt.setLong(1, networkId); + pstmt.setLong(2, dcId); + pstmt.setString(3, vlanType); + pstmt.executeUpdate(); + } + try (PreparedStatement pstmt = + conn.prepareStatement("SELECT user_ip_address.id, user_ip_address.public_ip_address, user_ip_address.account_id, user_ip_address.allocated FROM user_ip_address INNER JOIN vlan ON vlan.id=user_ip_address.vlan_db_id WHERE user_ip_address.data_center_id = ? AND vlan.vlan_type='VirtualNetwork'");) { + pstmt.setLong(1, dcId); + try (ResultSet rs = pstmt.executeQuery();) { + ArrayList allocatedIps = new ArrayList(); + while (rs.next()) { + Object[] ip = new Object[10]; + ip[0] = rs.getLong(1); // id + ip[1] = rs.getString(2); // ip address + ip[2] = rs.getLong(3); // account id + ip[3] = rs.getDate(4); // allocated + allocatedIps.add(ip); + } + for (Object[] allocatedIp : allocatedIps) { + try (PreparedStatement selectDataCenterMac = conn.prepareStatement("SELECT mac_address FROM data_center WHERE id = ?");) { + selectDataCenterMac.setLong(1, dcId); + try (ResultSet selectedDataCenterMac = selectDataCenterMac.executeQuery();) { + if (!selectedDataCenterMac.next()) { + throw new CloudRuntimeException("Unable to get mac address for data center " + dcId); + } + long mac = selectedDataCenterMac.getLong(1); + try (PreparedStatement updateDataCenter = conn.prepareStatement("UPDATE data_center SET mac_address=mac_address+1 WHERE id = ?");) { + updateDataCenter.setLong(1, dcId); + updateDataCenter.executeUpdate(); + } + Long associatedNetworkId = null; + if (allocatedIp[3] != null && allocatedIp[2] != null) { + try (PreparedStatement selectNetworks = conn.prepareStatement("SELECT id FROM networks WHERE data_center_id=? AND account_id=?");) { + selectNetworks.setLong(1, dcId); + selectNetworks.setLong(2, (Long)allocatedIp[2]); + try (ResultSet selectedNetworks = selectNetworks.executeQuery();) { + if (!selectedNetworks.next()) { + throw new CloudRuntimeException("Unable to find a network for account " + allocatedIp[2] + " in dc " + dcId); + } + associatedNetworkId = selectedNetworks.getLong(1); + } + } + } + try (PreparedStatement updateUserIpAddress = conn.prepareStatement("UPDATE user_ip_address SET mac_address=?, network_id=? WHERE id=?");) { + updateUserIpAddress.setLong(1, mac); + if (associatedNetworkId != null) { + updateUserIpAddress.setLong(2, associatedNetworkId); + } else { + updateUserIpAddress.setObject(2, null); + } + updateUserIpAddress.setLong(3, (Long)allocatedIp[0]); + updateUserIpAddress.executeUpdate(); + } + } + } } - associatedNetworkId = rs.getLong(1); - rs.close(); - pstmt.close(); } - pstmt = conn.prepareStatement("UPDATE user_ip_address SET mac_address=?, network_id=? WHERE id=?"); - pstmt.setLong(1, mac); - if (associatedNetworkId != null) { - pstmt.setLong(2, associatedNetworkId); - } else { - pstmt.setObject(2, null); - } - pstmt.setLong(3, (Long)allocatedIp[0]); - pstmt.executeUpdate(); - pstmt.close(); } - } protected void upgradeDataCenter(Connection conn) { - PreparedStatement pstmt; - try { - pstmt = conn.prepareStatement("SELECT value FROM configuration WHERE name='direct.attach.untagged.vlan.enabled'"); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT value FROM configuration WHERE name='direct.attach.untagged.vlan.enabled'"); + ResultSet rs = pstmt.executeQuery(); + ) { _basicZone = !rs.next() || Boolean.parseBoolean(rs.getString(1)); - rs.close(); - pstmt.close(); - pstmt = - conn.prepareStatement("UPDATE data_center SET networktype=?, dns_provider=?, gateway_provider=?, firewall_provider=?, dhcp_provider=?, lb_provider=?, vpn_provider=?, userdata_provider=?"); - if (_basicZone) { - pstmt.setString(1, "Basic"); - pstmt.setString(2, "DhcpServer"); - pstmt.setString(3, null); - pstmt.setString(4, null); - pstmt.setString(5, "DhcpServer"); - pstmt.setString(6, null); - pstmt.setString(7, null); - pstmt.setString(8, "DhcpServer"); - } else { - pstmt.setString(1, "Advanced"); - pstmt.setString(2, "VirtualRouter"); - pstmt.setString(3, "VirtualRouter"); - pstmt.setString(4, "VirtualRouter"); - pstmt.setString(5, "VirtualRouter"); - pstmt.setString(6, "VirtualRouter"); - pstmt.setString(7, "VirtualRouter"); - pstmt.setString(8, "VirtualRouter"); - } - pstmt.executeUpdate(); - pstmt.close(); + updateDatacenterWithServices(conn); // For basic zone vnet field should be NULL + updateBasicZoneDataCenterWithVnetAndGuestCidr(conn); - if (_basicZone) { - pstmt = conn.prepareStatement("UPDATE data_center SET vnet=?, guest_network_cidr=?"); - pstmt.setString(1, null); - pstmt.setString(2, null); - pstmt.executeUpdate(); - pstmt.close(); - } + ArrayList dcs = retrieveDataCenters(conn); - pstmt = conn.prepareStatement("SELECT id, guest_network_cidr, domain FROM data_center"); - rs = pstmt.executeQuery(); - ArrayList dcs = new ArrayList(); - while (rs.next()) { - Object[] dc = new Object[10]; - dc[0] = rs.getLong(1); // data center id - dc[1] = rs.getString(2); // guest network cidr - dc[2] = rs.getString(3); // network domain - dcs.add(dc); - } - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SELECT id FROM network_offerings WHERE name='System-Management-Network'"); - rs = pstmt.executeQuery(); - if (!rs.next()) { - s_logger.error("Unable to find the management network offering."); - throw new CloudRuntimeException("Unable to find the management network offering."); - } - long managementNetworkOfferingId = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SELECT id FROM network_offerings WHERE name='System-Public-Network'"); - rs = pstmt.executeQuery(); - if (!rs.next()) { - s_logger.error("Unable to find the public network offering."); - throw new CloudRuntimeException("Unable to find the public network offering."); - } - long publicNetworkOfferingId = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SELECT id FROM network_offerings WHERE name='System-Control-Network'"); - rs = pstmt.executeQuery(); - if (!rs.next()) { - s_logger.error("Unable to find the control network offering."); - throw new CloudRuntimeException("Unable to find the control network offering."); - } - long controlNetworkOfferingId = rs.getLong(1); - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SELECT id FROM network_offerings WHERE name='System-Storage-Network'"); - rs = pstmt.executeQuery(); - if (!rs.next()) { - s_logger.error("Unable to find the storage network offering."); - throw new CloudRuntimeException("Unable to find the storage network offering."); - } - long storageNetworkOfferingId = rs.getLong(1); - rs.close(); - pstmt.close(); + long managementNetworkOfferingId = retrieveNetworkOfferingId(conn,"System-Management-Network"); + long publicNetworkOfferingId = retrieveNetworkOfferingId(conn,"System-Public-Network"); + long controlNetworkOfferingId = retrieveNetworkOfferingId(conn,"System-Control-Network"); + long storageNetworkOfferingId = retrieveNetworkOfferingId(conn,"System-Storage-Network"); if (_basicZone) { for (Object[] dc : dcs) { - Long dcId = (Long)dc[0]; - long mgmtNetworkId = - insertNetwork(conn, "ManagementNetwork" + dcId, "Management Network created for Zone " + dcId, "Management", "Native", null, null, null, - "Static", managementNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - long storageNetworkId = - insertNetwork(conn, "StorageNetwork" + dcId, "Storage Network created for Zone " + dcId, "Storage", "Native", null, null, null, "Static", - storageNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - long controlNetworkId = - insertNetwork(conn, "ControlNetwork" + dcId, "Control Network created for Zone " + dcId, "Control", "LinkLocal", null, - NetUtils.getLinkLocalGateway(), NetUtils.getLinkLocalCIDR(), "Static", controlNetworkOfferingId, dcId, "ControlNetworkGuru", "Setup", 1, 1, - null, null, null, true, null, false, null); - upgradeManagementIpAddress(conn, dcId); - long basicDefaultDirectNetworkId = - insertNetwork(conn, "BasicZoneDirectNetwork" + dcId, "Basic Zone Direct Network created for Zone " + dcId, "Guest", "Native", null, null, null, - "Dhcp", 5, dcId, "DirectPodBasedNetworkGuru", "Setup", 1, 1, null, null, "Direct", true, null, true, null); - - pstmt = conn.prepareStatement("SELECT id FROM vlan WHERE vlan_type='DirectAttached' AND data_center_id=?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - while (rs.next()) { - long vlanId = rs.getLong(1); - - pstmt = conn.prepareStatement("UPDATE vlan SET network_id=? WHERE id=?"); - pstmt.setLong(1, basicDefaultDirectNetworkId); - pstmt.setLong(2, vlanId); - pstmt.executeUpdate(); - pstmt.close(); - } - - upgradeDirectUserIpAddress(conn, dcId, basicDefaultDirectNetworkId, "DirectAttached"); - - // update Dhcp servers information in domain_router and vm_instance tables; all domRs belong to the same - // network - pstmt = - conn.prepareStatement("SELECT vm_instance.id, vm_instance.domain_id, vm_instance.account_id, domain_router.gateway, domain_router.guest_ip_address, domain_router.domain, domain_router.dns1, domain_router.dns2, domain_router.vnet FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - ArrayList routers = new ArrayList(); - while (rs.next()) { - Object[] router = new Object[40]; - router[0] = rs.getLong(1); // router id - router[1] = rs.getString(4); // router gateway which is gonna be gateway for user vms - routers.add(router); - } - rs.close(); - pstmt.close(); - - for (Object[] router : routers) { - s_logger.debug("Updating domR with network id in basic zone id=" + dcId); - pstmt = conn.prepareStatement("UPDATE domain_router SET network_id = ? wHERE id = ? "); - pstmt.setLong(1, basicDefaultDirectNetworkId); - pstmt.setLong(2, (Long)router[0]); - pstmt.executeUpdate(); - pstmt.close(); - - upgradeUserVms(conn, (Long)router[0], basicDefaultDirectNetworkId, (String)router[1], "untagged", "DirectPodBasedNetworkGuru", "Create"); - upgradeDomR(conn, dcId, (Long)router[0], null, basicDefaultDirectNetworkId, controlNetworkId, "Basic", "untagged"); - } - - upgradeSsvm(conn, dcId, basicDefaultDirectNetworkId, mgmtNetworkId, controlNetworkId, "Basic"); - - pstmt = conn.prepareStatement("SELECT vm_instance.id FROM vm_instance WHERE removed IS NULL AND type='ConsoleProxy' AND data_center_id=?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - while (rs.next()) { - upgradeConsoleProxy(conn, dcId, rs.getLong(1), basicDefaultDirectNetworkId, mgmtNetworkId, controlNetworkId, "Basic"); - } - + updateBasicNetworkingDataCenter(conn, managementNetworkOfferingId, controlNetworkOfferingId, storageNetworkOfferingId, dc); } } else { for (Object[] dc : dcs) { - Long dcId = (Long)dc[0]; - long mgmtNetworkId = - insertNetwork(conn, "ManagementNetwork" + dcId, "Management Network created for Zone " + dcId, "Management", "Native", null, null, null, - "Static", managementNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - insertNetwork(conn, "StorageNetwork" + dcId, "Storage Network created for Zone " + dcId, "Storage", "Native", null, null, null, "Static", - storageNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - long controlNetworkId = - insertNetwork(conn, "ControlNetwork" + dcId, "Control Network created for Zone " + dcId, "Control", "Native", null, null, null, "Static", - controlNetworkOfferingId, dcId, "ControlNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - upgradeManagementIpAddress(conn, dcId); - long publicNetworkId = - insertNetwork(conn, "PublicNetwork" + dcId, "Public Network Created for Zone " + dcId, "Public", "Vlan", null, null, null, "Static", - publicNetworkOfferingId, dcId, "PublicNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); - - pstmt = - conn.prepareStatement("SELECT vm_instance.id, vm_instance.domain_id, vm_instance.account_id, domain_router.guest_ip_address, domain_router.domain, domain_router.dns1, domain_router.dns2, domain_router.vnet FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=? and domain_router.role='DHCP_FIREWALL_LB_PASSWD_USERDATA'"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - ArrayList routers = new ArrayList(); - while (rs.next()) { - Object[] router = new Object[40]; - router[0] = rs.getLong(1); // router id - router[1] = rs.getLong(2); // domain id - router[2] = rs.getLong(3); // account id - router[3] = rs.getString(4); // guest ip which becomes the gateway in network - router[4] = rs.getString(5); // domain name - router[5] = rs.getString(6); // dns1 - router[6] = rs.getString(7); // dns2 - router[7] = rs.getString(8); // vnet - routers.add(router); - } - rs.close(); - pstmt.close(); - - for (Object[] router : routers) { - String vnet = (String)router[7]; - String reservationId = null; - String state = "Allocated"; - if (vnet != null) { - reservationId = dcId + "-" + vnet; - state = "Implemented"; - } - - String vlan = null; - if (vnet != null) { - vlan = "vlan://" + vnet; - } - - long virtualNetworkId = - insertNetwork(conn, "VirtualNetwork" + router[0], "Virtual Network for " + router[0], "Guest", "Vlan", vlan, (String)router[3], - (String)dc[1], "Dhcp", 6, dcId, "ExternalGuestNetworkGuru", state, (Long)router[1], (Long)router[2], (String)router[5], - (String)router[6], "Virtual", false, (String)router[4], true, reservationId); - pstmt = conn.prepareStatement("UPDATE domain_router SET network_id = ? wHERE id = ? "); - pstmt.setLong(1, virtualNetworkId); - pstmt.setLong(2, (Long)router[0]); - pstmt.executeUpdate(); - pstmt.close(); - s_logger.debug("Network inserted for " + router[0] + " id = " + virtualNetworkId); - - upgradeUserVms(conn, (Long)router[0], virtualNetworkId, (String)router[3], vnet, "ExternalGuestNetworkGuru", "Start"); - upgradeDomR(conn, dcId, (Long)router[0], publicNetworkId, virtualNetworkId, controlNetworkId, "Advanced", vnet); - } - - upgradePublicUserIpAddress(conn, dcId, publicNetworkId, "VirtualNetwork"); - - // Create direct networks - pstmt = conn.prepareStatement("SELECT id, vlan_id, vlan_gateway, vlan_netmask FROM vlan WHERE vlan_type='DirectAttached' AND data_center_id=?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - HashMap vlanNetworkMap = new HashMap(); - while (rs.next()) { - long vlanId = rs.getLong(1); - String tag = rs.getString(2); - String gateway = rs.getString(3); - String netmask = rs.getString(4); - String cidr = NetUtils.getCidrFromGatewayAndNetmask(gateway, netmask); - - // Get the owner of the network - Long accountId = 1L; - Long domainId = 1L; - boolean isShared = true; - pstmt = conn.prepareStatement("SELECT account_id FROM account_vlan_map WHERE account_id IS NOT NULL AND vlan_db_id=?"); - pstmt.setLong(1, vlanId); - ResultSet accountRs = pstmt.executeQuery(); - while (accountRs.next()) { - isShared = false; - accountId = accountRs.getLong(1); - pstmt = conn.prepareStatement("SELECT domain_id FROM account WHERE id=?"); - pstmt.setLong(1, accountId); - ResultSet domainRs = pstmt.executeQuery(); - while (domainRs.next()) { - domainId = domainRs.getLong(1); - } - } - - if (vlanNetworkMap.get(tag) == null) { - long directNetworkId = - insertNetwork(conn, "DirectNetwork" + vlanId, "Direct network created for " + vlanId, "Guest", "Vlan", "vlan://" + tag, gateway, cidr, - "Dhcp", 7, dcId, "DirectNetworkGuru", "Setup", domainId, accountId, null, null, "Direct", isShared, (String)dc[2], true, null); - vlanNetworkMap.put(tag, directNetworkId); - } - - pstmt = conn.prepareStatement("UPDATE vlan SET network_id=? WHERE id=?"); - pstmt.setLong(1, vlanNetworkMap.get(tag)); - pstmt.setLong(2, vlanId); - pstmt.executeUpdate(); - - pstmt.close(); - - upgradeDirectUserIpAddress(conn, dcId, vlanNetworkMap.get(tag), "DirectAttached"); - s_logger.debug("Created Direct networks and upgraded Direct ip addresses"); - } - - // Create DHCP domRs - Direct networks - pstmt = - conn.prepareStatement("SELECT vm_instance.id, domain_router.guest_ip_address FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=? and domain_router.role='DHCP_USERDATA'"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - ArrayList dhcpServers = new ArrayList(); - while (rs.next()) { - Object[] dhcpServer = new Object[40]; - dhcpServer[0] = rs.getLong(1); // router id - dhcpServer[1] = rs.getString(2); // guest IP address - direct ip address of the domR - dhcpServers.add(dhcpServer); - } - rs.close(); - pstmt.close(); - - for (Object[] dhcpServer : dhcpServers) { - Long routerId = (Long)dhcpServer[0]; - String directIp = (String)dhcpServer[1]; - - pstmt = - conn.prepareStatement("SELECT u.source_network_id, v.vlan_id from user_ip_address u, vlan v where u.public_ip_address=? and v.id=u.vlan_db_id"); - pstmt.setString(1, directIp); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find Direct ip address " + directIp + " in user_ip_address table"); - } - - Long directNetworkId = rs.getLong(1); - String vnet = rs.getString(2); - rs.close(); - - pstmt = conn.prepareStatement("SELECT gateway from networks where id=?"); - pstmt.setLong(1, directNetworkId); - rs = pstmt.executeQuery(); - if (!rs.next()) { - throw new CloudRuntimeException("Unable to find gateway for network id=" + directNetworkId); - } - - String gateway = rs.getString(1); - rs.close(); - - pstmt = conn.prepareStatement("UPDATE domain_router SET network_id = ? wHERE id = ? "); - pstmt.setLong(1, directNetworkId); - pstmt.setLong(2, routerId); - pstmt.executeUpdate(); - pstmt.close(); - s_logger.debug("NetworkId updated for router id=" + routerId + "with network id = " + directNetworkId); - - upgradeUserVms(conn, routerId, directNetworkId, gateway, vnet, "DirectNetworkGuru", "Create"); - s_logger.debug("Upgraded Direct vms in Advance zone id=" + dcId); - upgradeDomR(conn, dcId, routerId, null, directNetworkId, controlNetworkId, "Advanced", vnet); - s_logger.debug("Upgraded Direct domRs in Advance zone id=" + dcId); - } - - // Upgrade SSVM - upgradeSsvm(conn, dcId, publicNetworkId, mgmtNetworkId, controlNetworkId, "Advanced"); - - // Upgrade ConsoleProxy - pstmt = conn.prepareStatement("SELECT vm_instance.id FROM vm_instance WHERE removed IS NULL AND type='ConsoleProxy' AND data_center_id=?"); - pstmt.setLong(1, dcId); - rs = pstmt.executeQuery(); - while (rs.next()) { - upgradeConsoleProxy(conn, dcId, rs.getLong(1), publicNetworkId, mgmtNetworkId, controlNetworkId, "Advanced"); - } - pstmt.close(); + updateAdvancedNetworkingDataCenter(conn, managementNetworkOfferingId, publicNetworkOfferingId, controlNetworkOfferingId, storageNetworkOfferingId, dc); } } @@ -1116,83 +768,624 @@ public class Upgrade218to22 implements DbUpgrade { } } - private void updateUserStats(Connection conn) { - try { + /** + * @param conn + * @throws SQLException + */ + private void updateDatacenterWithServices(Connection conn) throws SQLException { + try (PreparedStatement updateDataCenter = + conn.prepareStatement("UPDATE data_center SET networktype=?, dns_provider=?, gateway_provider=?, firewall_provider=?, dhcp_provider=?, lb_provider=?, vpn_provider=?, userdata_provider=?");) { + if (_basicZone) { + updateDataCenter.setString(1, "Basic"); + updateDataCenter.setString(2, "DhcpServer"); + updateDataCenter.setString(3, null); + updateDataCenter.setString(4, null); + updateDataCenter.setString(5, "DhcpServer"); + updateDataCenter.setString(6, null); + updateDataCenter.setString(7, null); + updateDataCenter.setString(8, "DhcpServer"); + } else { + updateDataCenter.setString(1, "Advanced"); + updateDataCenter.setString(2, "VirtualRouter"); + updateDataCenter.setString(3, "VirtualRouter"); + updateDataCenter.setString(4, "VirtualRouter"); + updateDataCenter.setString(5, "VirtualRouter"); + updateDataCenter.setString(6, "VirtualRouter"); + updateDataCenter.setString(7, "VirtualRouter"); + updateDataCenter.setString(8, "VirtualRouter"); + } + updateDataCenter.executeUpdate(); + } + } - // update device_type information - PreparedStatement pstmt = conn.prepareStatement("UPDATE user_statistics SET device_type='DomainRouter'"); + /** + * @param conn + * @throws SQLException + */ + private void updateBasicZoneDataCenterWithVnetAndGuestCidr(Connection conn) throws SQLException { + if (_basicZone) { + try (PreparedStatement updateDataCenterWithVnetAndGuestCidr = conn.prepareStatement("UPDATE data_center SET vnet=?, guest_network_cidr=?");) { + updateDataCenterWithVnetAndGuestCidr.setString(1, null); + updateDataCenterWithVnetAndGuestCidr.setString(2, null); + updateDataCenterWithVnetAndGuestCidr.executeUpdate(); + } + } + } + + /** + * @param conn + * @return + * @throws SQLException + */ + private ArrayList retrieveDataCenters(Connection conn) throws SQLException { + PreparedStatement selectDcData = conn.prepareStatement("SELECT id, guest_network_cidr, domain FROM data_center"); + ResultSet dcData = selectDcData.executeQuery(); + ArrayList dcs = new ArrayList(); + while (dcData.next()) { + Object[] dc = new Object[10]; + dc[0] = dcData.getLong(1); // data center id + dc[1] = dcData.getString(2); // guest network cidr + dc[2] = dcData.getString(3); // network domain + dcs.add(dc); + } + dcData.close(); + selectDcData.close(); + return dcs; + } + + /** + * @return + * @throws SQLException + * @throws CloudRuntimeException + */ + private long retrieveNetworkOfferingId(Connection conn, String type) throws SQLException, CloudRuntimeException { + long networkOfferingId; + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT id FROM network_offerings WHERE name=?"); + ) { + pstmt.setString(1, type); + try (ResultSet rs = pstmt.executeQuery();) { + if (!rs.next()) { + s_logger.error("Unable to find the network offering for networktype '" + type + "'"); + throw new CloudRuntimeException("Unable to find the storage network offering."); + } + networkOfferingId = rs.getLong(1); + return networkOfferingId; + } + } + } + + /** + * @param conn + * @param managementNetworkOfferingId + * @param controlNetworkOfferingId + * @param storageNetworkOfferingId + * @param dc + * @throws SQLException + */ + private void updateBasicNetworkingDataCenter(Connection conn, long managementNetworkOfferingId, long controlNetworkOfferingId, long storageNetworkOfferingId, Object[] dc) + throws SQLException { + Long dcId = (Long)dc[0]; + long mgmtNetworkId = + insertNetwork(conn, "ManagementNetwork" + dcId, "Management Network created for Zone " + dcId, "Management", "Native", null, null, null, + "Static", managementNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); +// long storageNetworkId = + insertNetwork(conn, "StorageNetwork" + dcId, "Storage Network created for Zone " + dcId, "Storage", "Native", null, null, null, "Static", + storageNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); + long controlNetworkId = + insertNetwork(conn, "ControlNetwork" + dcId, "Control Network created for Zone " + dcId, "Control", "LinkLocal", null, + NetUtils.getLinkLocalGateway(), NetUtils.getLinkLocalCIDR(), "Static", controlNetworkOfferingId, dcId, "ControlNetworkGuru", "Setup", 1, 1, + null, null, null, true, null, false, null); + upgradeManagementIpAddress(conn, dcId); + long basicDefaultDirectNetworkId = + insertNetwork(conn, "BasicZoneDirectNetwork" + dcId, "Basic Zone Direct Network created for Zone " + dcId, "Guest", "Native", null, null, null, + "Dhcp", 5, dcId, "DirectPodBasedNetworkGuru", "Setup", 1, 1, null, null, "Direct", true, null, true, null); + + updateVlanWithNetworkForDataCenter(conn, dcId, basicDefaultDirectNetworkId); + + upgradeDirectUserIpAddress(conn, dcId, basicDefaultDirectNetworkId, "DirectAttached"); + + // update Dhcp servers information in domain_router and vm_instance tables; all domRs belong to the same + // network + retrieveAndUpdateDomainRouters(conn, dcId, controlNetworkId, basicDefaultDirectNetworkId); + upgradeSsvm(conn, dcId, basicDefaultDirectNetworkId, mgmtNetworkId, controlNetworkId, "Basic"); + updateConsoleProxies(conn, dcId, mgmtNetworkId, controlNetworkId, basicDefaultDirectNetworkId, "Basic"); + } + + /** + * @param conn + * @param dcId + * @param controlNetworkId + * @param basicDefaultDirectNetworkId + * @throws SQLException + */ + private void retrieveAndUpdateDomainRouters(Connection conn, Long dcId, long controlNetworkId, long basicDefaultDirectNetworkId) throws SQLException { + try (PreparedStatement selectVmInstanceData = + conn.prepareStatement("SELECT vm_instance.id, vm_instance.domain_id, vm_instance.account_id, domain_router.gateway, domain_router.guest_ip_address, domain_router.domain, domain_router.dns1, domain_router.dns2, domain_router.vnet FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=?");) { + selectVmInstanceData.setLong(1, dcId); + try(ResultSet vmInstanceData = selectVmInstanceData.executeQuery();) { + ArrayList routers = new ArrayList(); + while (vmInstanceData.next()) { + Object[] router = new Object[40]; + router[0] = vmInstanceData.getLong(1); // router id + router[1] = vmInstanceData.getString(4); // router gateway which is gonna be gateway for user vms + routers.add(router); + } + + updateRouters(conn, dcId, controlNetworkId, basicDefaultDirectNetworkId, routers); + } + } + } + + /** + * @param conn + * @param dcId + * @param networkId + * @throws SQLException + */ + private void updateVlanWithNetworkForDataCenter(Connection conn, Long dcId, long networkId) throws SQLException { + try (PreparedStatement selectVlanId = conn.prepareStatement("SELECT id FROM vlan WHERE vlan_type='DirectAttached' AND data_center_id=?");) { + selectVlanId.setLong(1, dcId); + try (ResultSet selectedVlanId = selectVlanId.executeQuery();) { + while (selectedVlanId.next()) { + long vlanId = selectedVlanId.getLong(1); + + updateVlanNetworkForTag(conn, networkId, vlanId); + } + } + } + } + + /** + * @param conn + * @param managementNetworkOfferingId + * @param publicNetworkOfferingId + * @param controlNetworkOfferingId + * @param storageNetworkOfferingId + * @param dc + * @throws SQLException + * @throws CloudRuntimeException + */ + private void updateAdvancedNetworkingDataCenter(Connection conn, long managementNetworkOfferingId, long publicNetworkOfferingId, long controlNetworkOfferingId, + long storageNetworkOfferingId, Object[] dc) throws SQLException, CloudRuntimeException { + Long dcId = (Long)dc[0]; + long mgmtNetworkId = + insertNetwork(conn, "ManagementNetwork" + dcId, "Management Network created for Zone " + dcId, "Management", "Native", null, null, null, + "Static", managementNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); + insertNetwork(conn, "StorageNetwork" + dcId, "Storage Network created for Zone " + dcId, "Storage", "Native", null, null, null, "Static", + storageNetworkOfferingId, dcId, "PodBasedNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); + long controlNetworkId = + insertNetwork(conn, "ControlNetwork" + dcId, "Control Network created for Zone " + dcId, "Control", "Native", null, null, null, "Static", + controlNetworkOfferingId, dcId, "ControlNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); + upgradeManagementIpAddress(conn, dcId); + long publicNetworkId = + insertNetwork(conn, "PublicNetwork" + dcId, "Public Network Created for Zone " + dcId, "Public", "Vlan", null, null, null, "Static", + publicNetworkOfferingId, dcId, "PublicNetworkGuru", "Setup", 1, 1, null, null, null, true, null, false, null); + + ArrayList routers = retrieveRouters(conn, dcId); + + updateRouters(conn, dc, dcId, controlNetworkId, publicNetworkId, routers); + + upgradePublicUserIpAddress(conn, dcId, publicNetworkId, "VirtualNetwork"); + + createDirectNetworks(conn, dc, dcId); + + ArrayList dhcpServers = retrieveDhcpServers(conn, dcId); + + for (Object[] dhcpServer : dhcpServers) { + Long routerId = (Long)dhcpServer[0]; + String directIp = (String)dhcpServer[1]; + + updateDhcpServerData(conn, dcId, controlNetworkId, routerId, directIp); + } + // Upgrade SSVM + upgradeSsvm(conn, dcId, publicNetworkId, mgmtNetworkId, controlNetworkId, "Advanced"); + + updateConsoleProxies(conn, dcId, mgmtNetworkId, controlNetworkId, publicNetworkId, "Advanced"); + } + + /** + * @param dcId + * @return + * @throws SQLException + */ + private ArrayList retrieveRouters(Connection conn, Long dcId) throws SQLException { + ArrayList routers = new ArrayList(); + try (PreparedStatement selectRouterData = + conn.prepareStatement("SELECT vm_instance.id, vm_instance.domain_id, vm_instance.account_id, domain_router.guest_ip_address, domain_router.domain, domain_router.dns1, domain_router.dns2, domain_router.vnet FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=? and domain_router.role='DHCP_FIREWALL_LB_PASSWD_USERDATA'");) { + selectRouterData.setLong(1, dcId); + try (ResultSet routerData = selectRouterData.executeQuery();) { + while (routerData.next()) { + Object[] router = new Object[40]; + router[0] = routerData.getLong(1); // router id + router[1] = routerData.getLong(2); // domain id + router[2] = routerData.getLong(3); // account id + router[3] = routerData.getString(4); // guest ip which becomes the gateway in network + router[4] = routerData.getString(5); // domain name + router[5] = routerData.getString(6); // dns1 + router[6] = routerData.getString(7); // dns2 + router[7] = routerData.getString(8); // vnet + routers.add(router); + } + } + } + return routers; + } + + /** + * @param conn + * @param dc + * @param dcId + * @param controlNetworkId + * @param publicNetworkId + * @param routers + * @throws SQLException + */ + private void updateRouters(Connection conn, Object[] dc, Long dcId, long controlNetworkId, long publicNetworkId, ArrayList routers) throws SQLException { + for (Object[] router : routers) { + updateRouter(conn, dc, dcId, controlNetworkId, publicNetworkId, router); + } + } + /** + * @param conn + * @param dcId + * @param controlNetworkId + * @param basicDefaultDirectNetworkId + * @param routers + * @throws SQLException + */ + private void updateRouters(Connection conn, Long dcId, long controlNetworkId, long basicDefaultDirectNetworkId, ArrayList routers) throws SQLException { + for (Object[] router : routers) { + s_logger.debug("Updating domR with network id in basic zone id=" + dcId); + updateNetworkForRouter(conn, router, basicDefaultDirectNetworkId); + upgradeUserVms(conn, (Long)router[0], basicDefaultDirectNetworkId, (String)router[1], "untagged", "DirectPodBasedNetworkGuru", "Create"); + upgradeDomR(conn, dcId, (Long)router[0], null, basicDefaultDirectNetworkId, controlNetworkId, "Basic", "untagged"); + } + } + + + /** + * @param conn + * @param dc + * @param dcId + * @param controlNetworkId + * @param publicNetworkId + * @param router + * @throws SQLException + */ + private void updateRouter(Connection conn, Object[] dc, Long dcId, long controlNetworkId, long publicNetworkId, Object[] router) throws SQLException { + String vnet = (String)router[7]; + String reservationId = null; + String state = "Allocated"; + if (vnet != null) { + reservationId = dcId + "-" + vnet; + state = "Implemented"; + } + + String vlan = null; + if (vnet != null) { + vlan = "vlan://" + vnet; + } + + long virtualNetworkId = + insertNetwork(conn, "VirtualNetwork" + router[0], "Virtual Network for " + router[0], "Guest", "Vlan", vlan, (String)router[3], + (String)dc[1], "Dhcp", 6, dcId, "ExternalGuestNetworkGuru", state, (Long)router[1], (Long)router[2], (String)router[5], + (String)router[6], "Virtual", false, (String)router[4], true, reservationId); + updateNetworkForRouter(conn, router, virtualNetworkId); + + upgradeUserVms(conn, (Long)router[0], virtualNetworkId, (String)router[3], vnet, "ExternalGuestNetworkGuru", "Start"); + upgradeDomR(conn, dcId, (Long)router[0], publicNetworkId, virtualNetworkId, controlNetworkId, "Advanced", vnet); + } + + /** + * @param router + * @param virtualNetworkId + * @throws SQLException + */ + private void updateNetworkForRouter(Connection conn, Object[] router, long virtualNetworkId) throws SQLException { + try (PreparedStatement updateDomainRouter = conn.prepareStatement("UPDATE domain_router SET network_id = ? WHERE id = ? ");) { + updateDomainRouter.setLong(1, virtualNetworkId); + updateDomainRouter.setLong(2, (Long)router[0]); + updateDomainRouter.executeUpdate(); + } + s_logger.debug("Network inserted for " + router[0] + " id = " + virtualNetworkId); + } + + /** + * @param conn + * @param dc + * @param dcId + * @throws SQLException + */ + private void createDirectNetworks(Connection conn, Object[] dc, Long dcId) throws SQLException { + // Create direct networks + try (PreparedStatement selectVlanData = conn.prepareStatement("SELECT id, vlan_id, vlan_gateway, vlan_netmask FROM vlan WHERE vlan_type='DirectAttached' AND data_center_id=?");) { + selectVlanData.setLong(1, dcId); + try (ResultSet vlanData = selectVlanData.executeQuery();) { + HashMap vlanNetworkMap = new HashMap(); + while (vlanData.next()) { + long vlanId = vlanData.getLong(1); + String tag = vlanData.getString(2); + String gateway = vlanData.getString(3); + String netmask = vlanData.getString(4); + String cidr = NetUtils.getCidrFromGatewayAndNetmask(gateway, netmask); + + // Get the owner of the network + retrieveAccountDataAndCreateNetwork(conn, dc, dcId, vlanNetworkMap, vlanId, tag, gateway, cidr); + + updateNetworkInVlanTableforTag(conn, vlanNetworkMap, vlanId, tag); + + upgradeDirectUserIpAddress(conn, dcId, vlanNetworkMap.get(tag), "DirectAttached"); + s_logger.debug("Created Direct networks and upgraded Direct ip addresses"); + } + } + } + } + + /** + * @param conn + * @param dc + * @param dcId + * @param vlanNetworkMap + * @param vlanId + * @param tag + * @param gateway + * @param cidr + * @throws SQLException + */ + private void retrieveAccountDataAndCreateNetwork(Connection conn, Object[] dc, Long dcId, HashMap vlanNetworkMap, long vlanId, String tag, String gateway, + String cidr) throws SQLException { + Long accountId = 1L; + Long domainId = 1L; + boolean isShared = true; + try (PreparedStatement selectAccountId = conn.prepareStatement("SELECT account_id FROM account_vlan_map WHERE account_id IS NOT NULL AND vlan_db_id=?");) { + selectAccountId.setLong(1, vlanId); + try (ResultSet accountRs = selectAccountId.executeQuery();) { + while (accountRs.next()) { + isShared = false; + accountId = accountRs.getLong(1); + domainId = retrieveDomainId(conn, accountId); + } + } + } + if (vlanNetworkMap.get(tag) == null) { + long directNetworkId = + insertNetwork(conn, "DirectNetwork" + vlanId, "Direct network created for " + vlanId, "Guest", "Vlan", "vlan://" + tag, gateway, cidr, + "Dhcp", 7, dcId, "DirectNetworkGuru", "Setup", domainId, accountId, null, null, "Direct", isShared, (String)dc[2], true, null); + vlanNetworkMap.put(tag, directNetworkId); + } + } + + /** + * @param accountId + * @param domainId + * @return + * @throws SQLException + */ + private Long retrieveDomainId(Connection conn,Long accountId) throws SQLException { + try (PreparedStatement pstmt = conn.prepareStatement("SELECT domain_id FROM account WHERE id=?");) { + pstmt.setLong(1, accountId); + try(ResultSet domainRs = pstmt.executeQuery();) { + Long domainId = 1L; + while (domainRs.next()) { + domainId = domainRs.getLong(1); + } + return domainId; + } + } + } + + /** + * @param basicDefaultDirectNetworkId + * @param vlanId + * @throws SQLException + */ + private void updateVlanNetworkForTag(Connection conn, long basicDefaultDirectNetworkId, long vlanId) throws SQLException { + try (PreparedStatement pstmt = conn.prepareStatement("UPDATE vlan SET network_id=? WHERE id=?");) { + pstmt.setLong(1, basicDefaultDirectNetworkId); + pstmt.setLong(2, vlanId); + pstmt.executeUpdate(); + } + } + + /** + * @param vlanNetworkMap + * @param vlanId + * @param tag + * @throws SQLException + */ + private void updateNetworkInVlanTableforTag(Connection conn, HashMap vlanNetworkMap, long vlanId, String tag) throws SQLException { + updateVlanNetworkForTag(conn, vlanId, vlanNetworkMap.get(tag)); + } + + /** + * @param conn + * @param dcId + * @return + * @throws SQLException + */ + private ArrayList retrieveDhcpServers(Connection conn, Long dcId) throws SQLException { + // Create DHCP domRs - Direct networks + try (PreparedStatement pstmt = + conn.prepareStatement("SELECT vm_instance.id, domain_router.guest_ip_address FROM vm_instance INNER JOIN domain_router ON vm_instance.id=domain_router.id WHERE vm_instance.removed IS NULL AND vm_instance.type='DomainRouter' AND vm_instance.data_center_id=? and domain_router.role='DHCP_USERDATA'");) { + pstmt.setLong(1, dcId); + try (ResultSet rs = pstmt.executeQuery();) { + ArrayList dhcpServers = new ArrayList(); + while (rs.next()) { + Object[] dhcpServer = new Object[40]; + dhcpServer[0] = rs.getLong(1); // router id + dhcpServer[1] = rs.getString(2); // guest IP address - direct ip address of the domR + dhcpServers.add(dhcpServer); + } + return dhcpServers; + } + } + } + + /** + * @param conn + * @param dcId + * @param controlNetworkId + * @param routerId + * @param directIp + * @throws SQLException + * @throws CloudRuntimeException + */ + private void updateDhcpServerData(Connection conn, Long dcId, long controlNetworkId, Long routerId, String directIp) throws SQLException, CloudRuntimeException { + try ( + PreparedStatement pstmt = + conn.prepareStatement("SELECT u.source_network_id, v.vlan_id from user_ip_address u, vlan v where u.public_ip_address=? and v.id=u.vlan_db_id"); + ) { + pstmt.setString(1, directIp); + try (ResultSet rs = pstmt.executeQuery();) { + if (!rs.next()) { + throw new CloudRuntimeException("Unable to find Direct ip address " + directIp + " in user_ip_address table"); + } + + Long directNetworkId = rs.getLong(1); + String vnet = rs.getString(2); + + String gateway = retrieveGateway(conn, directNetworkId); + + updateDomainRouter(conn, routerId, directNetworkId); + s_logger.debug("NetworkId updated for router id=" + routerId + "with network id = " + directNetworkId); + upgradeUserVms(conn, routerId, directNetworkId, gateway, vnet, "DirectNetworkGuru", "Create"); + s_logger.debug("Upgraded Direct vms in Advance zone id=" + dcId); + upgradeDomR(conn, dcId, routerId, null, directNetworkId, controlNetworkId, "Advanced", vnet); + s_logger.debug("Upgraded Direct domRs in Advance zone id=" + dcId); + } + } + } + + /** + * @param conn + * @param directNetworkId + * @return + * @throws SQLException + * @throws CloudRuntimeException + */ + private String retrieveGateway(Connection conn, Long directNetworkId) throws SQLException, CloudRuntimeException { + try (PreparedStatement selectGateway = conn.prepareStatement("SELECT gateway from networks where id=?");) { + selectGateway.setLong(1, directNetworkId); + try (ResultSet rs = selectGateway.executeQuery();) { + if (!rs.next()) { + throw new CloudRuntimeException("Unable to find gateway for network id=" + directNetworkId); + } + String gateway = rs.getString(1); + return gateway; + } + } + } + + /** + * @param routerId + * @param directNetworkId + * @throws SQLException + */ + private void updateDomainRouter(Connection conn, Long routerId, Long directNetworkId) throws SQLException { + try (PreparedStatement updateDomainRouter = conn.prepareStatement("UPDATE domain_router SET network_id = ? WHERE id = ? ");) { + updateDomainRouter.setLong(1, directNetworkId); + updateDomainRouter.setLong(2, routerId); + updateDomainRouter.executeUpdate(); + } + } + + /** + * @param conn + * @param dcId + * @param mgmtNetworkId + * @param controlNetworkId + * @param publicNetworkId + * @throws SQLException + */ + private void updateConsoleProxies(Connection conn, Long dcId, long mgmtNetworkId, long controlNetworkId, long publicNetworkId, String networkingType) throws SQLException { + // Upgrade ConsoleProxy + try (PreparedStatement selectInstanceIds = conn.prepareStatement("SELECT vm_instance.id FROM vm_instance WHERE removed IS NULL AND type='ConsoleProxy' AND data_center_id=?");) { + selectInstanceIds.setLong(1, dcId); + try (ResultSet rs = selectInstanceIds.executeQuery();) { + while (rs.next()) { + upgradeConsoleProxy(conn, dcId, rs.getLong(1), publicNetworkId, mgmtNetworkId, controlNetworkId, networkingType); + } + } + } + } + + private void updateUserStats(Connection conn) { + try ( + // update device_type information + PreparedStatement pstmt = conn.prepareStatement("UPDATE user_statistics SET device_type='DomainRouter'"); + ){ pstmt.executeUpdate(); - pstmt.close(); s_logger.debug("Upgraded userStatistcis with device_type=DomainRouter"); // update device_id infrormation - pstmt = conn.prepareStatement("SELECT id, account_id, data_center_id FROM user_statistics"); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement selectUserStatistics = conn.prepareStatement("SELECT id, account_id, data_center_id FROM user_statistics"); + ResultSet rs = selectUserStatistics.executeQuery(); + ) { + while (rs.next()) { + Long id = rs.getLong(1); // user stats id + Long accountId = rs.getLong(2); // account id + Long dataCenterId = rs.getLong(3); // zone id - while (rs.next()) { - Long id = rs.getLong(1); // user stats id - Long accountId = rs.getLong(2); // account id - Long dataCenterId = rs.getLong(3); // zone id - - pstmt = conn.prepareStatement("SELECT networktype from data_center where id=?"); - pstmt.setLong(1, dataCenterId); - - ResultSet dcSet = pstmt.executeQuery(); - - if (!dcSet.next()) { - s_logger.error("Unable to get data_center information as a part of user_statistics update"); - throw new CloudRuntimeException("Unable to get data_center information as a part of user_statistics update"); - } - - String dataCenterType = dcSet.getString(1); - - if (dataCenterType.equalsIgnoreCase("basic")) { - accountId = 1L; - } - - pstmt = conn.prepareStatement("SELECT id from vm_instance where account_id=? AND data_center_id=? AND type='DomainRouter'"); - pstmt.setLong(1, accountId); - pstmt.setLong(2, dataCenterId); - ResultSet rs1 = pstmt.executeQuery(); - - Long deviceId = 0L; - if (!rs1.next()) { - // check if there are any non-removed user vms existing for this account - // if all vms are expunged, and there is no domR, just skip this record - pstmt = conn.prepareStatement("SELECT * from vm_instance where account_id=? AND data_center_id=? AND removed IS NULL"); - pstmt.setLong(1, accountId); - pstmt.setLong(2, dataCenterId); - ResultSet nonRemovedVms = pstmt.executeQuery(); - - if (nonRemovedVms.next()) { - s_logger.warn("Failed to find domR for for account id=" + accountId + " in zone id=" + dataCenterId + - "; will try to locate domR based on user_vm info"); - //try to get domR information from the user_vm belonging to the account - pstmt = - conn.prepareStatement("SELECT u.domain_router_id from user_vm u, vm_instance v where u.account_id=? AND v.data_center_id=? AND v.removed IS NULL AND u.domain_router_id is NOT NULL"); - pstmt.setLong(1, accountId); - pstmt.setLong(2, dataCenterId); - ResultSet userVmSet = pstmt.executeQuery(); - if (!userVmSet.next()) { - s_logger.warn("Skipping user_statistics upgrade for account id=" + accountId + " in datacenter id=" + dataCenterId); - continue; + try (PreparedStatement selectNetworkType = conn.prepareStatement("SELECT networktype from data_center where id=?");) { + selectNetworkType.setLong(1, dataCenterId); + try (ResultSet dcSet = selectNetworkType.executeQuery();) { + if (!dcSet.next()) { + s_logger.error("Unable to get data_center information as a part of user_statistics update"); + throw new CloudRuntimeException("Unable to get data_center information as a part of user_statistics update"); + } + String dataCenterType = dcSet.getString(1); + if (dataCenterType.equalsIgnoreCase("basic")) { + accountId = 1L; + } + } + } + try (PreparedStatement selectDomainRouterIds = conn.prepareStatement("SELECT id from vm_instance where account_id=? AND data_center_id=? AND type='DomainRouter'");) { + selectDomainRouterIds.setLong(1, accountId); + selectDomainRouterIds.setLong(2, dataCenterId); + try (ResultSet domainRouterIdResult = selectDomainRouterIds.executeQuery();) { + Long deviceId = 0L; + if (!domainRouterIdResult.next()) { + // check if there are any non-removed user vms existing for this account + // if all vms are expunged, and there is no domR, just skip this record + try (PreparedStatement selectnonRemovedVms = conn.prepareStatement("SELECT * from vm_instance where account_id=? AND data_center_id=? AND removed IS NULL");) { + selectnonRemovedVms.setLong(1, accountId); + selectnonRemovedVms.setLong(2, dataCenterId); + try (ResultSet nonRemovedVms = selectnonRemovedVms.executeQuery();) { + if (nonRemovedVms.next()) { + s_logger.warn("Failed to find domR for for account id=" + accountId + " in zone id=" + dataCenterId + + "; will try to locate domR based on user_vm info"); + //try to get domR information from the user_vm belonging to the account + try (PreparedStatement selectNetworkType = + conn.prepareStatement("SELECT u.domain_router_id from user_vm u, vm_instance v where u.account_id=? AND v.data_center_id=? AND v.removed IS NULL AND u.domain_router_id is NOT NULL");) { + selectNetworkType.setLong(1, accountId); + selectNetworkType.setLong(2, dataCenterId); + try (ResultSet userVmSet = selectNetworkType.executeQuery();) { + if (!userVmSet.next()) { + s_logger.warn("Skipping user_statistics upgrade for account id=" + accountId + " in datacenter id=" + dataCenterId); + continue; + } + deviceId = userVmSet.getLong(1); + } + } + } else { + s_logger.debug("Account id=" + accountId + " doesn't own any user vms and domRs, so skipping user_statistics update"); + continue; + } + } + } + } else { + deviceId = domainRouterIdResult.getLong(1); + } + try (PreparedStatement updateUserStatistics = conn.prepareStatement("UPDATE user_statistics SET device_id=? where id=?");) { + updateUserStatistics.setLong(1, deviceId); + updateUserStatistics.setLong(2, id); + updateUserStatistics.executeUpdate(); + } } - deviceId = userVmSet.getLong(1); - } else { - s_logger.debug("Account id=" + accountId + " doesn't own any user vms and domRs, so skipping user_statistics update"); - continue; } - } else { - deviceId = rs1.getLong(1); } - - pstmt = conn.prepareStatement("UPDATE user_statistics SET device_id=? where id=?"); - pstmt.setLong(1, deviceId); - pstmt.setLong(2, id); - pstmt.executeUpdate(); - - pstmt = conn.prepareStatement(""); - } s_logger.debug("Upgraded userStatistcis with deviceId(s)"); @@ -1202,10 +1395,11 @@ public class Upgrade218to22 implements DbUpgrade { } public void upgradePortForwardingRules(Connection conn) { - try { - PreparedStatement pstmt = - conn.prepareStatement("SELECT id, public_ip_address, public_port, private_ip_address, private_port, protocol FROM ip_forwarding WHERE forwarding=1"); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = + conn.prepareStatement("SELECT id, public_ip_address, public_port, private_ip_address, private_port, protocol FROM ip_forwarding WHERE forwarding=1"); + ResultSet rs = pstmt.executeQuery(); + ) { ArrayList rules = new ArrayList(); while (rs.next()) { Object[] rule = new Object[10]; @@ -1217,8 +1411,6 @@ public class Upgrade218to22 implements DbUpgrade { rule[5] = rs.getString(6); // rule protocol rules.add(rule); } - rs.close(); - pstmt.close(); if (!rules.isEmpty()) { s_logger.debug("Found " + rules.size() + " port forwarding rules to upgrade"); @@ -1228,72 +1420,68 @@ public class Upgrade218to22 implements DbUpgrade { String protocol = (String)rule[5]; String publicIp = (String)rule[1]; - pstmt = conn.prepareStatement("SELECT id, account_id, domain_id, network_id FROM user_ip_address WHERE public_ip_address=?"); - pstmt.setString(1, publicIp); - rs = pstmt.executeQuery(); + try (PreparedStatement selectUserIpAddressData = conn.prepareStatement("SELECT id, account_id, domain_id, network_id FROM user_ip_address WHERE public_ip_address=?");) { + selectUserIpAddressData.setString(1, publicIp); + try (ResultSet userIpAddressData = selectUserIpAddressData.executeQuery();) { - if (!rs.next()) { - s_logger.error("Unable to find public IP address " + publicIp); - throw new CloudRuntimeException("Unable to find public IP address " + publicIp); + if (!userIpAddressData.next()) { + s_logger.error("Unable to find public IP address " + publicIp); + throw new CloudRuntimeException("Unable to find public IP address " + publicIp); + } + int ipAddressId = userIpAddressData.getInt(1); + long accountId = userIpAddressData.getLong(2); + long domainId = userIpAddressData.getLong(3); + long networkId = userIpAddressData.getLong(4); + String privateIp = (String)rule[3]; + + // update port_forwarding_rules table + s_logger.trace("Updating port_forwarding_rules table..."); + try (PreparedStatement selectInstanceId = conn.prepareStatement("SELECT instance_id FROM nics where network_id=? AND ip4_address=?");) { + selectInstanceId.setLong(1, networkId); + selectInstanceId.setString(2, privateIp); + try (ResultSet selectedInstanceId = selectInstanceId.executeQuery();) { + + if (!selectedInstanceId.next()) { + // the vm might be expunged already...so just give the warning + s_logger.warn("Unable to find vmId for private ip address " + privateIp + " for account id=" + accountId + "; assume that the vm is expunged"); + // throw new CloudRuntimeException("Unable to find vmId for private ip address " + privateIp + + // " for account id=" + accountId); + } else { + long instanceId = selectedInstanceId.getLong(1); + s_logger.debug("Instance id is " + instanceId); + // update firewall_rules table + s_logger.trace("Updating firewall_rules table as a part of PF rules upgrade..."); + try ( + PreparedStatement insertFirewallRules = + conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'PortForwarding', ?, ?, ?, ?, 0, now())"); + ) { + insertFirewallRules.setLong(1, id); + insertFirewallRules.setInt(2, ipAddressId); + insertFirewallRules.setInt(3, Integer.parseInt(sourcePort.trim())); + insertFirewallRules.setInt(4, Integer.parseInt(sourcePort.trim())); + insertFirewallRules.setString(5, protocol); + insertFirewallRules.setLong(6, accountId); + insertFirewallRules.setLong(7, domainId); + insertFirewallRules.setLong(8, networkId); + insertFirewallRules.setString(9, UUID.randomUUID().toString()); + insertFirewallRules.executeUpdate(); + s_logger.trace("firewall_rules table is updated as a part of PF rules upgrade"); + } + String privatePort = (String)rule[4]; + try (PreparedStatement insertPortForwardingRules = conn.prepareStatement("INSERT INTO port_forwarding_rules VALUES (?, ?, ?, ?, ?)");) { + insertPortForwardingRules.setLong(1, id); + insertPortForwardingRules.setLong(2, instanceId); + insertPortForwardingRules.setString(3, privateIp); + insertPortForwardingRules.setInt(4, Integer.parseInt(privatePort.trim())); + insertPortForwardingRules.setInt(5, Integer.parseInt(privatePort.trim())); + insertPortForwardingRules.executeUpdate(); + } + s_logger.trace("port_forwarding_rules table is updated"); + } + } + } + } } - - int ipAddressId = rs.getInt(1); - long accountId = rs.getLong(2); - long domainId = rs.getLong(3); - long networkId = rs.getLong(4); - String privateIp = (String)rule[3]; - - rs.close(); - pstmt.close(); - - // update port_forwarding_rules table - s_logger.trace("Updating port_forwarding_rules table..."); - pstmt = conn.prepareStatement("SELECT instance_id FROM nics where network_id=? AND ip4_address=?"); - pstmt.setLong(1, networkId); - pstmt.setString(2, privateIp); - rs = pstmt.executeQuery(); - - if (!rs.next()) { - // the vm might be expunged already...so just give the warning - s_logger.warn("Unable to find vmId for private ip address " + privateIp + " for account id=" + accountId + "; assume that the vm is expunged"); - // throw new CloudRuntimeException("Unable to find vmId for private ip address " + privateIp + - // " for account id=" + accountId); - } else { - long instanceId = rs.getLong(1); - s_logger.debug("Instance id is " + instanceId); - // update firewall_rules table - s_logger.trace("Updating firewall_rules table as a part of PF rules upgrade..."); - pstmt = - conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'PortForwarding', ?, ?, ?, ?, 0, now())"); - pstmt.setLong(1, id); - pstmt.setInt(2, ipAddressId); - pstmt.setInt(3, Integer.parseInt(sourcePort.trim())); - pstmt.setInt(4, Integer.parseInt(sourcePort.trim())); - pstmt.setString(5, protocol); - pstmt.setLong(6, accountId); - pstmt.setLong(7, domainId); - pstmt.setLong(8, networkId); - pstmt.setString(9, UUID.randomUUID().toString()); - pstmt.executeUpdate(); - pstmt.close(); - s_logger.trace("firewall_rules table is updated as a part of PF rules upgrade"); - - rs.close(); - pstmt.close(); - - String privatePort = (String)rule[4]; - pstmt = conn.prepareStatement("INSERT INTO port_forwarding_rules VALUES (?, ?, ?, ?, ?)"); - pstmt.setLong(1, id); - pstmt.setLong(2, instanceId); - pstmt.setString(3, privateIp); - pstmt.setInt(4, Integer.parseInt(privatePort.trim())); - pstmt.setInt(5, Integer.parseInt(privatePort.trim())); - pstmt.executeUpdate(); - pstmt.close(); - s_logger.trace("port_forwarding_rules table is updated"); - - } - } } s_logger.debug("Port forwarding rules are updated"); @@ -1303,9 +1491,10 @@ public class Upgrade218to22 implements DbUpgrade { } public void upgradeLoadBalancingRules(Connection conn) { - try { - PreparedStatement pstmt = conn.prepareStatement("SELECT name, ip_address, public_port, private_port, algorithm, id FROM load_balancer"); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT name, ip_address, public_port, private_port, algorithm, id FROM load_balancer"); + ResultSet rs = pstmt.executeQuery(); + ) { ArrayList lbs = new ArrayList(); while (rs.next()) { Object[] lb = new Object[10]; @@ -1317,20 +1506,18 @@ public class Upgrade218to22 implements DbUpgrade { lb[5] = rs.getLong(6); // lb Id lbs.add(lb); } - rs.close(); - pstmt.close(); if (!lbs.isEmpty()) { s_logger.debug("Found " + lbs.size() + " lb rules to upgrade"); - pstmt = conn.prepareStatement("SELECT id FROM firewall_rules order by id"); - rs = pstmt.executeQuery(); long newLbId = 0; - while (rs.next()) { - newLbId = rs.getLong(1); + try ( + PreparedStatement selectFWRules = conn.prepareStatement("SELECT max(id) FROM firewall_rules order by id"); + ResultSet fwRules = selectFWRules.executeQuery(); + ) { + if (rs.next()) { + newLbId = rs.getLong(1); + } } - rs.close(); - pstmt.close(); - for (Object[] lb : lbs) { String name = (String)lb[0]; String publicIp = (String)lb[1]; @@ -1340,81 +1527,80 @@ public class Upgrade218to22 implements DbUpgrade { Long originalLbId = (Long)lb[5]; newLbId = newLbId + 1; - pstmt = conn.prepareStatement("SELECT id, account_id, domain_id, network_id FROM user_ip_address WHERE public_ip_address=?"); - pstmt.setString(1, publicIp); - rs = pstmt.executeQuery(); + try (PreparedStatement selectIpData = conn.prepareStatement("SELECT id, account_id, domain_id, network_id FROM user_ip_address WHERE public_ip_address=?");) { + selectIpData.setString(1, publicIp); + try (ResultSet ipData = selectIpData.executeQuery();) { - if (!rs.next()) { - s_logger.warn("Unable to find public IP address " + publicIp + "; skipping lb rule id=" + originalLbId + - " from update. Cleaning it up from load_balancer_vm_map and load_balancer table"); - pstmt = conn.prepareStatement("DELETE from load_balancer_vm_map where load_balancer_id=?"); - pstmt.setLong(1, originalLbId); - pstmt.executeUpdate(); - - pstmt = conn.prepareStatement("DELETE from load_balancer where id=?"); - pstmt.setLong(1, originalLbId); - pstmt.executeUpdate(); - - continue; + if (!ipData.next()) { + s_logger.warn("Unable to find public IP address " + publicIp + "; skipping lb rule id=" + originalLbId + + " from update. Cleaning it up from load_balancer_vm_map and load_balancer table"); + try (PreparedStatement deleteLbVmMap = conn.prepareStatement("DELETE from load_balancer_vm_map where load_balancer_id=?");) { + deleteLbVmMap.setLong(1, originalLbId); + deleteLbVmMap.executeUpdate(); + } + try (PreparedStatement deleteLoadBalancer = conn.prepareStatement("DELETE from load_balancer where id=?");) { + deleteLoadBalancer.setLong(1, originalLbId); + deleteLoadBalancer.executeUpdate(); + } + continue; + } + int ipAddressId = ipData.getInt(1); + long accountId = ipData.getLong(2); + long domainId = ipData.getLong(3); + long networkId = ipData.getLong(4); + // update firewall_rules table + s_logger.trace("Updating firewall_rules table as a part of LB rules upgrade..."); + try (PreparedStatement insertFirewallRules = + conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'LoadBalancing', ?, ?, ?, ?, 0, now())");) { + insertFirewallRules.setLong(1, newLbId); + insertFirewallRules.setInt(2, ipAddressId); + insertFirewallRules.setInt(3, Integer.parseInt(sourcePort)); + insertFirewallRules.setInt(4, Integer.parseInt(sourcePort)); + insertFirewallRules.setString(5, "tcp"); + insertFirewallRules.setLong(6, accountId); + insertFirewallRules.setLong(7, domainId); + insertFirewallRules.setLong(8, networkId); + insertFirewallRules.setString(9, UUID.randomUUID().toString()); + insertFirewallRules.executeUpdate(); + } + s_logger.trace("firewall_rules table is updated as a part of LB rules upgrade"); + } } - int ipAddressId = rs.getInt(1); - long accountId = rs.getLong(2); - long domainId = rs.getLong(3); - long networkId = rs.getLong(4); - - rs.close(); - pstmt.close(); - - // update firewall_rules table - s_logger.trace("Updating firewall_rules table as a part of LB rules upgrade..."); - pstmt = - conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'LoadBalancing', ?, ?, ?, ?, 0, now())"); - pstmt.setLong(1, newLbId); - pstmt.setInt(2, ipAddressId); - pstmt.setInt(3, Integer.parseInt(sourcePort)); - pstmt.setInt(4, Integer.parseInt(sourcePort)); - pstmt.setString(5, "tcp"); - pstmt.setLong(6, accountId); - pstmt.setLong(7, domainId); - pstmt.setLong(8, networkId); - pstmt.setString(9, UUID.randomUUID().toString()); - pstmt.executeUpdate(); - pstmt.close(); - s_logger.trace("firewall_rules table is updated as a part of LB rules upgrade"); // update load_balancing_rules s_logger.trace("Updating load_balancing_rules table as a part of LB rules upgrade..."); - pstmt = conn.prepareStatement("INSERT INTO load_balancing_rules VALUES (?, ?, NULL, ?, ?, ?)"); - pstmt.setLong(1, newLbId); - pstmt.setString(2, name); - pstmt.setInt(3, Integer.parseInt(destPort)); - pstmt.setInt(4, Integer.parseInt(destPort)); - pstmt.setString(5, algorithm); - pstmt.executeUpdate(); - pstmt.close(); + try (PreparedStatement insertLoadBalancer = conn.prepareStatement("INSERT INTO load_balancing_rules VALUES (?, ?, NULL, ?, ?, ?)");) { + insertLoadBalancer.setLong(1, newLbId); + insertLoadBalancer.setString(2, name); + insertLoadBalancer.setInt(3, Integer.parseInt(destPort)); + insertLoadBalancer.setInt(4, Integer.parseInt(destPort)); + insertLoadBalancer.setString(5, algorithm); + insertLoadBalancer.executeUpdate(); + } s_logger.trace("load_balancing_rules table is updated as a part of LB rules upgrade"); // update load_balancer_vm_map table s_logger.trace("Updating load_balancer_vm_map table as a part of LB rules upgrade..."); - pstmt = conn.prepareStatement("SELECT instance_id FROM load_balancer_vm_map WHERE load_balancer_id=?"); - pstmt.setLong(1, originalLbId); - rs = pstmt.executeQuery(); - ArrayList lbMaps = new ArrayList(); - while (rs.next()) { - Object[] lbMap = new Object[10]; - lbMap[0] = rs.getLong(1); // instanceId - lbMaps.add(lbMap); + try ( + PreparedStatement selectInstance = conn.prepareStatement("SELECT instance_id FROM load_balancer_vm_map WHERE load_balancer_id=?"); + ) { + selectInstance.setLong(1, originalLbId); + try (ResultSet selectedInstance = selectInstance.executeQuery();) { + ArrayList lbMaps = new ArrayList(); + while (selectedInstance.next()) { + Object[] lbMap = new Object[10]; + lbMap[0] = selectedInstance.getLong(1); // instanceId + lbMaps.add(lbMap); + } + } } - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("UPDATE load_balancer_vm_map SET load_balancer_id=? WHERE load_balancer_id=?"); - pstmt.setLong(1, newLbId); - pstmt.setLong(2, originalLbId); - pstmt.executeUpdate(); - pstmt.close(); + try (PreparedStatement updateLoadBalancer = conn.prepareStatement("UPDATE load_balancer_vm_map SET load_balancer_id=? WHERE load_balancer_id=?");) { + updateLoadBalancer.setLong(1, newLbId); + updateLoadBalancer.setLong(2, originalLbId); + updateLoadBalancer.executeUpdate(); + } s_logger.trace("load_balancer_vm_map table is updated as a part of LB rules upgrade"); } } @@ -1425,71 +1611,73 @@ public class Upgrade218to22 implements DbUpgrade { } private void upgradeHostMemoryCapacityInfo(Connection conn) { - try { - // count user_vm memory info (M Bytes) - PreparedStatement pstmt = - conn.prepareStatement("select h.id, sum(s.ram_size) from host h, vm_instance v, service_offering s where h.type='Routing' and v.state='Running' and v.`type`='User' and v.host_id=h.id and v.service_offering_id = s.id group by h.id"); + Map hostUsedMemoryInfo = new HashMap(); + // count user_vm memory info (M Bytes) + try ( + PreparedStatement pstmt = + conn.prepareStatement("select h.id, sum(s.ram_size) from host h, vm_instance v, service_offering s where h.type='Routing' and v.state='Running' and v.`type`='User' and v.host_id=h.id and v.service_offering_id = s.id group by h.id"); - ResultSet rs = pstmt.executeQuery(); - Map hostUsedMemoryInfo = new HashMap(); + ResultSet rs = pstmt.executeQuery(); + ) { while (rs.next()) { hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2)); } - rs.close(); - pstmt.close(); - int proxyRamSize = NumbersUtil.parseInt(getConfigValue(conn, "consoleproxy.ram.size"), 1024); // ConsoleProxyManager.DEFAULT_PROXY_VM_RAMSIZE); int domrRamSize = NumbersUtil.parseInt(getConfigValue(conn, "router.ram.size"), 128); // VpcVirtualNetworkApplianceManager.DEFAULT_ROUTER_VM_RAMSIZE); int ssvmRamSize = NumbersUtil.parseInt(getConfigValue(conn, "secstorage.vm.ram.size"), 256); // SecondaryStorageVmManager.DEFAULT_SS_VM_RAMSIZE); - pstmt = + try( + PreparedStatement selectConsoleProxyHostInfo = conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='ConsoleProxy' and v.host_id=h.id group by h.id"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedMemoryInfo.get(rs.getLong(1)) != null) { - Long usedMem = hostUsedMemoryInfo.get(rs.getLong(1)); - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * proxyRamSize + usedMem); - } else { - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * proxyRamSize); + ResultSet consoleProxyHostInfo = selectConsoleProxyHostInfo.executeQuery(); + ) { + while (consoleProxyHostInfo.next()) { + if (hostUsedMemoryInfo.get(consoleProxyHostInfo.getLong(1)) != null) { + Long usedMem = hostUsedMemoryInfo.get(consoleProxyHostInfo.getLong(1)); + hostUsedMemoryInfo.put(consoleProxyHostInfo.getLong(1), consoleProxyHostInfo.getLong(2) * proxyRamSize + usedMem); + } else { + hostUsedMemoryInfo.put(consoleProxyHostInfo.getLong(1), consoleProxyHostInfo.getLong(2) * proxyRamSize); + } } } - rs.close(); - pstmt.close(); - pstmt = + try ( + PreparedStatement selectDomainRouterHostInfo = conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='DomainRouter' and v.host_id=h.id group by h.id"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedMemoryInfo.get(rs.getLong(1)) != null) { - Long usedMem = hostUsedMemoryInfo.get(rs.getLong(1)); - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * domrRamSize + usedMem); - } else { - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * domrRamSize); + ResultSet domainrouterHostInfo = selectDomainRouterHostInfo.executeQuery(); + ) { + while (domainrouterHostInfo.next()) { + if (hostUsedMemoryInfo.get(domainrouterHostInfo.getLong(1)) != null) { + Long usedMem = hostUsedMemoryInfo.get(domainrouterHostInfo.getLong(1)); + hostUsedMemoryInfo.put(domainrouterHostInfo.getLong(1), domainrouterHostInfo.getLong(2) * domrRamSize + usedMem); + } else { + hostUsedMemoryInfo.put(domainrouterHostInfo.getLong(1), domainrouterHostInfo.getLong(2) * domrRamSize); + } } } - rs.close(); - pstmt.close(); - pstmt = + try ( + PreparedStatement selectSsvmHostInfo = conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='SecondaryStorageVm' and v.host_id=h.id group by h.id"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedMemoryInfo.get(rs.getLong(1)) != null) { - Long usedMem = hostUsedMemoryInfo.get(rs.getLong(1)); - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * ssvmRamSize + usedMem); - } else { - hostUsedMemoryInfo.put(rs.getLong(1), rs.getLong(2) * ssvmRamSize); + ResultSet ssvmHostInfo = selectSsvmHostInfo.executeQuery(); + ) { + while (ssvmHostInfo.next()) { + if (hostUsedMemoryInfo.get(ssvmHostInfo.getLong(1)) != null) { + Long usedMem = hostUsedMemoryInfo.get(ssvmHostInfo.getLong(1)); + hostUsedMemoryInfo.put(ssvmHostInfo.getLong(1), ssvmHostInfo.getLong(2) * ssvmRamSize + usedMem); + } else { + hostUsedMemoryInfo.put(ssvmHostInfo.getLong(1), ssvmHostInfo.getLong(2) * ssvmRamSize); + } } } - rs.close(); - pstmt.close(); for (Map.Entry entry : hostUsedMemoryInfo.entrySet()) { - pstmt = conn.prepareStatement("update op_host_capacity set used_capacity=? where host_id=? and capacity_type=0"); - pstmt.setLong(1, entry.getValue() * 1024 * 1024); - pstmt.setLong(2, entry.getKey()); + try (PreparedStatement updateHostCapacity = conn.prepareStatement("update op_host_capacity set used_capacity=? where host_id=? and capacity_type=0");) { + updateHostCapacity.setLong(1, entry.getValue() * 1024 * 1024); + updateHostCapacity.setLong(2, entry.getKey()); - pstmt.executeUpdate(); + updateHostCapacity.executeUpdate(); + } } } catch (SQLException e) { @@ -1585,12 +1773,13 @@ public class Upgrade218to22 implements DbUpgrade { } private void upgradeHostCpuCapacityInfo(Connection conn) { - try { - // count user_vm memory info (M Bytes) - PreparedStatement pstmt = - conn.prepareStatement("select h.id, sum(s.speed*s.cpu) from host h, vm_instance v, service_offering s where h.type='Routing' and v.state='Running' and v.`type`='User' and v.host_id=h.id and v.service_offering_id = s.id group by h.id"); + // count user_vm memory info (M Bytes) + try ( + PreparedStatement pstmt = + conn.prepareStatement("select h.id, sum(s.speed*s.cpu) from host h, vm_instance v, service_offering s where h.type='Routing' and v.state='Running' and v.`type`='User' and v.host_id=h.id and v.service_offering_id = s.id group by h.id"); - ResultSet rs = pstmt.executeQuery(); + ResultSet rs = pstmt.executeQuery(); + ) { Map hostUsedCpuInfo = new HashMap(); while (rs.next()) { hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2)); @@ -1602,55 +1791,58 @@ public class Upgrade218to22 implements DbUpgrade { int domrCpuMhz = NumbersUtil.parseInt(getConfigValue(conn, "router.cpu.mhz"), 500); // VpcVirtualNetworkApplianceManager.DEFAULT_ROUTER_CPU_MHZ); int ssvmCpuMhz = NumbersUtil.parseInt(getConfigValue(conn, "secstorage.vm.cpu.mhz"), 500); // SecondaryStorageVmManager.DEFAULT_SS_VM_CPUMHZ); - pstmt = - conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='ConsoleProxy' and v.host_id=h.id group by h.id"); - - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedCpuInfo.get(rs.getLong(1)) != null) { - Long usedCpuMhz = hostUsedCpuInfo.get(rs.getLong(1)); - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * proxyCpuMhz + usedCpuMhz); - } else { - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * proxyCpuMhz); + try ( + PreparedStatement getHostCpuInfo = + conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='ConsoleProxy' and v.host_id=h.id group by h.id"); + ResultSet hostCpuInfoData = getHostCpuInfo.executeQuery(); + ) { + while (hostCpuInfoData.next()) { + if (hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)) != null) { + Long usedCpuMhz = hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)); + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * proxyCpuMhz + usedCpuMhz); + } else { + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * proxyCpuMhz); + } } } - rs.close(); - pstmt.close(); - pstmt = - conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='DomainRouter' and v.host_id=h.id group by h.id"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedCpuInfo.get(rs.getLong(1)) != null) { - Long usedCpuMhz = hostUsedCpuInfo.get(rs.getLong(1)); - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * domrCpuMhz + usedCpuMhz); - } else { - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * domrCpuMhz); + try ( + PreparedStatement getHostCpuInfo = + conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='DomainRouter' and v.host_id=h.id group by h.id"); + ResultSet hostCpuInfoData = getHostCpuInfo.executeQuery(); + ) { + while (hostCpuInfoData.next()) { + if (hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)) != null) { + Long usedCpuMhz = hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)); + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * domrCpuMhz + usedCpuMhz); + } else { + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * domrCpuMhz); + } } } - rs.close(); - pstmt.close(); - pstmt = - conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='SecondaryStorageVm' and v.host_id=h.id group by h.id"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if (hostUsedCpuInfo.get(rs.getLong(1)) != null) { - Long usedCpuMhz = hostUsedCpuInfo.get(rs.getLong(1)); - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * ssvmCpuMhz + usedCpuMhz); - } else { - hostUsedCpuInfo.put(rs.getLong(1), rs.getLong(2) * ssvmCpuMhz); + try ( + PreparedStatement getHostCpuInfo = + conn.prepareStatement("select h.id, count(v.id) from host h, vm_instance v where h.type='Routing' and v.state='Running' and v.`type`='SecondaryStorageVm' and v.host_id=h.id group by h.id"); + ResultSet hostCpuInfoData = getHostCpuInfo.executeQuery(); + ) { + while (hostCpuInfoData.next()) { + if (hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)) != null) { + Long usedCpuMhz = hostUsedCpuInfo.get(hostCpuInfoData.getLong(1)); + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * ssvmCpuMhz + usedCpuMhz); + } else { + hostUsedCpuInfo.put(hostCpuInfoData.getLong(1), hostCpuInfoData.getLong(2) * ssvmCpuMhz); + } } } - rs.close(); - pstmt.close(); for (Map.Entry entry : hostUsedCpuInfo.entrySet()) { - pstmt = conn.prepareStatement("update op_host_capacity set used_capacity=? where host_id=? and capacity_type=1"); - pstmt.setLong(1, entry.getValue()); - pstmt.setLong(2, entry.getKey()); + try (PreparedStatement updateHostCapacity = conn.prepareStatement("update op_host_capacity set used_capacity=? where host_id=? and capacity_type=1");) { + updateHostCapacity.setLong(1, entry.getValue()); + updateHostCapacity.setLong(2, entry.getKey()); - pstmt.executeUpdate(); + updateHostCapacity.executeUpdate(); + } } } catch (SQLException e) { throw new CloudRuntimeException("Can't upgrade host capacity info ", e); @@ -1658,29 +1850,29 @@ public class Upgrade218to22 implements DbUpgrade { } private String getConfigValue(Connection conn, String name) { - try { + try ( + PreparedStatement pstmt = conn.prepareStatement("select value from configuration where name=?"); + ) { // count user_vm memory info (M Bytes) - PreparedStatement pstmt = conn.prepareStatement("select value from configuration where name=?"); pstmt.setString(1, name); - ResultSet rs = pstmt.executeQuery(); + try (ResultSet rs = pstmt.executeQuery();) { - String val = null; - if (rs.next()) { - val = rs.getString(1); + String val = null; + if (rs.next()) { + val = rs.getString(1); + } + return val; } - rs.close(); - pstmt.close(); - - return val; } catch (SQLException e) { throw new CloudRuntimeException("Can't upgrade host capacity info ", e); } } private void migrateEvents(Connection conn) { - try { - PreparedStatement pstmt1 = conn.prepareStatement("SHOW DATABASES LIKE 'cloud_usage'"); - ResultSet rs1 = pstmt1.executeQuery(); + try ( + PreparedStatement pstmt1 = conn.prepareStatement("SHOW DATABASES LIKE 'cloud_usage'"); + ResultSet rs1 = pstmt1.executeQuery(); + ) { if (!rs1.next()) { s_logger.debug("cloud_usage db doesn't exist. Skipping events migration"); return; @@ -1696,25 +1888,25 @@ public class Upgrade218to22 implements DbUpgrade { sql = "SELECT type, description, user_id, account_id, created, level, parameters FROM cloud.event vmevt WHERE vmevt.state = 'Completed' "; } - PreparedStatement pstmt = null; - - pstmt = conn.prepareStatement(sql); - int i = 1; - if (lastProcessedEvent != null) { - pstmt.setLong(i++, lastProcessedEvent); - } - ResultSet rs = pstmt.executeQuery(); - s_logger.debug("Begin Migrating events"); - while (rs.next()) { - EventVO event = new EventVO(); - event.setType(rs.getString(1)); - event.setDescription(rs.getString(2)); - event.setUserId(rs.getLong(3)); - event.setAccountId(rs.getLong(4)); - event.setCreatedDate(DateUtil.parseDateString(TimeZone.getTimeZone("GMT"), rs.getString(5))); - event.setLevel(rs.getString(6)); - event.setParameters(rs.getString(7)); - convertEvent(event, conn); + try (PreparedStatement pstmt = conn.prepareStatement(sql);) { + int i = 1; + if (lastProcessedEvent != null) { + pstmt.setLong(i++, lastProcessedEvent); + } + try (ResultSet rs = pstmt.executeQuery();) { + s_logger.debug("Begin Migrating events"); + while (rs.next()) { + EventVO event = new EventVO(); + event.setType(rs.getString(1)); + event.setDescription(rs.getString(2)); + event.setUserId(rs.getLong(3)); + event.setAccountId(rs.getLong(4)); + event.setCreatedDate(DateUtil.parseDateString(TimeZone.getTimeZone("GMT"), rs.getString(5))); + event.setLevel(rs.getString(6)); + event.setParameters(rs.getString(7)); + convertEvent(event, conn); + } + } } s_logger.debug("Migrating events completed"); } catch (Exception e) { @@ -1723,11 +1915,10 @@ public class Upgrade218to22 implements DbUpgrade { } private Long getMostRecentEvent(Connection conn) { - PreparedStatement pstmt = null; - String sql = "SELECT id FROM cloud_usage.event ORDER BY created DESC LIMIT 1"; - try { - pstmt = conn.prepareStatement(sql); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT id FROM cloud_usage.event ORDER BY created DESC LIMIT 1"); + ResultSet rs = pstmt.executeQuery(); + ) { if (rs.next()) { return rs.getLong(1); } @@ -1767,34 +1958,35 @@ public class Upgrade218to22 implements DbUpgrade { usageEvent.setZoneId(0); } // update firewall_rules table - PreparedStatement pstmt = null; - pstmt = - conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id, usage_event.resource_name," - + " usage_event.offering_id, usage_event.template_id, usage_event.size) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); - pstmt.setString(1, usageEvent.getType()); - pstmt.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), usageEvent.getCreateDate())); - pstmt.setLong(3, usageEvent.getAccountId()); - pstmt.setLong(4, usageEvent.getZoneId()); - pstmt.setLong(5, usageEvent.getResourceId()); - pstmt.setString(6, usageEvent.getResourceName()); - if (usageEvent.getOfferingId() != null) { - pstmt.setLong(7, usageEvent.getOfferingId()); - } else { - pstmt.setNull(7, Types.BIGINT); + try ( + PreparedStatement pstmt = + conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id, usage_event.resource_name," + + " usage_event.offering_id, usage_event.template_id, usage_event.size) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); + ) { + pstmt.setString(1, usageEvent.getType()); + pstmt.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), usageEvent.getCreateDate())); + pstmt.setLong(3, usageEvent.getAccountId()); + pstmt.setLong(4, usageEvent.getZoneId()); + pstmt.setLong(5, usageEvent.getResourceId()); + pstmt.setString(6, usageEvent.getResourceName()); + if (usageEvent.getOfferingId() != null) { + pstmt.setLong(7, usageEvent.getOfferingId()); + } else { + pstmt.setNull(7, Types.BIGINT); + } + if (usageEvent.getTemplateId() != null) { + pstmt.setLong(8, usageEvent.getTemplateId()); + } else { + pstmt.setNull(8, Types.BIGINT); + } + if (usageEvent.getSize() != null) { + pstmt.setLong(9, usageEvent.getSize()); + } else { + pstmt.setNull(9, Types.BIGINT); + } + // pstmt.setString(10, usageEvent.getResourceType()); + pstmt.executeUpdate(); } - if (usageEvent.getTemplateId() != null) { - pstmt.setLong(8, usageEvent.getTemplateId()); - } else { - pstmt.setNull(8, Types.BIGINT); - } - if (usageEvent.getSize() != null) { - pstmt.setLong(9, usageEvent.getSize()); - } else { - pstmt.setNull(9, Types.BIGINT); - } - // pstmt.setString(10, usageEvent.getResourceType()); - pstmt.executeUpdate(); - pstmt.close(); } } @@ -1840,13 +2032,6 @@ public class Upgrade218to22 implements DbUpgrade { return (eventType.equals(EventTypes.EVENT_SNAPSHOT_CREATE) || eventType.equals(EventTypes.EVENT_SNAPSHOT_DELETE)); } - private boolean isLoadBalancerEvent(String eventType) { - if (eventType == null) { - return false; - } - return eventType.startsWith("LB."); - } - private UsageEventVO convertVMEvent(EventVO event) throws IOException { Properties vmEventParams = new Properties(); @@ -1903,23 +2088,23 @@ public class Upgrade218to22 implements DbUpgrade { // Get ip address information Long ipId = 0L; Long zoneId = 0L; - PreparedStatement pstmt = conn.prepareStatement("SELECT id, data_center_id from user_ip_address where public_ip_address=?"); - pstmt.setString(1, ipAddress); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) { - ipId = rs.getLong(1); - zoneId = rs.getLong(2); - } - rs.close(); - pstmt.close(); + try (PreparedStatement pstmt = conn.prepareStatement("SELECT id, data_center_id from user_ip_address where public_ip_address=?");) { + pstmt.setString(1, ipAddress); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs.next()) { + ipId = rs.getLong(1); + zoneId = rs.getLong(2); + } - boolean isSourceNat = Boolean.parseBoolean(ipEventParams.getProperty("sourceNat")); + boolean isSourceNat = Boolean.parseBoolean(ipEventParams.getProperty("sourceNat")); - if (EventTypes.EVENT_NET_IP_ASSIGN.equals(event.getType())) { - zoneId = Long.parseLong(ipEventParams.getProperty("dcId")); - usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat, "", false); - } else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) { - usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat, "", false); + if (EventTypes.EVENT_NET_IP_ASSIGN.equals(event.getType())) { + zoneId = Long.parseLong(ipEventParams.getProperty("dcId")); + usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_ASSIGN, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat, "", false); + } else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) { + usageEvent = new UsageEventVO(EventTypes.EVENT_NET_IP_RELEASE, event.getAccountId(), zoneId, ipId, ipAddress, isSourceNat, "", false); + } + } } return usageEvent; } @@ -1951,21 +2136,19 @@ public class Upgrade218to22 implements DbUpgrade { // Get volume name information String volumeName = ""; - PreparedStatement pstmt = conn.prepareStatement("SELECT name, data_center_id from volumes where id=?"); - pstmt.setLong(1, volId); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) { - volumeName = rs.getString(1); - zoneId = rs.getLong(2); - } - rs.close(); - pstmt.close(); - - if (EventTypes.EVENT_VOLUME_CREATE.equals(event.getType())) { - usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_CREATE, event.getAccountId(), zoneId, volId, volumeName, doId, templateId, size); - } else if (EventTypes.EVENT_VOLUME_DELETE.equals(event.getType())) { - usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE, event.getAccountId(), zoneId, volId, volumeName); - + try(PreparedStatement pstmt = conn.prepareStatement("SELECT name, data_center_id from volumes where id=?");) { + pstmt.setLong(1, volId); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs.next()) { + volumeName = rs.getString(1); + zoneId = rs.getLong(2); + } + if (EventTypes.EVENT_VOLUME_CREATE.equals(event.getType())) { + usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_CREATE, event.getAccountId(), zoneId, volId, volumeName, doId, templateId, size); + } else if (EventTypes.EVENT_VOLUME_DELETE.equals(event.getType())) { + usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE, event.getAccountId(), zoneId, volId, volumeName); + } + } } return usageEvent; } @@ -2045,31 +2228,33 @@ public class Upgrade218to22 implements DbUpgrade { // Get snapshot info (there was a bug in 2.1.x - accountId is 0, and data_center info is not present in events table if (accountId.longValue() == 0L || zoneId.longValue() == 0L) { - PreparedStatement pstmt = conn.prepareStatement("SELECT zone_id, account_id from usage_event where resource_id=? and type like '%SNAPSHOT%'"); - pstmt.setLong(1, snapId); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) { - zoneId = rs.getLong(1); - accountId = rs.getLong(2); + try (PreparedStatement pstmt = conn.prepareStatement("SELECT zone_id, account_id from usage_event where resource_id=? and type like '%SNAPSHOT%'");) { + pstmt.setLong(1, snapId); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs.next()) { + zoneId = rs.getLong(1); + accountId = rs.getLong(2); + } + } + + if (EventTypes.EVENT_SNAPSHOT_CREATE.equals(event.getType())) { + usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_CREATE, accountId, zoneId, snapId, snapshotName, null, null, snapSize); + } else if (EventTypes.EVENT_SNAPSHOT_DELETE.equals(event.getType())) { + usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, accountId, zoneId, snapId, snapshotName, null, null, 0L); + } } - - rs.close(); - pstmt.close(); - } - - if (EventTypes.EVENT_SNAPSHOT_CREATE.equals(event.getType())) { - usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_CREATE, accountId, zoneId, snapId, snapshotName, null, null, snapSize); - } else if (EventTypes.EVENT_SNAPSHOT_DELETE.equals(event.getType())) { - usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, accountId, zoneId, snapId, snapshotName, null, null, 0L); } return usageEvent; } @Override public void performDataMigration(Connection conn) { - try { - PreparedStatement pstmt = conn.prepareStatement("USE cloud"); - pstmt.executeQuery(); + try ( + PreparedStatement useCloud = conn.prepareStatement("USE cloud"); + PreparedStatement hypervisorTypeUpdate = conn.prepareStatement("UPDATE vm_instance SET hypervisor_type='XenServer' WHERE hypervisor_type='xenserver'"); + PreparedStatement instanceUpdate = conn.prepareStatement("UPDATE vm_instance SET account_id=1, domain_id=1 WHERE type='ConsoleProxy' or type='SecondaryStorageVm'"); + ) { + useCloud.executeQuery(); upgradeDataCenter(conn); upgradeStoragePools(conn); upgradeInstanceGroups(conn); @@ -2085,14 +2270,10 @@ public class Upgrade218to22 implements DbUpgrade { createNetworkOfferingEvents(conn); // Update hypervisor type for user vm to be consistent with original 2.2.4 - pstmt = conn.prepareStatement("UPDATE vm_instance SET hypervisor_type='XenServer' WHERE hypervisor_type='xenserver'"); - pstmt.executeUpdate(); - pstmt.close(); + hypervisorTypeUpdate.executeUpdate(); // Set account=systemAccount and domain=ROOT for CPVM/SSVM - pstmt = conn.prepareStatement("UPDATE vm_instance SET account_id=1, domain_id=1 WHERE type='ConsoleProxy' or type='SecondaryStorageVm'"); - pstmt.executeUpdate(); - pstmt.close(); + instanceUpdate.executeUpdate(); // Update user statistics updateUserStats(conn); @@ -2143,33 +2324,32 @@ public class Upgrade218to22 implements DbUpgrade { } private void deleteOrphanedTemplateRef(Connection conn) { - try { - PreparedStatement pstmt = conn.prepareStatement("SELECT id, pool_id from template_spool_ref"); - ResultSet rs = pstmt.executeQuery(); + try ( + PreparedStatement selectStoragePoolRef = conn.prepareStatement("SELECT id, pool_id from template_spool_ref"); + ResultSet rs = selectStoragePoolRef.executeQuery(); + ) { if (!rs.next()) { s_logger.debug("No records in template_spool_ref, skipping this upgrade part"); return; } - while (rs.next()) { Long id = rs.getLong(1); Long poolId = rs.getLong(2); - pstmt = conn.prepareStatement("SELECT * from storage_pool where id=?"); - pstmt.setLong(1, poolId); - ResultSet rs1 = pstmt.executeQuery(); + try (PreparedStatement selectStoragePool = conn.prepareStatement("SELECT * from storage_pool where id=?");) { + selectStoragePool.setLong(1, poolId); + try (ResultSet selectedStoragePool = selectStoragePool.executeQuery();) { - if (!rs1.next()) { - s_logger.debug("Orphaned template_spool_ref record is found (storage pool doesn't exist any more0) id=" + id + "; so removing the record"); - pstmt = conn.prepareStatement("DELETE FROM template_spool_ref where id=?"); - pstmt.setLong(1, id); - pstmt.executeUpdate(); + if (!selectedStoragePool.next()) { + s_logger.debug("Orphaned template_spool_ref record is found (storage pool doesn't exist any more0) id=" + id + "; so removing the record"); + try (PreparedStatement delete = conn.prepareStatement("DELETE FROM template_spool_ref where id=?");) { + delete.setLong(1, id); + delete.executeUpdate(); + } + } + } } - } - rs.close(); - pstmt.close(); - s_logger.debug("Finished deleting orphaned template_spool_ref(s)"); } catch (Exception e) { s_logger.error("Failed to delete orphaned template_spool_ref(s): ", e); @@ -2178,46 +2358,48 @@ public class Upgrade218to22 implements DbUpgrade { } private void cleanupVolumes(Connection conn) { - try { - PreparedStatement pstmt = conn.prepareStatement("SELECT id, instance_id, account_id from volumes where destroyed=127"); - ResultSet rs = pstmt.executeQuery(); - - while (rs.next()) { - Long id = rs.getLong(1); + try ( + PreparedStatement selectVolumes = conn.prepareStatement("SELECT id, instance_id, account_id from volumes where destroyed=127"); + ResultSet selectedVolumes = selectVolumes.executeQuery(); + ){ + while (selectedVolumes.next()) { + Long id = selectedVolumes.getLong(1); s_logger.debug("Volume id is " + id); - Long instanceId = rs.getLong(2); - Long accountId = rs.getLong(3); + Long instanceId = selectedVolumes.getLong(2); + Long accountId = selectedVolumes.getLong(3); boolean removeVolume = false; - pstmt = conn.prepareStatement("SELECT * from account where id=? and removed is not null"); - pstmt.setLong(1, accountId); - ResultSet rs1 = pstmt.executeQuery(); + try (PreparedStatement selectAccounts = conn.prepareStatement("SELECT * from account where id=? and removed is not null");) { + selectAccounts.setLong(1, accountId); + try(ResultSet selectedAccounts = selectAccounts.executeQuery();) { - if (rs1.next()) { - removeVolume = true; - } + if (selectedAccounts.next()) { + removeVolume = true; + } - if (instanceId != null) { - pstmt = conn.prepareStatement("SELECT * from vm_instance where id=? and removed is not null"); - pstmt.setLong(1, instanceId); - rs1 = pstmt.executeQuery(); + if (instanceId != null) { + try(PreparedStatement selectInstances = conn.prepareStatement("SELECT * from vm_instance where id=? and removed is not null");) { + selectInstances.setLong(1, instanceId); + try (ResultSet selectedInstances = selectInstances.executeQuery();) { - if (rs1.next()) { - removeVolume = true; + if (selectedInstances.next()) { + removeVolume = true; + } + } + } + } + + if (removeVolume) { + try(PreparedStatement pstmt = conn.prepareStatement("UPDATE volumes SET state='Destroy' WHERE id=?");) { + pstmt.setLong(1, id); + pstmt.executeUpdate(); + s_logger.debug("Volume with id=" + id + " is marked with Destroy state as a part of volume cleanup (it's Destroyed had 127 value)"); + } + } } } - - if (removeVolume) { - pstmt = conn.prepareStatement("UPDATE volumes SET state='Destroy' WHERE id=?"); - pstmt.setLong(1, id); - pstmt.executeUpdate(); - s_logger.debug("Volume with id=" + id + " is marked with Destroy state as a part of volume cleanup (it's Destroyed had 127 value)"); - } } - rs.close(); - pstmt.close(); - s_logger.debug("Finished cleaning up volumes with incorrect Destroyed field (127)"); } catch (Exception e) { s_logger.error("Failed to cleanup volumes with incorrect Destroyed field (127):", e); @@ -2226,39 +2408,34 @@ public class Upgrade218to22 implements DbUpgrade { } private void modifyIndexes(Connection conn) { - try { - + try ( // removed indexes - PreparedStatement pstmt = conn.prepareStatement("SHOW INDEX FROM security_group WHERE KEY_NAME = 'fk_network_group__account_id'"); - ResultSet rs = pstmt.executeQuery(); - - if (rs.next()) { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`security_group` DROP INDEX `fk_network_group__account_id`"); - pstmt.executeUpdate(); - s_logger.debug("Unique key 'fk_network_group__account_id' is removed successfully"); + PreparedStatement show__Index = conn.prepareStatement("SHOW INDEX FROM security_group WHERE KEY_NAME = 'fk_network_group__account_id'"); + ResultSet result__index = show__Index.executeQuery(); + ) { + if (result__index.next()) { + try (PreparedStatement alterTable = conn.prepareStatement("ALTER TABLE `cloud`.`security_group` DROP INDEX `fk_network_group__account_id`");) { + alterTable.executeUpdate(); + s_logger.debug("Unique key 'fk_network_group__account_id' is removed successfully"); + } } - rs.close(); - pstmt.close(); - - pstmt = conn.prepareStatement("SHOW INDEX FROM security_group WHERE KEY_NAME = 'fk_network_group___account_id'"); - rs = pstmt.executeQuery(); - - if (rs.next()) { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`security_group` DROP INDEX `fk_network_group___account_id`"); - pstmt.executeUpdate(); - s_logger.debug("Unique key 'fk_network_group___account_id' is removed successfully"); + try ( + PreparedStatement show___Index = conn.prepareStatement("SHOW INDEX FROM security_group WHERE KEY_NAME = 'fk_network_group___account_id'"); + ResultSet result___index = show___Index.executeQuery(); + ) { + if (result___index.next()) { + try (PreparedStatement pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`security_group` DROP INDEX `fk_network_group___account_id`");) { + pstmt.executeUpdate(); + s_logger.debug("Unique key 'fk_network_group___account_id' is removed successfully"); + } + } } - - rs.close(); - pstmt.close(); - // add indexes - pstmt = - conn.prepareStatement("ALTER TABLE `cloud`.`security_group` ADD CONSTRAINT `fk_security_group___account_id` FOREIGN KEY `fk_security_group__account_id` (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE"); - pstmt.executeUpdate(); - pstmt.close(); - + try (PreparedStatement add_index = + conn.prepareStatement("ALTER TABLE `cloud`.`security_group` ADD CONSTRAINT `fk_security_group___account_id` FOREIGN KEY `fk_security_group__account_id` (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE");) { + add_index.executeUpdate(); + } } catch (SQLException e) { throw new CloudRuntimeException("Unable to drop indexes for 'security_group' table due to:", e); } @@ -2267,34 +2444,31 @@ public class Upgrade218to22 implements DbUpgrade { // There was a bug in 2.1.x when LB rule mapping wasn't removed along with lb rule removal // Do cleanup after making sure that the rule was removed private void cleanupLbVmMaps(Connection conn) { - try { - PreparedStatement pstmt = conn.prepareStatement("SELECT DISTINCT load_balancer_id FROM load_balancer_vm_map"); - ResultSet rs = pstmt.executeQuery(); - + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT DISTINCT load_balancer_id FROM load_balancer_vm_map"); + ResultSet rs = pstmt.executeQuery(); + ){ while (rs.next()) { long lbId = rs.getLong(1); - PreparedStatement pstmt1 = conn.prepareStatement("SELECT * FROM load_balancer where id=?"); - pstmt1.setLong(1, lbId); - ResultSet rs1 = pstmt1.executeQuery(); + try (PreparedStatement pstmt1 = conn.prepareStatement("SELECT * FROM load_balancer where id=?");) { + pstmt1.setLong(1, lbId); + try (ResultSet rs1 = pstmt1.executeQuery();) { - PreparedStatement pstmt2 = conn.prepareStatement("SELECT * from event where type like '%lb.delete%' and parameters like '%id=" + lbId + "%'"); - ResultSet rs2 = pstmt2.executeQuery(); - - if (!rs1.next() && rs2.next()) { - s_logger.debug("Removing load balancer vm mappings for lb id=" + lbId + " as a part of cleanup"); - pstmt = conn.prepareStatement("DELETE FROM load_balancer_vm_map where load_balancer_id=?"); - pstmt.setLong(1, lbId); - pstmt.executeUpdate(); + try ( + PreparedStatement pstmt2 = conn.prepareStatement("SELECT * from event where type like '%lb.delete%' and parameters like '%id=" + lbId + "%'"); + ResultSet rs2 = pstmt2.executeQuery(); + ) { + if (!rs1.next() && rs2.next()) { + s_logger.debug("Removing load balancer vm mappings for lb id=" + lbId + " as a part of cleanup"); + try (PreparedStatement delete = conn.prepareStatement("DELETE FROM load_balancer_vm_map where load_balancer_id=?");) { + delete.setLong(1, lbId); + delete.executeUpdate(); + } + } + } + } } - rs1.close(); - rs2.close(); - pstmt1.close(); - pstmt2.close(); } - - rs.close(); - pstmt.close(); - } catch (SQLException e) { throw new CloudRuntimeException("Failed to cleanup orpahned lb-vm mappings due to:", e); } @@ -2304,35 +2478,32 @@ public class Upgrade218to22 implements DbUpgrade { * Create usage events for existing port forwarding rules */ private void createPortForwardingEvents(Connection conn) { - try { - PreparedStatement pstmt = + s_logger.debug("Creating Port Forwarding usage events"); + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT fw.account_id, ip.data_center_id, fw.id FROM firewall_rules fw, user_ip_address ip where purpose = 'PortForwarding' and " - + "fw.state = 'Active' and ip.id = fw.ip_address_id"); - s_logger.debug("Creating Port Forwarding usage events"); - ResultSet rs = pstmt.executeQuery(); + + "fw.state = 'Active' and ip.id = fw.ip_address_id"); + ResultSet rs = pstmt.executeQuery(); + ) { Date now = new Date(); while (rs.next()) { long accountId = rs.getLong(1); long zoneId = rs.getLong(2); long ruleId = rs.getLong(3); - PreparedStatement pstmt1 = null; - pstmt1 = - conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id)" - + " VALUES (?, ?, ?, ?, ?)"); - pstmt1.setString(1, EventTypes.EVENT_NET_RULE_ADD); - pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); - pstmt1.setLong(3, accountId); - pstmt1.setLong(4, zoneId); - pstmt1.setLong(5, ruleId); - - pstmt1.executeUpdate(); - pstmt1.close(); + try ( + PreparedStatement pstmt1 = + conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id)" + + " VALUES (?, ?, ?, ?, ?)"); + ) { + pstmt1.setString(1, EventTypes.EVENT_NET_RULE_ADD); + pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); + pstmt1.setLong(3, accountId); + pstmt1.setLong(4, zoneId); + pstmt1.setLong(5, ruleId); + pstmt1.executeUpdate(); + } } - - rs.close(); - pstmt.close(); s_logger.debug("Completed creating Port Forwarding usage events"); - } catch (SQLException e) { throw new CloudRuntimeException("Failed to add port forwarding usage events due to:", e); } @@ -2342,35 +2513,32 @@ public class Upgrade218to22 implements DbUpgrade { * Create usage events for existing load balancer rules */ private void createLoadBalancerEvents(Connection conn) { - try { - PreparedStatement pstmt = - conn.prepareStatement("SELECT fw.account_id, ip.data_center_id, fw.id FROM firewall_rules fw, user_ip_address ip where purpose = 'LoadBalancing' and " - + "fw.state = 'Active' and ip.id = fw.ip_address_id"); - s_logger.debug("Creating load balancer usage events"); - ResultSet rs = pstmt.executeQuery(); + s_logger.debug("Creating load balancer usage events"); + try ( + PreparedStatement pstmt = + conn.prepareStatement("SELECT fw.account_id, ip.data_center_id, fw.id FROM firewall_rules fw, user_ip_address ip where purpose = 'LoadBalancing' and " + + "fw.state = 'Active' and ip.id = fw.ip_address_id"); + ResultSet rs = pstmt.executeQuery(); + ) { Date now = new Date(); while (rs.next()) { long accountId = rs.getLong(1); long zoneId = rs.getLong(2); long ruleId = rs.getLong(3); - PreparedStatement pstmt1 = null; - pstmt1 = - conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id)" - + " VALUES (?, ?, ?, ?, ?)"); - pstmt1.setString(1, EventTypes.EVENT_LOAD_BALANCER_CREATE); - pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); - pstmt1.setLong(3, accountId); - pstmt1.setLong(4, zoneId); - pstmt1.setLong(5, ruleId); - - pstmt1.executeUpdate(); - pstmt1.close(); + try ( + PreparedStatement pstmt1 = + conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id)" + + " VALUES (?, ?, ?, ?, ?)"); + ) { + pstmt1.setString(1, EventTypes.EVENT_LOAD_BALANCER_CREATE); + pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); + pstmt1.setLong(3, accountId); + pstmt1.setLong(4, zoneId); + pstmt1.setLong(5, ruleId); + pstmt1.executeUpdate(); + } } - - rs.close(); - pstmt.close(); s_logger.debug("Completed creating load balancer usage events"); - } catch (SQLException e) { throw new CloudRuntimeException("Failed to add Load Balancer usage events due to:", e); } @@ -2380,12 +2548,13 @@ public class Upgrade218to22 implements DbUpgrade { * Create usage events for network offerings */ private void createNetworkOfferingEvents(Connection conn) { - try { - PreparedStatement pstmt = - conn.prepareStatement("SELECT vm.account_id, vm.data_center_id, ni.instance_id, vm.name, nw.network_offering_id, nw.is_default FROM nics ni, " - + "networks nw, vm_instance vm where vm.type = 'User' and ni.removed is null and ni.instance_id = vm.id and ni.network_id = nw.id;"); - s_logger.debug("Creating network offering usage events"); - ResultSet rs = pstmt.executeQuery(); + s_logger.debug("Creating network offering usage events"); + try ( + PreparedStatement pstmt = + conn.prepareStatement("SELECT vm.account_id, vm.data_center_id, ni.instance_id, vm.name, nw.network_offering_id, nw.is_default FROM nics ni, " + + "networks nw, vm_instance vm where vm.type = 'User' and ni.removed is null and ni.instance_id = vm.id and ni.network_id = nw.id;"); + ResultSet rs = pstmt.executeQuery(); + ) { Date now = new Date(); while (rs.next()) { long accountId = rs.getLong(1); @@ -2394,30 +2563,24 @@ public class Upgrade218to22 implements DbUpgrade { String vmName = rs.getString(4); long nw_offering_id = rs.getLong(5); long isDefault = rs.getLong(6); - PreparedStatement pstmt1 = null; - pstmt1 = - conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id, usage_event.resource_name, " - + "usage_event.offering_id, usage_event.size)" + " VALUES (?, ?, ?, ?, ?, ?, ?, ?)"); - pstmt1.setString(1, EventTypes.EVENT_NETWORK_OFFERING_ASSIGN); - pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); - pstmt1.setLong(3, accountId); - pstmt1.setLong(4, zoneId); - pstmt1.setLong(5, vmId); - pstmt1.setString(6, vmName); - pstmt1.setLong(7, nw_offering_id); - pstmt1.setLong(8, isDefault); - - pstmt1.executeUpdate(); - pstmt1.close(); + try (PreparedStatement pstmt1 = + conn.prepareStatement( + "INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id, usage_event.resource_name, " + + "usage_event.offering_id, usage_event.size) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"); ) { + pstmt1.setString(1, EventTypes.EVENT_NETWORK_OFFERING_ASSIGN); + pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now)); + pstmt1.setLong(3, accountId); + pstmt1.setLong(4, zoneId); + pstmt1.setLong(5, vmId); + pstmt1.setString(6, vmName); + pstmt1.setLong(7, nw_offering_id); + pstmt1.setLong(8, isDefault); + pstmt1.executeUpdate(); + } } - - rs.close(); - pstmt.close(); s_logger.debug("Completed creating network offering usage events"); - } catch (SQLException e) { throw new CloudRuntimeException("Failed to add network offering usage events due to:", e); } } - } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java index eb4e8c75693..272d25990d6 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java @@ -411,6 +411,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { pstmt.close(); } } catch (SQLException e) { + s_logger.info("[ignored]",e); } } s_logger.debug("Done encrypting Config values"); @@ -861,6 +862,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { pstmt.executeUpdate(); pstmt.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } TransactionLegacy.closePstmts(pstmt2Close); } @@ -1000,6 +1002,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { pstmt.executeUpdate(); pstmt.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } TransactionLegacy.closePstmts(pstmt2Close); } @@ -1053,6 +1056,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { pstmt.close(); } } catch (SQLException e) { + s_logger.info("[ignored]",e); } } } @@ -1151,11 +1155,10 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to switch networks to the new network offering", e); } finally { - try { - pstmt = conn.prepareStatement("DROP TABLE `cloud`.`network_offerings2`"); - pstmt.executeUpdate(); - pstmt.close(); + try (PreparedStatement dropStatement = conn.prepareStatement("DROP TABLE `cloud`.`network_offerings2`");){ + dropStatement.executeUpdate(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } TransactionLegacy.closePstmts(pstmt2Close); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade222to224.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade222to224.java index dbd48c879e8..458f7eebf41 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade222to224.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade222to224.java @@ -207,18 +207,21 @@ public class Upgrade222to224 implements DbUpgrade { try { pstmtUpdate.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } if (rs != null) { try { rs.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } @@ -406,18 +409,21 @@ public class Upgrade222to224 implements DbUpgrade { try { pstmtUpdate.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } if (rs != null) { try { rs.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException e) { + s_logger.info("[ignored]",e); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade229to2210.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade229to2210.java index 2eca446652e..dbeb31e6b45 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade229to2210.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade229to2210.java @@ -68,41 +68,29 @@ public class Upgrade229to2210 implements DbUpgrade { } private void updateSnapshots(Connection conn) { - PreparedStatement pstmt = null; - ResultSet rs = null; long currentSnapshotId = 0; - try { - pstmt = - conn.prepareStatement("select id, prev_snap_id from snapshots where sechost_id is NULL and prev_snap_id is not NULL and status=\"BackedUp\" and removed is NULL order by id"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("select id, prev_snap_id from snapshots where sechost_id is NULL and prev_snap_id is not NULL and status=\"BackedUp\" and removed is NULL order by id"); + ResultSet rs = pstmt.executeQuery(); + PreparedStatement pstmt2 = conn.prepareStatement("select sechost_id from snapshots where id=? and sechost_id is not NULL"); + PreparedStatement updateSnapshotStatement = conn.prepareStatement("update snapshots set sechost_id=? where id=?"); + ){ while (rs.next()) { long id = rs.getLong(1); long preSnapId = rs.getLong(2); currentSnapshotId = id; - pstmt = conn.prepareStatement("select sechost_id from snapshots where id=? and sechost_id is not NULL"); - pstmt.setLong(1, preSnapId); - ResultSet sechost = pstmt.executeQuery(); - if (sechost.next()) { - long secHostId = sechost.getLong(1); - pstmt = conn.prepareStatement("update snapshots set sechost_id=? where id=?"); - pstmt.setLong(1, secHostId); - pstmt.setLong(2, id); - pstmt.executeUpdate(); + pstmt2.setLong(1, preSnapId); + try (ResultSet sechost = pstmt2.executeQuery();) { + if (sechost.next()) { + long secHostId = sechost.getLong(1); + updateSnapshotStatement.setLong(1, secHostId); + updateSnapshotStatement.setLong(2, id); + updateSnapshotStatement.executeUpdate(); + } } } } catch (SQLException e) { throw new CloudRuntimeException("Unable to update snapshots id=" + currentSnapshotId, e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -192,6 +180,7 @@ public class Upgrade229to2210 implements DbUpgrade { pstmt.close(); } } catch (SQLException e) { + s_logger.info("[ignored]",e); } } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade301to302.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade301to302.java index 0da787774b5..0e9b479c947 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade301to302.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade301to302.java @@ -31,7 +31,7 @@ import org.apache.log4j.Logger; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade301to302 implements DbUpgrade { +public class Upgrade301to302 extends LegacyDbUpgrade { final static Logger s_logger = Logger.getLogger(Upgrade301to302.class); @Override @@ -150,18 +150,9 @@ public class Upgrade301to302 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to update shared networks due to exception while executing query " + pstmt, e); } finally { - try { - if (rs != null) { - rs.close(); - } - if (rs1 != null) { - rs1.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(rs1); + closeAutoCloseable(pstmt); } } @@ -177,55 +168,34 @@ public class Upgrade301to302 implements DbUpgrade { DbUpgradeUtils.dropKeysIfExist(conn, "cloud.vm_instance", keys, true); DbUpgradeUtils.dropKeysIfExist(conn, "cloud.vm_instance", keys, false); - PreparedStatement pstmt = null; - try { - pstmt = + try ( + PreparedStatement pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`vm_instance` ADD CONSTRAINT `fk_vm_instance__last_host_id` FOREIGN KEY (`last_host_id`) REFERENCES `host` (`id`)"); + ){ pstmt.executeUpdate(); - pstmt.close(); } catch (SQLException e) { throw new CloudRuntimeException("Unable to insert foreign key in vm_instance table ", e); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } private void changeEngine(Connection conn) { s_logger.debug("Fixing engine and row_format for op_lock and op_nwgrp_work tables"); - PreparedStatement pstmt = null; - try { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`op_lock` ENGINE=MEMORY, ROW_FORMAT = FIXED"); + String sqlOpLock = "ALTER TABLE `cloud`.`op_lock` ENGINE=MEMORY, ROW_FORMAT = FIXED"; + try ( + PreparedStatement pstmt = conn.prepareStatement(sqlOpLock); + ) { pstmt.executeUpdate(); - pstmt.close(); } catch (Exception e) { - s_logger.debug("Failed do execute the statement " + pstmt + ", moving on as it's not critical fix"); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + s_logger.debug("Failed do execute the statement " + sqlOpLock + ", moving on as it's not critical fix"); } - try { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`op_nwgrp_work` ENGINE=MEMORY, ROW_FORMAT = FIXED"); + String sqlOpNwgrpWork = "ALTER TABLE `cloud`.`op_nwgrp_work` ENGINE=MEMORY, ROW_FORMAT = FIXED"; + try ( + PreparedStatement pstmt = conn.prepareStatement(sqlOpNwgrpWork); + ) { pstmt.executeUpdate(); - pstmt.close(); } catch (Exception e) { - s_logger.debug("Failed do execute the statement " + pstmt + ", moving on as it's not critical fix"); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + s_logger.debug("Failed do execute the statement " + sqlOpNwgrpWork + ", moving on as it's not critical fix"); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to303.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to303.java index 7cc8bc74c91..abd0c347df3 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to303.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to303.java @@ -36,7 +36,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade302to303 implements DbUpgrade { +public class Upgrade302to303 extends LegacyDbUpgrade { final static Logger s_logger = Logger.getLogger(Upgrade302to303.class); @Override @@ -133,23 +133,10 @@ public class Upgrade302to303 implements DbUpgrade { } } } - - if (zoneResults != null) { - try { - zoneResults.close(); - } catch (SQLException e) { - } - } - if (zoneSearchStmt != null) { - try { - zoneSearchStmt.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(zoneResults); + closeAutoCloseable(zoneSearchStmt); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); - } finally { - } } @@ -176,12 +163,7 @@ public class Upgrade302to303 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding F5 load balancer device", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } @@ -206,12 +188,7 @@ public class Upgrade302to303 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding SRX firewall device ", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } @@ -235,12 +212,7 @@ public class Upgrade302to303 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworkServiceProvider F5BigIp", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } @@ -264,12 +236,7 @@ public class Upgrade302to303 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworkServiceProvider JuniperSRX", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } @@ -299,16 +266,8 @@ public class Upgrade302to303 implements DbUpgrade { } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt configuration values ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.debug("Done encrypting Config values"); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java index 5ce8f366830..829e99852ba 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java @@ -34,7 +34,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { +public class Upgrade302to40 extends Upgrade30xBase { final static Logger s_logger = Logger.getLogger(Upgrade302to40.class); @Override @@ -138,33 +138,10 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while correcting Virtual Router Entries", e); } finally { - if (rsVR != null) { - try { - rsVR.close(); - } catch (SQLException e) { - } - } - - if (pstmtVR != null) { - try { - pstmtVR.close(); - } catch (SQLException e) { - } - } - - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - } - } - - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(rsVR); + closeAutoCloseable(pstmtVR); + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } @@ -398,33 +375,10 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while correcting PhysicalNetwork setup", e); } finally { - if (rsZone != null) { - try { - rsZone.close(); - } catch (SQLException e) { - } - } - - if (pstmtZone != null) { - try { - pstmtZone.close(); - } catch (SQLException e) { - } - } - - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - } - } - - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(rsZone); + closeAutoCloseable(pstmtZone); + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } @@ -510,29 +464,23 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while cloning NetworkOffering", e); } finally { + closeAutoCloseable(rs); try { pstmt = conn.prepareStatement("DROP TEMPORARY TABLE `cloud`.`network_offerings2`"); pstmt.executeUpdate(); - - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } } catch (SQLException e) { + s_logger.info("[ignored] ",e); } + closeAutoCloseable(pstmt); } } private void addHostDetailsUniqueKey(Connection conn) { s_logger.debug("Checking if host_details unique key exists, if not we will add it"); - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = conn.prepareStatement("SHOW INDEX FROM `cloud`.`host_details` WHERE KEY_NAME = 'uk_host_id_name'"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("SHOW INDEX FROM `cloud`.`host_details` WHERE KEY_NAME = 'uk_host_id_name'"); + ResultSet rs = pstmt.executeQuery(); + ) { if (rs.next()) { s_logger.debug("Unique key already exists on host_details - not adding new one"); } else { @@ -545,17 +493,6 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } } catch (SQLException e) { throw new CloudRuntimeException("Failed to check/update the host_details unique key ", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -602,16 +539,8 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable add VPC physical network service provider ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.debug("Done adding VPC physical network service providers to all physical networks"); } @@ -619,46 +548,33 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { private void updateRouterNetworkRef(Connection conn) { //Encrypt config params and change category to Hidden s_logger.debug("Updating router network ref"); - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = conn.prepareStatement("SELECT d.id, d.network_id FROM `cloud`.`domain_router` d, `cloud`.`vm_instance` v " + "WHERE d.id=v.id AND v.removed is NULL"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("SELECT d.id, d.network_id FROM `cloud`.`domain_router` d, `cloud`.`vm_instance` v " + "WHERE d.id=v.id AND v.removed is NULL"); + PreparedStatement pstmt1 = conn.prepareStatement("SELECT guest_type from `cloud`.`networks` where id=?"); + PreparedStatement pstmt2 = conn.prepareStatement("INSERT INTO `cloud`.`router_network_ref` (router_id, network_id, guest_type) " + "VALUES (?, ?, ?)"); + ResultSet rs = pstmt.executeQuery(); + ){ while (rs.next()) { Long routerId = rs.getLong(1); Long networkId = rs.getLong(2); //get the network type - pstmt = conn.prepareStatement("SELECT guest_type from `cloud`.`networks` where id=?"); - pstmt.setLong(1, networkId); - ResultSet rs1 = pstmt.executeQuery(); - rs1.next(); - String networkType = rs1.getString(1); - - //insert the reference - pstmt = conn.prepareStatement("INSERT INTO `cloud`.`router_network_ref` (router_id, network_id, guest_type) " + "VALUES (?, ?, ?)"); - - pstmt.setLong(1, routerId); - pstmt.setLong(2, networkId); - pstmt.setString(3, networkType); - pstmt.executeUpdate(); + pstmt1.setLong(1, networkId); + try (ResultSet rs1 = pstmt1.executeQuery();) { + rs1.next(); + String networkType = rs1.getString(1); + //insert the reference + pstmt2.setLong(1, routerId); + pstmt2.setLong(2, networkId); + pstmt2.setString(3, networkType); + pstmt2.executeUpdate(); + } s_logger.debug("Added reference for router id=" + routerId + " and network id=" + networkId); } } catch (SQLException e) { throw new CloudRuntimeException("Failed to update the router/network reference ", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Done updating router/network references"); } @@ -768,33 +684,19 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } } - if (zoneResults != null) { - try { - zoneResults.close(); - } catch (SQLException e) { - } - } - if (zoneSearchStmt != null) { - try { - zoneSearchStmt.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(zoneResults); + closeAutoCloseable(zoneSearchStmt); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); - } finally { - } } private void addF5LoadBalancer(Connection conn, long hostId, long physicalNetworkId) { - PreparedStatement pstmtUpdate = null; - try { - s_logger.debug("Adding F5 Big IP load balancer with host id " + hostId + " in to physical network" + physicalNetworkId); - String insertF5 = - "INSERT INTO `cloud`.`external_load_balancer_devices` (physical_network_id, host_id, provider_name, " - + "device_name, capacity, is_dedicated, device_state, allocation_state, is_inline, is_managed, uuid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - pstmtUpdate = conn.prepareStatement(insertF5); + s_logger.debug("Adding F5 Big IP load balancer with host id " + hostId + " in to physical network" + physicalNetworkId); + String insertF5 = + "INSERT INTO `cloud`.`external_load_balancer_devices` (physical_network_id, host_id, provider_name, " + + "device_name, capacity, is_dedicated, device_state, allocation_state, is_inline, is_managed, uuid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + try (PreparedStatement pstmtUpdate = conn.prepareStatement(insertF5);) { pstmtUpdate.setLong(1, physicalNetworkId); pstmtUpdate.setLong(2, hostId); pstmtUpdate.setString(3, "F5BigIp"); @@ -809,24 +711,15 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { pstmtUpdate.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding F5 load balancer device", e); - } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } } } private void addSrxFirewall(Connection conn, long hostId, long physicalNetworkId) { - PreparedStatement pstmtUpdate = null; - try { - s_logger.debug("Adding SRX firewall device with host id " + hostId + " in to physical network" + physicalNetworkId); - String insertSrx = - "INSERT INTO `cloud`.`external_firewall_devices` (physical_network_id, host_id, provider_name, " - + "device_name, capacity, is_dedicated, device_state, allocation_state, uuid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - pstmtUpdate = conn.prepareStatement(insertSrx); + s_logger.debug("Adding SRX firewall device with host id " + hostId + " in to physical network" + physicalNetworkId); + String insertSrx = + "INSERT INTO `cloud`.`external_firewall_devices` (physical_network_id, host_id, provider_name, " + + "device_name, capacity, is_dedicated, device_state, allocation_state, uuid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + try (PreparedStatement pstmtUpdate = conn.prepareStatement(insertSrx);) { pstmtUpdate.setLong(1, physicalNetworkId); pstmtUpdate.setLong(2, hostId); pstmtUpdate.setString(3, "JuniperSRX"); @@ -839,28 +732,18 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { pstmtUpdate.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding SRX firewall device ", e); - } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } } } private void addF5ServiceProvider(Connection conn, long physicalNetworkId, long zoneId) { - PreparedStatement pstmtUpdate = null; - try { - // add physical network service provider - F5BigIp - s_logger.debug("Adding PhysicalNetworkServiceProvider F5BigIp" + " in to physical network" + physicalNetworkId); - String insertPNSP = - "INSERT INTO `cloud`.`physical_network_service_providers` (`uuid`, `physical_network_id` , `provider_name`, `state` ," - + "`destination_physical_network_id`, `vpn_service_provided`, `dhcp_service_provided`, `dns_service_provided`, `gateway_service_provided`," - + "`firewall_service_provided`, `source_nat_service_provided`, `load_balance_service_provided`, `static_nat_service_provided`," - + "`port_forwarding_service_provided`, `user_data_service_provided`, `security_group_service_provided`) VALUES (?,?,?,?,0,0,0,0,0,0,0,1,0,0,0,0)"; - - pstmtUpdate = conn.prepareStatement(insertPNSP); + // add physical network service provider - F5BigIp + s_logger.debug("Adding PhysicalNetworkServiceProvider F5BigIp" + " in to physical network" + physicalNetworkId); + String insertPNSP = + "INSERT INTO `cloud`.`physical_network_service_providers` (`uuid`, `physical_network_id` , `provider_name`, `state` ," + + "`destination_physical_network_id`, `vpn_service_provided`, `dhcp_service_provided`, `dns_service_provided`, `gateway_service_provided`," + + "`firewall_service_provided`, `source_nat_service_provided`, `load_balance_service_provided`, `static_nat_service_provided`," + + "`port_forwarding_service_provided`, `user_data_service_provided`, `security_group_service_provided`) VALUES (?,?,?,?,0,0,0,0,0,0,0,1,0,0,0,0)"; + try (PreparedStatement pstmtUpdate = conn.prepareStatement(insertPNSP);) { pstmtUpdate.setString(1, UUID.randomUUID().toString()); pstmtUpdate.setLong(2, physicalNetworkId); pstmtUpdate.setString(3, "F5BigIp"); @@ -868,28 +751,18 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { pstmtUpdate.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworkServiceProvider F5BigIp", e); - } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } } } private void addSrxServiceProvider(Connection conn, long physicalNetworkId, long zoneId) { - PreparedStatement pstmtUpdate = null; - try { - // add physical network service provider - JuniperSRX - s_logger.debug("Adding PhysicalNetworkServiceProvider JuniperSRX"); - String insertPNSP = - "INSERT INTO `cloud`.`physical_network_service_providers` (`uuid`, `physical_network_id` , `provider_name`, `state` ," - + "`destination_physical_network_id`, `vpn_service_provided`, `dhcp_service_provided`, `dns_service_provided`, `gateway_service_provided`," - + "`firewall_service_provided`, `source_nat_service_provided`, `load_balance_service_provided`, `static_nat_service_provided`," - + "`port_forwarding_service_provided`, `user_data_service_provided`, `security_group_service_provided`) VALUES (?,?,?,?,0,0,0,0,1,1,1,0,1,1,0,0)"; - - pstmtUpdate = conn.prepareStatement(insertPNSP); + // add physical network service provider - JuniperSRX + s_logger.debug("Adding PhysicalNetworkServiceProvider JuniperSRX"); + String insertPNSP = + "INSERT INTO `cloud`.`physical_network_service_providers` (`uuid`, `physical_network_id` , `provider_name`, `state` ," + + "`destination_physical_network_id`, `vpn_service_provided`, `dhcp_service_provided`, `dns_service_provided`, `gateway_service_provided`," + + "`firewall_service_provided`, `source_nat_service_provided`, `load_balance_service_provided`, `static_nat_service_provided`," + + "`port_forwarding_service_provided`, `user_data_service_provided`, `security_group_service_provided`) VALUES (?,?,?,?,0,0,0,0,1,1,1,0,1,1,0,0)"; + try (PreparedStatement pstmtUpdate = conn.prepareStatement(insertPNSP);) { pstmtUpdate.setString(1, UUID.randomUUID().toString()); pstmtUpdate.setLong(2, physicalNetworkId); pstmtUpdate.setString(3, "JuniperSRX"); @@ -897,13 +770,6 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { pstmtUpdate.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworkServiceProvider JuniperSRX", e); - } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } } } @@ -1045,15 +911,8 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable create a mapping for the networks in network_external_lb_device_map and network_external_firewall_device_map", e); } finally { - try { - if (rs != null) { - rs.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.info("Successfully upgraded networks using F5 and SRX devices to have a entry in the network_external_lb_device_map and network_external_firewall_device_map"); } @@ -1062,12 +921,11 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { private void encryptConfig(Connection conn) { //Encrypt config params and change category to Hidden s_logger.debug("Encrypting Config values"); - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = - conn.prepareStatement("select name, value from `cloud`.`configuration` where name in ('router.ram.size', 'secondary.storage.vm', 'security.hash.key') and category <> 'Hidden'"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("select name, value from `cloud`.`configuration` where name in ('router.ram.size', 'secondary.storage.vm', 'security.hash.key') and category <> 'Hidden'"); + PreparedStatement pstmt1 = conn.prepareStatement("update `cloud`.`configuration` set value=?, category = 'Hidden' where name=?"); + ResultSet rs = pstmt.executeQuery(); + ) { while (rs.next()) { String name = rs.getString(1); String value = rs.getString(2); @@ -1075,37 +933,25 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { continue; } String encryptedValue = DBEncryptionUtil.encrypt(value); - pstmt = conn.prepareStatement("update `cloud`.`configuration` set value=?, category = 'Hidden' where name=?"); - pstmt.setBytes(1, encryptedValue.getBytes("UTF-8")); - pstmt.setString(2, name); - pstmt.executeUpdate(); + pstmt1.setBytes(1, encryptedValue.getBytes("UTF-8")); + pstmt1.setString(2, name); + pstmt1.executeUpdate(); } } catch (SQLException e) { throw new CloudRuntimeException("Unable encrypt configuration values ", e); } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt configuration values ", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Done encrypting Config values"); } private void encryptClusterDetails(Connection conn) { s_logger.debug("Encrypting cluster details"); - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = conn.prepareStatement("select id, value from `cloud`.`cluster_details` where name = 'password'"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("select id, value from `cloud`.`cluster_details` where name = 'password'"); + PreparedStatement pstmt1 = conn.prepareStatement("update `cloud`.`cluster_details` set value=? where id=?"); + ResultSet rs = pstmt.executeQuery(); + ) { while (rs.next()) { long id = rs.getLong(1); String value = rs.getString(2); @@ -1113,26 +959,14 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade { continue; } String encryptedValue = DBEncryptionUtil.encrypt(value); - pstmt = conn.prepareStatement("update `cloud`.`cluster_details` set value=? where id=?"); - pstmt.setBytes(1, encryptedValue.getBytes("UTF-8")); - pstmt.setLong(2, id); - pstmt.executeUpdate(); + pstmt1.setBytes(1, encryptedValue.getBytes("UTF-8")); + pstmt1.setLong(2, id); + pstmt1.executeUpdate(); } } catch (SQLException e) { throw new CloudRuntimeException("Unable encrypt cluster_details values ", e); } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt cluster_details values ", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Done encrypting cluster_details"); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade304to305.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade304to305.java index 2472716d3fa..3f1268845c0 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade304to305.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade304to305.java @@ -33,7 +33,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { +public class Upgrade304to305 extends Upgrade30xBase { final static Logger s_logger = Logger.getLogger(Upgrade304to305.class); @Override @@ -173,16 +173,8 @@ public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable add VPC physical network service provider ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.debug("Done adding VPC physical network service providers to all physical networks"); } @@ -220,16 +212,8 @@ public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Failed to update the router/network reference ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.debug("Done updating router/network references"); } @@ -254,16 +238,8 @@ public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Failed to check/update the host_details unique key ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } @@ -407,15 +383,8 @@ public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable create a mapping for the networks in network_external_lb_device_map and network_external_firewall_device_map", e); } finally { - try { - if (rs != null) { - rs.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.info("Successfully upgraded network using F5 and SRX devices to have a entry in the network_external_lb_device_map and network_external_firewall_device_map"); } @@ -487,16 +456,8 @@ public class Upgrade304to305 extends Upgrade30xBase implements DbUpgrade { } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt cluster_details values ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } s_logger.debug("Done encrypting cluster_details"); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java index 622f7ea6a54..c31ce659a00 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java @@ -31,7 +31,7 @@ import org.apache.log4j.Logger; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { +public class Upgrade305to306 extends Upgrade30xBase { final static Logger s_logger = Logger.getLogger(Upgrade305to306.class); @Override @@ -82,55 +82,33 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { DbUpgradeUtils.dropKeysIfExist(conn, "alert", indexList, false); //Now add index. - PreparedStatement pstmt = null; - try { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`alert` ADD INDEX `i_alert__last_sent`(`last_sent`)"); + try (PreparedStatement pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`alert` ADD INDEX `i_alert__last_sent`(`last_sent`)");) { pstmt.executeUpdate(); s_logger.debug("Added index i_alert__last_sent for table alert"); } catch (SQLException e) { throw new CloudRuntimeException("Unable to add index i_alert__last_sent to alert table for the column last_sent", e); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } private void upgradeEIPNetworkOfferings(Connection conn) { - PreparedStatement pstmt = null; - ResultSet rs = null; - - try { - pstmt = conn.prepareStatement("select id, elastic_ip_service from `cloud`.`network_offerings` where traffic_type='Guest'"); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("select id, elastic_ip_service from `cloud`.`network_offerings` where traffic_type='Guest'"); + PreparedStatement pstmt1 = conn.prepareStatement("UPDATE `cloud`.`network_offerings` set eip_associate_public_ip=? where id=?"); + ResultSet rs = pstmt.executeQuery(); + ){ while (rs.next()) { long id = rs.getLong(1); // check if elastic IP service is enabled for network offering if (rs.getLong(2) != 0) { //update network offering with eip_associate_public_ip set to true - pstmt = conn.prepareStatement("UPDATE `cloud`.`network_offerings` set eip_associate_public_ip=? where id=?"); - pstmt.setBoolean(1, true); - pstmt.setLong(2, id); - pstmt.executeUpdate(); + pstmt1.setBoolean(1, true); + pstmt1.setLong(2, id); + pstmt1.executeUpdate(); } } } catch (SQLException e) { throw new CloudRuntimeException("Unable to set eip_associate_public_ip for network offerings with EIP service enabled.", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -143,20 +121,11 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { DbUpgradeUtils.dropKeysIfExist(conn, "host_details", indexList, false); //Now add index. - PreparedStatement pstmt = null; - try { - pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`host_details` ADD INDEX `fk_host_details__host_id`(`host_id`)"); + try (PreparedStatement pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`host_details` ADD INDEX `fk_host_details__host_id`(`host_id`)");) { pstmt.executeUpdate(); s_logger.debug("Added index fk_host_details__host_id for table host_details"); } catch (SQLException e) { throw new CloudRuntimeException("Unable to add index fk_host_details__host_id to host_details table for the column host_id", e); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -218,15 +187,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to set egress firewall rules ", e); } finally { - try { - if (rs != null) { - rs.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } @@ -247,16 +209,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to remove Firewall service for SG shared network offering.", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } @@ -288,16 +242,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to update backup id for KVM snapshots", e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(pstmt); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade306to307.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade306to307.java index ab96b58358f..a911882fa69 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade306to307.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade306to307.java @@ -28,7 +28,7 @@ import org.apache.log4j.Logger; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade306to307 extends Upgrade30xBase implements DbUpgrade { +public class Upgrade306to307 extends Upgrade30xBase { final static Logger s_logger = Logger.getLogger(Upgrade306to307.class); @Override @@ -97,20 +97,11 @@ public class Upgrade306to307 extends Upgrade30xBase implements DbUpgrade { pstmt = conn.prepareStatement("drop table `cloud`.`network_details`"); pstmt.executeUpdate(); } catch (SQLException e) { + s_logger.info("[ignored] error during network offering update:" + e.getLocalizedMessage(), e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (rs1 != null) { - rs1.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(rs1); + closeAutoCloseable(pstmt); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java index 243513ae0ea..4319481fe93 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java @@ -69,23 +69,14 @@ public class Upgrade307to410 implements DbUpgrade { if (regionId != null) { region_id = Integer.parseInt(regionId); } - PreparedStatement pstmt = null; - try { + try (PreparedStatement pstmt = conn.prepareStatement("update `cloud`.`region` set id = ?");){ //Update regionId in region table s_logger.debug("Updating region table with Id: " + region_id); - pstmt = conn.prepareStatement("update `cloud`.`region` set id = ?"); pstmt.setInt(1, region_id); pstmt.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Error while updating region entries", e); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade30to301.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade30to301.java index 65712d0841b..fafec269c51 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade30to301.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade30to301.java @@ -28,7 +28,7 @@ import com.cloud.configuration.Resource.ResourceType; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -public class Upgrade30to301 implements DbUpgrade { +public class Upgrade30to301 extends LegacyDbUpgrade { final static Logger s_logger = Logger.getLogger(Upgrade30to301.class); @Override @@ -100,20 +100,9 @@ public class Upgrade30to301 implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Unable to update network resource count for account id=" + accountId, e); } finally { - try { - if (rs != null) { - rs.close(); - } - - if (rs1 != null) { - rs1.close(); - } - - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } + closeAutoCloseable(rs); + closeAutoCloseable(rs1); + closeAutoCloseable(pstmt); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade30xBase.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade30xBase.java index aacede083fa..47b877d5aa5 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade30xBase.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade30xBase.java @@ -27,37 +27,22 @@ import org.apache.log4j.Logger; import com.cloud.utils.exception.CloudRuntimeException; -public abstract class Upgrade30xBase implements DbUpgrade { +public abstract class Upgrade30xBase extends LegacyDbUpgrade { final static Logger s_logger = Logger.getLogger(Upgrade30xBase.class); protected String getNetworkLabelFromConfig(Connection conn, String name) { String sql = "SELECT value FROM `cloud`.`configuration` where name = ?"; String networkLabel = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = conn.prepareStatement(sql); + try (PreparedStatement pstmt = conn.prepareStatement(sql);) { pstmt.setString(1,name); - rs = pstmt.executeQuery(); - if (rs.next()) { - networkLabel = rs.getString(1); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs.next()) { + networkLabel = rs.getString(1); + } } } catch (SQLException e) { throw new CloudRuntimeException("Unable to fetch network label from configuration", e); - } finally { - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - } - } - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } } return networkLabel; } @@ -117,19 +102,8 @@ public abstract class Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } - if (pstmt2 != null) { - try { - pstmt2.close(); - } catch (SQLException e) { - } - } - + closeAutoCloseable(pstmt2); + closeAutoCloseable(pstmtUpdate); } } @@ -152,12 +126,7 @@ public abstract class Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } @@ -204,18 +173,8 @@ public abstract class Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding default Security Group Provider", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } - if (pstmt2 != null) { - try { - pstmt2.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmt2); + closeAutoCloseable(pstmtUpdate); } } @@ -261,18 +220,8 @@ public abstract class Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } - if (pstmt2 != null) { - try { - pstmt2.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmt2); + closeAutoCloseable(pstmtUpdate); } } @@ -299,12 +248,7 @@ public abstract class Upgrade30xBase implements DbUpgrade { } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); } finally { - if (pstmtUpdate != null) { - try { - pstmtUpdate.close(); - } catch (SQLException e) { - } - } + closeAutoCloseable(pstmtUpdate); } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java index 29bd67e713b..ab683fcb4f3 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java @@ -82,23 +82,14 @@ public class Upgrade40to41 implements DbUpgrade { if (regionId != null) { region_id = Integer.parseInt(regionId); } - PreparedStatement pstmt = null; - try { + try (PreparedStatement pstmt = conn.prepareStatement("update `cloud`.`region` set id = ?");) { //Update regionId in region table s_logger.debug("Updating region table with Id: " + region_id); - pstmt = conn.prepareStatement("update `cloud`.`region` set id = ?"); pstmt.setInt(1, region_id); pstmt.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Error while updating region entries", e); - } finally { - try { - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java index 7e7f7b7d36c..b816fdc9fc3 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -33,7 +33,6 @@ import java.util.Map; import java.util.UUID; import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; @@ -563,74 +562,47 @@ public class Upgrade410to420 implements DbUpgrade { //update the cluster_details table with default overcommit ratios. private void updateOverCommitRatioClusterDetails(Connection conn) { - PreparedStatement pstmt = null; - PreparedStatement pstmt1 = null; - PreparedStatement pstmt2 = null; - PreparedStatement pstmt3 = null; - ResultSet rs1 = null; - ResultSet rscpu_global = null; - ResultSet rsmem_global = null; - try { - pstmt = conn.prepareStatement("select id, hypervisor_type from `cloud`.`cluster` WHERE removed IS NULL"); - pstmt1 = conn.prepareStatement("INSERT INTO `cloud`.`cluster_details` (cluster_id, name, value) VALUES(?, 'cpuOvercommitRatio', ?)"); - pstmt2 = conn.prepareStatement("INSERT INTO `cloud`.`cluster_details` (cluster_id, name, value) VALUES(?, 'memoryOvercommitRatio', ?)"); - pstmt3 = conn.prepareStatement("select value from `cloud`.`configuration` where name=?"); - pstmt3.setString(1, "cpu.overprovisioning.factor"); - rscpu_global = pstmt3.executeQuery(); + try ( + PreparedStatement pstmt = conn.prepareStatement("select id, hypervisor_type from `cloud`.`cluster` WHERE removed IS NULL"); + PreparedStatement pstmt1 = conn.prepareStatement("INSERT INTO `cloud`.`cluster_details` (cluster_id, name, value) VALUES(?, 'cpuOvercommitRatio', ?)"); + PreparedStatement pstmt2 = conn.prepareStatement("INSERT INTO `cloud`.`cluster_details` (cluster_id, name, value) VALUES(?, 'memoryOvercommitRatio', ?)"); + PreparedStatement pstmt3 = conn.prepareStatement("select value from `cloud`.`configuration` where name=?");) { String global_cpu_overprovisioning_factor = "1"; - if (rscpu_global.next()) - global_cpu_overprovisioning_factor = rscpu_global.getString(1); - pstmt3.setString(1, "mem.overprovisioning.factor"); - rsmem_global = pstmt3.executeQuery(); String global_mem_overprovisioning_factor = "1"; - if (rsmem_global.next()) - global_mem_overprovisioning_factor = rsmem_global.getString(1); - rs1 = pstmt.executeQuery(); - - while (rs1.next()) { - long id = rs1.getLong(1); - String hypervisor_type = rs1.getString(2); - if (HypervisorType.VMware.toString().equalsIgnoreCase(hypervisor_type)) { - pstmt1.setLong(1, id); - pstmt1.setString(2, global_cpu_overprovisioning_factor); - pstmt1.execute(); - pstmt2.setLong(1, id); - pstmt2.setString(2, global_mem_overprovisioning_factor); - pstmt2.execute(); - } else { - //update cluster_details table with the default overcommit ratios. - pstmt1.setLong(1,id); - pstmt1.setString(2,global_cpu_overprovisioning_factor); - pstmt1.execute(); - pstmt2.setLong(1, id); - pstmt2.setString(2, "1"); - pstmt2.execute(); + pstmt3.setString(1, "cpu.overprovisioning.factor"); + try (ResultSet rscpu_global = pstmt3.executeQuery();) { + if (rscpu_global.next()) + global_cpu_overprovisioning_factor = rscpu_global.getString(1); + } + pstmt3.setString(1, "mem.overprovisioning.factor"); + try (ResultSet rsmem_global = pstmt3.executeQuery();) { + if (rsmem_global.next()) + global_mem_overprovisioning_factor = rsmem_global.getString(1); + } + try (ResultSet rs1 = pstmt.executeQuery();) { + while (rs1.next()) { + long id = rs1.getLong(1); + String hypervisor_type = rs1.getString(2); + if (HypervisorType.VMware.toString().equalsIgnoreCase(hypervisor_type)) { + pstmt1.setLong(1, id); + pstmt1.setString(2, global_cpu_overprovisioning_factor); + pstmt1.execute(); + pstmt2.setLong(1, id); + pstmt2.setString(2, global_mem_overprovisioning_factor); + pstmt2.execute(); + } else { + //update cluster_details table with the default overcommit ratios. + pstmt1.setLong(1, id); + pstmt1.setString(2, global_cpu_overprovisioning_factor); + pstmt1.execute(); + pstmt2.setLong(1, id); + pstmt2.setString(2, "1"); + pstmt2.execute(); + } } } } catch (SQLException e) { throw new CloudRuntimeException("Unable to update cluster_details with default overcommit ratios.", e); - } finally { - try { - if (rs1 != null) { - rs1.close(); - } - if (rsmem_global != null) { - rsmem_global.close(); - } - if (rscpu_global != null) { - rscpu_global.close(); - } - if (pstmt != null) { - pstmt.close(); - } - if (pstmt2 != null) { - pstmt2.close(); - } - if (pstmt3 != null) { - pstmt3.close(); - } - } catch (SQLException e) { - } } } @@ -846,94 +818,75 @@ public class Upgrade410to420 implements DbUpgrade { } private void updateNonLegacyZones(Connection conn, List zones) { - PreparedStatement clustersQuery = null; - PreparedStatement clusterDetailsQuery = null; - PreparedStatement pstmt = null; - ResultSet clusters = null; - ResultSet clusterDetails = null; - ResultSet dcInfo = null; try { for (Long zoneId : zones) { s_logger.debug("Discovered non-legacy zone " + zoneId + ". Processing the zone to associate with VMware datacenter."); // All clusters in a non legacy zone will belong to the same VMware DC, hence pick the first cluster - clustersQuery = conn.prepareStatement("select id from `cloud`.`cluster` where removed is NULL AND data_center_id=?"); - clustersQuery.setLong(1, zoneId); - clusters = clustersQuery.executeQuery(); - clusters.next(); - Long clusterId = clusters.getLong("id"); + try (PreparedStatement clustersQuery = conn.prepareStatement("select id from `cloud`.`cluster` where removed is NULL AND data_center_id=?");) { + clustersQuery.setLong(1, zoneId); + try (ResultSet clusters = clustersQuery.executeQuery();) { + clusters.next(); + Long clusterId = clusters.getLong("id"); - // Get VMware datacenter details from cluster_details table - String user = null; - String password = null; - String url = null; - clusterDetailsQuery = conn.prepareStatement("select name, value from `cloud`.`cluster_details` where cluster_id=?"); - clusterDetailsQuery.setLong(1, clusterId); - clusterDetails = clusterDetailsQuery.executeQuery(); - while (clusterDetails.next()) { - String key = clusterDetails.getString(1); - String value = clusterDetails.getString(2); - if (key.equalsIgnoreCase("username")) { - user = value; - } else if (key.equalsIgnoreCase("password")) { - password = value; - } else if (key.equalsIgnoreCase("url")) { - url = value; + // Get VMware datacenter details from cluster_details table + String user = null; + String password = null; + String url = null; + try (PreparedStatement clusterDetailsQuery = conn.prepareStatement("select name, value from `cloud`.`cluster_details` where cluster_id=?");) { + clusterDetailsQuery.setLong(1, clusterId); + try (ResultSet clusterDetails = clusterDetailsQuery.executeQuery();) { + while (clusterDetails.next()) { + String key = clusterDetails.getString(1); + String value = clusterDetails.getString(2); + if (key.equalsIgnoreCase("username")) { + user = value; + } else if (key.equalsIgnoreCase("password")) { + password = value; + } else if (key.equalsIgnoreCase("url")) { + url = value; + } + } + String[] tokens = url.split("/"); // url format - http://vcenter/dc/cluster + String vc = tokens[2]; + String dcName = tokens[3]; + String guid = dcName + "@" + vc; + + try (PreparedStatement insertVmWareDC = conn + .prepareStatement("INSERT INTO `cloud`.`vmware_data_center` (uuid, name, guid, vcenter_host, username, password) values(?, ?, ?, ?, ?, ?)");) { + insertVmWareDC.setString(1, UUID.randomUUID().toString()); + insertVmWareDC.setString(2, dcName); + insertVmWareDC.setString(3, guid); + insertVmWareDC.setString(4, vc); + insertVmWareDC.setString(5, user); + insertVmWareDC.setString(6, password); + insertVmWareDC.executeUpdate(); + } + try (PreparedStatement selectVmWareDC = conn.prepareStatement("SELECT id FROM `cloud`.`vmware_data_center` where guid=?");) { + selectVmWareDC.setString(1, guid); + try (ResultSet vmWareDcInfo = selectVmWareDC.executeQuery();) { + Long vmwareDcId = -1L; + if (vmWareDcInfo.next()) { + vmwareDcId = vmWareDcInfo.getLong("id"); + } + + try (PreparedStatement insertMapping = conn + .prepareStatement("INSERT INTO `cloud`.`vmware_data_center_zone_map` (zone_id, vmware_data_center_id) values(?, ?)");) { + insertMapping.setLong(1, zoneId); + insertMapping.setLong(2, vmwareDcId); + insertMapping.executeUpdate(); + } + } + } + } + } } } - String[] tokens = url.split("/"); // url format - http://vcenter/dc/cluster - String vc = tokens[2]; - String dcName = tokens[3]; - String guid = dcName + "@" + vc; - - pstmt = conn.prepareStatement("INSERT INTO `cloud`.`vmware_data_center` (uuid, name, guid, vcenter_host, username, password) values(?, ?, ?, ?, ?, ?)"); - pstmt.setString(1, UUID.randomUUID().toString()); - pstmt.setString(2, dcName); - pstmt.setString(3, guid); - pstmt.setString(4, vc); - pstmt.setString(5, user); - pstmt.setString(6, password); - pstmt.executeUpdate(); - - pstmt = conn.prepareStatement("SELECT id FROM `cloud`.`vmware_data_center` where guid=?"); - pstmt.setString(1, guid); - dcInfo = pstmt.executeQuery(); - Long vmwareDcId = -1L; - if (dcInfo.next()) { - vmwareDcId = dcInfo.getLong("id"); - } - - pstmt = conn.prepareStatement("INSERT INTO `cloud`.`vmware_data_center_zone_map` (zone_id, vmware_data_center_id) values(?, ?)"); - pstmt.setLong(1, zoneId); - pstmt.setLong(2, vmwareDcId); - pstmt.executeUpdate(); } } catch (SQLException e) { String msg = "Unable to update non legacy zones." + e.getMessage(); s_logger.error(msg); throw new CloudRuntimeException(msg, e); - } finally { - try { - if (clustersQuery != null) { - clustersQuery.close(); - } - if (clusterDetails != null) { - clusterDetails.close(); - } - if (clusterDetailsQuery != null) { - clusterDetailsQuery.close(); - } - if (clusters != null) { - clusters.close(); - } - if (dcInfo != null) { - dcInfo.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -1086,129 +1039,131 @@ public class Upgrade410to420 implements DbUpgrade { s_logger.debug("Updating network ACLs"); - PreparedStatement pstmt = null; - PreparedStatement pstmtDelete = null; - ResultSet rs = null; - ResultSet rsAcls = null; - ResultSet rsCidr = null; - //1,2 are default acl Ids, start acl Ids from 3 long nextAclId = 3; + String sqlSelectNetworkIds = "SELECT id, vpc_id, uuid FROM `cloud`.`networks` where vpc_id is not null and removed is null"; + String sqlSelectFirewallRules = "SELECT id, uuid, start_port, end_port, state, protocol, icmp_code, icmp_type, created, traffic_type FROM `cloud`.`firewall_rules` where network_id = ? and purpose = 'NetworkACL'"; + String sqlInsertNetworkAcl = "INSERT INTO `cloud`.`network_acl` (id, uuid, vpc_id, description, name) values (?, UUID(), ? , ?, ?)"; + String sqlSelectFirewallCidrs = "SELECT id, source_cidr FROM `cloud`.`firewall_rules_cidrs` where firewall_rule_id = ?"; + String sqlDeleteFirewallCidr = "DELETE FROM `cloud`.`firewall_rules_cidrs` where id = ?"; + String sqlInsertNetworkAclItem = "INSERT INTO `cloud`.`network_acl_item` (uuid, acl_id, start_port, end_port, state, protocol, icmp_code, icmp_type, created, traffic_type, cidr, number, action) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"; + String sqlDeleteFirewallRules = "DELETE FROM `cloud`.`firewall_rules` where id = ?"; + String sqlUpdateNetworks = "UPDATE `cloud`.`networks` set network_acl_id=? where id=?"; - try { + try ( + PreparedStatement pstmtSelectNetworkIds = conn.prepareStatement(sqlSelectNetworkIds); + PreparedStatement pstmtUpdate = conn.prepareStatement(sqlUpdateNetworks); + PreparedStatement pstmtInsertNetworkAclItem = conn.prepareStatement(sqlInsertNetworkAclItem); + PreparedStatement pstmtSelectFirewallRules = conn.prepareStatement(sqlSelectFirewallRules); + PreparedStatement pstmtInsertNetworkAcl = conn.prepareStatement(sqlInsertNetworkAcl); + PreparedStatement pstmtSelectFirewallCidrs = conn.prepareStatement(sqlSelectFirewallCidrs); + PreparedStatement pstmtDeleteFirewallCidr = conn.prepareStatement(sqlDeleteFirewallCidr); + PreparedStatement pstmtDeleteFirewallRules = conn.prepareStatement(sqlDeleteFirewallRules); + ResultSet rsNetworkIds = pstmtSelectNetworkIds.executeQuery();) { //Get all VPC tiers - pstmt = conn.prepareStatement("SELECT id, vpc_id, uuid FROM `cloud`.`networks` where vpc_id is not null and removed is null"); - rs = pstmt.executeQuery(); - while (rs.next()) { - Long networkId = rs.getLong(1); + while (rsNetworkIds.next()) { + Long networkId = rsNetworkIds.getLong(1); s_logger.debug("Updating network ACLs for network: " + networkId); - Long vpcId = rs.getLong(2); - String tierUuid = rs.getString(3); - pstmt = - conn.prepareStatement("SELECT id, uuid, start_port, end_port, state, protocol, icmp_code, icmp_type, created, traffic_type FROM `cloud`.`firewall_rules` where network_id = ? and purpose = 'NetworkACL'"); - pstmt.setLong(1, networkId); - rsAcls = pstmt.executeQuery(); + Long vpcId = rsNetworkIds.getLong(2); + String tierUuid = rsNetworkIds.getString(3); + pstmtSelectFirewallRules.setLong(1, networkId); boolean hasAcls = false; Long aclId = null; int number = 1; - while (rsAcls.next()) { - if (!hasAcls) { - hasAcls = true; - aclId = nextAclId++; - //create ACL for the tier - s_logger.debug("Creating network ACL for tier: " + tierUuid); - pstmt = conn.prepareStatement("INSERT INTO `cloud`.`network_acl` (id, uuid, vpc_id, description, name) values (?, UUID(), ? , ?, ?)"); - pstmt.setLong(1, aclId); - pstmt.setLong(2, vpcId); - pstmt.setString(3, "ACL for tier " + tierUuid); - pstmt.setString(4, "tier_" + tierUuid); - pstmt.executeUpdate(); - } - - Long fwRuleId = rsAcls.getLong(1); - String cidr = null; - //get cidr from firewall_rules_cidrs - pstmt = conn.prepareStatement("SELECT id, source_cidr FROM `cloud`.`firewall_rules_cidrs` where firewall_rule_id = ?"); - pstmt.setLong(1, fwRuleId); - rsCidr = pstmt.executeQuery(); - while (rsCidr.next()) { - Long cidrId = rsCidr.getLong(1); - String sourceCidr = rsCidr.getString(2); - if (cidr == null) { - cidr = sourceCidr; - } else { - cidr += "," + sourceCidr; + try (ResultSet rsAcls = pstmtSelectFirewallRules.executeQuery();) { + while (rsAcls.next()) { + if (!hasAcls) { + hasAcls = true; + aclId = nextAclId++; + //create ACL for the tier + s_logger.debug("Creating network ACL for tier: " + tierUuid); + pstmtInsertNetworkAcl.setLong(1, aclId); + pstmtInsertNetworkAcl.setLong(2, vpcId); + pstmtInsertNetworkAcl.setString(3, "ACL for tier " + tierUuid); + pstmtInsertNetworkAcl.setString(4, "tier_" + tierUuid); + pstmtInsertNetworkAcl.executeUpdate(); } - //Delete cidr entry - pstmtDelete = conn.prepareStatement("DELETE FROM `cloud`.`firewall_rules_cidrs` where id = ?"); - pstmtDelete.setLong(1, cidrId); - pstmtDelete.executeUpdate(); - } - String aclItemUuid = rsAcls.getString(2); - //Move acl to network_acl_item table - s_logger.debug("Moving firewall rule: " + aclItemUuid); - pstmt = - conn.prepareStatement("INSERT INTO `cloud`.`network_acl_item` (uuid, acl_id, start_port, end_port, state, protocol, icmp_code, icmp_type, created, traffic_type, cidr, number, action) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"); - //uuid - pstmt.setString(1, aclItemUuid); - //aclId - pstmt.setLong(2, aclId); - //Start port - Integer startPort = rsAcls.getInt(3); - if (rsAcls.wasNull()) { - pstmt.setNull(3, Types.INTEGER); - } else { - pstmt.setLong(3, startPort); - } - //End port - Integer endPort = rsAcls.getInt(4); - if (rsAcls.wasNull()) { - pstmt.setNull(4, Types.INTEGER); - } else { - pstmt.setLong(4, endPort); - } - //State - String state = rsAcls.getString(5); - pstmt.setString(5, state); - //protocol - String protocol = rsAcls.getString(6); - pstmt.setString(6, protocol); - //icmp_code - Integer icmpCode = rsAcls.getInt(7); - if (rsAcls.wasNull()) { - pstmt.setNull(7, Types.INTEGER); - } else { - pstmt.setLong(7, icmpCode); - } + Long fwRuleId = rsAcls.getLong(1); + String cidr = null; + //get cidr from firewall_rules_cidrs + pstmtSelectFirewallCidrs.setLong(1, fwRuleId); + try (ResultSet rsCidr = pstmtSelectFirewallCidrs.executeQuery();) { + while (rsCidr.next()) { + Long cidrId = rsCidr.getLong(1); + String sourceCidr = rsCidr.getString(2); + if (cidr == null) { + cidr = sourceCidr; + } else { + cidr += "," + sourceCidr; + } + //Delete cidr entry + pstmtDeleteFirewallCidr.setLong(1, cidrId); + pstmtDeleteFirewallCidr.executeUpdate(); + } + } + String aclItemUuid = rsAcls.getString(2); + //Move acl to network_acl_item table + s_logger.debug("Moving firewall rule: " + aclItemUuid); + //uuid + pstmtInsertNetworkAclItem.setString(1, aclItemUuid); + //aclId + pstmtInsertNetworkAclItem.setLong(2, aclId); + //Start port + Integer startPort = rsAcls.getInt(3); + if (rsAcls.wasNull()) { + pstmtInsertNetworkAclItem.setNull(3, Types.INTEGER); + } else { + pstmtInsertNetworkAclItem.setLong(3, startPort); + } + //End port + Integer endPort = rsAcls.getInt(4); + if (rsAcls.wasNull()) { + pstmtInsertNetworkAclItem.setNull(4, Types.INTEGER); + } else { + pstmtInsertNetworkAclItem.setLong(4, endPort); + } + //State + String state = rsAcls.getString(5); + pstmtInsertNetworkAclItem.setString(5, state); + //protocol + String protocol = rsAcls.getString(6); + pstmtInsertNetworkAclItem.setString(6, protocol); + //icmp_code + Integer icmpCode = rsAcls.getInt(7); + if (rsAcls.wasNull()) { + pstmtInsertNetworkAclItem.setNull(7, Types.INTEGER); + } else { + pstmtInsertNetworkAclItem.setLong(7, icmpCode); + } - //icmp_type - Integer icmpType = rsAcls.getInt(8); - if (rsAcls.wasNull()) { - pstmt.setNull(8, Types.INTEGER); - } else { - pstmt.setLong(8, icmpType); + //icmp_type + Integer icmpType = rsAcls.getInt(8); + if (rsAcls.wasNull()) { + pstmtInsertNetworkAclItem.setNull(8, Types.INTEGER); + } else { + pstmtInsertNetworkAclItem.setLong(8, icmpType); + } + + //created + Date created = rsAcls.getDate(9); + pstmtInsertNetworkAclItem.setDate(9, created); + //traffic type + String trafficType = rsAcls.getString(10); + pstmtInsertNetworkAclItem.setString(10, trafficType); + + //cidr + pstmtInsertNetworkAclItem.setString(11, cidr); + //number + pstmtInsertNetworkAclItem.setInt(12, number++); + //action + pstmtInsertNetworkAclItem.setString(13, "Allow"); + pstmtInsertNetworkAclItem.executeUpdate(); + + //Delete firewall rule + pstmtDeleteFirewallRules.setLong(1, fwRuleId); + pstmtDeleteFirewallRules.executeUpdate(); } - - //created - Date created = rsAcls.getDate(9); - pstmt.setDate(9, created); - //traffic type - String trafficType = rsAcls.getString(10); - pstmt.setString(10, trafficType); - - //cidr - pstmt.setString(11, cidr); - //number - pstmt.setInt(12, number++); - //action - pstmt.setString(13, "Allow"); - pstmt.executeUpdate(); - - //Delete firewall rule - pstmtDelete = conn.prepareStatement("DELETE FROM `cloud`.`firewall_rules` where id = ?"); - pstmtDelete.setLong(1, fwRuleId); - pstmtDelete.executeUpdate(); } if (!hasAcls) { //no network ACls for this network. @@ -1216,30 +1171,13 @@ public class Upgrade410to420 implements DbUpgrade { aclId = NetworkACL.DEFAULT_DENY; } //Assign acl to network - pstmt = conn.prepareStatement("UPDATE `cloud`.`networks` set network_acl_id=? where id=?"); - pstmt.setLong(1, aclId); - pstmt.setLong(2, networkId); - pstmt.executeUpdate(); + pstmtUpdate.setLong(1, aclId); + pstmtUpdate.setLong(2, networkId); + pstmtUpdate.executeUpdate(); } s_logger.debug("Done updating network ACLs "); } catch (SQLException e) { throw new CloudRuntimeException("Unable to move network acls from firewall rules table to network_acl_item table", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (rsAcls != null) { - rsAcls.close(); - } - if (rsCidr != null) { - rsCidr.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } } @@ -1457,12 +1395,13 @@ public class Upgrade410to420 implements DbUpgrade { // Corrects upgrade for deployment with F5 and SRX devices (pre 3.0) to network offering & // network service provider paradigm private void correctExternalNetworkDevicesSetup(Connection conn) { - PreparedStatement zoneSearchStmt = null, pNetworkStmt = null, f5DevicesStmt = null, srxDevicesStmt = null; - ResultSet zoneResults = null, pNetworksResults = null, f5DevicesResult = null, srxDevicesResult = null; + PreparedStatement pNetworkStmt = null, f5DevicesStmt = null, srxDevicesStmt = null; + ResultSet pNetworksResults = null, f5DevicesResult = null, srxDevicesResult = null; - try { - zoneSearchStmt = conn.prepareStatement("SELECT id, networktype FROM `cloud`.`data_center`"); - zoneResults = zoneSearchStmt.executeQuery(); + try ( + PreparedStatement zoneSearchStmt = conn.prepareStatement("SELECT id, networktype FROM `cloud`.`data_center`"); + ResultSet zoneResults = zoneSearchStmt.executeQuery(); + ){ while (zoneResults.next()) { long zoneId = zoneResults.getLong(1); String networkType = zoneResults.getString(2); @@ -1499,12 +1438,13 @@ public class Upgrade410to420 implements DbUpgrade { } } - PreparedStatement fetchSRXNspStmt = + boolean hasSrxNsp = false; + try (PreparedStatement fetchSRXNspStmt = conn.prepareStatement("SELECT id from `cloud`.`physical_network_service_providers` where physical_network_id=" + physicalNetworkId + " and provider_name = 'JuniperSRX'"); - ResultSet rsSRXNSP = fetchSRXNspStmt.executeQuery(); - boolean hasSrxNsp = rsSRXNSP.next(); - fetchSRXNspStmt.close(); + ResultSet rsSRXNSP = fetchSRXNspStmt.executeQuery();) { + hasSrxNsp = rsSRXNSP.next(); + } // if there is no 'JuniperSRX' physical network service provider added into physical network then // add 'JuniperSRX' as network service provider and add the entry in 'external_firewall_devices' @@ -1527,24 +1467,8 @@ public class Upgrade410to420 implements DbUpgrade { // not the network service provider has been provisioned in to physical network, mark all guest network // to be using network offering 'Isolated with external providers' fixZoneUsingExternalDevices(conn); - - if (zoneResults != null) { - try { - zoneResults.close(); - } catch (SQLException e) { - } - } - - if (zoneSearchStmt != null) { - try { - zoneSearchStmt.close(); - } catch (SQLException e) { - } - } } catch (SQLException e) { throw new CloudRuntimeException("Exception while adding PhysicalNetworks", e); - } finally { - } } @@ -1823,39 +1747,37 @@ public class Upgrade410to420 implements DbUpgrade { // migrate secondary storages NFS from host tables to image_store table private void migrateSecondaryStorageToImageStore(Connection conn) { - PreparedStatement storeInsert = null; - PreparedStatement storeDetailInsert = null; - PreparedStatement nfsQuery = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - ResultSet storeInfo = null; + String sqlSelectS3Count = "select count(*) from `cloud`.`s3`"; + String sqlSelectSwiftCount = "select count(*) from `cloud`.`swift`"; + String sqlInsertStoreDetail = "INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"; + String sqlUpdateHostAsRemoved = "UPDATE `cloud`.`host` SET removed = now() WHERE type = 'SecondaryStorage' and removed is null"; s_logger.debug("Migrating secondary storage to image store"); boolean hasS3orSwift = false; - try { + try ( + PreparedStatement pstmtSelectS3Count = conn.prepareStatement(sqlSelectS3Count); + PreparedStatement pstmtSelectSwiftCount = conn.prepareStatement(sqlSelectSwiftCount); + PreparedStatement storeDetailInsert = conn.prepareStatement(sqlInsertStoreDetail); + PreparedStatement storeInsert = + conn.prepareStatement("INSERT INTO `cloud`.`image_store` (id, uuid, name, image_provider_name, protocol, url, data_center_id, scope, role, parent, total_size, created) values(?, ?, ?, 'NFS', 'nfs', ?, ?, 'ZONE', ?, ?, ?, ?)"); + PreparedStatement nfsQuery = + conn.prepareStatement("select id, uuid, url, data_center_id, parent, total_size, created from `cloud`.`host` where type = 'SecondaryStorage' and removed is null"); + PreparedStatement pstmtUpdateHostAsRemoved = conn.prepareStatement(sqlUpdateHostAsRemoved); + ResultSet rsSelectS3Count = pstmtSelectS3Count.executeQuery(); + ResultSet rsSelectSwiftCount = pstmtSelectSwiftCount.executeQuery(); + ResultSet rsNfs = nfsQuery.executeQuery(); + ) { s_logger.debug("Checking if we need to migrate NFS secondary storage to image store or staging store"); int numRows = 0; - pstmt = conn.prepareStatement("select count(*) from `cloud`.`s3`"); - rs = pstmt.executeQuery(); - if (rs.next()) { - numRows = rs.getInt(1); + if (rsSelectS3Count.next()) { + numRows = rsSelectS3Count.getInt(1); + } + // check if there is swift storage + if (rsSelectSwiftCount.next()) { + numRows += rsSelectSwiftCount.getInt(1); } - rs.close(); - pstmt.close(); if (numRows > 0) { hasS3orSwift = true; - } else { - // check if there is swift storage - pstmt = conn.prepareStatement("select count(*) from `cloud`.`swift`"); - rs = pstmt.executeQuery(); - if (rs.next()) { - numRows = rs.getInt(1); - } - rs.close(); - pstmt.close(); - if (numRows > 0) { - hasS3orSwift = true; - } } String store_role = "Image"; @@ -1865,23 +1787,15 @@ public class Upgrade410to420 implements DbUpgrade { s_logger.debug("Migrating NFS secondary storage to " + store_role + " store"); - storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"); - // migrate NFS secondary storage, for nfs, keep previous host_id as the store_id - storeInsert = - conn.prepareStatement("INSERT INTO `cloud`.`image_store` (id, uuid, name, image_provider_name, protocol, url, data_center_id, scope, role, parent, total_size, created) values(?, ?, ?, 'NFS', 'nfs', ?, ?, 'ZONE', ?, ?, ?, ?)"); - nfsQuery = - conn.prepareStatement("select id, uuid, url, data_center_id, parent, total_size, created from `cloud`.`host` where type = 'SecondaryStorage' and removed is null"); - rs = nfsQuery.executeQuery(); - - while (rs.next()) { - Long nfs_id = rs.getLong("id"); - String nfs_uuid = rs.getString("uuid"); - String nfs_url = rs.getString("url"); - String nfs_parent = rs.getString("parent"); - int nfs_dcid = rs.getInt("data_center_id"); - Long nfs_totalsize = rs.getObject("total_size") != null ? rs.getLong("total_size") : null; - Date nfs_created = rs.getDate("created"); + while (rsNfs.next()) { + Long nfs_id = rsNfs.getLong("id"); + String nfs_uuid = rsNfs.getString("uuid"); + String nfs_url = rsNfs.getString("url"); + String nfs_parent = rsNfs.getString("parent"); + int nfs_dcid = rsNfs.getInt("data_center_id"); + Long nfs_totalsize = rsNfs.getObject("total_size") != null ? rsNfs.getLong("total_size") : null; + Date nfs_created = rsNfs.getDate("created"); // insert entry in image_store table and image_store_details // table and store host_id and store_id mapping @@ -1902,36 +1816,11 @@ public class Upgrade410to420 implements DbUpgrade { } s_logger.debug("Marking NFS secondary storage in host table as removed"); - pstmt = conn.prepareStatement("UPDATE `cloud`.`host` SET removed = now() WHERE type = 'SecondaryStorage' and removed is null"); - pstmt.executeUpdate(); - pstmt.close(); + pstmtUpdateHostAsRemoved.executeUpdate(); } catch (SQLException e) { String msg = "Unable to migrate secondary storages." + e.getMessage(); s_logger.error(msg); throw new CloudRuntimeException(msg, e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (storeInfo != null) { - storeInfo.close(); - } - - if (storeInsert != null) { - storeInsert.close(); - } - if (storeDetailInsert != null) { - storeDetailInsert.close(); - } - if (nfsQuery != null) { - nfsQuery.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Completed migrating secondary storage to image store"); } @@ -2008,26 +1897,21 @@ public class Upgrade410to420 implements DbUpgrade { // migrate secondary storages S3 from s3 tables to image_store table private void migrateS3ToImageStore(Connection conn) { - PreparedStatement storeInsert = null; - PreparedStatement storeDetailInsert = null; - PreparedStatement storeQuery = null; - PreparedStatement s3Query = null; - ResultSet rs = null; - ResultSet storeInfo = null; Long storeId = null; Map s3_store_id_map = new HashMap(); s_logger.debug("Migrating S3 to image store"); - try { - storeQuery = conn.prepareStatement("select id from `cloud`.`image_store` where uuid = ?"); - storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"); + try ( + PreparedStatement storeQuery = conn.prepareStatement("select id from `cloud`.`image_store` where uuid = ?"); + PreparedStatement storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"); - // migrate S3 to image_store - storeInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) " + - "values(?, ?, 'S3', ?, 'REGION', 'Image', ?)"); - s3Query = conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, " + - "max_error_retry, socket_timeout, created from `cloud`.`s3`"); - rs = s3Query.executeQuery(); + // migrate S3 to image_store + PreparedStatement storeInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) " + + "values(?, ?, 'S3', ?, 'REGION', 'Image', ?)"); + PreparedStatement s3Query = conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, " + + "max_error_retry, socket_timeout, created from `cloud`.`s3`"); + ResultSet rs = s3Query.executeQuery(); + ) { while (rs.next()) { Long s3_id = rs.getLong("id"); @@ -2052,9 +1936,10 @@ public class Upgrade410to420 implements DbUpgrade { storeInsert.executeUpdate(); storeQuery.setString(1, s3_uuid); - storeInfo = storeQuery.executeQuery(); - if (storeInfo.next()) { - storeId = storeInfo.getLong("id"); + try (ResultSet storeInfo = storeQuery.executeQuery();) { + if (storeInfo.next()) { + storeId = storeInfo.getLong("id"); + } } Map detailMap = new HashMap(); @@ -2088,29 +1973,6 @@ public class Upgrade410to420 implements DbUpgrade { String msg = "Unable to migrate S3 secondary storages." + e.getMessage(); s_logger.error(msg); throw new CloudRuntimeException(msg, e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (storeInfo != null) { - storeInfo.close(); - } - - if (storeInsert != null) { - storeInsert.close(); - } - if (storeDetailInsert != null) { - storeDetailInsert.close(); - } - if (storeQuery != null) { - storeQuery.close(); - } - if (s3Query != null) { - s3Query.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Migrating template_s3_ref to template_store_ref"); @@ -2223,26 +2085,20 @@ public class Upgrade410to420 implements DbUpgrade { // migrate secondary storages Swift from swift tables to image_store table private void migrateSwiftToImageStore(Connection conn) { - PreparedStatement storeInsert = null; - PreparedStatement storeDetailInsert = null; - PreparedStatement storeQuery = null; - PreparedStatement swiftQuery = null; - ResultSet rs = null; - ResultSet storeInfo = null; Long storeId = null; Map swift_store_id_map = new HashMap(); s_logger.debug("Migrating Swift to image store"); - try { - storeQuery = conn.prepareStatement("select id from `cloud`.`image_store` where uuid = ?"); - storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"); + try ( + PreparedStatement storeQuery = conn.prepareStatement("select id from `cloud`.`image_store` where uuid = ?"); + PreparedStatement storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)"); - // migrate SWIFT secondary storage - storeInsert = + // migrate SWIFT secondary storage + PreparedStatement storeInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, url, scope, role, created) values(?, ?, 'Swift', 'http', ?, 'REGION', 'Image', ?)"); - swiftQuery = conn.prepareStatement("select id, uuid, url, account, username, swift.key, created from `cloud`.`swift`"); - rs = swiftQuery.executeQuery(); - + PreparedStatement swiftQuery = conn.prepareStatement("select id, uuid, url, account, username, swift.key, created from `cloud`.`swift`"); + ResultSet rs = swiftQuery.executeQuery(); + ) { while (rs.next()) { Long swift_id = rs.getLong("id"); String swift_uuid = rs.getString("uuid"); @@ -2261,9 +2117,10 @@ public class Upgrade410to420 implements DbUpgrade { storeInsert.executeUpdate(); storeQuery.setString(1, swift_uuid); - storeInfo = storeQuery.executeQuery(); - if (storeInfo.next()) { - storeId = storeInfo.getLong("id"); + try (ResultSet storeInfo = storeQuery.executeQuery();) { + if (storeInfo.next()) { + storeId = storeInfo.getLong("id"); + } } Map detailMap = new HashMap(); @@ -2286,29 +2143,6 @@ public class Upgrade410to420 implements DbUpgrade { String msg = "Unable to migrate swift secondary storages." + e.getMessage(); s_logger.error(msg); throw new CloudRuntimeException(msg, e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (storeInfo != null) { - storeInfo.close(); - } - - if (storeInsert != null) { - storeInsert.close(); - } - if (storeDetailInsert != null) { - storeDetailInsert.close(); - } - if (storeQuery != null) { - storeQuery.close(); - } - if (swiftQuery != null) { - swiftQuery.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Migrating template_swift_ref to template_store_ref"); @@ -2322,16 +2156,13 @@ public class Upgrade410to420 implements DbUpgrade { // migrate template_s3_ref to template_store_ref private void migrateTemplateSwiftRef(Connection conn, Map swiftStoreMap) { - PreparedStatement tmplStoreInsert = null; - PreparedStatement s3Query = null; - ResultSet rs = null; s_logger.debug("Updating template_store_ref table from template_swift_ref table"); - try { - tmplStoreInsert = + try ( + PreparedStatement tmplStoreInsert = conn.prepareStatement("INSERT INTO `cloud`.`template_store_ref` (store_id, template_id, created, download_pct, size, physical_size, download_state, local_path, install_path, update_count, ref_cnt, store_role, state) values(?, ?, ?, 100, ?, ?, 'DOWNLOADED', '?', '?', 0, 0, 'Image', 'Ready')"); - s3Query = conn.prepareStatement("select swift_id, template_id, created, path, size, physical_size from `cloud`.`template_swift_ref`"); - rs = s3Query.executeQuery(); - + PreparedStatement s3Query = conn.prepareStatement("select swift_id, template_id, created, path, size, physical_size from `cloud`.`template_swift_ref`"); + ResultSet rs = s3Query.executeQuery(); + ) { while (rs.next()) { Long swift_id = rs.getLong("swift_id"); Long tmpl_id = rs.getLong("template_id"); @@ -2361,19 +2192,6 @@ public class Upgrade410to420 implements DbUpgrade { String msg = "Unable to migrate template_swift_ref." + e.getMessage(); s_logger.error(msg); throw new CloudRuntimeException(msg, e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (tmplStoreInsert != null) { - tmplStoreInsert.close(); - } - if (s3Query != null) { - s3Query.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Completed migrating template_swift_ref table."); } @@ -2636,10 +2454,10 @@ public class Upgrade410to420 implements DbUpgrade { private void upgradeResourceCount(Connection conn) { s_logger.debug("upgradeResourceCount start"); - ResultSet rsAccount = null; - try( PreparedStatement sel_dom_pstmt = conn.prepareStatement("select id, domain_id FROM `cloud`.`account` where removed is NULL ");) - { - rsAccount = sel_dom_pstmt.executeQuery(); + try( + PreparedStatement sel_dom_pstmt = conn.prepareStatement("select id, domain_id FROM `cloud`.`account` where removed is NULL "); + ResultSet rsAccount = sel_dom_pstmt.executeQuery(); + ) { while (rsAccount.next()) { long account_id = rsAccount.getLong(1); long domain_id = rsAccount.getLong(2); @@ -2767,13 +2585,6 @@ public class Upgrade410to420 implements DbUpgrade { s_logger.debug("upgradeResourceCount finish"); } catch (SQLException e) { throw new CloudRuntimeException("Unable to upgrade resource count (cpu,memory,primary_storage,secondary_storage) ", e); - } finally { - try { - if (rsAccount != null) { - rsAccount.close(); - } - } catch (SQLException e) { - } } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java index 2f0ae29ca7a..d8d0b32bd06 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java @@ -71,182 +71,144 @@ public class Upgrade420to421 implements DbUpgrade { private void updateOverprovisioningPerVm(Connection conn) { - PreparedStatement pstmt1 = null; - PreparedStatement pstmt2 = null; - PreparedStatement pstmt3 = null; - ResultSet result1 = null; - ResultSet result2 = null; - // Get cpu overprovisioning factor from global setting and update user vm details table for all the vms if factor > 1 - try { - pstmt1 = conn.prepareStatement("select value from `cloud`.`configuration` where name='cpu.overprovisioning.factor'"); - result1 = pstmt1.executeQuery(); + try (PreparedStatement selectConfiguration = conn.prepareStatement("select value from `cloud`.`configuration` where name=?");) { String cpuoverprov = "1"; - if(result1.next()){ - cpuoverprov = result1.getString(1); + selectConfiguration.setString(1, "cpu.overprovisioning.factor"); + try (ResultSet configData = selectConfiguration.executeQuery()) { + if (configData.next()) { + cpuoverprov = configData.getString(1); + } } - result1.close(); - pstmt1.close(); - - pstmt1 = conn.prepareStatement("select value from `cloud`.`configuration` where name='mem.overprovisioning.factor'"); - result1 = pstmt1.executeQuery(); String memoverprov = "1"; - if(result1.next()){ - memoverprov = result1.getString(1); + selectConfiguration.setString(1, "mem.overprovisioning.factor"); + try (ResultSet configData = selectConfiguration.executeQuery()) { + if (configData.next()) { + memoverprov = configData.getString(1); + } } - result1.close(); - pstmt1.close(); - // Need to populate only when overprovisioning factor doesn't pre exist. s_logger.debug("Starting updating user_vm_details with cpu/memory overprovisioning factors"); - pstmt2 = conn.prepareStatement("select id, hypervisor_type from `cloud`.`vm_instance` where removed is null and id not in (select vm_id from `cloud`.`user_vm_details` where name='cpuOvercommitRatio')"); - pstmt3 = conn.prepareStatement("INSERT IGNORE INTO cloud.user_vm_details (vm_id, name, value) VALUES (?, ?, ?)"); - result2 = pstmt2.executeQuery(); - while (result2.next()) { - String hypervisor_type = result2.getString(2); - if (hypervisor_type.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.name())) { - //For cpu - pstmt3.setLong(1, result2.getLong(1)); - pstmt3.setString(2, "cpuOvercommitRatio"); - pstmt3.setString(3, cpuoverprov); - pstmt3.executeUpdate(); + try ( + PreparedStatement pstmt2 = conn + .prepareStatement("select id, hypervisor_type from `cloud`.`vm_instance` where removed is null and id not in (select vm_id from `cloud`.`user_vm_details` where name='cpuOvercommitRatio')"); + PreparedStatement pstmt3 = conn.prepareStatement("INSERT IGNORE INTO cloud.user_vm_details (vm_id, name, value) VALUES (?, ?, ?)"); + ResultSet result2 = pstmt2.executeQuery();) { + while (result2.next()) { + String hypervisor_type = result2.getString(2); + if (hypervisor_type.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.name())) { + //For cpu + pstmt3.setLong(1, result2.getLong(1)); + pstmt3.setString(2, "cpuOvercommitRatio"); + pstmt3.setString(3, cpuoverprov); + pstmt3.executeUpdate(); + // For memory + pstmt3.setLong(1, result2.getLong(1)); + pstmt3.setString(2, "memoryOvercommitRatio"); + pstmt3.setString(3, memoverprov); // memory overprovisioning was used to reserve memory in case of VMware. + pstmt3.executeUpdate(); + } else { + //For cpu + pstmt3.setLong(1, result2.getLong(1)); + pstmt3.setString(2, "cpuOvercommitRatio"); + pstmt3.setString(3, cpuoverprov); + pstmt3.executeUpdate(); - // For memory - pstmt3.setLong(1, result2.getLong(1)); - pstmt3.setString(2, "memoryOvercommitRatio"); - pstmt3.setString(3, memoverprov); // memory overprovisioning was used to reserve memory in case of VMware. - pstmt3.executeUpdate(); - } else { - //For cpu - pstmt3.setLong(1, result2.getLong(1)); - pstmt3.setString(2, "cpuOvercommitRatio"); - pstmt3.setString(3, cpuoverprov); - pstmt3.executeUpdate(); - - // For memory - pstmt3.setLong(1, result2.getLong(1)); - pstmt3.setString(2, "memoryOvercommitRatio"); - pstmt3.setString(3, "1"); // memory overprovisioning didn't exist earlier. - pstmt3.executeUpdate(); + // For memory + pstmt3.setLong(1, result2.getLong(1)); + pstmt3.setString(2, "memoryOvercommitRatio"); + pstmt3.setString(3, "1"); // memory overprovisioning didn't exist earlier. + pstmt3.executeUpdate(); + } } } s_logger.debug("Done updating user_vm_details with cpu/memory overprovisioning factors"); - } catch (SQLException e) { throw new CloudRuntimeException("Unable to update cpu/memory overprovisioning factors", e); - } finally { - try { - if (pstmt1 != null && !pstmt1.isClosed()) { - pstmt1.close(); - } - } catch (SQLException e) { - } - try { - if (pstmt2 != null && !pstmt2.isClosed()) { - pstmt2.close(); - } - } catch (SQLException e) { - } - try { - if (pstmt3 != null && !pstmt3.isClosed()) { - pstmt3.close(); - } - } catch (SQLException e) { - } - try { - if (result1 != null) { - result1.close(); - } - } catch (SQLException e) { - } - try { - if (result2 != null) { - result2.close(); - } - }catch (SQLException e){ - - } } - } private void upgradeResourceCount(Connection conn) { s_logger.debug("upgradeResourceCount start"); - PreparedStatement pstmt1 = null; - PreparedStatement pstmt2 = null; - PreparedStatement pstmt3 = null; - PreparedStatement pstmt4 = null; - PreparedStatement pstmt5 = null; - ResultSet rsAccount = null; - ResultSet rsCount = null; - try { - pstmt1 = conn.prepareStatement("select id, domain_id FROM `cloud`.`account` where removed is NULL "); - rsAccount = pstmt1.executeQuery(); + String sqlSelectAccountIds = "select id, domain_id FROM `cloud`.`account` where removed is NULL "; + String sqlSelectOfferingTotals = "SELECT SUM(service_offering.cpu), SUM(service_offering.ram_size)" + + " FROM `cloud`.`vm_instance`, `cloud`.`service_offering`" + + " WHERE vm_instance.service_offering_id = service_offering.id AND vm_instance.account_id = ?" + + " AND vm_instance.removed is NULL" + + " AND vm_instance.vm_type='User' AND state not in ('Destroyed', 'Error', 'Expunging')"; + String sqlSelectTotalVolumeSize = + "SELECT sum(size) FROM `cloud`.`volumes` WHERE account_id= ?" + + " AND (path is not NULL OR state in ('Allocated')) AND removed is NULL" + + " AND instance_id IN (SELECT id FROM `cloud`.`vm_instance` WHERE vm_type='User')"; + String sqlSelectTotalPathlessVolumeSize = + "SELECT sum(size) FROM `cloud`.`volumes` WHERE account_id= ?" + + " AND path is NULL AND state not in ('Allocated') AND removed is NULL"; + String sqlSelectTotalSnapshotSize = "SELECT sum(size) FROM `cloud`.`snapshots` WHERE account_id= ? AND removed is NULL"; + String sqlSelectTotalTemplateStoreSize = "SELECT sum(template_store_ref.size) FROM `cloud`.`template_store_ref`,`cloud`.`vm_template` WHERE account_id = ?" + + " AND template_store_ref.template_id = vm_template.id AND download_state = 'DOWNLOADED' AND destroyed = false AND removed is NULL"; + String sqlSelectDomainIds = "select id FROM `cloud`.`domain`"; + String sqlSelectAccountCount = "select account.domain_id,sum(resource_count.count) from `cloud`.`account` left join `cloud`.`resource_count` on account.id=resource_count.account_id " + + "where resource_count.type=? group by account.domain_id;"; + + try ( + PreparedStatement pstmtSelectAccountIds = conn.prepareStatement(sqlSelectAccountIds); + PreparedStatement pstmtSelectOfferingTotals = conn.prepareStatement(sqlSelectOfferingTotals); + PreparedStatement pstmtSelectTotalVolumeSize = conn.prepareStatement(sqlSelectTotalVolumeSize); + PreparedStatement pstmtSelectTotalPathlessVolumeSize = conn.prepareStatement(sqlSelectTotalPathlessVolumeSize); + PreparedStatement pstmtSelectTotalSnapshotSize = conn.prepareStatement(sqlSelectTotalSnapshotSize); + PreparedStatement pstmtSelectTotalTemplateStoreSize = conn.prepareStatement(sqlSelectTotalTemplateStoreSize); + PreparedStatement pstmtSelectDomainIds = conn.prepareStatement(sqlSelectDomainIds); + PreparedStatement pstmtSelectAccountCount = conn.prepareStatement(sqlSelectAccountCount); + ResultSet rsAccount = pstmtSelectAccountIds.executeQuery(); + ) { while (rsAccount.next()) { long account_id = rsAccount.getLong(1); long domain_id = rsAccount.getLong(2); // 1. update cpu,memory for all accounts - pstmt2 = - conn.prepareStatement("SELECT SUM(service_offering.cpu), SUM(service_offering.ram_size)" + " FROM `cloud`.`vm_instance`, `cloud`.`service_offering`" - + " WHERE vm_instance.service_offering_id = service_offering.id AND vm_instance.account_id = ?" + " AND vm_instance.removed is NULL" - + " AND vm_instance.vm_type='User' AND state not in ('Destroyed', 'Error', 'Expunging')"); - pstmt2.setLong(1, account_id); - rsCount = pstmt2.executeQuery(); - if (rsCount.next()) { - upgradeResourceCountforAccount(conn, account_id, domain_id, "cpu", rsCount.getLong(1)); - upgradeResourceCountforAccount(conn, account_id, domain_id, "memory", rsCount.getLong(2)); - } else { - upgradeResourceCountforAccount(conn, account_id, domain_id, "cpu", 0L); - upgradeResourceCountforAccount(conn, account_id, domain_id, "memory", 0L); + pstmtSelectOfferingTotals.setLong(1, account_id); + try (ResultSet rsOfferingTotals = pstmtSelectOfferingTotals.executeQuery();) { + if (rsOfferingTotals.next()) { + upgradeResourceCountforAccount(conn, account_id, domain_id, "cpu", rsOfferingTotals.getLong(1)); + upgradeResourceCountforAccount(conn, account_id, domain_id, "memory", rsOfferingTotals.getLong(2)); + } else { + upgradeResourceCountforAccount(conn, account_id, domain_id, "cpu", 0L); + upgradeResourceCountforAccount(conn, account_id, domain_id, "memory", 0L); + } } - rsCount.close(); // 2. update primary_storage for all accounts - pstmt3 = - conn.prepareStatement("SELECT sum(size) FROM `cloud`.`volumes` WHERE account_id= ?" - + " AND (path is not NULL OR state in ('Allocated')) AND removed is NULL" - + " AND instance_id IN (SELECT id FROM `cloud`.`vm_instance` WHERE vm_type='User')"); - pstmt3.setLong(1, account_id); - rsCount = pstmt3.executeQuery(); - if (rsCount.next()) { - upgradeResourceCountforAccount(conn, account_id, domain_id, "primary_storage", rsCount.getLong(1)); - } else { - upgradeResourceCountforAccount(conn, account_id, domain_id, "primary_storage", 0L); + pstmtSelectTotalVolumeSize.setLong(1, account_id); + try (ResultSet rsTotalVolumeSize = pstmtSelectTotalVolumeSize.executeQuery();) { + if (rsTotalVolumeSize.next()) { + upgradeResourceCountforAccount(conn, account_id, domain_id, "primary_storage", rsTotalVolumeSize.getLong(1)); + } else { + upgradeResourceCountforAccount(conn, account_id, domain_id, "primary_storage", 0L); + } } - rsCount.close(); // 3. update secondary_storage for all accounts long totalVolumesSize = 0; long totalSnapshotsSize = 0; long totalTemplatesSize = 0; - pstmt4 = - conn.prepareStatement("SELECT sum(size) FROM `cloud`.`volumes` WHERE account_id= ?" - + " AND path is NULL AND state not in ('Allocated') AND removed is NULL"); - pstmt4.setLong(1, account_id); - rsCount = pstmt4.executeQuery(); - if (rsCount.next()) { - totalVolumesSize = rsCount.getLong(1); + pstmtSelectTotalPathlessVolumeSize.setLong(1, account_id); + try (ResultSet rsTotalPathlessVolumeSize = pstmtSelectTotalPathlessVolumeSize.executeQuery();) { + if (rsTotalPathlessVolumeSize.next()) { + totalVolumesSize = rsTotalPathlessVolumeSize.getLong(1); + } } - rsCount.close(); - pstmt4.close(); - pstmt4 = conn.prepareStatement("SELECT sum(size) FROM `cloud`.`snapshots` WHERE account_id= ? AND removed is NULL"); - pstmt4.setLong(1, account_id); - rsCount = pstmt4.executeQuery(); - if (rsCount.next()) { - totalSnapshotsSize = rsCount.getLong(1); + pstmtSelectTotalSnapshotSize.setLong(1, account_id); + try (ResultSet rsTotalSnapshotSize = pstmtSelectTotalSnapshotSize.executeQuery();) { + if (rsTotalSnapshotSize.next()) { + totalSnapshotsSize = rsTotalSnapshotSize.getLong(1); + } } - rsCount.close(); - pstmt4.close(); - - pstmt4 = - conn.prepareStatement("SELECT sum(template_store_ref.size) FROM `cloud`.`template_store_ref`,`cloud`.`vm_template` WHERE account_id = ?" - + " AND template_store_ref.template_id = vm_template.id AND download_state = 'DOWNLOADED' AND destroyed = false AND removed is NULL"); - pstmt4.setLong(1, account_id); - rsCount = pstmt4.executeQuery(); - if (rsCount.next()) { - totalTemplatesSize = rsCount.getLong(1); + pstmtSelectTotalTemplateStoreSize.setLong(1, account_id); + try (ResultSet rsTotalTemplateStoreSize = pstmtSelectTotalTemplateStoreSize.executeQuery();) { + if (rsTotalTemplateStoreSize.next()) { + totalTemplatesSize = rsTotalTemplateStoreSize.getLong(1); + } } upgradeResourceCountforAccount(conn, account_id, domain_id, "secondary_storage", totalVolumesSize + totalSnapshotsSize + totalTemplatesSize); } @@ -254,82 +216,53 @@ public class Upgrade420to421 implements DbUpgrade { // 4. upgrade cpu,memory,primary_storage,secondary_storage for domains String resource_types[] = {"cpu", "memory", "primary_storage", "secondary_storage"}; - pstmt5 = conn.prepareStatement("select id FROM `cloud`.`domain`"); - rsAccount = pstmt5.executeQuery(); - while (rsAccount.next()) { - long domain_id = rsAccount.getLong(1); - for (int count = 0; count < resource_types.length; count++) { - String resource_type = resource_types[count]; - upgradeResourceCountforDomain(conn, domain_id, resource_type, 0L); // reset value to 0 before statistics + try (ResultSet rsDomainIds = pstmtSelectDomainIds.executeQuery();) { + while (rsDomainIds.next()) { + long domain_id = rsDomainIds.getLong(1); + for (int count = 0; count < resource_types.length; count++) { + String resource_type = resource_types[count]; + upgradeResourceCountforDomain(conn, domain_id, resource_type, 0L); // reset value to 0 before statistics + } } } for (int count = 0; count < resource_types.length; count++) { String resource_type = resource_types[count]; - pstmt5 = - conn.prepareStatement("select account.domain_id,sum(resource_count.count) from `cloud`.`account` left join `cloud`.`resource_count` on account.id=resource_count.account_id " - + "where resource_count.type=? group by account.domain_id;"); - pstmt5.setString(1, resource_type); - rsCount = pstmt5.executeQuery(); - while (rsCount.next()) { - long domain_id = rsCount.getLong(1); - long resource_count = rsCount.getLong(2); - upgradeResourceCountforDomain(conn, domain_id, resource_type, resource_count); + pstmtSelectAccountCount.setString(1, resource_type); + try (ResultSet rsAccountCount = pstmtSelectAccountCount.executeQuery();) { + while (rsAccountCount.next()) { + long domain_id = rsAccountCount.getLong(1); + long resource_count = rsAccountCount.getLong(2); + upgradeResourceCountforDomain(conn, domain_id, resource_type, resource_count); + } } } s_logger.debug("upgradeResourceCount finish"); } catch (SQLException e) { throw new CloudRuntimeException("Unable to upgrade resource count (cpu,memory,primary_storage,secondary_storage) ", e); - } finally { - try { - if (rsAccount != null) { - rsAccount.close(); - } - if (rsCount != null) { - rsCount.close(); - } - if (pstmt1 != null) { - pstmt1.close(); - } - if (pstmt2 != null) { - pstmt2.close(); - } - if (pstmt3 != null) { - pstmt3.close(); - } - if (pstmt4 != null) { - pstmt4.close(); - } - if (pstmt5 != null) { - pstmt5.close(); - } - } catch (SQLException e) { - } } } private static void upgradeResourceCountforAccount(Connection conn, Long accountId, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. - PreparedStatement pstmt = null; - pstmt = - conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (account_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, accountId); - pstmt.setString(2, type); - pstmt.setLong(3, resourceCount); - pstmt.setLong(4, resourceCount); - pstmt.executeUpdate(); - pstmt.close(); + String sqlInsertResourceCount = "INSERT INTO `cloud`.`resource_count` (account_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"; + try (PreparedStatement pstmt = conn.prepareStatement(sqlInsertResourceCount);) { + pstmt.setLong(1, accountId); + pstmt.setString(2, type); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); + pstmt.executeUpdate(); + } } private static void upgradeResourceCountforDomain(Connection conn, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. - PreparedStatement pstmt = null; - pstmt = - conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (domain_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, domainId); - pstmt.setString(2, type); - pstmt.setLong(3, resourceCount); - pstmt.setLong(4, resourceCount); - pstmt.executeUpdate(); - pstmt.close(); + String sqlInsertResourceCount = "INSERT INTO `cloud`.`resource_count` (domain_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"; + try (PreparedStatement pstmt = conn.prepareStatement(sqlInsertResourceCount);) { + pstmt.setLong(1, domainId); + pstmt.setString(2, type); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); + pstmt.executeUpdate(); + } } } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java index 191e022d623..931e353df42 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade442to450.java @@ -32,6 +32,7 @@ import java.util.Set; import com.cloud.hypervisor.Hypervisor; import com.cloud.utils.crypt.DBEncryptionUtil; + import org.apache.log4j.Logger; import com.cloud.utils.exception.CloudRuntimeException; @@ -76,31 +77,20 @@ public class Upgrade442to450 implements DbUpgrade { } private void updateMaxRouterSizeConfig(Connection conn) { - PreparedStatement updatePstmt = null; - try { + String sqlUpdateConfig = "UPDATE `cloud`.`configuration` SET value=? WHERE name='router.ram.size' AND category='Hidden'"; + try (PreparedStatement updatePstmt = conn.prepareStatement(sqlUpdateConfig);){ String encryptedValue = DBEncryptionUtil.encrypt("256"); - updatePstmt = conn.prepareStatement("UPDATE `cloud`.`configuration` SET value=? WHERE name='router.ram.size' AND category='Hidden'"); updatePstmt.setBytes(1, encryptedValue.getBytes("UTF-8")); updatePstmt.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Unable to upgrade max ram size of router in config.", e); } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt configuration values ", e); - } finally { - try { - if (updatePstmt != null) { - updatePstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Done updating router.ram.size config to 256"); } private void upgradeMemoryOfVirtualRoutervmOffering(Connection conn) { - PreparedStatement updatePstmt = null; - PreparedStatement selectPstmt = null; - ResultSet selectResultSet = null; int newRamSize = 256; //256MB long serviceOfferingId = 0; @@ -109,10 +99,11 @@ public class Upgrade442to450 implements DbUpgrade { * We should not update/modify any user-defined offering. */ - try { - selectPstmt = conn.prepareStatement("SELECT id FROM `cloud`.`service_offering` WHERE vm_type='domainrouter'"); - updatePstmt = conn.prepareStatement("UPDATE `cloud`.`service_offering` SET ram_size=? WHERE id=?"); - selectResultSet = selectPstmt.executeQuery(); + try ( + PreparedStatement selectPstmt = conn.prepareStatement("SELECT id FROM `cloud`.`service_offering` WHERE vm_type='domainrouter'"); + PreparedStatement updatePstmt = conn.prepareStatement("UPDATE `cloud`.`service_offering` SET ram_size=? WHERE id=?"); + ResultSet selectResultSet = selectPstmt.executeQuery(); + ) { if(selectResultSet.next()) { serviceOfferingId = selectResultSet.getLong("id"); } @@ -122,19 +113,6 @@ public class Upgrade442to450 implements DbUpgrade { updatePstmt.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Unable to upgrade ram_size of service offering for domain router. ", e); - } finally { - try { - if (selectPstmt != null) { - selectPstmt.close(); - } - if (selectResultSet != null) { - selectResultSet.close(); - } - if (updatePstmt != null) { - updatePstmt.close(); - } - } catch (SQLException e) { - } } s_logger.debug("Done upgrading RAM for service offering of domain router to " + newRamSize); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to451.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to451.java index d56db8563c3..b49939fc7c7 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to451.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to451.java @@ -17,13 +17,6 @@ package com.cloud.upgrade.dao; -import com.cloud.utils.crypt.DBEncryptionUtil; -import com.cloud.utils.db.TransactionLegacy; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; -import org.apache.log4j.Logger; -import org.jasypt.exceptions.EncryptionOperationNotPossibleException; - import java.io.File; import java.io.UnsupportedEncodingException; import java.sql.Connection; @@ -33,6 +26,13 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import org.apache.log4j.Logger; +import org.jasypt.exceptions.EncryptionOperationNotPossibleException; + +import com.cloud.utils.crypt.DBEncryptionUtil; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.Script; + public class Upgrade450to451 implements DbUpgrade { final static Logger s_logger = Logger.getLogger(Upgrade450to451.class); @@ -80,50 +80,30 @@ public class Upgrade450to451 implements DbUpgrade { } private void encryptKeyInKeyStore(Connection conn) { - PreparedStatement selectStatement = null; - ResultSet selectResultSet = null; - PreparedStatement updateStatement = null; - try { - selectStatement = conn.prepareStatement("SELECT ks.id, ks.key FROM cloud.keystore ks WHERE ks.key IS NOT null"); - selectResultSet = selectStatement.executeQuery(); + try ( + PreparedStatement selectStatement = conn.prepareStatement("SELECT ks.id, ks.key FROM cloud.keystore ks WHERE ks.key IS NOT null"); + ResultSet selectResultSet = selectStatement.executeQuery(); + ) { while (selectResultSet.next()) { Long keyId = selectResultSet.getLong(1); String preSharedKey = selectResultSet.getString(2); - updateStatement = conn.prepareStatement("UPDATE cloud.keystore ks SET ks.key = ? WHERE ks.id = ?"); - updateStatement.setString(1, DBEncryptionUtil.encrypt(preSharedKey)); - updateStatement.setLong(2, keyId); - updateStatement.executeUpdate(); - updateStatement.close(); + try (PreparedStatement updateStatement = conn.prepareStatement("UPDATE cloud.keystore ks SET ks.key = ? WHERE ks.id = ?");) { + updateStatement.setString(1, DBEncryptionUtil.encrypt(preSharedKey)); + updateStatement.setLong(2, keyId); + updateStatement.executeUpdate(); + } } } catch (SQLException e) { throw new CloudRuntimeException("Exception while encrypting key column in keystore table", e); - } finally { - if (selectResultSet != null) - try { - selectResultSet.close(); - } catch (SQLException e) { - } - if (selectStatement != null) - try { - selectStatement.close(); - } catch (SQLException e) { - } - if (updateStatement != null) - try { - updateStatement.close(); - } catch (SQLException e) { - } } s_logger.debug("Done encrypting keystore's key column"); } private void encryptIpSecPresharedKeysOfRemoteAccessVpn(Connection conn) { - PreparedStatement selectStatement = null; - PreparedStatement updateStatement = null; - ResultSet resultSet = null; - try { - selectStatement = conn.prepareStatement("SELECT id, ipsec_psk FROM `cloud`.`remote_access_vpn`"); - resultSet = selectStatement.executeQuery(); + try ( + PreparedStatement selectStatement = conn.prepareStatement("SELECT id, ipsec_psk FROM `cloud`.`remote_access_vpn`"); + ResultSet resultSet = selectStatement.executeQuery(); + ) { while (resultSet.next()) { Long rowId = resultSet.getLong(1); String preSharedKey = resultSet.getString(2); @@ -132,92 +112,62 @@ public class Upgrade450to451 implements DbUpgrade { } catch (EncryptionOperationNotPossibleException ignored) { s_logger.debug("The ipsec_psk preshared key id=" + rowId + "in remote_access_vpn is not encrypted, encrypting it."); } - updateStatement = conn.prepareStatement("UPDATE `cloud`.`remote_access_vpn` SET ipsec_psk=? WHERE id=?"); - updateStatement.setString(1, DBEncryptionUtil.encrypt(preSharedKey)); - updateStatement.setLong(2, rowId); - updateStatement.executeUpdate(); - updateStatement.close(); + try (PreparedStatement updateStatement = conn.prepareStatement("UPDATE `cloud`.`remote_access_vpn` SET ipsec_psk=? WHERE id=?");) { + updateStatement.setString(1, DBEncryptionUtil.encrypt(preSharedKey)); + updateStatement.setLong(2, rowId); + updateStatement.executeUpdate(); + } } } catch (SQLException e) { throw new CloudRuntimeException("Unable to update the remote_access_vpn's preshared key ipsec_psk column", e); - } finally { - try { - if (resultSet != null) { - resultSet.close(); - } - if ((selectStatement != null) && (!selectStatement.isClosed())) { - selectStatement.close(); - } - if ((updateStatement != null) && (!updateStatement.isClosed())) - updateStatement.close(); - } catch (SQLException e) { - } } s_logger.debug("Done encrypting remote_access_vpn's ipsec_psk column"); } private void encryptStoragePoolUserInfo(Connection conn) { List listOfStatements = new ArrayList(); - try { - PreparedStatement preparedStatement = conn.prepareStatement("SELECT id, user_info FROM `cloud`.`storage_pool` WHERE user_info IS NOT NULL"); - listOfStatements.add(preparedStatement); - ResultSet resultSet = preparedStatement.executeQuery(); + try ( + PreparedStatement selectStatement = conn.prepareStatement("SELECT id, user_info FROM `cloud`.`storage_pool` WHERE user_info IS NOT NULL"); + ResultSet resultSet = selectStatement.executeQuery(); + ) { while (resultSet.next()) { long id = resultSet.getLong(1); String userInfo = resultSet.getString(2); String encryptedUserInfo = DBEncryptionUtil.encrypt(userInfo); - preparedStatement = conn.prepareStatement("UPDATE `cloud`.`storage_pool` SET user_info=? WHERE id=?"); - listOfStatements.add(preparedStatement); - if (encryptedUserInfo == null) - preparedStatement.setNull(1, 12); - else { - preparedStatement.setBytes(1, encryptedUserInfo.getBytes("UTF-8")); + try (PreparedStatement preparedStatement = conn.prepareStatement("UPDATE `cloud`.`storage_pool` SET user_info=? WHERE id=?");) { + listOfStatements.add(preparedStatement); + if (encryptedUserInfo == null) + preparedStatement.setNull(1, 12); + else { + preparedStatement.setBytes(1, encryptedUserInfo.getBytes("UTF-8")); + } + preparedStatement.setLong(2, id); + preparedStatement.executeUpdate(); } - preparedStatement.setLong(2, id); - preparedStatement.executeUpdate(); - preparedStatement.close(); } } catch (SQLException e) { throw new CloudRuntimeException("Unable encrypt storage pool user info ", e); } catch (UnsupportedEncodingException e) { throw new CloudRuntimeException("Unable encrypt storage pool user info ", e); - } finally { - TransactionLegacy.closePstmts(listOfStatements); } s_logger.debug("Done encrypting storage_pool's user_info column"); } private void updateUserVmDetailsWithNicAdapterType(Connection conn) { - PreparedStatement insertPstmt = null; - try { - insertPstmt = conn.prepareStatement("INSERT INTO `cloud`.`user_vm_details`(vm_id,name,value,display) select v.id as vm_id, details.name, details.value, details.display from `cloud`.`vm_instance` as v, `cloud`.`vm_template_details` as details where v.removed is null and v.vm_template_id=details.template_id and details.name='nicAdapter' and details.template_id in (select id from `cloud`.`vm_template` where hypervisor_type = 'vmware') and v.id not in (select vm_id from `cloud`.`user_vm_details` where name='nicAdapter');"); + try (PreparedStatement insertPstmt = conn.prepareStatement("INSERT INTO `cloud`.`user_vm_details`(vm_id,name,value,display) select v.id as vm_id, details.name, details.value, details.display from `cloud`.`vm_instance` as v, `cloud`.`vm_template_details` as details where v.removed is null and v.vm_template_id=details.template_id and details.name='nicAdapter' and details.template_id in (select id from `cloud`.`vm_template` where hypervisor_type = 'vmware') and v.id not in (select vm_id from `cloud`.`user_vm_details` where name='nicAdapter');");) { insertPstmt.executeUpdate(); } catch (SQLException e) { throw new CloudRuntimeException("Failed to update user_vm_details table with nicAdapter entries by copying from vm_template_detail table", e); - } finally { - try { - if (insertPstmt != null) - insertPstmt.close(); - } catch (SQLException e) { - } } s_logger.debug("Done. Updated user_vm_details table with nicAdapter entries by copying from vm_template_detail table. This affects only VM/templates with hypervisor_type as VMware."); } private void upgradeVMWareLocalStorage(Connection conn) { - PreparedStatement updatePstmt = null; - try { - updatePstmt = conn.prepareStatement("UPDATE storage_pool SET pool_type='VMFS',host_address=@newaddress WHERE (@newaddress:=concat('VMFS datastore: ', path)) IS NOT NULL AND scope = 'HOST' AND pool_type = 'LVM' AND id IN (SELECT * FROM (SELECT storage_pool.id FROM storage_pool,cluster WHERE storage_pool.cluster_id = cluster.id AND cluster.hypervisor_type='VMware') AS t);"); + try (PreparedStatement updatePstmt = conn.prepareStatement("UPDATE storage_pool SET pool_type='VMFS',host_address=@newaddress WHERE (@newaddress:=concat('VMFS datastore: ', path)) IS NOT NULL AND scope = 'HOST' AND pool_type = 'LVM' AND id IN (SELECT * FROM (SELECT storage_pool.id FROM storage_pool,cluster WHERE storage_pool.cluster_id = cluster.id AND cluster.hypervisor_type='VMware') AS t);");) { updatePstmt.executeUpdate(); + s_logger.debug("Done, upgraded VMWare local storage pool type to VMFS and host_address to the VMFS format"); } catch (SQLException e) { throw new CloudRuntimeException("Unable to upgrade VMWare local storage pool type", e); - } finally { - try { - if (updatePstmt != null) - updatePstmt.close(); - } catch (SQLException e) { - } - s_logger.debug("Done, upgraded VMWare local storage pool type to VMFS and host_address to the VMFS format"); } } } diff --git a/engine/schema/src/com/cloud/user/UserAccountVO.java b/engine/schema/src/com/cloud/user/UserAccountVO.java index 80ee873f3e5..5ce0eb79d66 100644 --- a/engine/schema/src/com/cloud/user/UserAccountVO.java +++ b/engine/schema/src/com/cloud/user/UserAccountVO.java @@ -251,7 +251,7 @@ public class UserAccountVO implements UserAccount, InternalIdentity { return accountState; } - public void setAccountDisabled(String accountState) { + public void setAccountState(String accountState) { this.accountState = accountState; } diff --git a/engine/schema/src/com/cloud/vm/NicVO.java b/engine/schema/src/com/cloud/vm/NicVO.java index 2865cc82163..81542973609 100644 --- a/engine/schema/src/com/cloud/vm/NicVO.java +++ b/engine/schema/src/com/cloud/vm/NicVO.java @@ -48,13 +48,13 @@ public class NicVO implements Nic { Long instanceId; @Column(name = "ip4_address") - String ip4Address; + String iPv4Address; @Column(name = "ip6_address") - String ip6Address; + String iPv6Address; @Column(name = "netmask") - String netmask; + String iPv4Netmask; @Column(name = "isolation_uri") URI isolationUri; @@ -66,7 +66,7 @@ public class NicVO implements Nic { URI broadcastUri; @Column(name = "gateway") - String gateway; + String iPv4Gateway; @Column(name = "mac_address") String macAddress; @@ -98,10 +98,10 @@ public class NicVO implements Nic { boolean defaultNic; @Column(name = "ip6_gateway") - String ip6Gateway; + String iPv6Gateway; @Column(name = "ip6_cidr") - String ip6Cidr; + String iPv6Cidr; @Column(name = "strategy") @Enumerated(value = EnumType.STRING) @@ -132,12 +132,12 @@ public class NicVO implements Nic { } @Override - public String getIp4Address() { - return ip4Address; + public String getIPv4Address() { + return iPv4Address; } - public void setIp4Address(String address) { - ip4Address = address; + public void setIPv4Address(String address) { + iPv4Address = address; } @Override @@ -164,26 +164,26 @@ public class NicVO implements Nic { } @Override - public String getIp6Address() { - return ip6Address; + public String getIPv6Address() { + return iPv6Address; } - public void setIp6Address(String ip6Address) { - this.ip6Address = ip6Address; + public void setIPv6Address(String ip6Address) { + this.iPv6Address = ip6Address; } @Override - public String getNetmask() { - return netmask; + public String getIPv4Netmask() { + return iPv4Netmask; } @Override - public String getGateway() { - return gateway; + public String getIPv4Gateway() { + return iPv4Gateway; } - public void setGateway(String gateway) { - this.gateway = gateway; + public void setIPv4Gateway(String gateway) { + this.iPv4Gateway = gateway; } @Override @@ -195,8 +195,8 @@ public class NicVO implements Nic { this.addressFormat = format; } - public void setNetmask(String netmask) { - this.netmask = netmask; + public void setIPv4Netmask(String netmask) { + this.iPv4Netmask = netmask; } @Override @@ -322,7 +322,7 @@ public class NicVO implements Nic { .append("-") .append(reservationId) .append("-") - .append(ip4Address) + .append(iPv4Address) .append("]") .toString(); } @@ -342,21 +342,21 @@ public class NicVO implements Nic { } @Override - public String getIp6Gateway() { - return ip6Gateway; + public String getIPv6Gateway() { + return iPv6Gateway; } - public void setIp6Gateway(String ip6Gateway) { - this.ip6Gateway = ip6Gateway; + public void setIPv6Gateway(String ip6Gateway) { + this.iPv6Gateway = ip6Gateway; } @Override - public String getIp6Cidr() { - return ip6Cidr; + public String getIPv6Cidr() { + return iPv6Cidr; } - public void setIp6Cidr(String ip6Cidr) { - this.ip6Cidr = ip6Cidr; + public void setIPv6Cidr(String ip6Cidr) { + this.iPv6Cidr = ip6Cidr; } @Override diff --git a/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java index 9f4d17a18ad..c2d6dfe8d8e 100644 --- a/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java @@ -23,6 +23,7 @@ import javax.annotation.PostConstruct; import javax.ejb.Local; import javax.inject.Inject; +import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Component; import com.cloud.host.HostVO; @@ -252,7 +253,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase im final List routerIds = listBy(sc); final List routers = new ArrayList(); for (final DomainRouterVO router : routerIds) { - routers.add(findById(router.getId())); + CollectionUtils.addIgnoreNull(routers, findById(router.getId())); } return routers; } diff --git a/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java index 1e78262710b..da89b2c54d3 100644 --- a/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java @@ -59,9 +59,9 @@ public class NicDaoImpl extends GenericDaoBase implements NicDao { AllFieldsSearch = createSearchBuilder(); AllFieldsSearch.and("instance", AllFieldsSearch.entity().getInstanceId(), Op.EQ); AllFieldsSearch.and("network", AllFieldsSearch.entity().getNetworkId(), Op.EQ); - AllFieldsSearch.and("gateway", AllFieldsSearch.entity().getGateway(), Op.EQ); + AllFieldsSearch.and("gateway", AllFieldsSearch.entity().getIPv4Gateway(), Op.EQ); AllFieldsSearch.and("vmType", AllFieldsSearch.entity().getVmType(), Op.EQ); - AllFieldsSearch.and("address", AllFieldsSearch.entity().getIp4Address(), Op.EQ); + AllFieldsSearch.and("address", AllFieldsSearch.entity().getIPv4Address(), Op.EQ); AllFieldsSearch.and("isDefault", AllFieldsSearch.entity().isDefaultNic(), Op.EQ); AllFieldsSearch.and("broadcastUri", AllFieldsSearch.entity().getBroadcastUri(), Op.EQ); AllFieldsSearch.and("secondaryip", AllFieldsSearch.entity().getSecondaryIp(), Op.EQ); @@ -70,9 +70,9 @@ public class NicDaoImpl extends GenericDaoBase implements NicDao { AllFieldsSearch.done(); IpSearch = createSearchBuilder(String.class); - IpSearch.select(null, Func.DISTINCT, IpSearch.entity().getIp4Address()); + IpSearch.select(null, Func.DISTINCT, IpSearch.entity().getIPv4Address()); IpSearch.and("network", IpSearch.entity().getNetworkId(), Op.EQ); - IpSearch.and("address", IpSearch.entity().getIp4Address(), Op.NNULL); + IpSearch.and("address", IpSearch.entity().getIPv4Address(), Op.NNULL); IpSearch.done(); NonReleasedSearch = createSearchBuilder(); @@ -216,7 +216,7 @@ public class NicDaoImpl extends GenericDaoBase implements NicDao { sc.setParameters("instance", instanceId); NicVO nicVo = findOneBy(sc); if (nicVo != null) { - return nicVo.getIp4Address(); + return nicVo.getIPv4Address(); } return null; } diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java index db028c4fd3f..1f2843d144f 100644 --- a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java @@ -30,12 +30,12 @@ import javax.annotation.PostConstruct; import javax.ejb.Local; import javax.inject.Inject; -import com.cloud.utils.Pair; import org.apache.log4j.Logger; import com.cloud.server.ResourceTag.ResourceObjectType; import com.cloud.tags.dao.ResourceTagDao; import com.cloud.user.Account; +import com.cloud.utils.Pair; import com.cloud.utils.db.Attribute; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.GenericSearchBuilder; @@ -185,7 +185,7 @@ public class UserVmDaoImpl extends GenericDaoBase implements Use SearchBuilder nicSearch = _nicDao.createSearchBuilder(); nicSearch.and("networkId", nicSearch.entity().getNetworkId(), SearchCriteria.Op.EQ); - nicSearch.and("ip4Address", nicSearch.entity().getIp4Address(), SearchCriteria.Op.NNULL); + nicSearch.and("ip4Address", nicSearch.entity().getIPv4Address(), SearchCriteria.Op.NNULL); AccountDataCenterVirtualSearch = createSearchBuilder(); AccountDataCenterVirtualSearch.and("account", AccountDataCenterVirtualSearch.entity().getAccountId(), SearchCriteria.Op.EQ); @@ -307,8 +307,8 @@ public class UserVmDaoImpl extends GenericDaoBase implements Use SearchBuilder nicSearch = _nicDao.createSearchBuilder(); nicSearch.and("networkId", nicSearch.entity().getNetworkId(), SearchCriteria.Op.EQ); nicSearch.and("removed", nicSearch.entity().getRemoved(), SearchCriteria.Op.NULL); - nicSearch.and().op("ip4Address", nicSearch.entity().getIp4Address(), SearchCriteria.Op.NNULL); - nicSearch.or("ip6Address", nicSearch.entity().getIp6Address(), SearchCriteria.Op.NNULL); + nicSearch.and().op("ip4Address", nicSearch.entity().getIPv4Address(), SearchCriteria.Op.NNULL); + nicSearch.or("ip6Address", nicSearch.entity().getIPv6Address(), SearchCriteria.Op.NNULL); nicSearch.cp(); UserVmSearch = createSearchBuilder(); diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java index 39395458822..d265da15de2 100644 --- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java +++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java @@ -117,4 +117,6 @@ public interface PrimaryDataStoreDao extends GenericDao { List findZoneWideStoragePoolsByHypervisor(long dataCenterId, HypervisorType hypervisorType); List findLocalStoragePoolsByHostAndTags(long hostId, String[] tags); + + List listLocalStoragePoolByPath(long datacenterId, String path); } diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java index d3c29f70d6a..5f98f908196 100644 --- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java +++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java @@ -53,6 +53,7 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase protected final SearchBuilder DcPodSearch; protected final SearchBuilder DcPodAnyClusterSearch; protected final SearchBuilder DeleteLvmSearch; + protected final SearchBuilder DcLocalStorageSearch; protected final GenericSearchBuilder StatusCountSearch; @Inject @@ -115,6 +116,11 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase StatusCountSearch.select(null, Func.COUNT, null); StatusCountSearch.done(); + DcLocalStorageSearch = createSearchBuilder(); + DcLocalStorageSearch.and("datacenterId", DcLocalStorageSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcLocalStorageSearch.and("path", DcLocalStorageSearch.entity().getPath(), SearchCriteria.Op.EQ); + DcLocalStorageSearch.and("scope", DcLocalStorageSearch.entity().getScope(), SearchCriteria.Op.EQ); + DcLocalStorageSearch.done(); } @Override @@ -195,6 +201,16 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase return findOneBy(sc); } + @Override + public List listLocalStoragePoolByPath(long datacenterId, String path) { + SearchCriteria sc = DcLocalStorageSearch.create(); + sc.setParameters("path", path); + sc.setParameters("datacenterId", datacenterId); + sc.setParameters("scope", ScopeType.HOST); + + return listBy(sc); + } + @Override public List listBy(long datacenterId, Long podId, Long clusterId, ScopeType scope) { if (clusterId != null) { @@ -380,7 +396,6 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase @Override public List findZoneWideStoragePoolsByTags(long dcId, String[] tags) { - List storagePools = null; if (tags == null || tags.length == 0) { QueryBuilder sc = QueryBuilder.create(StoragePoolVO.class); sc.and(sc.entity().getDataCenterId(), Op.EQ, dcId); @@ -399,17 +414,20 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase sql.append(ZoneWideDetailsSqlSuffix); TransactionLegacy txn = TransactionLegacy.currentTxn(); try (PreparedStatement pstmt = txn.prepareStatement(sql.toString());){ - int i=0; - for (Map.Entry detail : details.entrySet()) { - pstmt.setString(++i,detail.getKey()); - pstmt.setString(++i,detail.getValue()); - } List pools = new ArrayList(); if (pstmt != null) { - i = 1; + int i = 1; + pstmt.setLong(i++, dcId); pstmt.setString(i++, ScopeType.ZONE.toString()); + + for (Map.Entry detail : details.entrySet()) { + pstmt.setString(i++, detail.getKey()); + pstmt.setString(i++, detail.getValue()); + } + pstmt.setInt(i++, details.size()); + try(ResultSet rs = pstmt.executeQuery();) { while (rs.next()) { pools.add(toEntityBean(rs, false)); diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreDao.java b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreDao.java index 231b241408b..4b83e312c7b 100644 --- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreDao.java +++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreDao.java @@ -60,4 +60,7 @@ public interface SnapshotDataStoreDao extends GenericDao future = new AsyncCallFuture(); CopyCommandResult result = null; @@ -251,6 +336,13 @@ public class StorageCacheManagerImpl implements StorageCacheManager, Manager { if (result == null) { objOnCacheStore.processEvent(Event.OperationFailed); } + synchronized (lock) { + /* + * Wake up all threads waiting for cache copy. + */ + s_logger.debug("wake up all waiting threads(lock: " + lock.hashCode() + ")"); + lock.notifyAll(); + } } return null; } diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java index 84df7ff0046..24ecff57e9c 100644 --- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java +++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -407,6 +407,10 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { VolumeVO volumeVo = volDao.findById(volume.getId()); Long oldPoolId = volume.getPoolId(); volumeVo.setPath(((MigrateVolumeAnswer)answer).getVolumePath()); + String chainInfo = ((MigrateVolumeAnswer)answer).getVolumeChainInfo(); + if (chainInfo != null) { + volumeVo.setChainInfo(chainInfo); + } volumeVo.setPodId(destPool.getPodId()); volumeVo.setPoolId(destPool.getId()); volumeVo.setLastPoolId(oldPoolId); diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java index f6dc33e7ee5..ccb70c4aba3 100644 --- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java @@ -291,10 +291,10 @@ public class TemplateServiceImpl implements TemplateService { List allTemplates = null; if (zoneId == null) { // region wide store - allTemplates = _templateDao.listAllActive(); + allTemplates = _templateDao.listByState(VirtualMachineTemplate.State.Active, VirtualMachineTemplate.State.NotUploaded, VirtualMachineTemplate.State.UploadInProgress); } else { // zone wide store - allTemplates = _templateDao.listAllInZone(zoneId); + allTemplates = _templateDao.listInZoneByState(zoneId, VirtualMachineTemplate.State.Active, VirtualMachineTemplate.State.NotUploaded, VirtualMachineTemplate.State.UploadInProgress); } List rtngTmplts = _templateDao.listAllSystemVMTemplates(); List defaultBuiltin = _templateDao.listDefaultBuiltinTemplates(); diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java index 16c14f3c36d..171885e3f3b 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java @@ -72,7 +72,10 @@ public class SnapshotDataFactoryImpl implements SnapshotDataFactory { SnapshotVO snapshot = snapshotDao.findById(snapshotId); SnapshotDataStoreVO snapshotStore = snapshotStoreDao.findBySnapshot(snapshotId, role); if (snapshotStore == null) { - return null; + snapshotStore = snapshotStoreDao.findByVolume(snapshot.getVolumeId(), role); + if (snapshotStore == null) { + return null; + } } DataStore store = storeMgr.getDataStore(snapshotStore.getDataStoreId(), role); SnapshotObject so = SnapshotObject.getSnapshotObject(snapshot, store); diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java index 4c76cda9fd6..f7f044fa8f1 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java @@ -407,16 +407,19 @@ public class SnapshotServiceImpl implements SnapshotService { } @Override - public boolean revertSnapshot(Long snapshotId) { - SnapshotInfo snapshot = _snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Primary); - PrimaryDataStore store = (PrimaryDataStore)snapshot.getDataStore(); + public boolean revertSnapshot(SnapshotInfo snapshot) { + SnapshotInfo snapshotOnPrimaryStore = _snapshotFactory.getSnapshot(snapshot.getId(), DataStoreRole.Primary); + if (snapshotOnPrimaryStore == null) { + throw new CloudRuntimeException("Cannot find an entry for snapshot " + snapshot.getId() + " on primary storage pools"); + } + PrimaryDataStore store = (PrimaryDataStore)snapshotOnPrimaryStore.getDataStore(); AsyncCallFuture future = new AsyncCallFuture(); RevertSnapshotContext context = new RevertSnapshotContext(null, snapshot, future); AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().revertSnapshotCallback(null, null)).setContext(context); - ((PrimaryDataStoreDriver)store.getDriver()).revertSnapshot(snapshot, caller); + ((PrimaryDataStoreDriver)store.getDriver()).revertSnapshot(snapshot, snapshotOnPrimaryStore, caller); SnapshotResult result = null; try { diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStrategyBase.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStrategyBase.java index 6db8343214b..b08a8377f95 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStrategyBase.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStrategyBase.java @@ -37,7 +37,7 @@ public abstract class SnapshotStrategyBase implements SnapshotStrategy { } @Override - public boolean revertSnapshot(Long snapshotId) { - return snapshotSvr.revertSnapshot(snapshotId); + public boolean revertSnapshot(SnapshotInfo snapshot) { + return snapshotSvr.revertSnapshot(snapshot); } } diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java index deec7fe5f55..2c71525aad5 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java @@ -35,6 +35,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotResult; import org.apache.cloudstack.engine.subsystem.api.storage.StrategyPriority; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; import org.apache.cloudstack.storage.command.SnapshotAndCopyAnswer; import org.apache.cloudstack.storage.command.SnapshotAndCopyCommand; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; @@ -56,6 +57,8 @@ import com.cloud.storage.DataStoreRole; import com.cloud.storage.Snapshot; import com.cloud.storage.SnapshotVO; import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolStatus; import com.cloud.storage.Volume; import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.SnapshotDao; @@ -153,8 +156,44 @@ public class StorageSystemSnapshotStrategy extends SnapshotStrategyBase { } @Override - public boolean revertSnapshot(Long snapshotId) { - throw new UnsupportedOperationException("Reverting not supported. Create a template or volume based on the snapshot instead."); + public boolean revertSnapshot(SnapshotInfo snapshot) { + if (canHandle(snapshot,SnapshotOperation.REVERT) == StrategyPriority.CANT_HANDLE) { + throw new UnsupportedOperationException("Reverting not supported. Create a template or volume based on the snapshot instead."); + } + + SnapshotVO snapshotVO = _snapshotDao.acquireInLockTable(snapshot.getId()); + if (snapshotVO == null) { + throw new CloudRuntimeException("Failed to get lock on snapshot:" + snapshot.getId()); + } + + try { + VolumeInfo volumeInfo = snapshot.getBaseVolume(); + StoragePool store = (StoragePool)volumeInfo.getDataStore(); + if (store != null && store.getStatus() != StoragePoolStatus.Up) { + snapshot.processEvent(Event.OperationFailed); + throw new CloudRuntimeException("store is not in up state"); + } + volumeInfo.stateTransit(Volume.Event.RevertSnapshotRequested); + boolean result = false; + try { + result = snapshotSvr.revertSnapshot(snapshot); + if (! result) { + s_logger.debug("Failed to revert snapshot: " + snapshot.getId()); + throw new CloudRuntimeException("Failed to revert snapshot: " + snapshot.getId()); + } + } finally { + if (result) { + volumeInfo.stateTransit(Volume.Event.OperationSucceeded); + } else { + volumeInfo.stateTransit(Volume.Event.OperationFailed); + } + } + return result; + } finally { + if (snapshotVO != null) { + _snapshotDao.releaseFromLockTable(snapshot.getId()); + } + } } @Override @@ -401,10 +440,6 @@ public class StorageSystemSnapshotStrategy extends SnapshotStrategyBase { @Override public StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op) { - if (SnapshotOperation.REVERT.equals(op)) { - return StrategyPriority.CANT_HANDLE; - } - long volumeId = snapshot.getVolumeId(); VolumeVO volumeVO = _volumeDao.findById(volumeId); @@ -424,6 +459,13 @@ public class StorageSystemSnapshotStrategy extends SnapshotStrategyBase { storagePoolId = volumeVO.getPoolId(); } + if (SnapshotOperation.REVERT.equals(op)) { + if (volumeVO != null && ImageFormat.QCOW2.equals(volumeVO.getFormat())) + return StrategyPriority.DEFAULT; + else + return StrategyPriority.CANT_HANDLE; + } + DataStore dataStore = _dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary); Map mapCapabilities = dataStore.getDriver().getCapabilities(); diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java index 8ed77df9aaf..96ea7bbc0c5 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java @@ -278,7 +278,7 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase { } @Override - public boolean revertSnapshot(Long snapshotId) { + public boolean revertSnapshot(SnapshotInfo snapshot) { throw new CloudRuntimeException("revert Snapshot is not supported"); } diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java index c204d29c296..13fd54cf8f7 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java @@ -137,7 +137,7 @@ public class DefaultVMSnapshotStrategy extends ManagerBase implements VMSnapshot HostVO host = hostDao.findById(hostId); GuestOSHypervisorVO guestOsMapping = guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), host.getHypervisorType().toString(), host.getHypervisorVersion()); - CreateVMSnapshotCommand ccmd = new CreateVMSnapshotCommand(userVm.getInstanceName(), target, volumeTOs, guestOS.getDisplayName()); + CreateVMSnapshotCommand ccmd = new CreateVMSnapshotCommand(userVm.getInstanceName(), userVm.getUuid(), target, volumeTOs, guestOS.getDisplayName()); if (guestOsMapping == null) { ccmd.setPlatformEmulator(null); } else { @@ -350,7 +350,7 @@ public class DefaultVMSnapshotStrategy extends ManagerBase implements VMSnapshot snapshot.getCurrent(), parent, true); Long hostId = vmSnapshotHelper.pickRunningHost(vmSnapshot.getVmId()); GuestOSVO guestOS = guestOSDao.findById(userVm.getGuestOSId()); - RevertToVMSnapshotCommand revertToSnapshotCommand = new RevertToVMSnapshotCommand(vmInstanceName, vmSnapshotTO, volumeTOs, guestOS.getDisplayName()); + RevertToVMSnapshotCommand revertToSnapshotCommand = new RevertToVMSnapshotCommand(vmInstanceName, userVm.getUuid(), vmSnapshotTO, volumeTOs, guestOS.getDisplayName()); HostVO host = hostDao.findById(hostId); GuestOSHypervisorVO guestOsMapping = guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), host.getHypervisorType().toString(), host.getHypervisorVersion()); if (guestOsMapping == null) { diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java index 0778e5427b9..d38aaed80ed 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java +++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java @@ -395,30 +395,19 @@ public class DefaultEndPointSelector implements EndPointSelector { sbuilder.append(" ORDER by rand() limit 1"); String sql = sbuilder.toString(); - PreparedStatement pstmt = null; - ResultSet rs = null; HostVO host = null; TransactionLegacy txn = TransactionLegacy.currentTxn(); - try { - pstmt = txn.prepareStatement(sql); - rs = pstmt.executeQuery(); + try ( + PreparedStatement pstmt = txn.prepareStatement(sql); + ResultSet rs = pstmt.executeQuery(); + ) { while (rs.next()) { long id = rs.getLong(1); host = hostDao.findById(id); } } catch (SQLException e) { s_logger.warn("can't find endpoint", e); - } finally { - try { - if (rs != null) { - rs.close(); - } - if (pstmt != null) { - pstmt.close(); - } - } catch (SQLException e) { - } } if (host == null) { diff --git a/engine/storage/src/org/apache/cloudstack/storage/helper/HypervisorHelperImpl.java b/engine/storage/src/org/apache/cloudstack/storage/helper/HypervisorHelperImpl.java index e90770e8e35..9b7007dc4d6 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/helper/HypervisorHelperImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/helper/HypervisorHelperImpl.java @@ -124,7 +124,7 @@ public class HypervisorHelperImpl implements HypervisorHelper { GuestOSVO guestOS = guestOSDao.findById(virtualMachine.getGuestOSId()); List volumeTOs = vmSnapshotHelper.getVolumeTOList(virtualMachine.getId()); CreateVMSnapshotCommand ccmd = - new CreateVMSnapshotCommand(virtualMachine.getInstanceName(), vmSnapshotTO, volumeTOs, guestOS.getDisplayName()); + new CreateVMSnapshotCommand(virtualMachine.getInstanceName(), virtualMachine.getUuid(), vmSnapshotTO, volumeTOs, guestOS.getDisplayName()); HostVO host = hostDao.findById(hostId); GuestOSHypervisorVO guestOsMapping = guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), host.getHypervisorType().toString(), host.getHypervisorVersion()); ccmd.setPlatformEmulator(guestOsMapping.getGuestOsName()); diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java index ea73ecd7e33..fea0b77942b 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java @@ -55,6 +55,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase storeSnapshotSearch; private SearchBuilder snapshotIdSearch; private SearchBuilder volumeIdSearch; + private SearchBuilder volumeSearch; private final String parentSearch = "select store_id, store_role, snapshot_id from cloud.snapshot_store_ref where store_id = ? " + " and store_role = ? and volume_id = ? and state = 'Ready'" + " order by created DESC " + " limit 1"; @@ -119,6 +120,11 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase sc = volumeSearch.create(); + sc.setParameters("volume_id", volumeId); + sc.setParameters("store_role", role); + return findOneBy(sc); + } + @Override public List findBySnapshotId(long snapshotId) { SearchCriteria sc = snapshotIdSearch.create(); diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java index e77d5489cb6..89af0765fdb 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java @@ -18,6 +18,8 @@ */ package org.apache.cloudstack.storage.datastore.provider; +import java.util.List; + import javax.inject.Inject; import org.apache.log4j.Logger; @@ -32,6 +34,7 @@ import com.cloud.agent.api.Answer; import com.cloud.agent.api.ModifyStoragePoolAnswer; import com.cloud.agent.api.ModifyStoragePoolCommand; import com.cloud.alert.AlertManager; +import com.cloud.exception.StorageConflictException; import com.cloud.storage.DataStoreRole; import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolHostVO; @@ -52,7 +55,7 @@ public class DefaultHostListener implements HypervisorHostListener { PrimaryDataStoreDao primaryStoreDao; @Override - public boolean hostConnect(long hostId, long poolId) { + public boolean hostConnect(long hostId, long poolId) throws StorageConflictException { StoragePool pool = (StoragePool)this.dataStoreMgr.getDataStore(poolId, DataStoreRole.Primary); ModifyStoragePoolCommand cmd = new ModifyStoragePoolCommand(true, pool); final Answer answer = agentMgr.easySend(hostId, cmd); @@ -71,6 +74,17 @@ public class DefaultHostListener implements HypervisorHostListener { assert (answer instanceof ModifyStoragePoolAnswer) : "Well, now why won't you actually return the ModifyStoragePoolAnswer when it's ModifyStoragePoolCommand? Pool=" + pool.getId() + "Host=" + hostId; ModifyStoragePoolAnswer mspAnswer = (ModifyStoragePoolAnswer)answer; + if (mspAnswer.getLocalDatastoreName() != null && pool.isShared()) { + String datastoreName = mspAnswer.getLocalDatastoreName(); + List localStoragePools = this.primaryStoreDao.listLocalStoragePoolByPath(pool.getDataCenterId(), datastoreName); + for (StoragePoolVO localStoragePool : localStoragePools) { + if (datastoreName.equals(localStoragePool.getPath())) { + s_logger.warn("Storage pool: " + pool.getId() + " has already been added as local storage: " + localStoragePool.getName()); + throw new StorageConflictException("Cannot add shared storage pool: " + pool.getId() + " because it has already been added as local storage:" + + localStoragePool.getName()); + } + } + } StoragePoolHostVO poolHost = storagePoolHostDao.findByPoolHost(pool.getId(), hostId); if (poolHost == null) { diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java index e8518704d9e..5bf49a9a813 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java @@ -333,11 +333,10 @@ public class VolumeObject implements VolumeInfo { } finally { // in case of OperationFailed, expunge the entry if (event == ObjectInDataStoreStateMachine.Event.OperationFailed && - (volumeVO.getState() != Volume.State.Copying && volumeVO.getState() != Volume.State.Uploaded)) { + (volumeVO.getState() != Volume.State.Copying && volumeVO.getState() != Volume.State.Uploaded && volumeVO.getState() != Volume.State.UploadError)) { objectInStoreMgr.deleteIfNotReady(this); } } - } @Override diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java index a9b01d49843..ecf3aacb0b8 100644 --- a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java +++ b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java @@ -572,7 +572,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C } finally { profiler.stop(); - if (profiler.getDuration() >= HeartbeatInterval.value()) { + if (profiler.getDurationInMillis() >= HeartbeatInterval.value()) { if (s_logger.isDebugEnabled()) { s_logger.debug("Management server heartbeat takes too long to finish. profiler: " + profiler.toString() + ", profilerHeartbeatUpdate: " + profilerHeartbeatUpdate.toString() + ", profilerPeerScan: " + profilerPeerScan.toString()); @@ -665,12 +665,12 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C notifyNodeJoined(msg.getNodes()); profiler.stop(); - if (profiler.getDuration() > 1000) { + if (profiler.getDurationInMillis() > 1000) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Notifying management server join event took " + profiler.getDuration() + " ms"); + s_logger.debug("Notifying management server join event took " + profiler.getDurationInMillis() + " ms"); } } else { - s_logger.warn("Notifying management server join event took " + profiler.getDuration() + " ms"); + s_logger.warn("Notifying management server join event took " + profiler.getDurationInMillis() + " ms"); } } break; @@ -683,12 +683,12 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C notifyNodeLeft(msg.getNodes()); profiler.stop(); - if (profiler.getDuration() > 1000) { + if (profiler.getDurationInMillis() > 1000) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Notifying management server leave event took " + profiler.getDuration() + " ms"); + s_logger.debug("Notifying management server leave event took " + profiler.getDurationInMillis() + " ms"); } } else { - s_logger.warn("Notifying management server leave event took " + profiler.getDuration() + " ms"); + s_logger.warn("Notifying management server leave event took " + profiler.getDurationInMillis() + " ms"); } } break; @@ -927,7 +927,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C profiler.stop(); - if (profiler.getDuration() >= HeartbeatInterval.value()) { + if (profiler.getDurationInMillis() >= HeartbeatInterval.value()) { if (s_logger.isDebugEnabled()) { s_logger.debug("Peer scan takes too long to finish. profiler: " + profiler.toString() + ", profilerQueryActiveList: " + profilerQueryActiveList.toString() + ", profilerSyncClusterInfo: " + profilerSyncClusterInfo.toString() + ", profilerInvalidatedNodeList: " + diff --git a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java index d36aed1d4d2..7451b5f4226 100644 --- a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java +++ b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java @@ -24,12 +24,12 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; - import org.apache.cloudstack.framework.config.ConfigDepot; import com.cloud.cluster.dao.ManagementServerHostDao; import com.cloud.utils.NumbersUtil; import com.cloud.utils.component.AdapterBase; +import com.cloud.utils.component.ComponentLifecycle; import com.cloud.utils.db.DbProperties; public class ClusterServiceServletAdapter extends AdapterBase implements ClusterServiceAdapter { @@ -50,6 +50,10 @@ public class ClusterServiceServletAdapter extends AdapterBase implements Cluster private int _clusterServicePort = DEFAULT_SERVICE_PORT; + public ClusterServiceServletAdapter() { + setRunLevel(ComponentLifecycle.RUN_LEVEL_FRAMEWORK); + } + @Override public ClusterService getPeerService(String strPeer) throws RemoteException { try { diff --git a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletContainer.java b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletContainer.java index 9615f01a2dc..08f5dba69f6 100644 --- a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletContainer.java +++ b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletContainer.java @@ -114,6 +114,7 @@ public class ClusterServiceServletContainer { try { _serverSocket.close(); } catch (IOException e) { + s_logger.info("[ignored] error on closing server socket", e); } _serverSocket = null; } @@ -170,6 +171,7 @@ public class ClusterServiceServletContainer { try { Thread.sleep(1000); } catch (InterruptedException e1) { + s_logger.debug("[ignored] interupted while waiting to retry running the servlet container."); } } } diff --git a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java index 9b3472447e9..ec8b90866d0 100644 --- a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java +++ b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java @@ -134,15 +134,4 @@ public class ClusterServiceServletImpl implements ClusterService { return s_client; } - // for test purpose only - public static void main(final String[] args) { - /* - ClusterServiceServletImpl service = new ClusterServiceServletImpl("http://localhost:9090/clusterservice", 300); - try { - String result = service.execute("test", 1, "{ p1:v1, p2:v2 }", true); - System.out.println(result); - } catch (RemoteException e) { - } - */ - } } diff --git a/framework/cluster/test/com/cloud/cluster/ClusterServiceServletAdapterTest.java b/framework/cluster/test/com/cloud/cluster/ClusterServiceServletAdapterTest.java new file mode 100644 index 00000000000..28dbcaa951a --- /dev/null +++ b/framework/cluster/test/com/cloud/cluster/ClusterServiceServletAdapterTest.java @@ -0,0 +1,47 @@ +// 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.cluster; + +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.runners.MockitoJUnitRunner; + +import com.cloud.utils.component.ComponentLifecycle; + +@RunWith(MockitoJUnitRunner.class) +public class ClusterServiceServletAdapterTest { + + ClusterServiceServletAdapter clusterServiceServletAdapter; + ClusterManagerImpl clusterManagerImpl; + + @Before + public void setup() throws IllegalArgumentException, + IllegalAccessException, NoSuchFieldException, SecurityException { + clusterServiceServletAdapter = new ClusterServiceServletAdapter(); + clusterManagerImpl = new ClusterManagerImpl(); + } + + @Test + public void testRunLevel() { + int runLevel = clusterServiceServletAdapter.getRunLevel(); + assertTrue(runLevel == ComponentLifecycle.RUN_LEVEL_FRAMEWORK); + assertTrue(runLevel == clusterManagerImpl.getRunLevel()); + } +} diff --git a/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java b/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java index f3f04952666..65bad9c44a7 100644 --- a/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java +++ b/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java @@ -17,7 +17,6 @@ package org.apache.cloudstack.framework.config.dao; import java.sql.PreparedStatement; -import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -26,11 +25,10 @@ import javax.annotation.PostConstruct; import javax.ejb.Local; import javax.naming.ConfigurationException; +import org.apache.cloudstack.framework.config.impl.ConfigurationVO; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; -import org.apache.cloudstack.framework.config.impl.ConfigurationVO; - import com.cloud.utils.component.ComponentLifecycle; import com.cloud.utils.crypt.DBEncryptionUtil; import com.cloud.utils.db.DB; @@ -144,21 +142,13 @@ public class ConfigurationDaoImpl extends GenericDaoBase 0) { - return true; - } else { - if (s_logger.isDebugEnabled()) - s_logger.debug("GET_LOCK() timed out on lock : " + name); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs != null && rs.first()) { + if (rs.getInt(1) > 0) { + return true; + } else { + if (s_logger.isDebugEnabled()) + s_logger.debug("GET_LOCK() timed out on lock : " + name); + } } } } catch (SQLException e) { s_logger.error("GET_LOCK() throws exception ", e); } catch (Throwable e) { s_logger.error("GET_LOCK() throws exception ", e); - } finally { - closeStatement(pstmt); - closeResultSet(rs); } removeConnectionForGlobalLocks(name); - try { - conn.close(); - } catch (SQLException e) { - } + closeAutoCloseable(conn, "connection for global lock"); return false; } @@ -242,30 +232,26 @@ public class DbUtil { } public static boolean releaseGlobalLock(String name) { - Connection conn = getConnectionForGlobalLocks(name, false); - if (conn == null) { - s_logger.error("Unable to acquire DB connection for global lock system"); - assert (false); - return false; - } + try (Connection conn = getConnectionForGlobalLocks(name, false);) { + if (conn == null) { + s_logger.error("Unable to acquire DB connection for global lock system"); + assert (false); + return false; + } - PreparedStatement pstmt = null; - ResultSet rs = null; - try { - pstmt = conn.prepareStatement("SELECT COALESCE(RELEASE_LOCK(?), 0)"); - pstmt.setString(1, name); - rs = pstmt.executeQuery(); - if (rs != null && rs.first()) - return rs.getInt(1) > 0; - s_logger.error("releaseGlobalLock:RELEASE_LOCK() returns unexpected result"); + try (PreparedStatement pstmt = conn.prepareStatement("SELECT COALESCE(RELEASE_LOCK(?), 0)");) { + pstmt.setString(1, name); + try (ResultSet rs = pstmt.executeQuery();) { + if (rs != null && rs.first()) { + return rs.getInt(1) > 0; + } + s_logger.error("releaseGlobalLock:RELEASE_LOCK() returns unexpected result"); + } + } } catch (SQLException e) { s_logger.error("RELEASE_LOCK() throws exception ", e); } catch (Throwable e) { s_logger.error("RELEASE_LOCK() throws exception ", e); - } finally { - closeResultSet(rs); - closeStatement(pstmt); - closeConnection(conn); } return false; } @@ -285,45 +271,15 @@ public class DbUtil { } public static void closeResultSet(final ResultSet resultSet) { - - try { - - if (resultSet != null) { - resultSet.close(); - } - - } catch (SQLException e) { - s_logger.warn("Ignored exception while closing result set.", e); - } - + closeAutoCloseable(resultSet, "exception while closing result set."); } public static void closeStatement(final Statement statement) { - - try { - - if (statement != null) { - statement.close(); - } - - } catch (SQLException e) { - s_logger.warn("Ignored exception while closing statement.", e); - } - + closeAutoCloseable(statement, "exception while closing statement."); } public static void closeConnection(final Connection connection) { - - try { - - if (connection != null) { - connection.close(); - } - - } catch (SQLException e) { - s_logger.warn("Ignored exception while close connection.", e); - } - + closeAutoCloseable(connection, "exception while close connection."); } } diff --git a/framework/db/src/com/cloud/utils/db/Merovingian2.java b/framework/db/src/com/cloud/utils/db/Merovingian2.java index 0c76fb5886d..d2537e369bd 100644 --- a/framework/db/src/com/cloud/utils/db/Merovingian2.java +++ b/framework/db/src/com/cloud/utils/db/Merovingian2.java @@ -71,7 +71,15 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean { _concierge = new ConnectionConcierge("LockMaster", conn, true); } catch (SQLException e) { s_logger.error("Unable to get a new db connection", e); - throw new CloudRuntimeException("Unable to initialize a connection to the database for locking purposes: ", e); + throw new CloudRuntimeException("Unable to initialize a connection to the database for locking purposes", e); + } finally { + if (_concierge == null && conn != null) { + try { + conn.close(); + } catch (SQLException e) { + s_logger.debug("closing connection failed after everything else.", e); + } + } } } @@ -136,6 +144,7 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean { } Thread.sleep(5000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while aquiring " + key); } } String msg = "Timed out on acquiring lock " + key + " . Waited for " + ((InaccurateClock.getTime() - startTime)/1000) + "seconds"; diff --git a/framework/db/test/com/cloud/utils/db/GlobalLockTest.java b/framework/db/test/com/cloud/utils/db/GlobalLockTest.java index 58c496f330b..79f96707bf0 100644 --- a/framework/db/test/com/cloud/utils/db/GlobalLockTest.java +++ b/framework/db/test/com/cloud/utils/db/GlobalLockTest.java @@ -54,6 +54,7 @@ public class GlobalLockTest { Thread.sleep(jobDuration * 1000); } } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while testing global lock."); } finally { if (locked) { boolean unlocked = WorkLock.unlock(); diff --git a/framework/db/test/com/cloud/utils/db/TransactionTest.java b/framework/db/test/com/cloud/utils/db/TransactionTest.java index 76bd5a54161..fed663285d1 100644 --- a/framework/db/test/com/cloud/utils/db/TransactionTest.java +++ b/framework/db/test/com/cloud/utils/db/TransactionTest.java @@ -38,32 +38,17 @@ public class TransactionTest { @BeforeClass public static void oneTimeSetup() { - Connection conn = null; - PreparedStatement pstmt = null; - try { - conn = TransactionLegacy.getStandaloneConnection(); - - pstmt = - conn.prepareStatement("CREATE TABLE `cloud`.`test` (" + "`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT," + "`fld_int` int unsigned," - + "`fld_long` bigint unsigned," + "`fld_string` varchar(255)," + "PRIMARY KEY (`id`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + try ( + Connection conn = TransactionLegacy.getStandaloneConnection(); + PreparedStatement pstmt = + conn.prepareStatement("CREATE TABLE `cloud`.`test` (" + "`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT," + "`fld_int` int unsigned," + + "`fld_long` bigint unsigned," + "`fld_string` varchar(255)," + "PRIMARY KEY (`id`)" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + ) { pstmt.execute(); } catch (SQLException e) { throw new CloudRuntimeException("Problem with sql", e); - } finally { - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } - if (conn != null) { - try { - conn.close(); - } catch (SQLException e) { - } - } } } @@ -157,57 +142,25 @@ public class TransactionTest { * Delete all records after each test, but table is still kept */ public void tearDown() { - Connection conn = null; - PreparedStatement pstmt = null; - try { - conn = TransactionLegacy.getStandaloneConnection(); - - pstmt = conn.prepareStatement("truncate table `cloud`.`test`"); + try ( + Connection conn = TransactionLegacy.getStandaloneConnection(); + PreparedStatement pstmt = conn.prepareStatement("truncate table `cloud`.`test`"); + ) { pstmt.execute(); - } catch (SQLException e) { throw new CloudRuntimeException("Problem with sql", e); - } finally { - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } - if (conn != null) { - try { - conn.close(); - } catch (SQLException e) { - } - } } } @AfterClass public static void oneTimeTearDown() { - Connection conn = null; - PreparedStatement pstmt = null; - try { - conn = TransactionLegacy.getStandaloneConnection(); - - pstmt = conn.prepareStatement("DROP TABLE IF EXISTS `cloud`.`test`"); + try ( + Connection conn = TransactionLegacy.getStandaloneConnection(); + PreparedStatement pstmt = conn.prepareStatement("DROP TABLE IF EXISTS `cloud`.`test`"); + ) { pstmt.execute(); - } catch (SQLException e) { throw new CloudRuntimeException("Problem with sql", e); - } finally { - if (pstmt != null) { - try { - pstmt.close(); - } catch (SQLException e) { - } - } - if (conn != null) { - try { - conn.close(); - } catch (SQLException e) { - } - } } } } diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java index b4065640329..ae28f900e54 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java @@ -23,6 +23,8 @@ import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import org.apache.log4j.Logger; + import org.apache.cloudstack.framework.serializer.MessageSerializer; import org.apache.cloudstack.framework.transport.TransportEndpoint; import org.apache.cloudstack.framework.transport.TransportEndpointSite; @@ -32,10 +34,11 @@ import org.apache.cloudstack.managed.context.ManagedContextRunnable; import com.cloud.utils.concurrency.NamedThreadFactory; public class ClientTransportProvider implements TransportProvider { + final static Logger s_logger = Logger.getLogger(ClientTransportProvider.class); public static final int DEFAULT_WORKER_POOL_SIZE = 5; - private Map _endpointSites = new HashMap(); - private Map _attachedMap = new HashMap(); + private final Map _endpointSites = new HashMap(); + private final Map _attachedMap = new HashMap(); private MessageSerializer _messageSerializer; @@ -69,6 +72,8 @@ public class ClientTransportProvider implements TransportProvider { try { _connection.connect(_serverAddress, _serverPort); } catch (Throwable e) { + s_logger.info("[ignored]" + + "error during ipc client initialization: " + e.getLocalizedMessage()); } } }); diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageBusBase.java b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageBusBase.java index e3eeb7bc6c3..3579690aa95 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageBusBase.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageBusBase.java @@ -326,6 +326,7 @@ public class MessageBusBase implements MessageBus { try { wait(); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while guarding re-entrance on message bus."); } } else { break; diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java index 1dcd6bd2682..774b99969aa 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java @@ -41,6 +41,7 @@ public class MessageDetector implements MessageSubscriber { try { wait(timeoutInMiliseconds); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while waiting on any message."); } } } diff --git a/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java index 46e5965d665..de7558734c3 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java @@ -32,7 +32,6 @@ import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; -import org.apache.commons.io.IOUtils; import org.apache.log4j.Logger; @@ -107,10 +106,10 @@ public class OnwireClassRegistry { if (resources != null) { while (resources.hasMoreElements()) { String filePath = resources.nextElement().getFile(); - // WINDOWS HACK - if (filePath.indexOf("%20") > 0) - filePath = filePath.replaceAll("%20", " "); if (filePath != null) { + // WINDOWS HACK + if (filePath.indexOf("%20") > 0) + filePath = filePath.replaceAll("%20", " "); if ((filePath.indexOf("!") > 0) && (filePath.indexOf(".jar") > 0)) { String jarPath = filePath.substring(0, filePath.indexOf("!")).substring(filePath.indexOf(":") + 1); // WINDOWS HACK @@ -126,6 +125,7 @@ public class OnwireClassRegistry { } catch (IOException e) { s_logger.debug("Encountered IOException", e); } catch (ClassNotFoundException e) { + s_logger.info("[ignored] class not found", e); } return classes; } @@ -140,6 +140,7 @@ public class OnwireClassRegistry { Class clazz = Class.forName(name); classes.add(clazz); } catch (ClassNotFoundException e) { + s_logger.info("[ignored] class not found in directory " + directory, e); } catch (Exception e) { s_logger.debug("Encountered unexpect exception! ", e); } @@ -156,28 +157,27 @@ public class OnwireClassRegistry { static Set> getFromJARFile(String jar, String packageName) throws IOException, ClassNotFoundException { Set> classes = new HashSet>(); - JarInputStream jarFile = new JarInputStream(new FileInputStream(jar)); - JarEntry jarEntry; - do { - jarEntry = jarFile.getNextJarEntry(); - if (jarEntry != null) { - String className = jarEntry.getName(); - if (className.endsWith(".class")) { - className = stripFilenameExtension(className); - if (className.startsWith(packageName)) { - try { - Class clz = Class.forName(className.replace('/', '.')); - classes.add(clz); - } catch (ClassNotFoundException | NoClassDefFoundError e) { - s_logger.warn("Unable to load class from jar file", e); + try (JarInputStream jarFile = new JarInputStream(new FileInputStream(jar));) { + JarEntry jarEntry; + do { + jarEntry = jarFile.getNextJarEntry(); + if (jarEntry != null) { + String className = jarEntry.getName(); + if (className.endsWith(".class")) { + className = stripFilenameExtension(className); + if (className.startsWith(packageName)) { + try { + Class clz = Class.forName(className.replace('/', '.')); + classes.add(clz); + } catch (ClassNotFoundException | NoClassDefFoundError e) { + s_logger.warn("Unable to load class from jar file", e); + } } } } - } - } while (jarEntry != null); - - IOUtils.closeQuietly(jarFile); - return classes; + } while (jarEntry != null); + return classes; + } } static String stripFilenameExtension(String file) { diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java deleted file mode 100644 index 2ea7c7c3dc1..00000000000 --- a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.framework.codestyle; - -import org.apache.cloudstack.framework.rpc.RpcCallbackDispatcher; -import org.apache.cloudstack.framework.rpc.RpcClientCall; -import org.apache.cloudstack.framework.rpc.RpcException; -import org.apache.cloudstack.framework.rpc.RpcIOException; -import org.apache.cloudstack.framework.rpc.RpcProvider; -import org.apache.cloudstack.framework.rpc.RpcTimeoutException; - -public class ClientOnlyEventDrivenStyle { - RpcProvider _rpcProvider; - - public void AsyncCallRpcService() { - String cmd = new String(); - RpcCallbackDispatcher callbackDispatcher = RpcCallbackDispatcher.create(this); - callbackDispatcher.setCallback(callbackDispatcher.getTarget().OnAsyncCallRpcServiceCallback(null, null)); - _rpcProvider.newCall("host-2") - .setCommand("TestCommand") - .setCommandArg(cmd) - .setTimeout(10000) - .setCallbackDispatcher(callbackDispatcher) - .setContext("Context Object") - // save context object for callback handler - .apply(); - } - - public Void OnAsyncCallRpcServiceCallback(RpcClientCall call, String context) { - try { - String answer = call.get(); - - } catch (RpcTimeoutException e) { - - } catch (RpcIOException e) { - - } catch (RpcException e) { - } - - return null; - } -} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java deleted file mode 100644 index 1e2df201ddf..00000000000 --- a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.framework.codestyle; - -import org.apache.cloudstack.framework.rpc.RpcCallbackListener; -import org.apache.cloudstack.framework.rpc.RpcClientCall; -import org.apache.cloudstack.framework.rpc.RpcException; -import org.apache.cloudstack.framework.rpc.RpcIOException; -import org.apache.cloudstack.framework.rpc.RpcProvider; -import org.apache.cloudstack.framework.rpc.RpcTimeoutException; - -public class ClientOnlyListenerStyle { - - RpcProvider _rpcProvider; - - public void AsyncCallRpcService() { - String cmd = new String(); - _rpcProvider.newCall("host-2").setCommand("TestCommand").setCommandArg(cmd).setTimeout(10000).addCallbackListener(new RpcCallbackListener() { - @Override - public void onSuccess(String result) { - } - - @Override - public void onFailure(RpcException e) { - } - }).apply(); - } - - public void SyncCallRpcService() { - String cmd = new String(); - RpcClientCall call = _rpcProvider.newCall("host-2").setCommand("TestCommand").setCommandArg(cmd).setTimeout(10000).apply(); - - try { - String answer = call.get(); - } catch (RpcTimeoutException e) { - - } catch (RpcIOException e) { - - } catch (RpcException e) { - } - } -} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java index 4de8952da74..af5862c48e6 100644 --- a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java @@ -18,13 +18,17 @@ */ package org.apache.cloudstack.framework.sampleserver; +import org.apache.log4j.Logger; + public class SampleManagementServer { + private static final Logger s_logger = Logger.getLogger(SampleManagementServer.class); public void mainLoop() { while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } } } diff --git a/framework/ipc/test/org/apache/cloudstack/messagebus/TestMessageBus.java b/framework/ipc/test/org/apache/cloudstack/messagebus/TestMessageBus.java index 64e4f8863cb..3ee48803e29 100644 --- a/framework/ipc/test/org/apache/cloudstack/messagebus/TestMessageBus.java +++ b/framework/ipc/test/org/apache/cloudstack/messagebus/TestMessageBus.java @@ -22,6 +22,11 @@ import javax.inject.Inject; import junit.framework.TestCase; +import org.apache.cloudstack.framework.messagebus.MessageBus; +import org.apache.cloudstack.framework.messagebus.MessageDetector; +import org.apache.cloudstack.framework.messagebus.MessageSubscriber; +import org.apache.cloudstack.framework.messagebus.PublishScope; +import org.apache.log4j.Logger; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -29,14 +34,10 @@ import org.mockito.Mockito; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.apache.cloudstack.framework.messagebus.MessageBus; -import org.apache.cloudstack.framework.messagebus.MessageDetector; -import org.apache.cloudstack.framework.messagebus.MessageSubscriber; -import org.apache.cloudstack.framework.messagebus.PublishScope; - @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/MessageBusTestContext.xml") public class TestMessageBus extends TestCase { + private static final Logger s_logger = Logger.getLogger(TestMessageBus.class); @Inject MessageBus _messageBus; @@ -128,6 +129,7 @@ public class TestMessageBus extends TestCase { try { Thread.sleep(3000); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } _messageBus.publish(null, "Host", PublishScope.GLOBAL, null); } @@ -148,6 +150,7 @@ public class TestMessageBus extends TestCase { try { thread.join(); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } } } diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/VmWorkJobDaoImpl.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/VmWorkJobDaoImpl.java index d38de0ebadd..e81ab1ebbf7 100644 --- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/VmWorkJobDaoImpl.java +++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/VmWorkJobDaoImpl.java @@ -20,6 +20,7 @@ import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Date; import java.util.List; + import javax.annotation.PostConstruct; import javax.inject.Inject; @@ -166,25 +167,35 @@ public class VmWorkJobDaoImpl extends GenericDaoBase implemen public void doInTransactionWithoutResult(TransactionStatus status) { TransactionLegacy txn = TransactionLegacy.currentTxn(); - PreparedStatement pstmt = null; - try { - pstmt = txn.prepareAutoCloseStatement( + try ( + PreparedStatement pstmt = txn + .prepareAutoCloseStatement( "DELETE FROM vm_work_job WHERE id IN (SELECT id FROM async_job WHERE (job_dispatcher='VmWorkJobPlaceHolder' OR job_dispatcher='VmWorkJobDispatcher') AND job_init_msid=?)"); + ) { pstmt.setLong(1, msid); pstmt.execute(); } catch (SQLException e) { + s_logger.info("[ignored]" + + "SQL failed to delete vm work job: " + e.getLocalizedMessage()); } catch (Throwable e) { + s_logger.info("[ignored]" + + "caught an error during delete vm work job: " + e.getLocalizedMessage()); } - try { - pstmt = txn.prepareAutoCloseStatement( + try ( + PreparedStatement pstmt = txn.prepareAutoCloseStatement( "DELETE FROM async_job WHERE (job_dispatcher='VmWorkJobPlaceHolder' OR job_dispatcher='VmWorkJobDispatcher') AND job_init_msid=?"); + ) { pstmt.setLong(1, msid); pstmt.execute(); } catch (SQLException e) { + s_logger.info("[ignored]" + + "SQL failed to delete async job: " + e.getLocalizedMessage()); } catch (Throwable e) { + s_logger.info("[ignored]" + + "caught an error during delete async job: " + e.getLocalizedMessage()); } } }); diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/SyncQueueManagerImpl.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/SyncQueueManagerImpl.java index c17c5812f03..2f97991e3e3 100644 --- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/SyncQueueManagerImpl.java +++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/SyncQueueManagerImpl.java @@ -207,6 +207,7 @@ public class SyncQueueManagerImpl extends ManagerBase implements SyncQueueManage @Override @DB public void returnItem(final long queueItemId) { + s_logger.info("Returning queue item " + queueItemId + " back to queue for second try in case of DB deadlock"); try { Transaction.execute(new TransactionCallbackNoReturn() { @Override diff --git a/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobManagerTest.java b/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobManagerTest.java index 62a8d81ced2..a49f28ef55d 100644 --- a/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobManagerTest.java +++ b/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobManagerTest.java @@ -61,6 +61,7 @@ public class AsyncJobManagerTest extends TestCase { try { Thread.sleep(3000); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } s_logger.info("wakeup"); @@ -119,6 +120,7 @@ public class AsyncJobManagerTest extends TestCase { try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } } diff --git a/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobTestDispatcher.java b/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobTestDispatcher.java index 34351a6c934..eb30a804978 100644 --- a/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobTestDispatcher.java +++ b/framework/jobs/test/org/apache/cloudstack/framework/jobs/AsyncJobTestDispatcher.java @@ -52,6 +52,7 @@ public class AsyncJobTestDispatcher extends AdapterBase implements AsyncJobDispa try { Thread.sleep(interval); } catch (InterruptedException e) { + s_logger.debug("[ignored] ."); } _asyncJobMgr.completeAsyncJob(job.getId(), Status.SUCCEEDED, 0, null); diff --git a/framework/spring/module/src/test/java/org/apache/cloudstack/spring/module/factory/ModuleBasedContextFactoryTest.java b/framework/spring/module/src/test/java/org/apache/cloudstack/spring/module/factory/ModuleBasedContextFactoryTest.java index 037fe1561c2..d8d109f6575 100644 --- a/framework/spring/module/src/test/java/org/apache/cloudstack/spring/module/factory/ModuleBasedContextFactoryTest.java +++ b/framework/spring/module/src/test/java/org/apache/cloudstack/spring/module/factory/ModuleBasedContextFactoryTest.java @@ -103,16 +103,19 @@ public class ModuleBasedContextFactoryTest { assertEquals(parent, parentBean); } + int notfound = 0; for (String notThere : notTheres) { try { context.getBean(notThere, String.class); fail(); } catch (NoSuchBeanDefinitionException e) { + notfound++; } } int count = context.getBean("count", InstantiationCounter.class).getCount(); + assertEquals(notTheres.length, notfound); assertEquals(order, count); } diff --git a/plugins/database/mysql-ha/src/com/cloud/utils/db/StaticStrategy.java b/plugins/database/mysql-ha/src/com/cloud/utils/db/StaticStrategy.java index c8d21dd1a8f..6b0cb24878a 100644 --- a/plugins/database/mysql-ha/src/com/cloud/utils/db/StaticStrategy.java +++ b/plugins/database/mysql-ha/src/com/cloud/utils/db/StaticStrategy.java @@ -23,6 +23,8 @@ import java.util.List; import java.util.Map; import java.util.Properties; +import org.apache.log4j.Logger; + import com.mysql.jdbc.BalanceStrategy; import com.mysql.jdbc.Connection; import com.mysql.jdbc.ConnectionImpl; @@ -30,6 +32,7 @@ import com.mysql.jdbc.LoadBalancingConnectionProxy; import com.mysql.jdbc.SQLError; public class StaticStrategy implements BalanceStrategy { + private static final Logger s_logger = Logger.getLogger(StaticStrategy.class); public StaticStrategy() { } @@ -91,6 +94,7 @@ public class StaticStrategy implements BalanceStrategy { try { Thread.sleep(250); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while fail over in progres."); } // start fresh diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java index 70b9b586844..5ad48dc7493 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java @@ -30,19 +30,17 @@ import java.util.Map; import javax.ejb.Local; import javax.inject.Inject; -import com.cloud.network.Network; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.AddBaremetalPxeCmd; import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd; import org.apache.cloudstack.api.ListBaremetalPxeServersCmd; +import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev; +import com.cloud.agent.api.baremetal.PrepareCreateTemplateCommand; import com.cloud.agent.api.baremetal.PreparePxeServerAnswer; import com.cloud.agent.api.baremetal.PreparePxeServerCommand; -import com.cloud.agent.api.baremetal.PrepareCreateTemplateCommand; import com.cloud.baremetal.database.BaremetalPxeDao; import com.cloud.baremetal.database.BaremetalPxeVO; import com.cloud.baremetal.networkservice.BaremetalPxeManager.BaremetalPxeType; @@ -52,6 +50,7 @@ import com.cloud.deploy.DeployDestination; import com.cloud.host.Host; import com.cloud.host.HostVO; import com.cloud.host.dao.HostDetailsDao; +import com.cloud.network.Network; import com.cloud.network.PhysicalNetworkServiceProvider; import com.cloud.network.dao.PhysicalNetworkDao; import com.cloud.network.dao.PhysicalNetworkServiceProviderDao; @@ -95,12 +94,12 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements long pxeServerId = pxeVo.getHostId(); String mac = pxeNic.getMacAddress(); - String ip = pxeNic.getIp4Address(); - String gateway = pxeNic.getGateway(); - String mask = pxeNic.getNetmask(); - String dns = pxeNic.getDns1(); + String ip = pxeNic.getIPv4Address(); + String gateway = pxeNic.getIPv4Gateway(); + String mask = pxeNic.getIPv4Netmask(); + String dns = pxeNic.getIPv4Dns1(); if (dns == null) { - dns = pxeNic.getDns2(); + dns = pxeNic.getIPv4Dns2(); } try { @@ -139,10 +138,10 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements HostVO host = _hostDao.findById(hostId); DataCenterVO dc = _dcDao.findById(host.getDataCenterId()); NicVO nic = nics.get(0); - String mask = nic.getNetmask(); + String mask = nic.getIPv4Netmask(); String mac = nic.getMacAddress(); - String ip = nic.getIp4Address(); - String gateway = nic.getGateway(); + String ip = nic.getIPv4Address(); + String gateway = nic.getIPv4Gateway(); String dns = dc.getDns1(); if (dns == null) { dns = dc.getDns2(); diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java index 7075c6b4881..5ef861d8139 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java @@ -303,6 +303,7 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while waiting to retry running script."); } continue; } else if (res == null) { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java index a0b41998982..292e6ef051d 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java @@ -18,6 +18,13 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; + import com.cloud.dc.DataCenter; import com.cloud.dc.Pod; import com.cloud.dc.PodVlanMapVO; @@ -50,12 +57,6 @@ import com.cloud.utils.db.TransactionStatus; import com.cloud.vm.NicProfile; import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachineProfile; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; -import org.apache.log4j.Logger; - -import javax.ejb.Local; -import javax.inject.Inject; @Local(value = {NetworkGuru.class}) public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { @@ -93,7 +94,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { return; } - String oldIp = nic.getIp4Address(); + String oldIp = nic.getIPv4Address(); boolean getNewIp = false; if (oldIp == null) { getNewIp = true; @@ -113,7 +114,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { } }); - nic.setIp4Address(null); + nic.setIPv4Address(null); getNewIp = true; } } @@ -127,8 +128,8 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { } DataCenter dc = _dcDao.findById(network.getDataCenterId()); - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); /* * Pod pod = dest.getPod(); Pair ip = @@ -154,13 +155,13 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp) throws InsufficientAddressCapacityException, ConcurrentOperationException { DataCenter dc = _dcDao.findById(pod.getDataCenterId()); - if (nic.getIp4Address() == null) { - s_logger.debug(String.format("Requiring ip address: %s", nic.getIp4Address())); + if (nic.getIPv4Address() == null) { + s_logger.debug(String.format("Requiring ip address: %s", nic.getIPv4Address())); PublicIp ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), requiredIp, false); - nic.setIp4Address(ip.getAddress().toString()); + nic.setIPv4Address(ip.getAddress().toString()); nic.setFormat(AddressFormat.Ip4); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Gateway(ip.getGateway()); + nic.setIPv4Netmask(ip.getNetmask()); if (ip.getVlanTag() != null && ip.getVlanTag().equalsIgnoreCase(Vlan.UNTAGGED)) { nic.setIsolationUri(IsolationType.Ec2.toUri(Vlan.UNTAGGED)); nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED)); @@ -169,7 +170,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { nic.setReservationId(String.valueOf(ip.getVlanTag())); nic.setMacAddress(ip.getMacAddress()); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java index 2b67abe728a..c2182e19d81 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java @@ -22,6 +22,20 @@ // Automatically generated by addcopyright.py at 04/03/2012 package com.cloud.baremetal.networkservice; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.api.AddBaremetalDhcpCmd; +import org.apache.cloudstack.api.ListBaremetalDhcpCmd; +import org.apache.log4j.Logger; + import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; import com.cloud.agent.api.StartupCommand; @@ -60,18 +74,6 @@ import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; import com.cloud.vm.dao.UserVmDao; -import org.apache.cloudstack.api.AddBaremetalDhcpCmd; -import org.apache.cloudstack.api.ListBaremetalDhcpCmd; -import org.apache.log4j.Logger; - -import javax.ejb.Local; -import javax.inject.Inject; -import javax.naming.ConfigurationException; -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; @Local(value = {BaremetalDhcpManager.class}) public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDhcpManager, ResourceStateAdapter { @@ -141,22 +143,22 @@ public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDh } HostVO h = hosts.get(0); - String dns = nic.getDns1(); + String dns = nic.getIPv4Dns1(); if (dns == null) { - dns = nic.getDns2(); + dns = nic.getIPv4Dns2(); } DhcpEntryCommand dhcpCommand = - new DhcpEntryCommand(nic.getMacAddress(), nic.getIp4Address(), profile.getVirtualMachine().getHostName(), null, dns, nic.getGateway(), null, + new DhcpEntryCommand(nic.getMacAddress(), nic.getIPv4Address(), profile.getVirtualMachine().getHostName(), null, dns, nic.getIPv4Gateway(), null, _ntwkModel.getExecuteInSeqNtwkElmtCmd()); String errMsg = - String.format("Set dhcp entry on external DHCP %1$s failed(ip=%2$s, mac=%3$s, vmname=%4$s)", h.getPrivateIpAddress(), nic.getIp4Address(), + String.format("Set dhcp entry on external DHCP %1$s failed(ip=%2$s, mac=%3$s, vmname=%4$s)", h.getPrivateIpAddress(), nic.getIPv4Address(), nic.getMacAddress(), profile.getVirtualMachine().getHostName()); // prepareBareMetalDhcpEntry(nic, dhcpCommand); try { Answer ans = _agentMgr.send(h.getId(), dhcpCommand); if (ans.getResult()) { s_logger.debug(String.format("Set dhcp entry on external DHCP %1$s successfully(ip=%2$s, mac=%3$s, vmname=%4$s)", h.getPrivateIpAddress(), - nic.getIp4Address(), nic.getMacAddress(), profile.getVirtualMachine().getHostName())); + nic.getIPv4Address(), nic.getMacAddress(), profile.getVirtualMachine().getHostName())); return true; } else { s_logger.debug(errMsg + " " + ans.getDetails()); diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java index d6404a62008..beffa3e7fcc 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java @@ -18,6 +18,24 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import java.io.File; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd; +import org.apache.cloudstack.api.AddBaremetalPxeCmd; +import org.apache.cloudstack.api.ListBaremetalPxeServersCmd; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.log4j.Logger; + import com.cloud.agent.api.Answer; import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev; @@ -61,22 +79,6 @@ import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.NicDao; -import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd; -import org.apache.cloudstack.api.AddBaremetalPxeCmd; -import org.apache.cloudstack.api.ListBaremetalPxeServersCmd; -import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.log4j.Logger; - -import javax.ejb.Local; -import javax.inject.Inject; -import java.io.File; -import java.net.URI; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; @Local(value = BaremetalPxeService.class) public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase implements BaremetalPxeService { @@ -229,16 +231,16 @@ public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase imple List tuple = parseKickstartUrl(profile); String cmd = String.format("/opt/cloud/bin/prepare_pxe.sh %s %s %s %s %s %s", tuple.get(1), tuple.get(2), profile.getTemplate().getUuid(), String.format("01-%s", nic.getMacAddress().replaceAll(":", "-")).toLowerCase(), tuple.get(0), nic.getMacAddress().toLowerCase()); - s_logger.debug(String.format("prepare pxe on virtual router[ip:%s], cmd: %s", mgmtNic.getIp4Address(), cmd)); - Pair ret = SshHelper.sshExecute(mgmtNic.getIp4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd); + s_logger.debug(String.format("prepare pxe on virtual router[ip:%s], cmd: %s", mgmtNic.getIPv4Address(), cmd)); + Pair ret = SshHelper.sshExecute(mgmtNic.getIPv4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd); if (!ret.first()) { throw new CloudRuntimeException(String.format("failed preparing PXE in virtual router[id:%s], because %s", vr.getId(), ret.second())); } //String internalServerIp = "10.223.110.231"; - cmd = String.format("/opt/cloud/bin/baremetal_snat.sh %s %s %s", mgmtNic.getIp4Address(), internalServerIp, mgmtNic.getGateway()); - s_logger.debug(String.format("prepare SNAT on virtual router[ip:%s], cmd: %s", mgmtNic.getIp4Address(), cmd)); - ret = SshHelper.sshExecute(mgmtNic.getIp4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd); + cmd = String.format("/opt/cloud/bin/baremetal_snat.sh %s %s %s", mgmtNic.getIPv4Address(), internalServerIp, mgmtNic.getIPv4Gateway()); + s_logger.debug(String.format("prepare SNAT on virtual router[ip:%s], cmd: %s", mgmtNic.getIPv4Address(), cmd)); + ret = SshHelper.sshExecute(mgmtNic.getIPv4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd); if (!ret.first()) { throw new CloudRuntimeException(String.format("failed preparing PXE in virtual router[id:%s], because %s", vr.getId(), ret.second())); } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java index f68e7d3c70e..e99292a6436 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java @@ -30,14 +30,12 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.network.Network; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd; import org.apache.cloudstack.api.AddBaremetalPxeCmd; import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd; import org.apache.cloudstack.api.ListBaremetalPxeServersCmd; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -50,6 +48,7 @@ import com.cloud.deploy.DeployDestination; import com.cloud.host.Host; import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; +import com.cloud.network.Network; import com.cloud.network.NetworkModel; import com.cloud.network.dao.PhysicalNetworkDao; import com.cloud.network.dao.PhysicalNetworkVO; @@ -194,14 +193,14 @@ public class BaremetalPxeManagerImpl extends ManagerBase implements BaremetalPxe String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(vm.getId(), vm.getServiceOfferingId()).getDisplayText(); String zoneName = _dcDao.findById(vm.getDataCenterId()).getName(); NicVO nvo = _nicDao.findById(nic.getId()); - VmDataCommand cmd = new VmDataCommand(nvo.getIp4Address(), vm.getInstanceName(), _ntwkModel.getExecuteInSeqNtwkElmtCmd()); + VmDataCommand cmd = new VmDataCommand(nvo.getIPv4Address(), vm.getInstanceName(), _ntwkModel.getExecuteInSeqNtwkElmtCmd()); // if you add new metadata files, also edit systemvm/patches/debian/config/var/www/html/latest/.htaccess cmd.addVmData("userdata", "user-data", vm.getUserData()); cmd.addVmData("metadata", "service-offering", StringUtils.unicodeEscape(serviceOffering)); cmd.addVmData("metadata", "availability-zone", StringUtils.unicodeEscape(zoneName)); - cmd.addVmData("metadata", "local-ipv4", nic.getIp4Address()); + cmd.addVmData("metadata", "local-ipv4", nic.getIPv4Address()); cmd.addVmData("metadata", "local-hostname", StringUtils.unicodeEscape(vm.getInstanceName())); - cmd.addVmData("metadata", "public-ipv4", nic.getIp4Address()); + cmd.addVmData("metadata", "public-ipv4", nic.getIPv4Address()); cmd.addVmData("metadata", "public-hostname", StringUtils.unicodeEscape(vm.getInstanceName())); cmd.addVmData("metadata", "instance-id", String.valueOf(vm.getId())); cmd.addVmData("metadata", "vm-id", String.valueOf(vm.getInstanceName())); diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs index aa36ed86436..6e1df24f27a 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs @@ -668,8 +668,6 @@ namespace HypervResource { public const string Answer = "com.cloud.agent.api.Answer"; public const string AttachIsoCommand = "com.cloud.agent.api.AttachIsoCommand"; - public const string AttachVolumeAnswer = "com.cloud.agent.api.AttachVolumeAnswer"; - public const string AttachVolumeCommand = "com.cloud.agent.api.AttachVolumeCommand"; public const string AnsBackupSnapshotAnswerwer = "com.cloud.agent.api.BackupSnapshotAnswer"; public const string BackupSnapshotCommand = "com.cloud.agent.api.BackupSnapshotCommand"; public const string BumpUpPriorityCommand = "com.cloud.agent.api.BumpUpPriorityCommand"; diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/guru/HypervGuru.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/guru/HypervGuru.java index 2a631429156..f000324f724 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/guru/HypervGuru.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/guru/HypervGuru.java @@ -27,18 +27,18 @@ import javax.inject.Inject; import com.cloud.agent.api.to.NicTO; import com.cloud.agent.api.to.VirtualMachineTO; +import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.HypervisorGuru; import com.cloud.hypervisor.HypervisorGuruBase; -import com.cloud.storage.GuestOSVO; -import com.cloud.storage.dao.GuestOSDao; -import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.hypervisor.hyperv.manager.HypervManager; import com.cloud.network.NetworkModel; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.TrafficType; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.NetworkVO; +import com.cloud.storage.GuestOSVO; +import com.cloud.storage.dao.GuestOSDao; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.vm.NicProfile; import com.cloud.vm.VirtualMachine; @@ -129,10 +129,10 @@ public class HypervGuru extends HypervisorGuruBase implements HypervisorGuru { } catch (InsufficientAddressCapacityException e) { throw new CloudRuntimeException("unable to allocate mac address on network: " + networkId); } - nicTo.setDns1(profile.getDns1()); - nicTo.setDns2(profile.getDns2()); - if (publicNicProfile != null && publicNicProfile.getGateway() != null) { - nicTo.setGateway(publicNicProfile.getGateway()); + nicTo.setDns1(profile.getIPv4Dns1()); + nicTo.setDns2(profile.getIPv4Dns2()); + if (publicNicProfile != null && publicNicProfile.getIPv4Gateway() != null) { + nicTo.setGateway(publicNicProfile.getIPv4Gateway()); } else { nicTo.setGateway(network.getGateway()); } diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java index 66aa425b7cf..17c5708a322 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java @@ -2363,10 +2363,8 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S // VM patching/rebooting time that may need int retry = _retry; while (System.currentTimeMillis() - startTick <= _opsTimeout || --retry > 0) { - SocketChannel sch = null; - try { - s_logger.info("Trying to connect to " + ipAddress); - sch = SocketChannel.open(); + s_logger.info("Trying to connect to " + ipAddress); + try (SocketChannel sch = SocketChannel.open();) { sch.configureBlocking(true); sch.socket().setSoTimeout(5000); // we need to connect to the control ip address to check the status of the system vm @@ -2382,13 +2380,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S try { Thread.sleep(5000); } catch (InterruptedException ex) { - } - } - } finally { - if (sch != null) { - try { - sch.close(); - } catch (IOException e) { + s_logger.debug("[ignored] interupted while waiting to retry connecting to vm after exception: "+e.getLocalizedMessage()); } } } @@ -2396,6 +2388,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S try { Thread.sleep(1000); } catch (InterruptedException ex) { + s_logger.debug("[ignored] interupted while connecting to vm."); } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index aaf75ff9214..2fab9a83cf7 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -26,6 +26,7 @@ import java.util.regex.Pattern; import javax.naming.ConfigurationException; +import com.google.common.base.Strings; import org.apache.log4j.Logger; import org.libvirt.LibvirtException; @@ -275,7 +276,7 @@ public class BridgeVifDriver extends VifDriverBase { createControlNetwork(_bridges.get("linklocal")); } - private void deleteExitingLinkLocalRouteTable(String linkLocalBr) { + private void deleteExistingLinkLocalRouteTable(String linkLocalBr) { Script command = new Script("/bin/bash", _timeout); command.add("-c"); command.add("ip route | grep " + NetUtils.getLinkLocalCIDR()); @@ -286,8 +287,12 @@ public class BridgeVifDriver extends VifDriverBase { String[] lines = parser.getLines().split("\\n"); for (String line : lines) { String[] tokens = line.split(" "); - if (!tokens[2].equalsIgnoreCase(linkLocalBr)) { - Script.runSimpleBashScript("ip route del " + NetUtils.getLinkLocalCIDR()); + if (tokens != null && tokens.length < 2) { + continue; + } + final String device = tokens[2]; + if (!Strings.isNullOrEmpty(device) && !device.equalsIgnoreCase(linkLocalBr)) { + Script.runSimpleBashScript("ip route del " + NetUtils.getLinkLocalCIDR() + " dev " + tokens[2]); } else { foundLinkLocalBr = true; } @@ -300,7 +305,7 @@ public class BridgeVifDriver extends VifDriverBase { } private void createControlNetwork(String privBrName) { - deleteExitingLinkLocalRouteTable(privBrName); + deleteExistingLinkLocalRouteTable(privBrName); if (!isBridgeExists(privBrName)) { Script.runSimpleBashScript("brctl addbr " + privBrName + "; ip link set " + privBrName + " up; ip address add 169.254.0.1/16 dev " + privBrName, _timeout); } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java index 5407d764474..49aa99cea68 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java @@ -160,13 +160,13 @@ public class KVMHAMonitor extends KVMHABase implements Runnable { try { monitorThread.join(); } catch (InterruptedException e) { - + s_logger.debug("[ignored] interupted joining monitor."); } try { Thread.sleep(_heartBeatUpdateFreq); } catch (InterruptedException e) { - + s_logger.debug("[ignored] interupted between heartbeats."); } } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java old mode 100644 new mode 100755 index 6d2260302cc..864afa72397 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -46,6 +46,7 @@ import javax.naming.ConfigurationException; import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; import org.apache.cloudstack.storage.to.VolumeObjectTO; +import org.apache.cloudstack.utils.hypervisor.HypervisorUtils; import org.apache.cloudstack.utils.linux.CPUStat; import org.apache.cloudstack.utils.linux.MemStat; import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; @@ -180,7 +181,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private String _ovsPvlanVmPath; private String _routerProxyPath; private String _ovsTunnelPath; - private String _setupCgroupPath; private String _host; private String _dcId; private String _pod; @@ -236,6 +236,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv protected int _migrateSpeed; protected int _migrateDowntime; protected int _migratePauseAfter; + protected boolean _diskActivityCheckEnabled; + protected long _diskActivityCheckFileSizeMin = 10485760; // 10MB + protected int _diskActivityCheckTimeoutSeconds = 120; // 120s + protected long _diskActivityInactiveThresholdMilliseconds = 30000; // 30s private final Map _pifs = new HashMap(); private final Map _vmStats = new ConcurrentHashMap(); @@ -259,7 +263,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private String _updateHostPasswdPath; - private int _dom0MinMem; + private long _dom0MinMem; protected boolean _disconnected = true; protected int _cmdsTimeout; @@ -699,17 +703,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv _hypervisorType = HypervisorType.KVM; } - //Verify that cpu,cpuacct cgroups are not co-mounted - if(HypervisorType.LXC.equals(getHypervisorType())){ - _setupCgroupPath = Script.findScript(kvmScriptsDir, "setup-cgroups.sh"); - if (_setupCgroupPath == null) { - throw new ConfigurationException("Unable to find the setup-cgroups.sh"); - } - if(!checkCgroups()){ - throw new ConfigurationException("cpu,cpuacct cgroups are co-mounted"); - } - } - _hypervisorURI = (String)params.get("hypervisor.uri"); if (_hypervisorURI == null) { _hypervisorURI = LibvirtConnection.getHypervisorURI(_hypervisorType.toString()); @@ -798,7 +791,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv _videoRam = NumbersUtil.parseInt(value, 0); value = (String)params.get("host.reserved.mem.mb"); - _dom0MinMem = NumbersUtil.parseInt(value, 0) * 1024 * 1024; + // Reserve 1GB unless admin overrides + _dom0MinMem = NumbersUtil.parseInt(value, 1024) * 1024 * 1024L; value = (String) params.get("kvmclock.disable"); if (Boolean.parseBoolean(value)) { @@ -955,6 +949,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv params.put("libvirtVersion", _hypervisorLibvirtVersion); configureVifDrivers(params); + configureDiskActivityChecks(params); final KVMStorageProcessor storageProcessor = new KVMStorageProcessor(_storagePoolMgr, this); storageProcessor.configure(name, params); @@ -970,6 +965,20 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return true; } + protected void configureDiskActivityChecks(final Map params) { + _diskActivityCheckEnabled = Boolean.parseBoolean((String)params.get("vm.diskactivity.checkenabled")); + if (_diskActivityCheckEnabled) { + int timeout = NumbersUtil.parseInt((String)params.get("vm.diskactivity.checktimeout_s"), 0); + if (timeout > 0) { + _diskActivityCheckTimeoutSeconds = timeout; + } + long inactiveTime = NumbersUtil.parseLong((String)params.get("vm.diskactivity.inactivetime_ms"), 0L); + if (inactiveTime > 0) { + _diskActivityInactiveThresholdMilliseconds = inactiveTime; + } + } + } + protected void configureVifDrivers(final Map params) throws ConfigurationException { final String LIBVIRT_VIF_DRIVER = "libvirt.vif.driver"; @@ -1152,12 +1161,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv final String fname = interfaces[i].getName(); s_logger.debug("matchPifFileInDirectory: file name '" + fname + "'"); if (fname.startsWith("eth") || fname.startsWith("bond") || fname.startsWith("vlan") || fname.startsWith("vx") || fname.startsWith("em") || - fname.matches("^p\\d+p\\d+.*")) { + fname.matches("^p\\d+p\\d+.*") || fname.startsWith("ens") || fname.startsWith("eno") || fname.startsWith("enp") || fname.startsWith("enx")) { return fname; } } - s_logger.debug("failing to get physical interface from bridge " + bridgeName + ", did not find an eth*, bond*, vlan*, em*, or p*p* in " + brif.getAbsolutePath()); + s_logger.debug("failing to get physical interface from bridge " + bridgeName + ", did not find an eth*, bond*, vlan*, em*, p*p*, ens*, eno*, enp*, or enx* in " + brif.getAbsolutePath()); return ""; } @@ -2035,6 +2044,17 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv volPath = physicalDisk.getPath(); } + // check for disk activity, if detected we should exit because vm is running elsewhere + if (_diskActivityCheckEnabled && physicalDisk != null && physicalDisk.getFormat() == PhysicalDiskFormat.QCOW2) { + s_logger.debug("Checking physical disk file at path " + volPath + " for disk activity to ensure vm is not running elsewhere"); + try { + HypervisorUtils.checkVolumeFileForActivity(volPath, _diskActivityCheckTimeoutSeconds, _diskActivityInactiveThresholdMilliseconds, _diskActivityCheckFileSizeMin); + } catch (IOException ex) { + throw new CloudRuntimeException("Unable to check physical disk file for activity", ex); + } + s_logger.debug("Disk activity check cleared"); + } + // if params contains a rootDiskController key, use its value (this is what other HVs are doing) DiskDef.DiskBus diskBusType = null; final Map params = vmSpec.getDetails(); @@ -2586,16 +2606,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv info.add((int)cpus); info.add(speed); + // Report system's RAM as actual RAM minus host OS reserved RAM + ram = ram - _dom0MinMem; info.add(ram); info.add(cap); - long dom0ram = Math.min(ram / 10, 768 * 1024 * 1024L);// save a maximum - // of 10% of - // system ram or - // 768M - dom0ram = Math.max(dom0ram, _dom0MinMem); - info.add(dom0ram); + info.add(_dom0MinMem); info.add(cpuSockets); - s_logger.debug("cpus=" + cpus + ", speed=" + speed + ", ram=" + ram + ", dom0ram=" + dom0ram + ", cpu sockets=" + cpuSockets); + s_logger.debug("cpus=" + cpus + ", speed=" + speed + ", ram=" + ram + ", _dom0MinMem=" + _dom0MinMem + ", cpu sockets=" + cpuSockets); return info; } @@ -2615,7 +2632,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv String msg = null; try { dm = conn.domainLookupByName(vmName); - String vmDef = dm.getXMLDesc(0); + // Get XML Dump including the secure information such as VNC password + // By passing 1, or VIR_DOMAIN_XML_SECURE flag + // https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags + String vmDef = dm.getXMLDesc(1); final LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser(); parser.parseDomainXML(vmDef); for (final InterfaceDef nic : parser.getInterfaces()) { @@ -3329,17 +3349,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return _hypervisorType; } - private boolean checkCgroups(){ - final Script command = new Script(_setupCgroupPath, 5 * 1000, s_logger); - String result; - result = command.execute(); - if (result != null) { - s_logger.debug("cgroup check failed:" + result); - return false; - } - return true; - } - public String mapRbdDevice(final KVMPhysicalDisk disk){ final KVMStoragePool pool = disk.getPool(); //Check if rbd image is already mapped diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtAttachVolumeCommandWrapper.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtAttachVolumeCommandWrapper.java deleted file mode 100644 index c78f0ed6078..00000000000 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtAttachVolumeCommandWrapper.java +++ /dev/null @@ -1,60 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.hypervisor.kvm.resource.wrapper; - -import org.libvirt.Connect; -import org.libvirt.LibvirtException; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; -import com.cloud.exception.InternalErrorException; -import com.cloud.hypervisor.kvm.resource.LibvirtComputingResource; -import com.cloud.hypervisor.kvm.storage.KVMPhysicalDisk; -import com.cloud.hypervisor.kvm.storage.KVMStoragePool; -import com.cloud.resource.CommandWrapper; -import com.cloud.resource.ResourceWrapper; - -@ResourceWrapper(handles = AttachVolumeCommand.class) -public final class LibvirtAttachVolumeCommandWrapper extends CommandWrapper { - - @Override - public Answer execute(final AttachVolumeCommand command, final LibvirtComputingResource libvirtComputingResource) { - try { - final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper(); - - final Connect conn = libvirtUtilitiesHelper.getConnectionByVmName(command.getVmName()); - - final KVMStoragePool primary = libvirtComputingResource.getStoragePoolMgr().getStoragePool(command.getPooltype(), command.getPoolUuid()); - final KVMPhysicalDisk disk = primary.getPhysicalDisk(command.getVolumePath()); - - libvirtComputingResource.attachOrDetachDisk(conn, command.getAttach(), command.getVmName(), disk, - command.getDeviceId().intValue(), command.getBytesReadRate(), command.getBytesWriteRate(), command.getIopsReadRate(), command.getIopsWriteRate(), - command.getCacheMode()); - - } catch (final LibvirtException e) { - return new AttachVolumeAnswer(command, e.toString()); - } catch (final InternalErrorException e) { - return new AttachVolumeAnswer(command, e.toString()); - } - - return new AttachVolumeAnswer(command, command.getDeviceId(), command.getVolumePath()); - } -} \ No newline at end of file diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtBackupSnapshotCommandWrapper.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtBackupSnapshotCommandWrapper.java index 25da0468dea..ad33945498a 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtBackupSnapshotCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtBackupSnapshotCommandWrapper.java @@ -171,7 +171,11 @@ public final class LibvirtBackupSnapshotCommandWrapper extends CommandWrapper pools = monitor.getStoragePools(); + + /** + * We can only safely fence off hosts when we use NFS + * On NFS primary storage pools hosts continuesly write + * a heartbeat. Disable Fencing Off for hosts without NFS + */ + if (pools.size() == 0) { + String logline = "No NFS storage pools found. No way to safely fence " + command.getVmName() + " on host " + command.getHostGuid(); + s_logger.warn(logline); + return new FenceAnswer(command, false, logline); + } + final KVMHAChecker ha = new KVMHAChecker(pools, command.getHostIp()); final Future future = executors.submit(ha); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java index 1847818878b..c1328aa99ae 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java @@ -83,8 +83,16 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper= 1000000 ? 8 : 1; // 1000000 equals v1.0.0 + + xmlDesc = dm.getXMLDesc(xmlFlag).replace(libvirtComputingResource.getPrivateIp(), command.getDestinationIp()); dconn = libvirtUtilitiesHelper.retrieveQemuConnection("qemu+tcp://" + command.getDestinationIp() + "/system"); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtResizeVolumeCommandWrapper.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtResizeVolumeCommandWrapper.java index 167c72aac18..79ed6e4ae2c 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtResizeVolumeCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtResizeVolumeCommandWrapper.java @@ -69,9 +69,10 @@ public final class LibvirtResizeVolumeCommandWrapper extends CommandWrapper { + + private static final Logger s_logger = Logger.getLogger(LibvirtRevertSnapshotCommandWrapper.class); + + @Override + public Answer execute(final RevertSnapshotCommand command, final LibvirtComputingResource libvirtComputingResource) { + SnapshotObjectTO snapshot = command.getData(); + VolumeObjectTO volume = snapshot.getVolume(); + PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) volume.getDataStore(); + DataStoreTO snapshotImageStore = snapshot.getDataStore(); + if (!(snapshotImageStore instanceof NfsTO)) { + return new Answer(command, false, "revert snapshot on object storage is not implemented yet"); + } + NfsTO nfsImageStore = (NfsTO) snapshotImageStore; + + String secondaryStoragePoolUrl = nfsImageStore.getUrl(); + + String volumePath = volume.getPath(); + String snapshotPath = null; + String snapshotRelPath = null; + KVMStoragePool secondaryStoragePool = null; + try { + final KVMStoragePoolManager storagePoolMgr = libvirtComputingResource.getStoragePoolMgr(); + secondaryStoragePool = storagePoolMgr.getStoragePoolByURI(secondaryStoragePoolUrl); + String ssPmountPath = secondaryStoragePool.getLocalPath(); + snapshotRelPath = snapshot.getPath(); + snapshotPath = ssPmountPath + File.separator + snapshotRelPath; + + KVMPhysicalDisk snapshotDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), + primaryStore.getUuid(), volumePath); + KVMStoragePool primaryPool = snapshotDisk.getPool(); + + if (primaryPool.getType() == StoragePoolType.RBD) { + return new Answer(command, false, "revert snapshot to RBD is not implemented yet"); + } else { + Script cmd = new Script(libvirtComputingResource.manageSnapshotPath(), libvirtComputingResource.getCmdsTimeout(), s_logger); + cmd.add("-v", snapshotPath); + cmd.add("-n", snapshotDisk.getName()); + cmd.add("-p", snapshotDisk.getPath()); + String result = cmd.execute(); + if (result != null) { + s_logger.debug("Failed to revert snaptshot: " + result); + return new Answer(command, false, result); + } + } + + return new Answer(command, true, "RevertSnapshotCommand executes successfully"); + } catch (CloudRuntimeException e) { + return new Answer(command, false, e.toString()); + } + } +} diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java index 40ba11fcdce..28e5f03d512 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java @@ -286,6 +286,7 @@ public class KVMStoragePoolManager { try { Thread.sleep(30000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while trying to get storage pool."); } cnt++; } diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java index 42ebf86b61b..920c86a5edf 100644 --- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java @@ -76,7 +76,6 @@ import org.xml.sax.SAXException; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.BackupSnapshotCommand; import com.cloud.agent.api.CheckHealthCommand; import com.cloud.agent.api.CheckNetworkCommand; @@ -1246,7 +1245,8 @@ public class LibvirtComputingResourceTest { when(conn.domainLookupByName(vmName)).thenReturn(dm); when(libvirtComputingResource.getPrivateIp()).thenReturn("127.0.0.1"); - when(dm.getXMLDesc(0)).thenReturn("host_domain"); + when(dm.getXMLDesc(8)).thenReturn("host_domain"); + when(dm.getXMLDesc(1)).thenReturn("host_domain"); when(dm.isPersistent()).thenReturn(1); doNothing().when(dm).undefine(); @@ -1274,10 +1274,20 @@ public class LibvirtComputingResourceTest { verify(libvirtComputingResource, times(1)).getDisks(conn, vmName); try { verify(conn, times(1)).domainLookupByName(vmName); - verify(dm, times(1)).getXMLDesc(0); } catch (final LibvirtException e) { fail(e.getMessage()); } + + try { + verify(dm, times(1)).getXMLDesc(8); + } catch (final Throwable t) { + try { + verify(dm, times(1)).getXMLDesc(1); + } + catch (final LibvirtException e) { + fail(e.getMessage()); + } + } } @Test @@ -1503,141 +1513,6 @@ public class LibvirtComputingResourceTest { } } - @Test - public void testAttachVolumeCommand() { - final Connect conn = Mockito.mock(Connect.class); - final LibvirtUtilitiesHelper libvirtUtilitiesHelper = Mockito.mock(LibvirtUtilitiesHelper.class); - - final boolean attach = true; - final boolean managed = true; - final String vmName = "Test"; - final StoragePoolType poolType = StoragePoolType.ISO; - final String volumePath = "/path"; - final String volumeName = "volume"; - final Long volumeSize = 200l; - final Long deviceId = 1l; - final String chainInfo = "none"; - final AttachVolumeCommand command = new AttachVolumeCommand(attach, managed, vmName, poolType, volumePath, volumeName, volumeSize, deviceId, chainInfo); - - final KVMStoragePoolManager poolManager = Mockito.mock(KVMStoragePoolManager.class); - final KVMStoragePool primary = Mockito.mock(KVMStoragePool.class); - final KVMPhysicalDisk disk = Mockito.mock(KVMPhysicalDisk.class); - - when(libvirtComputingResource.getLibvirtUtilitiesHelper()).thenReturn(libvirtUtilitiesHelper); - try { - when(libvirtUtilitiesHelper.getConnectionByVmName(vmName)).thenReturn(conn); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - - when(libvirtComputingResource.getStoragePoolMgr()).thenReturn(poolManager); - when(poolManager.getStoragePool(command.getPooltype(), command.getPoolUuid())).thenReturn(primary); - when(primary.getPhysicalDisk(command.getVolumePath())).thenReturn(disk); - - final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance(); - assertNotNull(wrapper); - - final Answer answer = wrapper.execute(command, libvirtComputingResource); - assertTrue(answer.getResult()); - - verify(libvirtComputingResource, times(1)).getLibvirtUtilitiesHelper(); - try { - verify(libvirtUtilitiesHelper, times(1)).getConnectionByVmName(vmName); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - } - - @SuppressWarnings("unchecked") - @Test - public void testAttachVolumeCommandLibvirtException() { - final LibvirtUtilitiesHelper libvirtUtilitiesHelper = Mockito.mock(LibvirtUtilitiesHelper.class); - - final boolean attach = true; - final boolean managed = true; - final String vmName = "Test"; - final StoragePoolType poolType = StoragePoolType.ISO; - final String volumePath = "/path"; - final String volumeName = "volume"; - final Long volumeSize = 200l; - final Long deviceId = 1l; - final String chainInfo = "none"; - final AttachVolumeCommand command = new AttachVolumeCommand(attach, managed, vmName, poolType, volumePath, volumeName, volumeSize, deviceId, chainInfo); - - final KVMStoragePoolManager poolManager = Mockito.mock(KVMStoragePoolManager.class); - final KVMStoragePool primary = Mockito.mock(KVMStoragePool.class); - final KVMPhysicalDisk disk = Mockito.mock(KVMPhysicalDisk.class); - - when(libvirtComputingResource.getLibvirtUtilitiesHelper()).thenReturn(libvirtUtilitiesHelper); - try { - when(libvirtUtilitiesHelper.getConnectionByVmName(vmName)).thenThrow(LibvirtException.class); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - - when(libvirtComputingResource.getStoragePoolMgr()).thenReturn(poolManager); - when(poolManager.getStoragePool(command.getPooltype(), command.getPoolUuid())).thenReturn(primary); - when(primary.getPhysicalDisk(command.getVolumePath())).thenReturn(disk); - - final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance(); - assertNotNull(wrapper); - - final Answer answer = wrapper.execute(command, libvirtComputingResource); - assertFalse(answer.getResult()); - - verify(libvirtComputingResource, times(1)).getLibvirtUtilitiesHelper(); - try { - verify(libvirtUtilitiesHelper, times(1)).getConnectionByVmName(vmName); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - } - - @SuppressWarnings("unchecked") - @Test - public void testAttachVolumeCommandInternalErrorException() { - final LibvirtUtilitiesHelper libvirtUtilitiesHelper = Mockito.mock(LibvirtUtilitiesHelper.class); - - final boolean attach = true; - final boolean managed = true; - final String vmName = "Test"; - final StoragePoolType poolType = StoragePoolType.ISO; - final String volumePath = "/path"; - final String volumeName = "volume"; - final Long volumeSize = 200l; - final Long deviceId = 1l; - final String chainInfo = "none"; - final AttachVolumeCommand command = new AttachVolumeCommand(attach, managed, vmName, poolType, volumePath, volumeName, volumeSize, deviceId, chainInfo); - - final KVMStoragePoolManager poolManager = Mockito.mock(KVMStoragePoolManager.class); - final KVMStoragePool primary = Mockito.mock(KVMStoragePool.class); - final KVMPhysicalDisk disk = Mockito.mock(KVMPhysicalDisk.class); - - when(libvirtComputingResource.getLibvirtUtilitiesHelper()).thenReturn(libvirtUtilitiesHelper); - try { - when(libvirtUtilitiesHelper.getConnectionByVmName(vmName)).thenThrow(InternalErrorException.class); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - - when(libvirtComputingResource.getStoragePoolMgr()).thenReturn(poolManager); - when(poolManager.getStoragePool(command.getPooltype(), command.getPoolUuid())).thenReturn(primary); - when(primary.getPhysicalDisk(command.getVolumePath())).thenReturn(disk); - - final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance(); - assertNotNull(wrapper); - - final Answer answer = wrapper.execute(command, libvirtComputingResource); - assertFalse(answer.getResult()); - - verify(libvirtComputingResource, times(1)).getLibvirtUtilitiesHelper(); - try { - verify(libvirtUtilitiesHelper, times(1)).getConnectionByVmName(vmName); - } catch (final LibvirtException e) { - fail(e.getMessage()); - } - } - @Test public void testWatchConsoleProxyLoadCommand() { final int interval = 0; diff --git a/plugins/hypervisors/ovm/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py b/plugins/hypervisors/ovm/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py index d04d1044ac2..8ad41dab9c0 100755 --- a/plugins/hypervisors/ovm/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py +++ b/plugins/hypervisors/ovm/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py @@ -75,13 +75,9 @@ class OvmSecurityGroup(OvmObject): @staticmethod def add_fw_framework(bridge_name): try: - cfo = ConfigFileOps("/etc/sysctl.conf") - cfo.addEntry("net.bridge.bridge-nf-call-arptables", "1") - cfo.addEntry("net.bridge.bridge-nf-call-iptables", "1") - cfo.addEntry("net.bridge.bridge-nf-call-ip6tables", "1") - cfo.save() - - execute("sysctl -p /etc/sysctl.conf") + execute("sysctl -w net.bridge.bridge-nf-call-arptables=1") + execute("sysctl -w net.bridge.bridge-nf-call-iptables=1") + execute("sysctl -w net.bridge.bridge-nf-call-ip6tables=1") except: logging.debug("failed to turn on bridge netfilter") return False diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java index 0b83ea4e5b6..0541b7e61a2 100644 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java @@ -40,8 +40,6 @@ import org.apache.cloudstack.storage.to.VolumeObjectTO; import com.cloud.agent.IAgentControl; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.CheckNetworkAnswer; import com.cloud.agent.api.CheckNetworkCommand; import com.cloud.agent.api.CheckVirtualMachineAnswer; @@ -810,10 +808,6 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { return new GetVmStatsAnswer(cmd, vmStatsNameMap); } - protected AttachVolumeAnswer execute(AttachVolumeCommand cmd) { - return new AttachVolumeAnswer(cmd, "You must stop " + cmd.getVmName() + " first, OVM doesn't support hotplug datadisk"); - } - public Answer execute(DestroyCommand cmd) { try { OvmVolume.destroy(_conn, cmd.getVolume().getPoolUuid(), cmd.getVolume().getPath()); @@ -1183,8 +1177,6 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { return execute((GetStorageStatsCommand)cmd); } else if (clazz == GetVmStatsCommand.class) { return execute((GetVmStatsCommand)cmd); - } else if (clazz == AttachVolumeCommand.class) { - return execute((AttachVolumeCommand)cmd); } else if (clazz == DestroyCommand.class) { return execute((DestroyCommand)cmd); } else if (clazz == PrepareForMigrationCommand.class) { diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java index ea0d4075b50..5af2b8f0a21 100644 --- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java +++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java @@ -38,7 +38,6 @@ import org.apache.cloudstack.storage.command.StorageSubSystemCommand; import com.cloud.agent.IAgentControl; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -// import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.CheckHealthCommand; import com.cloud.agent.api.CheckNetworkCommand; import com.cloud.agent.api.CheckOnHostCommand; diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupport.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupport.java index f75cdc935ea..407e6b5df46 100644 --- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupport.java +++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupport.java @@ -28,8 +28,6 @@ import org.apache.log4j.Logger; import org.apache.xmlrpc.XmlRpcException; import com.cloud.agent.api.Answer; -// import com.cloud.agent.api.AttachVolumeAnswer; -// import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.GetVmStatsAnswer; import com.cloud.agent.api.GetVmStatsCommand; import com.cloud.agent.api.GetVncPortAnswer; @@ -152,12 +150,7 @@ public class Ovm3VmSupport { } return true; } -/* - public AttachVolumeAnswer execute(AttachVolumeCommand cmd) { - return new AttachVolumeAnswer(cmd, "You must stop " + cmd.getVmName() - + " first, Ovm3 doesn't support hotplug datadisk"); - } -*/ + /* Migration should make sure both HVs are the same ? */ public PrepareForMigrationAnswer execute(PrepareForMigrationCommand cmd) { VirtualMachineTO vm = cmd.getVirtualMachine(); diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupportTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupportTest.java index fc2b0a17b85..e65f0d4f762 100644 --- a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupportTest.java +++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupportTest.java @@ -125,16 +125,4 @@ public class Ovm3VmSupportTest { Answer ra = hypervisor.executeRequest(cmd); results.basicBooleanTest(ra.getResult()); } -/* - @Test - public void AttachVolumeCommandTest() throws ConfigurationException { - hypervisor = support.prepare(configTest.getParams()); - // boolean attach, boolean managed, String vmName, StoragePoolType pooltype, - // String volumePath, String volumeName, Long volumeSize, Long deviceId, String chainInfo - AttachVolumeCommand cmd = new AttachVolumeCommand(true, false, xen.getVmName(), StoragePoolType.NetworkFilesystem, - "x", "x", 0L, 0L, "x"); - Answer ra = hypervisor.executeRequest(cmd); - results.basicBooleanTest(ra.getResult()); - } -*/ } diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManager.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManager.java index 6f5a494c27f..f60e13321ae 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManager.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManager.java @@ -24,8 +24,6 @@ import org.apache.cloudstack.storage.command.UploadStatusCommand; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.BackupSnapshotCommand; import com.cloud.agent.api.ComputeChecksumCommand; import com.cloud.agent.api.CreatePrivateTemplateFromSnapshotCommand; @@ -59,8 +57,6 @@ public interface MockStorageManager extends Manager { public CreateAnswer createVolume(CreateCommand cmd); - public AttachVolumeAnswer AttachVolume(AttachVolumeCommand cmd); - public Answer AttachIso(AttachIsoCommand cmd); public Answer DeleteStoragePool(DeleteStoragePoolCommand cmd); diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java index ba24dc7310c..a4fc2f9c10b 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java @@ -42,8 +42,6 @@ import org.apache.cloudstack.storage.command.UploadStatusCommand; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.BackupSnapshotAnswer; import com.cloud.agent.api.BackupSnapshotCommand; import com.cloud.agent.api.ComputeChecksumCommand; @@ -245,36 +243,6 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa return new CreateAnswer(cmd, volumeTo); } - @Override - public AttachVolumeAnswer AttachVolume(AttachVolumeCommand cmd) { - TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.SIMULATOR_DB); - try { - txn.start(); - String poolid = cmd.getPoolUuid(); - String volumeName = cmd.getVolumeName(); - MockVolumeVO volume = _mockVolumeDao.findByStoragePathAndType(cmd.getVolumePath()); - if (volume == null) { - return new AttachVolumeAnswer(cmd, "Can't find volume:" + volumeName + "on pool:" + poolid); - } - - String vmName = cmd.getVmName(); - MockVMVO vm = _mockVMDao.findByVmName(vmName); - if (vm == null) { - return new AttachVolumeAnswer(cmd, "can't vm :" + vmName); - } - txn.commit(); - - return new AttachVolumeAnswer(cmd, cmd.getDeviceId(), cmd.getVolumePath()); - } catch (Exception ex) { - txn.rollback(); - throw new CloudRuntimeException("Error when attaching volume " + cmd.getVolumeName() + " to VM " + cmd.getVmName(), ex); - } finally { - txn.close(); - txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); - txn.close(); - } - } - @Override public Answer AttachIso(AttachIsoCommand cmd) { MockVolumeVO iso = findVolumeFromSecondary(cmd.getIsoPath(), cmd.getStoreUrl(), MockVolumeType.ISO); diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManager.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManager.java index 44c652a688a..df2703d0b08 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManager.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManager.java @@ -81,23 +81,23 @@ public interface MockVmManager extends Manager { Answer setVmData(VmDataCommand cmd); - Answer CheckConsoleProxyLoad(CheckConsoleProxyLoadCommand cmd); + Answer checkConsoleProxyLoad(CheckConsoleProxyLoadCommand cmd); - Answer WatchConsoleProxyLoad(WatchConsoleProxyLoadCommand cmd); + Answer watchConsoleProxyLoad(WatchConsoleProxyLoadCommand cmd); - Answer SavePassword(SavePasswordCommand cmd); + Answer savePassword(SavePasswordCommand cmd); - MigrateAnswer Migrate(MigrateCommand cmd, SimulatorInfo info); + MigrateAnswer migrate(MigrateCommand cmd, SimulatorInfo info); PrepareForMigrationAnswer prepareForMigrate(PrepareForMigrationCommand cmd); - SecurityGroupRuleAnswer AddSecurityGroupRules(SecurityGroupRulesCmd cmd, SimulatorInfo info); + SecurityGroupRuleAnswer addSecurityGroupRules(SecurityGroupRulesCmd cmd, SimulatorInfo info); GetDomRVersionAnswer getDomRVersion(GetDomRVersionCmd cmd); CheckRouterAnswer checkRouter(CheckRouterCommand cmd); - Answer CleanupNetworkRules(CleanupNetworkRulesCmd cmd, SimulatorInfo info); + Answer cleanupNetworkRules(CleanupNetworkRulesCmd cmd, SimulatorInfo info); Answer scaleVm(ScaleVmCommand cmd); diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java index dbe8adea25a..d58029564bb 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java @@ -57,6 +57,7 @@ import com.cloud.agent.api.RebootAnswer; import com.cloud.agent.api.RebootCommand; import com.cloud.agent.api.RevertToVMSnapshotAnswer; import com.cloud.agent.api.RevertToVMSnapshotCommand; +import com.cloud.agent.api.ScaleVmAnswer; import com.cloud.agent.api.ScaleVmCommand; import com.cloud.agent.api.SecurityGroupRuleAnswer; import com.cloud.agent.api.SecurityGroupRulesCmd; @@ -248,7 +249,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { return vmMap; } catch (final Exception ex) { txn.rollback(); - throw new CloudRuntimeException("unable to fetch vms from host " + hostGuid, ex); + throw new CloudRuntimeException("unable to fetch vms from host " + hostGuid, ex); } finally { txn.close(); txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); @@ -292,7 +293,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { return states; } catch (final Exception ex) { txn.rollback(); - throw new CloudRuntimeException("unable to fetch vms from host " + hostGuid, ex); + throw new CloudRuntimeException("unable to fetch vms from host " + hostGuid, ex); } finally { txn.close(); txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); @@ -369,7 +370,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { } @Override - public MigrateAnswer Migrate(final MigrateCommand cmd, final SimulatorInfo info) { + public MigrateAnswer migrate(final MigrateCommand cmd, final SimulatorInfo info) { TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.SIMULATOR_DB); try { txn.start(); @@ -382,7 +383,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { final MockHost destHost = _mockHostDao.findByGuid(destGuid); if (destHost == null) { - return new MigrateAnswer(cmd, false, "can;t find host:" + info.getHostUuid(), null); + return new MigrateAnswer(cmd, false, "can't find destination host:" + destGuid, null); } vm.setHostId(destHost.getId()); _mockVmDao.update(vm.getId(), vm); @@ -424,7 +425,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { } @Override - public Answer CleanupNetworkRules(final CleanupNetworkRulesCmd cmd, final SimulatorInfo info) { + public Answer cleanupNetworkRules(final CleanupNetworkRulesCmd cmd, final SimulatorInfo info) { TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.SIMULATOR_DB); try { txn.start(); @@ -449,12 +450,34 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { @Override public Answer scaleVm(final ScaleVmCommand cmd) { - return null; //To change body of implemented methods use File | Settings | File Templates. + TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.SIMULATOR_DB); + try { + txn.start(); + final String vmName = cmd.getVmName(); + final MockVMVO vm = _mockVmDao.findByVmName(vmName); + if (vm == null) { + return new ScaleVmAnswer(cmd, false, "Can't find VM " + vmName); + } + vm.setCpu(cmd.getCpus() * cmd.getMaxSpeed()); + vm.setMemory(cmd.getMaxRam()); + _mockVmDao.update(vm.getId(), vm); + s_logger.debug("Scaled up VM " + vmName); + txn.commit(); + return new ScaleVmAnswer(cmd, true, null); + } catch (final Exception ex) { + txn.rollback(); + throw new CloudRuntimeException("Unable to scale up VM", ex); + } finally { + txn.close(); + txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB); + txn.close(); + } } @Override public Answer plugSecondaryIp(final NetworkRulesVmSecondaryIpCommand cmd) { - return null; //To change body of implemented methods use File | Settings | File Templates. + s_logger.debug("Plugged secondary IP to VM " + cmd.getVmName()); + return new Answer(cmd, true, null); } @Override @@ -527,12 +550,12 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { } @Override - public Answer CheckConsoleProxyLoad(final CheckConsoleProxyLoadCommand cmd) { + public Answer checkConsoleProxyLoad(final CheckConsoleProxyLoadCommand cmd) { return Answer.createUnsupportedCommandAnswer(cmd); } @Override - public Answer WatchConsoleProxyLoad(final WatchConsoleProxyLoadCommand cmd) { + public Answer watchConsoleProxyLoad(final WatchConsoleProxyLoadCommand cmd) { return Answer.createUnsupportedCommandAnswer(cmd); } @@ -543,7 +566,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { } @Override - public SecurityGroupRuleAnswer AddSecurityGroupRules(final SecurityGroupRulesCmd cmd, final SimulatorInfo info) { + public SecurityGroupRuleAnswer addSecurityGroupRules(final SecurityGroupRulesCmd cmd, final SimulatorInfo info) { if (!info.isEnabled()) { return new SecurityGroupRuleAnswer(cmd, false, "Disabled", SecurityGroupRuleAnswer.FailureReason.CANNOT_BRIDGE_FIREWALL); } @@ -611,7 +634,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager { } @Override - public Answer SavePassword(final SavePasswordCommand cmd) { + public Answer savePassword(final SavePasswordCommand cmd) { return new Answer(cmd); } diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java index bd7e9e8eb33..a5dc9ebd476 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java +++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java @@ -37,7 +37,6 @@ import org.springframework.stereotype.Component; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.BackupSnapshotCommand; import com.cloud.agent.api.CheckHealthCommand; import com.cloud.agent.api.CheckNetworkCommand; @@ -286,7 +285,7 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage } else if (cmd instanceof PrepareForMigrationCommand) { answer = _mockVmMgr.prepareForMigrate((PrepareForMigrationCommand)cmd); } else if (cmd instanceof MigrateCommand) { - answer = _mockVmMgr.Migrate((MigrateCommand)cmd, info); + answer = _mockVmMgr.migrate((MigrateCommand)cmd, info); } else if (cmd instanceof StartCommand) { answer = _mockVmMgr.startVM((StartCommand)cmd, info); } else if (cmd instanceof CheckSshCommand) { @@ -310,7 +309,7 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage } else if (cmd instanceof VmDataCommand) { answer = _mockVmMgr.setVmData((VmDataCommand)cmd); } else if (cmd instanceof CleanupNetworkRulesCmd) { - answer = _mockVmMgr.CleanupNetworkRules((CleanupNetworkRulesCmd)cmd, info); + answer = _mockVmMgr.cleanupNetworkRules((CleanupNetworkRulesCmd)cmd, info); } else if (cmd instanceof CheckNetworkCommand) { answer = _mockAgentMgr.checkNetworkCommand((CheckNetworkCommand)cmd); } else if (cmd instanceof StopCommand) { @@ -320,19 +319,17 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage } else if (cmd instanceof GetVncPortCommand) { answer = _mockVmMgr.getVncPort((GetVncPortCommand)cmd); } else if (cmd instanceof CheckConsoleProxyLoadCommand) { - answer = _mockVmMgr.CheckConsoleProxyLoad((CheckConsoleProxyLoadCommand)cmd); + answer = _mockVmMgr.checkConsoleProxyLoad((CheckConsoleProxyLoadCommand)cmd); } else if (cmd instanceof WatchConsoleProxyLoadCommand) { - answer = _mockVmMgr.WatchConsoleProxyLoad((WatchConsoleProxyLoadCommand)cmd); + answer = _mockVmMgr.watchConsoleProxyLoad((WatchConsoleProxyLoadCommand)cmd); } else if (cmd instanceof SecurityGroupRulesCmd) { - answer = _mockVmMgr.AddSecurityGroupRules((SecurityGroupRulesCmd)cmd, info); + answer = _mockVmMgr.addSecurityGroupRules((SecurityGroupRulesCmd)cmd, info); } else if (cmd instanceof SavePasswordCommand) { - answer = _mockVmMgr.SavePassword((SavePasswordCommand)cmd); + answer = _mockVmMgr.savePassword((SavePasswordCommand)cmd); } else if (cmd instanceof PrimaryStorageDownloadCommand) { answer = _mockStorageMgr.primaryStorageDownload((PrimaryStorageDownloadCommand)cmd); } else if (cmd instanceof CreateCommand) { answer = _mockStorageMgr.createVolume((CreateCommand)cmd); - } else if (cmd instanceof AttachVolumeCommand) { - answer = _mockStorageMgr.AttachVolume((AttachVolumeCommand)cmd); } else if (cmd instanceof AttachIsoCommand) { answer = _mockStorageMgr.AttachIso((AttachIsoCommand)cmd); } else if (cmd instanceof DeleteStoragePoolCommand) { diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentRoutingResource.java b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentRoutingResource.java index d41576e010f..400ade9216d 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentRoutingResource.java +++ b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentRoutingResource.java @@ -136,6 +136,7 @@ public class AgentRoutingResource extends AgentStorageResource { try { clz = Class.forName(objectType); } catch (ClassNotFoundException e) { + s_logger.info("[ignored] ping returned class", e); } if (clz != null) { StringReader reader = new StringReader(objectData); diff --git a/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java b/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java index 314179887c3..1196260a9ae 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java +++ b/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java @@ -22,6 +22,7 @@ import java.util.Formatter; import javax.ejb.Local; +import org.apache.log4j.Logger; import org.springframework.stereotype.Component; import com.cloud.simulator.MockConfigurationVO; @@ -33,11 +34,12 @@ import com.cloud.utils.db.TransactionLegacy; @Component @Local(value = {MockConfigurationDao.class}) public class MockConfigurationDaoImpl extends GenericDaoBase implements MockConfigurationDao { - private SearchBuilder _searchByDcIdName; - private SearchBuilder _searchByDcIDPodIdName; - private SearchBuilder _searchByDcIDPodIdClusterIdName; - private SearchBuilder _searchByDcIDPodIdClusterIdHostIdName; - private SearchBuilder _searchByGlobalName; + final static Logger s_logger = Logger.getLogger(MockConfigurationDaoImpl.class); + private final SearchBuilder _searchByDcIdName; + private final SearchBuilder _searchByDcIDPodIdName; + private final SearchBuilder _searchByDcIDPodIdClusterIdName; + private final SearchBuilder _searchByDcIDPodIdClusterIdHostIdName; + private final SearchBuilder _searchByGlobalName; public MockConfigurationDaoImpl() { _searchByGlobalName = createSearchBuilder(); @@ -131,16 +133,16 @@ public class MockConfigurationDaoImpl extends GenericDaoBase entry : volToFiler) { volume = entry.first(); long volumeId = volume.getId(); @@ -3211,8 +3212,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa for (VirtualDisk disk : disks) { if (volumeDeviceKey.get(volumeId) == disk.getKey()) { VolumeObjectTO newVol = new VolumeObjectTO(); + String newPath = vmMo.getVmdkFileBaseName(disk); + String poolName = entry.second().getUuid().replace("-", ""); + VirtualMachineDiskInfo diskInfo = diskInfoBuilder.getDiskInfoByBackingFileBaseName(newPath, poolName); newVol.setId(volumeId); - newVol.setPath(vmMo.getVmdkFileBaseName(disk)); + newVol.setPath(newPath); + newVol.setChainInfo(_gson.toJson(diskInfo)); volumeToList.add(newVol); break; } @@ -3329,7 +3334,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.debug("Successfully consolidated disks of VM " + vmName + "."); } - // Update and return volume path because that could have changed after migration + // Update and return volume path and chain info because that could have changed after migration if (!targetDsMo.fileExists(fullVolumePath)) { VirtualDisk[] disks = vmMo.getAllDiskDevice(); for (VirtualDisk disk : disks) @@ -3337,8 +3342,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa volumePath = vmMo.getVmdkFileBaseName(disk); } } - - return new MigrateVolumeAnswer(cmd, true, null, volumePath); + VirtualMachineDiskInfoBuilder diskInfoBuilder = vmMo.getDiskInfoBuilder(); + String chainInfo = _gson.toJson(diskInfoBuilder.getDiskInfoByBackingFileBaseName(volumePath, poolTo.getUuid().replace("-", ""))); + MigrateVolumeAnswer answer = new MigrateVolumeAnswer(cmd, true, null, volumePath); + answer.setVolumeChainInfo(chainInfo); + return answer; } catch (Exception e) { String msg = "Catch Exception " + e.getClass().getName() + " due to " + e.toString(); s_logger.error(msg, e); @@ -3413,6 +3421,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa long available = summary.getFreeSpace(); Map tInfo = new HashMap(); ModifyStoragePoolAnswer answer = new ModifyStoragePoolAnswer(cmd, capacity, available, tInfo); + if (cmd.getAdd() && pool.getType() == StoragePoolType.VMFS) { + answer.setLocalDatastoreName(morDatastore.getValue()); + } return answer; } catch (Throwable e) { if (e instanceof RemoteException) { @@ -4799,10 +4810,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // VM patching/rebooting time that may need int retry = _retry; while (System.currentTimeMillis() - startTick <= _opsTimeout || --retry > 0) { - SocketChannel sch = null; - try { - s_logger.info("Trying to connect to " + ipAddress); - sch = SocketChannel.open(); + s_logger.info("Trying to connect to " + ipAddress); + try (SocketChannel sch = SocketChannel.open();) { sch.configureBlocking(true); sch.socket().setSoTimeout(5000); @@ -4818,13 +4827,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { Thread.sleep(5000); } catch (InterruptedException ex) { - } - } - } finally { - if (sch != null) { - try { - sch.close(); - } catch (IOException e) { + s_logger.debug("[ignored] interupted while waiting to retry connect after failure.", e); } } } @@ -4832,6 +4835,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { Thread.sleep(1000); } catch (InterruptedException ex) { + s_logger.debug("[ignored] interupted while waiting to retry connect."); } } diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java index ec819f8a184..cc7071523bf 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java +++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java @@ -1303,7 +1303,7 @@ public class VmwareStorageProcessor implements StorageProcessor { VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, null); VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(vmName); if (vmMo == null) { - String msg = "Unable to find the VM to execute AttachVolumeCommand, vmName: " + vmName; + String msg = "Unable to find the VM to execute AttachCommand, vmName: " + vmName; s_logger.error(msg); throw new Exception(msg); } @@ -1329,7 +1329,7 @@ public class VmwareStorageProcessor implements StorageProcessor { } if (morDs == null) { - String msg = "Unable to find the mounted datastore to execute AttachVolumeCommand, vmName: " + vmName; + String msg = "Unable to find the mounted datastore to execute AttachCommand, vmName: " + vmName; s_logger.error(msg); throw new Exception(msg); } diff --git a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java index da9764de54d..4b77aab6170 100644 --- a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java +++ b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java @@ -207,6 +207,9 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy { VolumeVO volumeVO = volDao.findById(volume.getId()); Long oldPoolId = volumeVO.getPoolId(); volumeVO.setPath(volumeTo.getPath()); + if (volumeTo.getChainInfo() != null) { + volumeVO.setChainInfo(volumeTo.getChainInfo()); + } volumeVO.setLastPoolId(oldPoolId); volumeVO.setFolder(pool.getPath()); volumeVO.setPodId(pool.getPodId()); diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java index 05cf0e8df7c..dd44ad81534 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java @@ -124,6 +124,7 @@ import com.cloud.utils.StringUtils; import com.cloud.utils.Ternary; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.net.NetUtils; +import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SSHCmdHelper; import com.cloud.utils.ssh.SshHelper; import com.cloud.vm.VirtualMachine.PowerState; @@ -2867,10 +2868,19 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } } - protected List getPatchFiles() { - return null; + private List getPatchFiles() { + String patch = getPatchFilePath(); + String patchfilePath = Script.findScript("", patch); + if (patchfilePath == null) { + throw new CloudRuntimeException("Unable to find patch file "+patch); + } + List files = new ArrayList(); + files.add(new File(patchfilePath)); + return files; } + protected abstract String getPatchFilePath(); + public String getPerfMon(final Connection conn, final Map params, final int wait) { String result = null; try { diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpOssResource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpOssResource.java index b2f403dbbc2..44fad935140 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpOssResource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpOssResource.java @@ -17,17 +17,11 @@ package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import org.apache.xmlrpc.XmlRpcException; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Types.XenAPIException; import com.xensource.xenapi.VM; @@ -38,17 +32,8 @@ public class XcpOssResource extends CitrixResourceBase { private static final long mem_32m = 33554432L; @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xcposs/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " - + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xcposs/patch"; } @Override diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpServerResource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpServerResource.java index 03d9bf12156..092300123e8 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpServerResource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XcpServerResource.java @@ -16,18 +16,12 @@ // under the License. package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import org.apache.log4j.Logger; import org.apache.xmlrpc.XmlRpcException; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; import com.xensource.xenapi.Types.XenAPIException; @@ -40,16 +34,8 @@ public class XcpServerResource extends CitrixResourceBase { private final static long mem_32m = 33554432L; @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xcpserver/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xcpserver/patch"; } /** diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56FP1Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56FP1Resource.java index f3d281afd94..7a9a1c60cb9 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56FP1Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56FP1Resource.java @@ -16,9 +16,6 @@ // under the License. package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import javax.ejb.Local; @@ -26,8 +23,6 @@ import javax.ejb.Local; import org.apache.xmlrpc.XmlRpcException; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; import com.xensource.xenapi.Types.XenAPIException; @@ -36,16 +31,8 @@ import com.xensource.xenapi.Types.XenAPIException; public class XenServer56FP1Resource extends XenServer56Resource { @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch"; } /** diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56Resource.java index b1649637d66..61777ef757c 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56Resource.java @@ -16,14 +16,14 @@ // under the License. package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import org.apache.log4j.Logger; +import com.cloud.agent.api.StartupCommand; +import com.cloud.resource.ServerResource; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.ssh.SSHCmdHelper; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; import com.xensource.xenapi.Network; @@ -31,28 +31,13 @@ import com.xensource.xenapi.PIF; import com.xensource.xenapi.Types.XenAPIException; import com.xensource.xenapi.VLAN; -import com.cloud.agent.api.StartupCommand; -import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; -import com.cloud.utils.ssh.SSHCmdHelper; - @Local(value = ServerResource.class) public class XenServer56Resource extends CitrixResourceBase { private final static Logger s_logger = Logger.getLogger(XenServer56Resource.class); @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver56/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xenserver56/patch"; } @Override diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56SP2Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56SP2Resource.java index 37748178fbb..b1d6f97f28a 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56SP2Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer56SP2Resource.java @@ -16,15 +16,9 @@ // under the License. package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; @Local(value = ServerResource.class) public class XenServer56SP2Resource extends XenServer56FP1Resource { @@ -34,17 +28,4 @@ public class XenServer56SP2Resource extends XenServer56FP1Resource { _xsMemoryUsed = 128 * 1024 * 1024L; _xsVirtualizationFactor = 62.0 / 64.0; } - - @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; - } } diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer600Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer600Resource.java index c6e5d82af06..dd7b34fbc21 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer600Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer600Resource.java @@ -16,30 +16,15 @@ // under the License. package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; @Local(value = ServerResource.class) public class XenServer600Resource extends XenServer56SP2Resource { @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver60/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xenserver60/patch"; } - } diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer650Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer650Resource.java index 98796eb0435..941cefaad26 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer650Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServer650Resource.java @@ -18,29 +18,15 @@ */ package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import com.cloud.resource.ServerResource; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; @Local(value=ServerResource.class) public class XenServer650Resource extends Xenserver625Resource { @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver65/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xenserver65/patch"; } } diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625Resource.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625Resource.java index 58d64eb6756..5fc05b7eaab 100644 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625Resource.java +++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625Resource.java @@ -18,10 +18,6 @@ */ package com.cloud.hypervisor.xenserver.resource; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - import javax.ejb.Local; import org.apache.cloudstack.hypervisor.xenserver.XenServerResourceNewBase; @@ -32,7 +28,6 @@ import com.cloud.resource.ServerResource; import com.cloud.storage.resource.StorageSubsystemCommandHandler; import com.cloud.storage.resource.StorageSubsystemCommandHandlerBase; import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SSHCmdHelper; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; @@ -45,27 +40,18 @@ public class Xenserver625Resource extends XenServerResourceNewBase { private static final Logger s_logger = Logger.getLogger(Xenserver625Resource.class); @Override - protected List getPatchFiles() { - final List files = new ArrayList(); - final String patch = "scripts/vm/hypervisor/xenserver/xenserver62/patch"; - final String patchfilePath = Script.findScript("", patch); - if (patchfilePath == null) { - throw new CloudRuntimeException("Unable to find patch file " + patch); - } - final File file = new File(patchfilePath); - files.add(file); - return files; + protected String getPatchFilePath() { + return "scripts/vm/hypervisor/xenserver/xenserver62/patch"; } @Override protected StorageSubsystemCommandHandler buildStorageHandler() { - final XenServerStorageProcessor processor = new Xenserver625StorageProcessor(this); + XenServerStorageProcessor processor = new Xenserver625StorageProcessor(this); return new StorageSubsystemCommandHandlerBase(processor); } @Override - public void umountSnapshotDir(final Connection conn, final Long dcId) { - } + public void umountSnapshotDir(final Connection conn, final Long dcId) {} @Override public boolean setupServer(final Connection conn,final Host host) { diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixAttachVolumeCommandWrapper.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixAttachVolumeCommandWrapper.java deleted file mode 100644 index 436419e75f0..00000000000 --- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixAttachVolumeCommandWrapper.java +++ /dev/null @@ -1,146 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.hypervisor.xenserver.resource.wrapper.xenbase; - -import java.util.Set; - -import org.apache.log4j.Logger; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.AttachVolumeAnswer; -import com.cloud.agent.api.AttachVolumeCommand; -import com.cloud.hypervisor.xenserver.resource.CitrixResourceBase; -import com.cloud.resource.CommandWrapper; -import com.cloud.resource.ResourceWrapper; -import com.xensource.xenapi.Connection; -import com.xensource.xenapi.SR; -import com.xensource.xenapi.Types; -import com.xensource.xenapi.Types.XenAPIException; -import com.xensource.xenapi.VBD; -import com.xensource.xenapi.VDI; -import com.xensource.xenapi.VM; - -@ResourceWrapper(handles = AttachVolumeCommand.class) -public final class CitrixAttachVolumeCommandWrapper extends CommandWrapper { - - private static final Logger s_logger = Logger.getLogger(CitrixAttachVolumeCommandWrapper.class); - - @Override - public Answer execute(final AttachVolumeCommand command, final CitrixResourceBase citrixResourceBase) { - final Connection conn = citrixResourceBase.getConnection(); - final boolean attach = command.getAttach(); - final String vmName = command.getVmName(); - final String vdiNameLabel = vmName + "-DATA"; - final Long deviceId = command.getDeviceId(); - - String errorMsg; - if (attach) { - errorMsg = "Failed to attach volume"; - } else { - errorMsg = "Failed to detach volume"; - } - - try { - VDI vdi = null; - - if (command.getAttach() && command.isManaged()) { - final SR sr = citrixResourceBase.getIscsiSR(conn, command.get_iScsiName(), command.getStorageHost(), command.get_iScsiName(), command.getChapInitiatorUsername(), - command.getChapInitiatorPassword(), true); - - vdi = citrixResourceBase.getVDIbyUuid(conn, command.getVolumePath(), false); - - if (vdi == null) { - vdi = citrixResourceBase.createVdi(sr, vdiNameLabel, command.getVolumeSize()); - } - } else { - vdi = citrixResourceBase.getVDIbyUuid(conn, command.getVolumePath()); - } - - // Look up the VM - final VM vm = citrixResourceBase.getVM(conn, vmName); - if (attach) { - // Figure out the disk number to attach the VM to - String diskNumber = null; - if (deviceId != null) { - if (deviceId.longValue() == 3) { - final String msg = "Device 3 is reserved for CD-ROM, choose other device"; - return new AttachVolumeAnswer(command, msg); - } - if (citrixResourceBase.isDeviceUsed(conn, vm, deviceId)) { - final String msg = "Device " + deviceId + " is used in VM " + vmName; - return new AttachVolumeAnswer(command, msg); - } - diskNumber = deviceId.toString(); - } else { - diskNumber = citrixResourceBase.getUnusedDeviceNum(conn, vm); - } - // Create a new VBD - final VBD.Record vbdr = new VBD.Record(); - vbdr.VM = vm; - vbdr.VDI = vdi; - vbdr.bootable = false; - vbdr.userdevice = diskNumber; - vbdr.mode = Types.VbdMode.RW; - vbdr.type = Types.VbdType.DISK; - vbdr.unpluggable = true; - final VBD vbd = VBD.create(conn, vbdr); - - // Attach the VBD to the VM - vbd.plug(conn); - - // Update the VDI's label to include the VM name - vdi.setNameLabel(conn, vdiNameLabel); - - return new AttachVolumeAnswer(command, Long.parseLong(diskNumber), vdi.getUuid(conn)); - } else { - // Look up all VBDs for this VDI - final Set vbds = vdi.getVBDs(conn); - - // Detach each VBD from its VM, and then destroy it - for (final VBD vbd : vbds) { - final VBD.Record vbdr = vbd.getRecord(conn); - - if (vbdr.currentlyAttached) { - vbd.unplug(conn); - } - - vbd.destroy(conn); - } - - // Update the VDI's label to be "detached" - vdi.setNameLabel(conn, "detached"); - - if (command.isManaged()) { - citrixResourceBase.handleSrAndVdiDetach(command.get_iScsiName(), conn); - } - - return new AttachVolumeAnswer(command); - } - } catch (final XenAPIException e) { - final String msg = errorMsg + " for uuid: " + command.getVolumePath() + " due to " + e.toString(); - s_logger.warn(msg, e); - return new AttachVolumeAnswer(command, msg); - } catch (final Exception e) { - final String msg = errorMsg + " for uuid: " + command.getVolumePath() + " due to " + e.getMessage(); - s_logger.warn(msg, e); - return new AttachVolumeAnswer(command, msg); - } - } -} \ No newline at end of file diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpOssResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpOssResourcePathTest.java new file mode 100644 index 00000000000..1617432b22e --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpOssResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XcpOssResourcePathTest { + + private XcpOssResource xcpOssResource = new XcpOssResource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xcpOssResource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xcposs/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpServerResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpServerResourcePathTest.java new file mode 100644 index 00000000000..17fa6499dda --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpServerResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XcpServerResourcePathTest { + + private XcpServerResource xcpServerResource = new XcpServerResource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xcpServerResource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xcpserver/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56FP1ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56FP1ResourcePathTest.java new file mode 100644 index 00000000000..7b76816a6f6 --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56FP1ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer56FP1ResourcePathTest { + + private XenServer56FP1Resource xenServer56FP1Resource = new XenServer56FP1Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer56FP1Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56ResourcePathTest.java new file mode 100644 index 00000000000..c92dd23bc14 --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer56ResourcePathTest { + + private XenServer56Resource xenServer56Resource = new XenServer56Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer56Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver56/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56SP2ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56SP2ResourcePathTest.java new file mode 100644 index 00000000000..e301673602e --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56SP2ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer56SP2ResourcePathTest { + + private XenServer56SP2Resource xenServer56SP2Resource = new XenServer56SP2Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer56SP2Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer600ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer600ResourcePathTest.java new file mode 100644 index 00000000000..27762e8939c --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer600ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer600ResourcePathTest { + + private XenServer600Resource xenServer600Resource = new XenServer600Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer600Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver60/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer625ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer625ResourcePathTest.java new file mode 100644 index 00000000000..121ba0c5679 --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer625ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer625ResourcePathTest { + + private Xenserver625Resource xenServer625Resource = new Xenserver625Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer625Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver62/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer650ResourcePathTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer650ResourcePathTest.java new file mode 100644 index 00000000000..18a4bbb431d --- /dev/null +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer650ResourcePathTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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.hypervisor.xenserver.resource; + +import org.junit.Assert; +import org.junit.Test; + +public class XenServer650ResourcePathTest { + + private XenServer650Resource xenServer650Resource = new XenServer650Resource(); + + @Test + public void testPatchFilePath() { + String patchFilePath = xenServer650Resource.getPatchFilePath(); + String patch = "scripts/vm/hypervisor/xenserver/xenserver65/patch"; + + Assert.assertEquals(patch, patchFilePath); + } +} diff --git a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java index 39dd0751c4c..ca58f355336 100644 --- a/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java +++ b/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java @@ -49,7 +49,6 @@ import org.powermock.api.mockito.PowerMockito; import com.cloud.agent.api.Answer; import com.cloud.agent.api.AttachIsoCommand; -import com.cloud.agent.api.AttachVolumeCommand; import com.cloud.agent.api.CheckHealthCommand; import com.cloud.agent.api.CheckNetworkCommand; import com.cloud.agent.api.CheckOnHostCommand; @@ -127,7 +126,6 @@ import com.cloud.hypervisor.xenserver.resource.XsLocalNetwork; import com.cloud.network.Networks.TrafficType; import com.cloud.network.PhysicalNetworkSetupInfo; import com.cloud.storage.Storage.ImageFormat; -import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.VMTemplateStorageResourceAssoc; import com.cloud.storage.resource.StorageSubsystemCommandHandler; import com.cloud.utils.Pair; @@ -144,7 +142,6 @@ import com.xensource.xenapi.Types.XenAPIException; import com.xensource.xenapi.VM; import com.xensource.xenapi.VMGuestMetrics; - @RunWith(MockitoJUnitRunner.class) public class CitrixRequestWrapperTest { @@ -440,19 +437,6 @@ public class CitrixRequestWrapperTest { assertFalse(answer.getResult()); } - @Test - public void testAttachVolumeCommand() { - final AttachVolumeCommand attachCommand = new AttachVolumeCommand(false, true, "Test", StoragePoolType.LVM, "/", "DATA", 100l, 1l, "123"); - - final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); - assertNotNull(wrapper); - - final Answer answer = wrapper.execute(attachCommand, citrixResourceBase); - verify(citrixResourceBase, times(1)).getConnection(); - - assertFalse(answer.getResult()); - } - @Test public void testAttachIsoCommand() { final AttachIsoCommand attachCommand = new AttachIsoCommand("Test", "/", true); @@ -471,7 +455,7 @@ public class CitrixRequestWrapperTest { final StoragePoolVO poolVO = Mockito.mock(StoragePoolVO.class); final UpgradeSnapshotCommand upgradeSnapshotCommand = new UpgradeSnapshotCommand(poolVO, "http", 1l, 1l, 1l, 1l, 1l, "/", "58c5778b-7dd1-47cc-a7b5-f768541bf278", "Test", - "2.1"); + "2.1"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -487,7 +471,7 @@ public class CitrixRequestWrapperTest { final StoragePoolVO poolVO = Mockito.mock(StoragePoolVO.class); final UpgradeSnapshotCommand upgradeSnapshotCommand = new UpgradeSnapshotCommand(poolVO, "http", 1l, 1l, 1l, 1l, 1l, "/", "58c5778b-7dd1-47cc-a7b5-f768541bf278", "Test", - "3.1"); + "3.1"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -832,8 +816,9 @@ public class CitrixRequestWrapperTest { try { when(network.getBridge(conn)).thenReturn(bridge); when( - citrixResourceBase.callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge, "remoteIP", createGreCommand.getRemoteIp(), "greKey", - createGreCommand.getKey(), "from", Long.toString(createGreCommand.getFrom()), "to", Long.toString(createGreCommand.getTo()))).thenReturn("1:2"); + citrixResourceBase.callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge, "remoteIP", createGreCommand.getRemoteIp(), "greKey", + createGreCommand.getKey(), "from", Long.toString(createGreCommand.getFrom()), "to", Long.toString(createGreCommand.getTo()))).thenReturn( + "1:2"); } catch (final BadServerResponse e) { fail(e.getMessage()); @@ -938,8 +923,9 @@ public class CitrixRequestWrapperTest { when(network.getBridge(conn)).thenReturn(bridge); when( - citrixResourceBase.callHostPlugin(conn, "ovstunnel", "configure_ovs_bridge_for_network_topology", "bridge", bridge, "config", - physicalTopology.getVpcConfigInJson(), "host-id", ((Long) physicalTopology.getHostId()).toString(), "seq-no", Long.toString(1))).thenReturn("SUCCESS"); + citrixResourceBase.callHostPlugin(conn, "ovstunnel", "configure_ovs_bridge_for_network_topology", "bridge", bridge, "config", + physicalTopology.getVpcConfigInJson(), "host-id", ((Long) physicalTopology.getHostId()).toString(), "seq-no", Long.toString(1))).thenReturn( + "SUCCESS"); } catch (final BadServerResponse e) { fail(e.getMessage()); @@ -976,8 +962,9 @@ public class CitrixRequestWrapperTest { when(network.getBridge(conn)).thenReturn(bridge); when( - citrixResourceBase.callHostPlugin(conn, "ovstunnel", "configure_ovs_bridge_for_routing_policies", "bridge", bridge, "host-id", - ((Long) routingPolicy.getHostId()).toString(), "config", routingPolicy.getVpcConfigInJson(), "seq-no", Long.toString(1))).thenReturn("SUCCESS"); + citrixResourceBase.callHostPlugin(conn, "ovstunnel", "configure_ovs_bridge_for_routing_policies", "bridge", bridge, "host-id", + ((Long) routingPolicy.getHostId()).toString(), "config", routingPolicy.getVpcConfigInJson(), "seq-no", Long.toString(1))).thenReturn( + "SUCCESS"); } catch (final BadServerResponse e) { fail(e.getMessage()); @@ -1129,9 +1116,9 @@ public class CitrixRequestWrapperTest { when(network.getBridge(conn)).thenReturn(bridge); when(citrixResourceBase.callHostPlugin(conn, "ovstunnel", "create_tunnel", "bridge", bridge, "remote_ip", createTunnel.getRemoteIp(), - "key", createTunnel.getKey().toString(), "from", - createTunnel.getFrom().toString(), "to", createTunnel.getTo().toString(), "cloudstack-network-id", - createTunnel.getNetworkUuid())).thenReturn("SUCCESS:0"); + "key", createTunnel.getKey().toString(), "from", + createTunnel.getFrom().toString(), "to", createTunnel.getTo().toString(), "cloudstack-network-id", + createTunnel.getNetworkUuid())).thenReturn("SUCCESS:0"); } catch (final BadServerResponse e) { fail(e.getMessage()); @@ -1166,9 +1153,9 @@ public class CitrixRequestWrapperTest { when(network.getBridge(conn)).thenReturn(bridge); when(citrixResourceBase.callHostPlugin(conn, "ovstunnel", "create_tunnel", "bridge", bridge, "remote_ip", createTunnel.getRemoteIp(), - "key", createTunnel.getKey().toString(), "from", - createTunnel.getFrom().toString(), "to", createTunnel.getTo().toString(), "cloudstack-network-id", - createTunnel.getNetworkUuid())).thenReturn("FAIL:1"); + "key", createTunnel.getKey().toString(), "from", + createTunnel.getFrom().toString(), "to", createTunnel.getTo().toString(), "cloudstack-network-id", + createTunnel.getNetworkUuid())).thenReturn("FAIL:1"); } catch (final BadServerResponse e) { fail(e.getMessage()); @@ -1216,7 +1203,6 @@ public class CitrixRequestWrapperTest { when(citrixResourceBase.getConnection()).thenReturn(conn); - final Answer answer = wrapper.execute(setupBridge, citrixResourceBase); verify(citrixResourceBase, times(1)).getConnection(); @@ -1260,7 +1246,7 @@ public class CitrixRequestWrapperTest { final Connection conn = Mockito.mock(Connection.class); final Network network = Mockito.mock(Network.class); - final OvsDestroyTunnelCommand destroyTunnel = new OvsDestroyTunnelCommand(1l, "net01", "port11"); + final OvsDestroyTunnelCommand destroyTunnel = new OvsDestroyTunnelCommand(1l, "net01", "port11"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -1293,7 +1279,7 @@ public class CitrixRequestWrapperTest { final Connection conn = Mockito.mock(Connection.class); final Network network = Mockito.mock(Network.class); - final OvsDestroyTunnelCommand destroyTunnel = new OvsDestroyTunnelCommand(1l, "net01", "port11"); + final OvsDestroyTunnelCommand destroyTunnel = new OvsDestroyTunnelCommand(1l, "net01", "port11"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -1339,7 +1325,8 @@ public class CitrixRequestWrapperTest { cmdLine.append(XenServerUtilitiesHelper.SCRIPT_CMD_PATH).append(VRScripts.UPDATE_HOST_PASSWD).append(' ').append(username).append(' ').append(newPassword); when(citrixResourceBase.getXenServerUtilitiesHelper()).thenReturn(xenServerUtilitiesHelper); - when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn(cmdLine.toString()); + when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn( + cmdLine.toString()); try { when(xenServerUtilitiesHelper.executeSshWrapper(hostIp, 22, username, null, hostPasswd, cmdLine.toString())).thenReturn(result); @@ -1387,7 +1374,8 @@ public class CitrixRequestWrapperTest { cmdLine.append(XenServerUtilitiesHelper.SCRIPT_CMD_PATH).append(VRScripts.UPDATE_HOST_PASSWD).append(' ').append(username).append(' ').append(newPassword); when(citrixResourceBase.getXenServerUtilitiesHelper()).thenReturn(xenServerUtilitiesHelper); - when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn(cmdLine.toString()); + when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn( + cmdLine.toString()); try { when(xenServerUtilitiesHelper.executeSshWrapper(hostIp, 22, username, null, hostPasswd, cmdLine.toString())).thenReturn(result); @@ -1433,7 +1421,8 @@ public class CitrixRequestWrapperTest { cmdLine.append(XenServerUtilitiesHelper.SCRIPT_CMD_PATH).append(VRScripts.UPDATE_HOST_PASSWD).append(' ').append(username).append(' ').append(newPassword); when(citrixResourceBase.getXenServerUtilitiesHelper()).thenReturn(xenServerUtilitiesHelper); - when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn(cmdLine.toString()); + when(xenServerUtilitiesHelper.buildCommandLine(XenServerUtilitiesHelper.SCRIPT_CMD_PATH, VRScripts.UPDATE_HOST_PASSWD, username, newPassword)).thenReturn( + cmdLine.toString()); try { when(xenServerUtilitiesHelper.executeSshWrapper(hostIp, 22, username, null, hostPasswd, cmdLine.toString())).thenThrow(new Exception("testing failure")); @@ -1468,7 +1457,7 @@ public class CitrixRequestWrapperTest { final Pool pool = PowerMockito.mock(Pool.class); final Pool.Record poolr = Mockito.mock(Pool.Record.class); final Host.Record hostr = Mockito.mock(Host.Record.class); - final Host master = Mockito.mock(Host.class); + final Host master = Mockito.mock(Host.class); final ClusterVMMetaDataSyncCommand vmDataSync = new ClusterVMMetaDataSyncCommand(10, 1l); @@ -1578,7 +1567,7 @@ public class CitrixRequestWrapperTest { final VMSnapshotTO snapshotTO = Mockito.mock(VMSnapshotTO.class); final List volumeTOs = new ArrayList(); - final CreateVMSnapshotCommand vmSnapshot = new CreateVMSnapshotCommand("Test", snapshotTO, volumeTOs, "Debian"); + final CreateVMSnapshotCommand vmSnapshot = new CreateVMSnapshotCommand("Test", "uuid", snapshotTO, volumeTOs, "Debian"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -1620,7 +1609,7 @@ public class CitrixRequestWrapperTest { final VMSnapshotTO snapshotTO = Mockito.mock(VMSnapshotTO.class); final List volumeTOs = new ArrayList(); - final RevertToVMSnapshotCommand vmSnapshot = new RevertToVMSnapshotCommand("Test", snapshotTO, volumeTOs, "Debian"); + final RevertToVMSnapshotCommand vmSnapshot = new RevertToVMSnapshotCommand("Test", "uuid", snapshotTO, volumeTOs, "Debian"); final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); @@ -1645,7 +1634,7 @@ public class CitrixRequestWrapperTest { when(citrixResourceBase.getConnection()).thenReturn(conn); when(citrixResourceBase.callHostPlugin(conn, "vmops", "network_rules_vmSecondaryIp", "vmName", rulesVm.getVmName(), "vmMac", rulesVm.getVmMac(), - "vmSecIp", rulesVm.getVmSecIp(), "action", rulesVm.getAction())).thenReturn("true"); + "vmSecIp", rulesVm.getVmSecIp(), "action", rulesVm.getAction())).thenReturn("true"); final Answer answer = wrapper.execute(rulesVm, citrixResourceBase); @@ -1665,7 +1654,7 @@ public class CitrixRequestWrapperTest { when(citrixResourceBase.getConnection()).thenReturn(conn); when(citrixResourceBase.callHostPlugin(conn, "vmops", "network_rules_vmSecondaryIp", "vmName", rulesVm.getVmName(), "vmMac", rulesVm.getVmMac(), - "vmSecIp", rulesVm.getVmSecIp(), "action", rulesVm.getAction())).thenReturn("false"); + "vmSecIp", rulesVm.getVmSecIp(), "action", rulesVm.getAction())).thenReturn("false"); final Answer answer = wrapper.execute(rulesVm, citrixResourceBase); @@ -1681,7 +1670,7 @@ public class CitrixRequestWrapperTest { final VirtualMachineTO machineTO = Mockito.mock(VirtualMachineTO.class); final Connection conn = Mockito.mock(Connection.class); final XsHost xsHost = Mockito.mock(XsHost.class); - final Host host = Mockito.mock(Host.class); + final Host host = Mockito.mock(Host.class); final ScaleVmCommand scaleVm = new ScaleVmCommand(machineTO); @@ -1739,7 +1728,7 @@ public class CitrixRequestWrapperTest { } when(citrixResourceBase.callHostPlugin(conn, "ovs-pvlan", "setup-pvlan-dhcp", "op", op, "nw-label", label, "primary-pvlan", primaryPvlan, "isolated-pvlan", - isolatedPvlan, "dhcp-name", dhcpName, "dhcp-ip", dhcpIp, "dhcp-mac", dhcpMac)).thenReturn("true"); + isolatedPvlan, "dhcp-name", dhcpName, "dhcp-ip", dhcpIp, "dhcp-mac", dhcpMac)).thenReturn("true"); final Answer answer = wrapper.execute(lanSetup, citrixResourceBase); @@ -1780,7 +1769,7 @@ public class CitrixRequestWrapperTest { } when(citrixResourceBase.callHostPlugin(conn, "ovs-pvlan", "setup-pvlan-dhcp", "op", op, "nw-label", label, "primary-pvlan", primaryPvlan, "isolated-pvlan", - isolatedPvlan, "dhcp-name", dhcpName, "dhcp-ip", dhcpIp, "dhcp-mac", dhcpMac)).thenReturn("false"); + isolatedPvlan, "dhcp-name", dhcpName, "dhcp-ip", dhcpIp, "dhcp-mac", dhcpMac)).thenReturn("false"); final Answer answer = wrapper.execute(lanSetup, citrixResourceBase); @@ -1819,7 +1808,7 @@ public class CitrixRequestWrapperTest { } when(citrixResourceBase.callHostPlugin(conn, "ovs-pvlan", "setup-pvlan-vm", "op", op, "nw-label", label, "primary-pvlan", primaryPvlan, "isolated-pvlan", - isolatedPvlan, "vm-mac", vmMac)).thenReturn("true"); + isolatedPvlan, "vm-mac", vmMac)).thenReturn("true"); final Answer answer = wrapper.execute(lanSetup, citrixResourceBase); @@ -1858,7 +1847,7 @@ public class CitrixRequestWrapperTest { } when(citrixResourceBase.callHostPlugin(conn, "ovs-pvlan", "setup-pvlan-vm", "op", op, "nw-label", label, "primary-pvlan", primaryPvlan, "isolated-pvlan", - isolatedPvlan, "vm-mac", vmMac)).thenReturn("false"); + isolatedPvlan, "vm-mac", vmMac)).thenReturn("false"); final Answer answer = wrapper.execute(lanSetup, citrixResourceBase); @@ -1908,7 +1897,7 @@ public class CitrixRequestWrapperTest { @Test public void testIpAssocVpcCommand() { final VirtualRoutingResource routingResource = Mockito.mock(VirtualRoutingResource.class); - final IpAddressTO [] ips = new IpAddressTO[0]; + final IpAddressTO[] ips = new IpAddressTO[0]; final IpAssocVpcCommand ipAssociation = new IpAssocVpcCommand(ips); @@ -1928,7 +1917,7 @@ public class CitrixRequestWrapperTest { @Test public void testIpAssocCommand() { final VirtualRoutingResource routingResource = Mockito.mock(VirtualRoutingResource.class); - final IpAddressTO [] ips = new IpAddressTO[0]; + final IpAddressTO[] ips = new IpAddressTO[0]; final IpAssocCommand ipAssociation = new IpAssocCommand(ips); @@ -1980,7 +1969,6 @@ public class CitrixRequestWrapperTest { final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance(); assertNotNull(wrapper); - when(citrixResourceBase.getConnection()).thenReturn(conn); when(citrixResourceBase.getVM(conn, getVmIpAddrCmd.getVmName())).thenReturn(vm); when(vm.getGuestMetrics(conn)).thenReturn(mtr); diff --git a/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfUtils.java b/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfUtils.java index 61f3d481637..da409df9835 100644 --- a/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfUtils.java +++ b/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfUtils.java @@ -292,7 +292,7 @@ public class BigSwitchBcfUtils { p.setOwner(BigSwitchBcfApi.getCloudstackInstanceId()); List ipList = new ArrayList(); - ipList.add(new AttachmentData().getAttachment().new IpAddress(nic.getIp4Address())); + ipList.add(new AttachmentData().getAttachment().new IpAddress(nic.getIPv4Address())); p.setIpAddresses(ipList); p.setId(nic.getUuid()); diff --git a/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java b/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java index 3c69f3bf9ce..dba9de2be8c 100644 --- a/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java +++ b/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java @@ -264,7 +264,7 @@ NetworkACLServiceProvider, FirewallServiceProvider, ResourceStateAdapter { String hostname = dest.getHost().getName(); String nicId = nic.getUuid(); Integer vlan = Integer.valueOf(BroadcastDomainType.getValue(nic.getIsolationUri())); - String ipv4 = nic.getIp4Address(); + String ipv4 = nic.getIPv4Address(); String mac = nic.getMacAddress(); long zoneId = network.getDataCenterId(); String vmwareVswitchLabel = _networkModel.getDefaultGuestTrafficLabel(zoneId, HypervisorType.VMware); diff --git a/plugins/network-elements/bigswitch/src/com/cloud/network/guru/BigSwitchBcfGuestNetworkGuru.java b/plugins/network-elements/bigswitch/src/com/cloud/network/guru/BigSwitchBcfGuestNetworkGuru.java index 7625b4ba4c3..e205f47ef15 100644 --- a/plugins/network-elements/bigswitch/src/com/cloud/network/guru/BigSwitchBcfGuestNetworkGuru.java +++ b/plugins/network-elements/bigswitch/src/com/cloud/network/guru/BigSwitchBcfGuestNetworkGuru.java @@ -387,7 +387,7 @@ public class BigSwitchBcfGuestNetworkGuru extends GuestNetworkGuru implements Ne String nicId = nic.getUuid(); Integer vlan = Integer.valueOf(BroadcastDomainType.getValue(nic.getIsolationUri())); - String ipv4 = nic.getIp4Address(); + String ipv4 = nic.getIPv4Address(); String mac = nic.getMacAddress(); CreateBcfAttachmentCommand cmd = new CreateBcfAttachmentCommand(tenantId, diff --git a/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java b/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java index 5d1f02ba552..4e0a3196dfb 100644 --- a/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java +++ b/plugins/network-elements/dns-notifier/src/org/apache/cloudstack/network/element/DnsNotifier.java @@ -73,8 +73,8 @@ public class DnsNotifier extends AdapterBase implements NetworkElement { throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { // signal to the dns server that this vm is up and running and set the ip address to hostname mapping. vm.getHostName(); - nic.getIp4Address(); - nic.getIp6Address(); + nic.getIPv4Address(); + nic.getIPv6Address(); return true; } @@ -82,8 +82,8 @@ public class DnsNotifier extends AdapterBase implements NetworkElement { public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException { vm.getHostName(); - nic.getIp4Address(); - nic.getIp6Address(); + nic.getIPv4Address(); + nic.getIPv6Address(); // signal to the dns server that the vm is being shutdown and remove the mapping. return true; } diff --git a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java index 9aba5ae4d01..b2d651c4f70 100644 --- a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java +++ b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java @@ -434,12 +434,12 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast for (NicProfile nic : profile.getNics()) { int deviceId = nic.getDeviceId(); - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); if (nic.isDefaultNic()) { - buf.append(" gateway=").append(nic.getGateway()); - defaultDns1 = nic.getDns1(); - defaultDns2 = nic.getDns2(); + buf.append(" gateway=").append(nic.getIPv4Gateway()); + defaultDns1 = nic.getIPv4Dns1(); + defaultDns2 = nic.getIPv4Dns2(); } if (nic.getTrafficType() == TrafficType.Management) { buf.append(" localgw=").append(dest.getPod().getGateway()); @@ -497,11 +497,11 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast List nics = profile.getNics(); for (NicProfile nic : nics) { if (nic.getTrafficType() == TrafficType.Public) { - elbVm.setPublicIpAddress(nic.getIp4Address()); - elbVm.setPublicNetmask(nic.getNetmask()); + elbVm.setPublicIpAddress(nic.getIPv4Address()); + elbVm.setPublicNetmask(nic.getIPv4Netmask()); elbVm.setPublicMacAddress(nic.getMacAddress()); } else if (nic.getTrafficType() == TrafficType.Control) { - elbVm.setPrivateIpAddress(nic.getIp4Address()); + elbVm.setPrivateIpAddress(nic.getIPv4Address()); elbVm.setPrivateMacAddress(nic.getMacAddress()); } } @@ -534,14 +534,14 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast // TODO this is a ugly to test hypervisor type here // for basic network mode, we will use the guest NIC for control NIC for (NicProfile nic : profile.getNics()) { - if (nic.getTrafficType() == TrafficType.Guest && nic.getIp4Address() != null) { + if (nic.getTrafficType() == TrafficType.Guest && nic.getIPv4Address() != null) { controlNic = nic; guestNetworkId = nic.getNetworkId(); } } } else { for (NicProfile nic : profile.getNics()) { - if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) { + if (nic.getTrafficType() == TrafficType.Control && nic.getIPv4Address() != null) { controlNic = nic; } else if (nic.getTrafficType() == TrafficType.Guest) { guestNetworkId = nic.getNetworkId(); @@ -554,7 +554,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast return false; } - cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922)); + cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922)); // Re-apply load balancing rules List lbs = _elbVmMapDao.listLbsForElbVm(elbVm.getId()); diff --git a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java index c5a184c8f29..042145bf926 100644 --- a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java +++ b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java @@ -152,7 +152,7 @@ public class GloboDnsElement extends AdapterBase implements ResourceStateAdapter throw new InvalidParameterValueException("VM name should contain only lower case letters and digits: " + vmName + " - " + vm); } - CreateOrUpdateRecordAndReverseCommand cmd = new CreateOrUpdateRecordAndReverseCommand(vmHostname, nic.getIp4Address(), network.getNetworkDomain(), + CreateOrUpdateRecordAndReverseCommand cmd = new CreateOrUpdateRecordAndReverseCommand(vmHostname, nic.getIPv4Address(), network.getNetworkDomain(), GloboDNSTemplateId.value(), GloboDNSOverride.value()); callCommand(cmd, zoneId); return true; @@ -174,7 +174,7 @@ public class GloboDnsElement extends AdapterBase implements ResourceStateAdapter throw new CloudRuntimeException("Could not find zone associated to this network"); } - RemoveRecordCommand cmd = new RemoveRecordCommand(hostNameOfVirtualMachine(vm), nic.getIp4Address(), network.getNetworkDomain(), GloboDNSOverride.value()); + RemoveRecordCommand cmd = new RemoveRecordCommand(hostNameOfVirtualMachine(vm), nic.getIPv4Address(), network.getNetworkDomain(), GloboDNSOverride.value()); callCommand(cmd, zoneId); return true; } diff --git a/plugins/network-elements/globodns/test/com/globo/globodns/cloudstack/element/GloboDnsElementTest.java b/plugins/network-elements/globodns/test/com/globo/globodns/cloudstack/element/GloboDnsElementTest.java index 36155b9331e..12427f6f38e 100644 --- a/plugins/network-elements/globodns/test/com/globo/globodns/cloudstack/element/GloboDnsElementTest.java +++ b/plugins/network-elements/globodns/test/com/globo/globodns/cloudstack/element/GloboDnsElementTest.java @@ -19,9 +19,9 @@ package com.globo.globodns.cloudstack.element; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.verify; import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import java.io.IOException; @@ -151,7 +151,7 @@ public class GloboDnsElementTest { when(network.getDataCenterId()).thenReturn(zoneId); when(network.getId()).thenReturn(1l); NicProfile nic = new NicProfile(); - nic.setIp4Address("10.11.12.13"); + nic.setIPv4Address("10.11.12.13"); VirtualMachineProfile vm = mock(VirtualMachineProfile.class); when(vm.getHostName()).thenReturn("vm-name"); when(vm.getType()).thenReturn(VirtualMachine.Type.User); @@ -184,7 +184,7 @@ public class GloboDnsElementTest { when(network.getDataCenterId()).thenReturn(zoneId); when(network.getId()).thenReturn(1l); NicProfile nic = new NicProfile(); - nic.setIp4Address("10.11.12.13"); + nic.setIPv4Address("10.11.12.13"); VirtualMachineProfile vm = mock(VirtualMachineProfile.class); when(vm.getHostName()).thenReturn("vm-name"); when(vm.getType()).thenReturn(VirtualMachine.Type.User); diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java index 4bd852d19db..88ab512dbe9 100644 --- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java +++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java @@ -190,12 +190,12 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In for (final NicProfile nic : profile.getNics()) { final int deviceId = nic.getDeviceId(); - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); if (nic.isDefaultNic()) { - buf.append(" gateway=").append(nic.getGateway()); - buf.append(" dns1=").append(nic.getGateway()); + buf.append(" gateway=").append(nic.getIPv4Gateway()); + buf.append(" dns1=").append(nic.getIPv4Gateway()); } if (nic.getTrafficType() == TrafficType.Guest) { @@ -251,7 +251,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In final List nics = profile.getNics(); for (final NicProfile nic : nics) { if (nic.getTrafficType() == TrafficType.Control) { - internalLbVm.setPrivateIpAddress(nic.getIp4Address()); + internalLbVm.setPrivateIpAddress(nic.getIPv4Address()); internalLbVm.setPrivateMacAddress(nic.getMacAddress()); } } @@ -339,7 +339,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In if (reprogramGuestNtwk) { final NicProfile guestNic = getNicProfileByTrafficType(profile, TrafficType.Guest); - finalizeLbRulesForIp(cmds, internalLbVm, provider, new Ip(guestNic.getIp4Address()), guestNic.getNetworkId()); + finalizeLbRulesForIp(cmds, internalLbVm, provider, new Ip(guestNic.getIPv4Address()), guestNic.getNetworkId()); } return true; @@ -408,7 +408,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In protected NicProfile getNicProfileByTrafficType(final VirtualMachineProfile profile, final TrafficType trafficType) { for (final NicProfile nic : profile.getNics()) { - if (nic.getTrafficType() == trafficType && nic.getIp4Address() != null) { + if (nic.getTrafficType() == trafficType && nic.getIPv4Address() != null) { return nic; } } @@ -416,11 +416,11 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In } protected void finalizeSshAndVersionOnStart(final Commands cmds, final VirtualMachineProfile profile, final DomainRouterVO router, final NicProfile controlNic) { - cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922)); + cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922)); // Update internal lb vm template/scripts version final GetDomRVersionCmd command = new GetDomRVersionCmd(); - command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address()); + command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIPv4Address()); command.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName()); cmds.addCommand("getDomRVersion", command); } @@ -480,7 +480,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In maxconn = offering.getConcurrentConnections().toString(); } final LoadBalancerConfigCommand cmd = - new LoadBalancerConfigCommand(lbs, guestNic.getIp4Address(), guestNic.getIp4Address(), internalLbVm.getPrivateIpAddress(), _itMgr.toNicTO(guestNicProfile, + new LoadBalancerConfigCommand(lbs, guestNic.getIPv4Address(), guestNic.getIPv4Address(), internalLbVm.getPrivateIpAddress(), _itMgr.toNicTO(guestNicProfile, internalLbVm.getHypervisorType()), internalLbVm.getVpcId(), maxconn, offering.isKeepAliveEnabled()); cmd.lbStatsVisibility = _configDao.getValue(Config.NetworkLBHaproxyStatsVisbility.key()); @@ -489,7 +489,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In cmd.lbStatsPort = _configDao.getValue(Config.NetworkLBHaproxyStatsPort.key()); cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getInternalLbControlIp(internalLbVm.getId())); - cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, guestNic.getIp4Address()); + cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, guestNic.getIPv4Address()); cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, internalLbVm.getInstanceName()); final DataCenterVO dcVo = _dcDao.findById(internalLbVm.getDataCenterId()); cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString()); @@ -502,7 +502,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In for (final NicVO nic : nics) { final Network ntwk = _ntwkModel.getNetwork(nic.getNetworkId()); if (ntwk.getTrafficType() == TrafficType.Control) { - controlIpAddress = nic.getIp4Address(); + controlIpAddress = nic.getIPv4Address(); } } @@ -672,17 +672,17 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In s_logger.debug("Adding nic for Internal LB in Guest network " + guestNetwork); final NicProfile guestNic = new NicProfile(); if (guestIp != null) { - guestNic.setIp4Address(guestIp.addr()); + guestNic.setIPv4Address(guestIp.addr()); } else { - guestNic.setIp4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); + guestNic.setIPv4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); } - guestNic.setGateway(guestNetwork.getGateway()); + guestNic.setIPv4Gateway(guestNetwork.getGateway()); guestNic.setBroadcastUri(guestNetwork.getBroadcastUri()); guestNic.setBroadcastType(guestNetwork.getBroadcastDomainType()); guestNic.setIsolationUri(guestNetwork.getBroadcastUri()); guestNic.setMode(guestNetwork.getMode()); final String gatewayCidr = guestNetwork.getCidr(); - guestNic.setNetmask(NetUtils.getCidrNetmask(gatewayCidr)); + guestNic.setIPv4Netmask(NetUtils.getCidrNetmask(gatewayCidr)); guestNic.setDefaultNic(true); networks.put(guestNetwork, new ArrayList(Arrays.asList(guestNic))); } @@ -714,7 +714,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In while (it.hasNext()) { final DomainRouterVO vm = it.next(); final Nic nic = _nicDao.findByNtwkIdAndInstanceId(guestNetworkId, vm.getId()); - if (!nic.getIp4Address().equalsIgnoreCase(requestedGuestIp.addr())) { + if (!nic.getIPv4Address().equalsIgnoreCase(requestedGuestIp.addr())) { it.remove(); } } diff --git a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java index bc48d468ded..b24d51101ea 100644 --- a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java +++ b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java @@ -24,8 +24,6 @@ import java.util.List; import javax.inject.Inject; -import junit.framework.TestCase; - import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO; import org.apache.cloudstack.network.lb.InternalLoadBalancerVMManager; import org.junit.Before; @@ -74,6 +72,8 @@ import com.cloud.vm.VirtualMachineManager; import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.NicDao; +import junit.framework.TestCase; + /** * Set of unittests for InternalLoadBalancerVMManager * @@ -137,7 +137,7 @@ public class InternalLBVMManagerTest extends TestCase { vm = setId(vm, 1); vm.setPrivateIpAddress("10.2.2.2"); final NicVO nic = new NicVO("somereserver", 1L, 1L, VirtualMachine.Type.InternalLoadBalancerVm); - nic.setIp4Address(requestedIp); + nic.setIPv4Address(requestedIp); final List emptyList = new ArrayList(); final List nonEmptyList = new ArrayList(); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java index 05723b04447..7f564098755 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java @@ -27,24 +27,19 @@ import java.util.Set; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - import org.apache.cloudstack.network.contrail.api.command.CreateServiceInstanceCmd; import org.apache.cloudstack.network.contrail.model.InstanceIpModel; import org.apache.cloudstack.network.contrail.model.VMInterfaceModel; import org.apache.cloudstack.network.contrail.model.VirtualMachineModel; import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.deploy.DeployDestination; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.IpAddress; -import com.cloud.network.dao.NetworkDao; -import com.cloud.network.dao.NetworkVO; -import com.cloud.resource.ResourceManager; - import com.cloud.network.Network; import com.cloud.network.Network.Capability; import com.cloud.network.Network.Provider; @@ -52,12 +47,17 @@ import com.cloud.network.Network.Service; import com.cloud.network.Networks.TrafficType; import com.cloud.network.PhysicalNetworkServiceProvider; import com.cloud.network.PublicIpAddress; -import com.cloud.network.element.IpDeployer; -import com.cloud.network.element.StaticNatServiceProvider; -import com.cloud.network.element.SourceNatServiceProvider; +import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; import com.cloud.network.element.DhcpServiceProvider; +import com.cloud.network.element.IpDeployer; +import com.cloud.network.element.SourceNatServiceProvider; +import com.cloud.network.element.StaticNatServiceProvider; import com.cloud.network.rules.StaticNat; import com.cloud.offering.NetworkOffering; +import com.cloud.resource.ResourceManager; +import com.cloud.server.ConfigurationServer; +import com.cloud.server.ConfigurationServerImpl; import com.cloud.utils.component.AdapterBase; import com.cloud.vm.NicProfile; import com.cloud.vm.NicVO; @@ -65,8 +65,6 @@ import com.cloud.vm.ReservationContext; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; -import com.cloud.server.ConfigurationServer; -import com.cloud.server.ConfigurationServerImpl; @Component @Local(value = {ContrailElement.class, StaticNatServiceProvider.class, IpDeployer.class, SourceNatServiceProvider.class}) @@ -196,7 +194,7 @@ public class ContrailElementImpl extends AdapterBase ipModel = new InstanceIpModel(vm.getInstanceName(), nic.getDeviceId()); ipModel.addToVMInterface(vmiModel); } - ipModel.setAddress(nicProfile.getIp4Address()); + ipModel.setAddress(nicProfile.getIPv4Address()); try { vmModel.update(_manager.getModelController()); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java index 427c2795305..8a86bc85363 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java @@ -24,15 +24,11 @@ import java.util.List; import javax.ejb.Local; import javax.inject.Inject; -import net.juniper.contrail.api.types.MacAddressesType; -import net.juniper.contrail.api.types.VirtualMachineInterface; - -import org.apache.log4j.Logger; - import org.apache.cloudstack.network.contrail.model.InstanceIpModel; import org.apache.cloudstack.network.contrail.model.VMInterfaceModel; import org.apache.cloudstack.network.contrail.model.VirtualMachineModel; import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel; +import org.apache.log4j.Logger; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; @@ -73,6 +69,9 @@ import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; +import net.juniper.contrail.api.types.MacAddressesType; +import net.juniper.contrail.api.types.VirtualMachineInterface; + @Local(value = {NetworkGuru.class}) public class ContrailGuru extends AdapterBase implements NetworkGuru { @Inject @@ -193,14 +192,14 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru { InsufficientAddressCapacityException, ConcurrentOperationException { s_logger.debug("allocate NicProfile on " + network.getName()); - if (profile != null && profile.getRequestedIpv4() != null) { + if (profile != null && profile.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + profile); } if (profile == null) { profile = new NicProfile(ReservationStrategy.Create, null, null, null, null); } - profile.setStrategy(ReservationStrategy.Start); + profile.setReservationStrategy(ReservationStrategy.Start); URI broadcastUri = null; try { broadcastUri = new URI("vlan://untagged"); @@ -256,9 +255,9 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru { } else { s_logger.debug("Reuse existing instance-ip object on " + ipModel.getName()); } - if (nic.getIp4Address() != null) { - s_logger.debug("Nic using existing IP address " + nic.getIp4Address()); - ipModel.setAddress(nic.getIp4Address()); + if (nic.getIPv4Address() != null) { + s_logger.debug("Nic using existing IP address " + nic.getIPv4Address()); + ipModel.setAddress(nic.getIPv4Address()); } try { @@ -282,13 +281,13 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru { } } - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { s_logger.debug("Allocated IP address " + ipModel.getAddress()); - nic.setIp4Address(ipModel.getAddress()); + nic.setIPv4Address(ipModel.getAddress()); if (network.getCidr() != null) { - nic.setNetmask(NetUtils.cidr2Netmask(network.getCidr())); + nic.setIPv4Netmask(NetUtils.cidr2Netmask(network.getCidr())); } - nic.setGateway(network.getGateway()); + nic.setIPv4Gateway(network.getGateway()); nic.setFormat(AddressFormat.Ip4); } } diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java index 71d2901a1e3..fd29ca9a7b5 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java @@ -17,6 +17,8 @@ package org.apache.cloudstack.network.contrail.management; +import static com.cloud.utils.AutoCloseableUtil.closeAutoCloseable; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -38,7 +40,6 @@ import com.cloud.network.dao.NetworkVO; import com.cloud.offering.NetworkOffering; import com.cloud.user.Account; import com.cloud.utils.PropertiesUtil; - /** * ManagementNetworkGuru * @@ -81,10 +82,7 @@ public class ManagementNetworkGuru extends ContrailGuru { s_logger.error(e.getMessage()); throw new ConfigurationException(e.getMessage()); } finally { - try { - inputFile.close(); - } catch (IOException e) { - } + closeAutoCloseable(inputFile, "error closing config file"); } _mgmtCidr = configProps.getProperty("management.cidr"); _mgmtGateway = configProps.getProperty("management.gateway"); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ModelObject.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ModelObject.java index c751d75b63c..acfff7de291 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ModelObject.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ModelObject.java @@ -22,6 +22,8 @@ import java.io.Serializable; import java.lang.ref.WeakReference; import java.util.TreeSet; +import org.apache.log4j.Logger; + import com.cloud.exception.InternalErrorException; /** @@ -43,6 +45,7 @@ public interface ModelObject { public static class ModelReference implements Comparable, Serializable { private static final long serialVersionUID = -2019113974956703526L; + private static final Logger s_logger = Logger.getLogger(ModelReference.class); /* * WeakReference class is not serializable by definition. So, we cannot enforce its serialization unless we write the implementation of @@ -86,8 +89,9 @@ public interface ModelObject { ModelReference rhs = (ModelReference)other; return compareTo(rhs) == 0; } catch (ClassCastException ex) { + // not this class , so + return false; } - return false; } public ModelObject get() { diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VMInterfaceModel.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VMInterfaceModel.java index 49060f1bd3b..dbfb969f9ae 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VMInterfaceModel.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VMInterfaceModel.java @@ -19,20 +19,19 @@ package org.apache.cloudstack.network.contrail.model; import java.io.IOException; -import net.juniper.contrail.api.ApiConnector; -import net.juniper.contrail.api.types.MacAddressesType; -import net.juniper.contrail.api.types.VirtualMachineInterface; -import net.juniper.contrail.api.types.VirtualMachineInterfacePropertiesType; - -import org.apache.log4j.Logger; - import org.apache.cloudstack.network.contrail.management.ContrailManager; +import org.apache.log4j.Logger; import com.cloud.exception.InternalErrorException; import com.cloud.network.Network; import com.cloud.vm.NicVO; import com.cloud.vm.VMInstanceVO; +import net.juniper.contrail.api.ApiConnector; +import net.juniper.contrail.api.types.MacAddressesType; +import net.juniper.contrail.api.types.VirtualMachineInterface; +import net.juniper.contrail.api.types.VirtualMachineInterfacePropertiesType; + public class VMInterfaceModel extends ModelObjectBase { private static final Logger s_logger = Logger.getLogger(VMInterfaceModel.class); @@ -78,7 +77,7 @@ public class VMInterfaceModel extends ModelObjectBase { setProperties(controller, instance, nic); InstanceIpModel ipModel = getInstanceIp(); - String ipAddress = nic.getIp4Address(); + String ipAddress = nic.getIPv4Address(); if (ipAddress != null) { if (ipModel == null) { ipModel = new InstanceIpModel(_vmName, _deviceId); diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/InstanceIpModelTest.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/InstanceIpModelTest.java index a996900124c..38b8ea68fea 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/InstanceIpModelTest.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/InstanceIpModelTest.java @@ -16,33 +16,31 @@ // under the License. package org.apache.cloudstack.network.contrail.model; -import java.util.UUID; +import static org.mockito.Matchers.anyInt; +import static org.mockito.Matchers.anyLong; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import java.io.IOException; +import java.util.UUID; import org.apache.cloudstack.network.contrail.management.ContrailManagerImpl; import org.apache.log4j.Logger; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.anyLong; -import static org.mockito.Mockito.anyInt; -import static org.mockito.Mockito.anyString; +import org.junit.Test; import com.cloud.network.Network; import com.cloud.network.Networks.TrafficType; -import com.cloud.network.dao.NetworkVO; import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; import com.cloud.vm.NicVO; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.dao.UserVmDao; -import net.juniper.contrail.api.ApiConnectorMock; -import net.juniper.contrail.api.ApiConnector; - -import org.junit.Test; import junit.framework.TestCase; +import net.juniper.contrail.api.ApiConnector; +import net.juniper.contrail.api.ApiConnectorMock; public class InstanceIpModelTest extends TestCase { private static final Logger s_logger = @@ -102,7 +100,7 @@ public class InstanceIpModelTest extends TestCase { // Create Virtual=Machine-Interface (VMInterface) NicVO nic = mock(NicVO.class); - when(nic.getIp4Address()).thenReturn("10.1.1.2"); + when(nic.getIPv4Address()).thenReturn("10.1.1.2"); when(nic.getMacAddress()).thenReturn("00:01:02:03:04:05"); when(nic.getDeviceId()).thenReturn(100); when(nic.getState()).thenReturn(NicVO.State.Allocated); @@ -128,7 +126,7 @@ public class InstanceIpModelTest extends TestCase { } InstanceIpModel ipModel = new InstanceIpModel(vm.getInstanceName(), nic.getDeviceId()); ipModel.addToVMInterface(vmiModel); - ipModel.setAddress(nic.getIp4Address()); + ipModel.setAddress(nic.getIPv4Address()); try { ipModel.update(controller); diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/VMInterfaceModelTest.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/VMInterfaceModelTest.java index ebc1f76bd5a..391ada58589 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/VMInterfaceModelTest.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/model/VMInterfaceModelTest.java @@ -16,33 +16,32 @@ // under the License. package org.apache.cloudstack.network.contrail.model; -import java.util.UUID; +import static org.mockito.Matchers.anyInt; +import static org.mockito.Matchers.anyLong; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + import java.io.IOException; +import java.util.UUID; import org.apache.cloudstack.network.contrail.management.ContrailManagerImpl; import org.apache.log4j.Logger; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.anyLong; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.anyInt; +import org.junit.Test; import com.cloud.network.Network; import com.cloud.network.Networks.TrafficType; -import com.cloud.network.dao.NetworkVO; import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; import com.cloud.vm.NicVO; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.dao.UserVmDao; +import junit.framework.TestCase; +import net.juniper.contrail.api.ApiConnector; import net.juniper.contrail.api.ApiConnectorMock; import net.juniper.contrail.api.types.VirtualMachineInterface; -import net.juniper.contrail.api.ApiConnector; - -import org.junit.Test; -import junit.framework.TestCase; public class VMInterfaceModelTest extends TestCase { private static final Logger s_logger = @@ -103,7 +102,7 @@ public class VMInterfaceModelTest extends TestCase { // Create Virtual=Machine-Interface (VMInterface) NicVO nic = mock(NicVO.class); - when(nic.getIp4Address()).thenReturn("10.1.1.2"); + when(nic.getIPv4Address()).thenReturn("10.1.1.2"); when(nic.getMacAddress()).thenReturn("00:01:02:03:04:05"); when(nic.getDeviceId()).thenReturn(100); when(nic.getState()).thenReturn(NicVO.State.Allocated); diff --git a/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java b/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java index ccd2fb695f6..e1d93303248 100644 --- a/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java +++ b/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java @@ -31,6 +31,7 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; import javax.ws.rs.core.MultivaluedMap; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.log4j.Logger; import org.midonet.client.MidonetApi; import org.midonet.client.dto.DtoRule; @@ -49,10 +50,6 @@ import org.midonet.client.resource.Rule; import org.midonet.client.resource.RuleChain; import org.springframework.stereotype.Component; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -import org.apache.cloudstack.framework.config.dao.ConfigurationDao; - import com.cloud.agent.api.to.FirewallRuleTO; import com.cloud.agent.api.to.PortForwardingRuleTO; import com.cloud.configuration.Config; @@ -87,6 +84,7 @@ import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; +import com.sun.jersey.core.util.MultivaluedMapImpl; @Component @Local(value = {NetworkElement.class, ConnectivityProvider.class, FirewallServiceProvider.class, SourceNatServiceProvider.class, DhcpServiceProvider.class, @@ -430,7 +428,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, boolean isNewDhcpHost = true; for (DhcpHost dhcpHost : sub.getDhcpHosts()) { - if (dhcpHost.getIpAddr().equals(nic.getIp4Address())) { + if (dhcpHost.getIpAddr().equals(nic.getIPv4Address())) { isNewDhcpHost = false; break; } @@ -438,7 +436,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, if (isNewDhcpHost) { DhcpHost host = sub.addDhcpHost(); - host.ipAddr(nic.getIp4Address()); + host.ipAddr(nic.getIPv4Address()); host.macAddr(nic.getMacAddress()); // This only sets the cloudstack internal name host.name(vm.getHostName()); @@ -776,7 +774,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, boolean routeExists = false; for (Route route : providerRouter.getRoutes(new MultivaluedMapImpl())) { String ip4 = route.getDstNetworkAddr(); - if (ip4 != null && ip4.equals(nic.getIp4Address())) { + if (ip4 != null && ip4.equals(nic.getIPv4Address())) { routeExists = true; break; } @@ -788,7 +786,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, .weight(100) .srcNetworkAddr("0.0.0.0") .srcNetworkLength(0) - .dstNetworkAddr(nic.getIp4Address()) + .dstNetworkAddr(nic.getIPv4Address()) .dstNetworkLength(32) .nextHopPort(providerDownlink.getId()) .nextHopGateway(null) @@ -826,7 +824,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, //remove the routes associated with this IP address for (Route route : providerRouter.getRoutes(new MultivaluedMapImpl())) { String routeDstAddr = route.getDstNetworkAddr(); - if (routeDstAddr != null && routeDstAddr.equals(nic.getIp4Address())) { + if (routeDstAddr != null && routeDstAddr.equals(nic.getIPv4Address())) { route.delete(); } } @@ -1211,7 +1209,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, if (peerPort != null && peerPort instanceof RouterPort) { RouterPort checkPort = (RouterPort)peerPort; // Check it's a port on the providerRouter with the right gateway address - if (checkPort.getDeviceId().compareTo(providerRouter.getId()) == 0 && checkPort.getPortAddress().equals(nic.getGateway())) { + if (checkPort.getDeviceId().compareTo(providerRouter.getId()) == 0 && checkPort.getPortAddress().equals(nic.getIPv4Gateway())) { providerDownlink = checkPort; bridgeUplink = (BridgePort)api.getPort(checkPort.getPeerId()); break; @@ -1221,10 +1219,10 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider, // Create the ports and connection if they don't exist if (providerDownlink == null) { - String cidr = NetUtils.ipAndNetMaskToCidr(nic.getGateway(), nic.getNetmask()); + String cidr = NetUtils.ipAndNetMaskToCidr(nic.getIPv4Gateway(), nic.getIPv4Netmask()); String cidrSubnet = NetUtils.getCidrSubNet(cidr); int cidrSize = (int)NetUtils.getCidrSize(NetUtils.cidr2Netmask(cidr)); - String gateway = nic.getGateway(); + String gateway = nic.getIPv4Gateway(); // Add interior port on router side, with network details providerDownlink = providerRouter.addInteriorRouterPort().networkAddress(cidrSubnet).networkLength(cidrSize).portAddress(gateway).create(); diff --git a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java index ee8fa27609d..bb1b6f9b3de 100644 --- a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java +++ b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java @@ -94,15 +94,15 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { @Override protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { PublicIp ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), null, vm.getOwner(), Vlan.VlanType.VirtualNetwork, null, null, false); - nic.setIp4Address(ip.getAddress().addr()); + nic.setIPv4Address(ip.getAddress().addr()); - nic.setGateway(ip.getGateway()); + nic.setIPv4Gateway(ip.getGateway()); // Set netmask to /24 for now // TDO make it /32 and go via router for anything else on the subnet - nic.setNetmask("255.255.255.0"); + nic.setIPv4Netmask("255.255.255.0"); // Make it the default nic so that a default route is set up. nic.setDefaultNic(true); @@ -115,8 +115,8 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { nic.setMacAddress(ip.getMacAddress()); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } @Override @@ -125,8 +125,8 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { DataCenter dc = _dcDao.findById(network.getDataCenterId()); if (profile != null) { - profile.setDns1(dc.getDns1()); - profile.setDns2(dc.getDns2()); + profile.setIPv4Dns1(dc.getDns1()); + profile.setIPv4Dns2(dc.getDns2()); } } @@ -140,18 +140,18 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { s_logger.debug("allocate called with network: " + network + " nic: " + nic + " vm: " + vm); DataCenter dc = _dcDao.findById(network.getDataCenterId()); - if (nic.getRequestedIpv4() != null) { + if (nic.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + nic); } getIp(nic, dc, vm, network); - if (nic.getIp4Address() == null) { - nic.setStrategy(Nic.ReservationStrategy.Start); + if (nic.getIPv4Address() == null) { + nic.setReservationStrategy(Nic.ReservationStrategy.Start); } else if (vm.getVirtualMachine().getType() == VirtualMachine.Type.DomainRouter) { - nic.setStrategy(Nic.ReservationStrategy.Managed); + nic.setReservationStrategy(Nic.ReservationStrategy.Managed); } else { - nic.setStrategy(Nic.ReservationStrategy.Create); + nic.setReservationStrategy(Nic.ReservationStrategy.Create); } nic.setBroadcastUri(generateBroadcastUri(network)); @@ -163,7 +163,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { s_logger.debug("reserve called with network: " + network + " nic: " + nic + " vm: " + vm); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { getIp(nic, dest.getDataCenter(), vm, network); } } @@ -206,10 +206,10 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru { public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) { s_logger.debug("deallocate called with network: " + network + " nic: " + nic + " vm: " + vm); if (s_logger.isDebugEnabled()) { - s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address()); + s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address()); } - final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null && nic.getReservationStrategy() != Nic.ReservationStrategy.Managed) { Transaction.execute(new TransactionCallbackNoReturn() { @Override diff --git a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java index 8434831e3aa..51e2b1b4329 100644 --- a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java +++ b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java @@ -30,8 +30,6 @@ import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.UUID; -import junit.framework.TestCase; - import org.midonet.client.MidonetApi; import org.midonet.client.resource.Bridge; import org.midonet.client.resource.BridgePort; @@ -53,6 +51,8 @@ import com.cloud.vm.NicProfile; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; +import junit.framework.TestCase; + public class MidoNetElementTest extends TestCase { /* @@ -104,7 +104,7 @@ public class MidoNetElementTest extends TestCase { //mockNic NicProfile mockNic = mock(NicProfile.class); - when(mockNic.getIp4Address()).thenReturn("10.10.10.170"); + when(mockNic.getIPv4Address()).thenReturn("10.10.10.170"); when(mockNic.getMacAddress()).thenReturn("02:00:73:3e:00:01"); when(mockNic.getName()).thenReturn("Fake Name"); diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java index 10397543bdf..137aa613f9c 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java @@ -954,6 +954,7 @@ public class NetscalerResource implements ServerResource { try { Thread.sleep(10000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while waiting for netscaler to be 'up'."); } ns refreshNsObj = new ns(); refreshNsObj.set_id(newVpx.get_id()); @@ -1695,7 +1696,8 @@ public class NetscalerResource implements ServerResource { return site; } } catch (Exception e) { - + s_logger.info("[ignored]" + + "error getting site: " + e.getLocalizedMessage()); } return null; } diff --git a/plugins/network-elements/nicira-nvp/pom.xml b/plugins/network-elements/nicira-nvp/pom.xml index 352155deb1a..e74a5ae85e1 100644 --- a/plugins/network-elements/nicira-nvp/pom.xml +++ b/plugins/network-elements/nicira-nvp/pom.xml @@ -18,7 +18,8 @@ under the License. --> - + 4.0.0 cloud-plugin-network-nvp Apache CloudStack Plugin - Network Nicira NVP @@ -29,10 +30,29 @@ ../../pom.xml + + + org.apache.cloudstack + cloud-utils + 4.6.0-SNAPSHOT + test-jar + test + + + + src/main/java + src/test/java + target/classes + target/test-classes + + + src/main/resources + + - test/resources + src/test/resources true diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java deleted file mode 100644 index 810453cfbf7..00000000000 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java +++ /dev/null @@ -1,658 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.network.nicira; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.reflect.TypeToken; - -import com.cloud.utils.rest.CloudstackRESTException; -import com.cloud.utils.rest.RESTServiceConnector; -import com.cloud.utils.rest.RESTValidationStrategy; - -@SuppressWarnings("rawtypes") -public class NiciraNvpApi { - protected static final String GET_METHOD_TYPE = "get"; - protected static final String DELETE_METHOD_TYPE = "delete"; - protected static final String PUT_METHOD_TYPE = "put"; - protected static final String POST_METHOD_TYPE = "post"; - - protected static final String SEC_PROFILE_URI_PREFIX = "/ws.v1/security-profile"; - protected static final String ACL_URI_PREFIX = "/ws.v1/acl"; - private static final String SWITCH_URI_PREFIX = "/ws.v1/lswitch"; - private static final String ROUTER_URI_PREFIX = "/ws.v1/lrouter"; - private static final String LOGIN_URL = "/ws.v1/login"; - - protected RESTServiceConnector restConnector; - - protected final static Map prefixMap; - - protected final static Map listTypeMap; - - protected final static Map defaultListParams; - - static { - prefixMap = new HashMap(); - prefixMap.put(SecurityProfile.class, SEC_PROFILE_URI_PREFIX); - prefixMap.put(Acl.class, ACL_URI_PREFIX); - prefixMap.put(LogicalSwitch.class, SWITCH_URI_PREFIX); - prefixMap.put(LogicalRouter.class, ROUTER_URI_PREFIX); - - listTypeMap = new HashMap(); - listTypeMap.put(SecurityProfile.class, new TypeToken>() { - }.getType()); - listTypeMap.put(Acl.class, new TypeToken>() { - }.getType()); - listTypeMap.put(LogicalSwitch.class, new TypeToken>() { - }.getType()); - listTypeMap.put(LogicalRouter.class, new TypeToken>() { - }.getType()); - - defaultListParams = new HashMap(); - defaultListParams.put("fields", "*"); - } - - public NiciraNvpApi() { - final List> classList = new ArrayList>(); - classList.add(NatRule.class); - classList.add(RoutingConfig.class); - final List> deserializerList = new ArrayList>(); - deserializerList.add(new NatRuleAdapter()); - deserializerList.add(new RoutingConfigAdapter()); - - restConnector = new RESTServiceConnector(new RESTValidationStrategy(LOGIN_URL), classList, deserializerList); - } - - public NiciraNvpApi(final String address, final String username, final String password) { - this(); - restConnector.setControllerAddress(address); - restConnector.setAdminCredentials(username, password); - } - - public void setControllerAddress(final String address) { - restConnector.setControllerAddress(address); - } - - public void setAdminCredentials(final String username, final String password) { - restConnector.setAdminCredentials(username, password); - } - - /** - * POST - * - * @param entity - * @return - * @throws NiciraNvpApiException - */ - protected T create(final T entity) throws NiciraNvpApiException { - final String uri = prefixMap.get(entity.getClass()); - return createWithUri(entity, uri); - } - - /** - * POST - * - * @param entity - * @return - * @throws NiciraNvpApiException - */ - protected T createWithUri(final T entity, final String uri) throws NiciraNvpApiException { - T createdEntity; - try { - createdEntity = restConnector.executeCreateObject(entity, new TypeToken() { - }.getType(), uri, Collections. emptyMap()); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - return createdEntity; - } - - /** - * GET list of items - * - * @return - * @throws NiciraNvpApiException - */ - protected NiciraNvpList find(final Class clazz) throws NiciraNvpApiException { - return find(null, clazz); - } - - /** - * GET list of items - * - * @param uuid - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList find(final String uuid, final Class clazz) throws NiciraNvpApiException { - final String uri = prefixMap.get(clazz); - Map params = defaultListParams; - if (uuid != null) { - params = new HashMap(defaultListParams); - params.put("uuid", uuid); - } - - NiciraNvpList entities; - try { - entities = restConnector.executeRetrieveObject(listTypeMap.get(clazz), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - if (entities == null) { - throw new NiciraNvpApiException("Unexpected response from API"); - } - - return entities; - } - - /** - * PUT item given a UUID as key and an item object - * with the new data - * - * @param item - * @param uuid - * @throws NiciraNvpApiException - */ - public void update(final T item, final String uuid) - throws NiciraNvpApiException { - final String uri = prefixMap.get(item.getClass()) + "/" + uuid; - updateWithUri(item, uri); - } - - /** - * PUT item given a UUID as key and an item object - * with the new data - * - * @param item - * @param uuid - * @throws NiciraNvpApiException - */ - public void updateWithUri(final T item, final String uri) - throws NiciraNvpApiException { - try { - restConnector.executeUpdateObject(item, uri, Collections. emptyMap()); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - } - - /** - * DELETE Security Profile given a UUID as key - * - * @param securityProfileUuid - * @throws NiciraNvpApiException - */ - public void delete(final String uuid, final Class clazz) - throws NiciraNvpApiException { - final String uri = prefixMap.get(clazz) + "/" + uuid; - deleteWithUri(uri); - } - - /** - * DELETE Security Profile given a UUID as key - * - * @param securityProfileUuid - * @throws NiciraNvpApiException - */ - public void deleteWithUri(final String uri) - throws NiciraNvpApiException { - try { - restConnector.executeDeleteObject(uri); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - } - - /** - * POST {@link SecurityProfile} - * - * @param securityProfile - * @return - * @throws NiciraNvpApiException - */ - public SecurityProfile createSecurityProfile(final SecurityProfile securityProfile) throws NiciraNvpApiException { - return create(securityProfile); - } - - /** - * GET list of {@link SecurityProfile} - * - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findSecurityProfile() throws NiciraNvpApiException { - return findSecurityProfile(null); - } - - /** - * GET list of {@link SecurityProfile} filtered by UUID - * - * We could have invoked the service: - * SEC_PROFILE_URI_PREFIX + "/" + securityProfileUuid - * but it is not working currently - * - * @param uuid - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findSecurityProfile(final String uuid) throws NiciraNvpApiException { - return find(uuid, SecurityProfile.class); - } - - /** - * PUT {@link SecurityProfile} given a UUID as key and a {@link SecurityProfile} - * with the new data - * - * @param securityProfile - * @param securityProfileUuid - * @throws NiciraNvpApiException - */ - public void updateSecurityProfile(final SecurityProfile securityProfile, - final String securityProfileUuid) - throws NiciraNvpApiException { - update(securityProfile, securityProfileUuid); - } - - /** - * DELETE Security Profile given a UUID as key - * - * @param securityProfileUuid - * @throws NiciraNvpApiException - */ - public void deleteSecurityProfile(final String securityProfileUuid) - throws NiciraNvpApiException { - delete(securityProfileUuid, SecurityProfile.class); - } - - - /** - * POST {@link Acl} - * - * @param acl - * @return - * @throws NiciraNvpApiException - */ - public Acl createAcl(final Acl acl) throws NiciraNvpApiException { - return create(acl); - } - - /** - * GET list of {@link Acl} - * - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findAcl() throws NiciraNvpApiException { - return findAcl(null); - } - - /** - * GET list of {@link Acl} filtered by UUID - * - * @param uuid - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findAcl(final String uuid) throws NiciraNvpApiException { - return find(uuid, Acl.class); - } - - /** - * PUT {@link Acl} given a UUID as key and a {@link Acl} - * with the new data - * - * @param acl - * @param aclUuid - * @throws NiciraNvpApiException - */ - public void updateAcl(final Acl acl, - final String aclUuid) - throws NiciraNvpApiException { - update(acl, aclUuid); - } - - /** - * DELETE Acl given a UUID as key - * - * @param acl - * @throws NiciraNvpApiException - */ - public void deleteAcl(final String aclUuid) throws NiciraNvpApiException { - delete(aclUuid, Acl.class); - } - - public LogicalSwitch createLogicalSwitch(final LogicalSwitch logicalSwitch) throws NiciraNvpApiException { - return create(logicalSwitch); - } - - /** - * GET list of {@link LogicalSwitch} - * - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findLogicalSwitch() throws NiciraNvpApiException { - return findLogicalSwitch(null); - } - - /** - * GET list of {@link LogicalSwitch} filtered by UUID - * - * @param uuid - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findLogicalSwitch(final String uuid) throws NiciraNvpApiException { - return find(uuid, LogicalSwitch.class); - } - - /** - * PUT {@link LogicalSwitch} given a UUID as key and a {@link LogicalSwitch} - * with the new data - * - * @param logicalSwitch - * @param logicalSwitchUuid - * @throws NiciraNvpApiException - */ - public void updateLogicalSwitch(final LogicalSwitch logicalSwitch, - final String logicalSwitchUuid) - throws NiciraNvpApiException { - update(logicalSwitch, logicalSwitchUuid); - } - - public void deleteLogicalSwitch(final String uuid) throws NiciraNvpApiException { - delete(uuid, LogicalSwitch.class); - } - - public LogicalSwitchPort createLogicalSwitchPort(final String logicalSwitchUuid, final LogicalSwitchPort logicalSwitchPort) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport"; - return createWithUri(logicalSwitchPort, uri); - } - - public void updateLogicalSwitchPort(final String logicalSwitchUuid, final LogicalSwitchPort logicalSwitchPort) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport/" + logicalSwitchPort.getUuid(); - updateWithUri(logicalSwitchPort, uri); - } - - public void updateLogicalSwitchPortAttachment(final String logicalSwitchUuid, final String logicalSwitchPortUuid, - final Attachment attachment) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport/" + logicalSwitchPortUuid + "/attachment"; - updateWithUri(attachment, uri); - } - - public void deleteLogicalSwitchPort(final String logicalSwitchUuid, final String logicalSwitchPortUuid) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport/" + logicalSwitchPortUuid; - deleteWithUri(uri); - } - - public String findLogicalSwitchPortUuidByVifAttachmentUuid(final String logicalSwitchUuid, final String vifAttachmentUuid) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport"; - final Map params = new HashMap(); - params.put("attachment_vif_uuid", vifAttachmentUuid); - params.put("fields", "uuid"); - - NiciraNvpList lspl; - try { - lspl = restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - if (lspl == null || lspl.getResultCount() != 1) { - throw new NiciraNvpApiException("Unexpected response from API"); - } - - final LogicalSwitchPort lsp = lspl.getResults().get(0); - return lsp.getUuid(); - } - - public ControlClusterStatus getControlClusterStatus() throws NiciraNvpApiException { - final String uri = "/ws.v1/control-cluster/status"; - ControlClusterStatus ccs; - try { - ccs = restConnector.executeRetrieveObject(new TypeToken() { - }.getType(), uri, null); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - return ccs; - } - - public NiciraNvpList findLogicalSwitchPortsByUuid(final String logicalSwitchUuid, final String logicalSwitchPortUuid) throws NiciraNvpApiException { - final String uri = SWITCH_URI_PREFIX + "/" + logicalSwitchUuid + "/lport"; - final Map params = new HashMap(); - params.put("uuid", logicalSwitchPortUuid); - params.put("fields", "uuid"); - - NiciraNvpList lspl; - try { - lspl = restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - if (lspl == null) { - throw new NiciraNvpApiException("Unexpected response from API"); - } - - return lspl; - } - - public NiciraNvpList findLogicalRouterPortsByUuid(final String logicalRouterUuid, final String logicalRouterPortUuid) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport"; - final Map params = new HashMap(); - params.put("uuid", logicalRouterPortUuid); - params.put("fields", "uuid"); - - NiciraNvpList lrpl; - try { - lrpl = restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - - if (lrpl == null) { - throw new NiciraNvpApiException("Unexpected response from API"); - } - - return lrpl; - } - - public LogicalRouter createLogicalRouter(final LogicalRouter logicalRouter) throws NiciraNvpApiException { - return create(logicalRouter); - } - - /** - * GET list of {@link LogicalRouter} - * - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findLogicalRouter() throws NiciraNvpApiException { - return findLogicalRouter(null); - } - - /** - * GET list of {@link LogicalRouter} filtered by UUID - * - * @param uuid - * @return - * @throws NiciraNvpApiException - */ - public NiciraNvpList findLogicalRouter(final String uuid) throws NiciraNvpApiException { - return find(uuid, LogicalRouter.class); - } - - public LogicalRouter findOneLogicalRouterByUuid(final String logicalRouterUuid) throws NiciraNvpApiException { - return findLogicalRouter(logicalRouterUuid).getResults().get(0); - } - - public void updateLogicalRouter(final LogicalRouter logicalRouter, - final String logicalRouterUuid) - throws NiciraNvpApiException { - update(logicalRouter, logicalRouterUuid); - } - - public void deleteLogicalRouter(final String logicalRouterUuid) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid; - deleteWithUri(uri); - } - - public LogicalRouterPort createLogicalRouterPort(final String logicalRouterUuid, final LogicalRouterPort logicalRouterPort) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport"; - return createWithUri(logicalRouterPort, uri); - } - - public void deleteLogicalRouterPort(final String logicalRouterUuid, final String logicalRouterPortUuid) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport/" + logicalRouterPortUuid; - deleteWithUri(uri); - } - - public void updateLogicalRouterPort(final String logicalRouterUuid, final LogicalRouterPort logicalRouterPort) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport/" + logicalRouterPort.getUuid(); - updateWithUri(logicalRouterPort, uri); - } - - public void updateLogicalRouterPortAttachment(final String logicalRouterUuid, final String logicalRouterPortUuid, final Attachment attachment) - throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport/" + logicalRouterPortUuid + "/attachment"; - updateWithUri(attachment, uri); - } - - public NatRule createLogicalRouterNatRule(final String logicalRouterUuid, final NatRule natRule) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/nat"; - return createWithUri(natRule, uri); - } - - public void updateLogicalRouterNatRule(final String logicalRouterUuid, final NatRule natRule) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/nat/" + natRule.getUuid(); - updateWithUri(natRule, uri); - } - - public void deleteLogicalRouterNatRule(final String logicalRouterUuid, final UUID natRuleUuid) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/nat/" + natRuleUuid.toString(); - deleteWithUri(uri); - } - - public NiciraNvpList findLogicalRouterPortByGatewayServiceAndVlanId(final String logicalRouterUuid, final String gatewayServiceUuid, - final long vlanId) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport"; - final Map params = new HashMap(); - params.put("attachment_gwsvc_uuid", gatewayServiceUuid); - params.put("attachment_vlan", "0"); - params.put("fields", "*"); - - try { - return restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - } - - public NiciraNvpList findNatRulesByLogicalRouterUuid(final String logicalRouterUuid) throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/nat"; - final Map params = new HashMap(); - params.put("fields", "*"); - - try { - return restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - } - - public NiciraNvpList findLogicalRouterPortByGatewayServiceUuid(final String logicalRouterUuid, final String l3GatewayServiceUuid) - throws NiciraNvpApiException { - final String uri = ROUTER_URI_PREFIX + "/" + logicalRouterUuid + "/lport"; - final Map params = new HashMap(); - params.put("fields", "*"); - params.put("attachment_gwsvc_uuid", l3GatewayServiceUuid); - - try { - return restConnector.executeRetrieveObject(new TypeToken>() { - }.getType(), uri, params); - } catch (final CloudstackRESTException e) { - throw new NiciraNvpApiException(e); - } - } - - public static class NatRuleAdapter implements JsonDeserializer { - - @Override - public NatRule deserialize(final JsonElement jsonElement, final Type type, final JsonDeserializationContext context) throws JsonParseException { - final JsonObject jsonObject = jsonElement.getAsJsonObject(); - - if (!jsonObject.has("type")) { - throw new JsonParseException("Deserializing as a NatRule, but no type present in the json object"); - } - - final String natRuleType = jsonObject.get("type").getAsString(); - if ("SourceNatRule".equals(natRuleType)) { - return context.deserialize(jsonElement, SourceNatRule.class); - } else if ("DestinationNatRule".equals(natRuleType)) { - return context.deserialize(jsonElement, DestinationNatRule.class); - } - - throw new JsonParseException("Failed to deserialize type \"" + natRuleType + "\""); - } - } - - public static class RoutingConfigAdapter implements JsonDeserializer { - - private static final String ROUTING_TABLE_ROUTING_CONFIG = "RoutingTableRoutingConfig"; - private static final String SINGLE_DEFAULT_ROUTE_IMPLICIT_ROUTING_CONFIG = "SingleDefaultRouteImplicitRoutingConfig"; - - @Override - public RoutingConfig deserialize(final JsonElement jsonElement, final Type type, final JsonDeserializationContext context) throws JsonParseException { - final JsonObject jsonObject = jsonElement.getAsJsonObject(); - - if (!jsonObject.has("type")) { - throw new JsonParseException("Deserializing as a RoutingConfig, but no type present in the json object"); - } - - final String routingConfigType = jsonObject.get("type").getAsString(); - if (SINGLE_DEFAULT_ROUTE_IMPLICIT_ROUTING_CONFIG.equals(routingConfigType)) { - return context.deserialize(jsonElement, SingleDefaultRouteImplicitRoutingConfig.class); - } else if (ROUTING_TABLE_ROUTING_CONFIG.equals(routingConfigType)) { - return context.deserialize(jsonElement, RoutingTableRoutingConfig.class); - } - - throw new JsonParseException("Failed to deserialize type \"" + routingConfigType + "\""); - } - } -} diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePortForwardingRulesOnLogicalRouterCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigurePublicIpsOnLogicalRouterCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/ConfigureStaticNatRulesOnLogicalRouterCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalRouterAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalRouterAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalRouterAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalRouterAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalRouterCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalRouterCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalRouterCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalRouterCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchPortAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchPortAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchPortAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchPortAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchPortCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchPortCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/CreateLogicalSwitchPortCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/CreateLogicalSwitchPortCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalRouterAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalRouterAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalRouterAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalRouterAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalRouterCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalRouterCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalRouterCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalRouterCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchPortAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchPortAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchPortAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchPortAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchPortCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchPortCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/DeleteLogicalSwitchPortCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/DeleteLogicalSwitchPortCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/FindLogicalSwitchPortAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/FindLogicalSwitchPortAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/FindLogicalSwitchPortAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/FindLogicalSwitchPortAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/FindLogicalSwitchPortCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/FindLogicalSwitchPortCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/FindLogicalSwitchPortCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/FindLogicalSwitchPortCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/StartupNiciraNvpCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/StartupNiciraNvpCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/StartupNiciraNvpCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/StartupNiciraNvpCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/UpdateLogicalSwitchPortAnswer.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/UpdateLogicalSwitchPortAnswer.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/UpdateLogicalSwitchPortAnswer.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/UpdateLogicalSwitchPortAnswer.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/UpdateLogicalSwitchPortCommand.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/UpdateLogicalSwitchPortCommand.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/agent/api/UpdateLogicalSwitchPortCommand.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/agent/api/UpdateLogicalSwitchPortCommand.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/DeleteNiciraNvpDeviceCmd.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/DeleteNiciraNvpDeviceCmd.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/DeleteNiciraNvpDeviceCmd.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/DeleteNiciraNvpDeviceCmd.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/ListNiciraNvpDeviceNetworksCmd.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/ListNiciraNvpDeviceNetworksCmd.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/ListNiciraNvpDeviceNetworksCmd.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/ListNiciraNvpDeviceNetworksCmd.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/ListNiciraNvpDevicesCmd.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/ListNiciraNvpDevicesCmd.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/api/commands/ListNiciraNvpDevicesCmd.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/ListNiciraNvpDevicesCmd.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/api/response/NiciraNvpDeviceResponse.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/api/response/NiciraNvpDeviceResponse.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpDeviceVO.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpDeviceVO.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpDeviceVO.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpDeviceVO.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpNicMappingVO.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpNicMappingVO.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpNicMappingVO.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpNicMappingVO.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpRouterMappingVO.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpRouterMappingVO.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/NiciraNvpRouterMappingVO.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/NiciraNvpRouterMappingVO.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpDao.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpDao.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpDao.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpDao.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpDaoImpl.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpDaoImpl.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpDaoImpl.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpDaoImpl.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpNicMappingDao.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpNicMappingDao.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpNicMappingDao.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpNicMappingDao.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpNicMappingDaoImpl.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpNicMappingDaoImpl.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpNicMappingDaoImpl.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpNicMappingDaoImpl.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDao.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpRouterMappingDao.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDao.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpRouterMappingDao.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/dao/NiciraNvpRouterMappingDaoImpl.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElement.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElementService.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElementService.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElementService.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/element/NiciraNvpElementService.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java similarity index 73% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java index e68f740cdcf..975ebd19aa0 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java @@ -98,14 +98,14 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { public NiciraNvpGuestNetworkGuru() { super(); - _isolationMethods = new IsolationMethod[] {IsolationMethod.STT}; + _isolationMethods = new IsolationMethod[] { IsolationMethod.STT, IsolationMethod.VXLAN }; } @Override protected boolean canHandle(final NetworkOffering offering, final NetworkType networkType, final PhysicalNetwork physicalNetwork) { // This guru handles only Guest Isolated network that supports Source nat service - if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == Network.GuestType.Isolated && - isMyIsolationMethod(physicalNetwork) && ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(), Service.Connectivity)) { + if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == Network.GuestType.Isolated + && isMyIsolationMethod(physicalNetwork) && ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(), Service.Connectivity)) { return true; } else { s_logger.trace("We only take care of Guest networks of type " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced); @@ -115,27 +115,26 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { @Override public Network design(final NetworkOffering offering, final DeploymentPlan plan, final Network userSpecified, final Account owner) { - // Check of the isolation type of the related physical network is STT - PhysicalNetworkVO physnet = physicalNetworkDao.findById(plan.getPhysicalNetworkId()); - DataCenter dc = _dcDao.findById(plan.getDataCenterId()); + // Check of the isolation type of the related physical network is supported + final PhysicalNetworkVO physnet = physicalNetworkDao.findById(plan.getPhysicalNetworkId()); + final DataCenter dc = _dcDao.findById(plan.getDataCenterId()); if (!canHandle(offering, dc.getNetworkType(), physnet)) { s_logger.debug("Refusing to design this network"); return null; } - List devices = niciraNvpDao.listByPhysicalNetwork(physnet.getId()); + final List devices = niciraNvpDao.listByPhysicalNetwork(physnet.getId()); if (devices.isEmpty()) { s_logger.error("No NiciraNvp Controller on physical network " + physnet.getName()); return null; } s_logger.debug("Nicira Nvp " + devices.get(0).getUuid() + " found on physical network " + physnet.getId()); - s_logger.debug("Physical isolation type is STT, asking GuestNetworkGuru to design this network"); - NetworkVO networkObject = (NetworkVO)super.design(offering, plan, userSpecified, owner); + s_logger.debug("Physical isolation type is supported, asking GuestNetworkGuru to design this network"); + final NetworkVO networkObject = (NetworkVO) super.design(offering, plan, userSpecified, owner); if (networkObject == null) { return null; } - // Override the broadcast domain type networkObject.setBroadcastDomainType(BroadcastDomainType.Lswitch); return networkObject; @@ -143,12 +142,11 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { @Override public Network implement(final Network network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) - throws InsufficientVirtualNetworkCapacityException { - assert (network.getState() == State.Implementing) : "Why are we implementing " + network; + throws InsufficientVirtualNetworkCapacityException { + assert network.getState() == State.Implementing : "Why are we implementing " + network; - long dcId = dest.getDataCenter().getId(); + final long dcId = dest.getDataCenter().getId(); - //get physical network id Long physicalNetworkId = network.getPhysicalNetworkId(); // physical network id can be null in Guest Network in Basic zone, so locate the physical network @@ -156,9 +154,8 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { physicalNetworkId = networkModel.findPhysicalNetworkId(dcId, offering.getTags(), offering.getTrafficType()); } - NetworkVO implemented = - new NetworkVO(network.getTrafficType(), network.getMode(), network.getBroadcastDomainType(), network.getNetworkOfferingId(), State.Allocated, - network.getDataCenterId(), physicalNetworkId, offering.getRedundantRouter()); + final NetworkVO implemented = new NetworkVO(network.getTrafficType(), network.getMode(), network.getBroadcastDomainType(), network.getNetworkOfferingId(), + State.Allocated, network.getDataCenterId(), physicalNetworkId, offering.getRedundantRouter()); if (network.getGateway() != null) { implemented.setGateway(network.getGateway()); @@ -171,26 +168,26 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { // Name is either the given name or the uuid String name = network.getName(); if (name == null || name.isEmpty()) { - name = ((NetworkVO)network).getUuid(); + name = ((NetworkVO) network).getUuid(); } if (name.length() > MAX_NAME_LENGTH) { - name = name.substring(0, MAX_NAME_LENGTH - 1); // max length 40 + name = name.substring(0, MAX_NAME_LENGTH - 1); } - List devices = niciraNvpDao.listByPhysicalNetwork(physicalNetworkId); + final List devices = niciraNvpDao.listByPhysicalNetwork(physicalNetworkId); if (devices.isEmpty()) { s_logger.error("No NiciraNvp Controller on physical network " + physicalNetworkId); return null; } - NiciraNvpDeviceVO niciraNvpDevice = devices.get(0); - HostVO niciraNvpHost = hostDao.findById(niciraNvpDevice.getHostId()); + final NiciraNvpDeviceVO niciraNvpDevice = devices.get(0); + final HostVO niciraNvpHost = hostDao.findById(niciraNvpDevice.getHostId()); hostDao.loadDetails(niciraNvpHost); - String transportzoneuuid = niciraNvpHost.getDetail("transportzoneuuid"); - String transportzoneisotype = niciraNvpHost.getDetail("transportzoneisotype"); + final String transportzoneuuid = niciraNvpHost.getDetail("transportzoneuuid"); + final String transportzoneisotype = niciraNvpHost.getDetail("transportzoneisotype"); - CreateLogicalSwitchCommand cmd = - new CreateLogicalSwitchCommand(transportzoneuuid, transportzoneisotype, name, context.getDomain().getName() + "-" + context.getAccount().getAccountName()); - CreateLogicalSwitchAnswer answer = (CreateLogicalSwitchAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd); + final CreateLogicalSwitchCommand cmd = new CreateLogicalSwitchCommand(transportzoneuuid, transportzoneisotype, name, context.getDomain().getName() + "-" + + context.getAccount().getAccountName()); + final CreateLogicalSwitchAnswer answer = (CreateLogicalSwitchAnswer) agentMgr.easySend(niciraNvpHost.getId(), cmd); if (answer == null || !answer.getResult()) { s_logger.error("CreateLogicalSwitchCommand failed"); @@ -201,7 +198,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { implemented.setBroadcastUri(new URI("lswitch", answer.getLogicalSwitchUuid(), null)); implemented.setBroadcastDomainType(BroadcastDomainType.Lswitch); s_logger.info("Implemented OK, network linked to = " + implemented.getBroadcastUri().toString()); - } catch (URISyntaxException e) { + } catch (final URISyntaxException e) { s_logger.error("Unable to store logical switch id in broadcast uri, uuid = " + implemented.getUuid(), e); return null; } @@ -211,35 +208,33 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru { @Override public void reserve(final NicProfile nic, final Network network, final VirtualMachineProfile vm, final DeployDestination dest, final ReservationContext context) - throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { - // TODO Auto-generated method stub + throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { super.reserve(nic, network, vm, dest, context); } @Override public boolean release(final NicProfile nic, final VirtualMachineProfile vm, final String reservationId) { - // TODO Auto-generated method stub return super.release(nic, vm, reservationId); } @Override public void shutdown(final NetworkProfile profile, final NetworkOffering offering) { - NetworkVO networkObject = networkDao.findById(profile.getId()); + final NetworkVO networkObject = networkDao.findById(profile.getId()); if (networkObject.getBroadcastDomainType() != BroadcastDomainType.Lswitch || networkObject.getBroadcastUri() == null) { s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + networkObject.getDisplayText()); return; } - List devices = niciraNvpDao.listByPhysicalNetwork(networkObject.getPhysicalNetworkId()); + final List devices = niciraNvpDao.listByPhysicalNetwork(networkObject.getPhysicalNetworkId()); if (devices.isEmpty()) { s_logger.error("No NiciraNvp Controller on physical network " + networkObject.getPhysicalNetworkId()); return; } - NiciraNvpDeviceVO niciraNvpDevice = devices.get(0); - HostVO niciraNvpHost = hostDao.findById(niciraNvpDevice.getHostId()); + final NiciraNvpDeviceVO niciraNvpDevice = devices.get(0); + final HostVO niciraNvpHost = hostDao.findById(niciraNvpDevice.getHostId()); - DeleteLogicalSwitchCommand cmd = new DeleteLogicalSwitchCommand(BroadcastDomainType.getValue(networkObject.getBroadcastUri())); - DeleteLogicalSwitchAnswer answer = (DeleteLogicalSwitchAnswer)agentMgr.easySend(niciraNvpHost.getId(), cmd); + final DeleteLogicalSwitchCommand cmd = new DeleteLogicalSwitchCommand(BroadcastDomainType.getValue(networkObject.getBroadcastUri())); + final DeleteLogicalSwitchAnswer answer = (DeleteLogicalSwitchAnswer) agentMgr.easySend(niciraNvpHost.getId(), cmd); if (answer == null || !answer.getResult()) { s_logger.error("DeleteLogicalSwitchCommand failed"); diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AccessConfiguration.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AccessConfiguration.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AccessConfiguration.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AccessConfiguration.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AccessRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AccessRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AccessRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AccessRule.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Acl.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Acl.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Acl.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Acl.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AclRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AclRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/AclRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/AclRule.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Attachment.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Attachment.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Attachment.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Attachment.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/BaseNiciraEntity.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/BaseNiciraEntity.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/BaseNiciraEntity.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/BaseNiciraEntity.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/BaseNiciraNamedEntity.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/BaseNiciraNamedEntity.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/BaseNiciraNamedEntity.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/BaseNiciraNamedEntity.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/ControlClusterStatus.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/ControlClusterStatus.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/ControlClusterStatus.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/ControlClusterStatus.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/DestinationNatRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/DestinationNatRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/DestinationNatRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/DestinationNatRule.java diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/ExecutionCounter.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/ExecutionCounter.java new file mode 100644 index 00000000000..1314498211b --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/ExecutionCounter.java @@ -0,0 +1,50 @@ +// +// 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.nicira; + +import java.util.concurrent.atomic.AtomicInteger; + +public class ExecutionCounter { + + private final int executionLimit; + private final AtomicInteger executionCount = new AtomicInteger(0); + + public ExecutionCounter(final int executionLimit) { + this.executionLimit = executionLimit; + } + + public ExecutionCounter resetExecutionCounter() { + executionCount.set(0); + return this; + } + + public boolean hasReachedExecutionLimit() { + return executionCount.get() >= executionLimit; + } + + public ExecutionCounter incrementExecutionCounter() { + executionCount.incrementAndGet(); + return this; + } + + public int getValue() { + return executionCount.get(); + } +} diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/L3GatewayAttachment.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/L3GatewayAttachment.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/L3GatewayAttachment.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/L3GatewayAttachment.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalRouter.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalRouter.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalRouter.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalRouter.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalRouterPort.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalRouterPort.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalRouterPort.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalRouterPort.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalSwitch.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalSwitch.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalSwitch.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalSwitch.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalSwitchPort.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalSwitchPort.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/LogicalSwitchPort.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/LogicalSwitchPort.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Match.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Match.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/Match.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/Match.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NatRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NatRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NatRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NatRule.java diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NatRuleAdapter.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NatRuleAdapter.java new file mode 100644 index 00000000000..7ea2f5b23bd --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NatRuleAdapter.java @@ -0,0 +1,49 @@ +// +// 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.nicira; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; + +public class NatRuleAdapter implements JsonDeserializer { + + @Override + public NatRule deserialize(final JsonElement jsonElement, final Type type, final JsonDeserializationContext context) throws JsonParseException { + final JsonObject jsonObject = jsonElement.getAsJsonObject(); + + if (!jsonObject.has("type")) { + throw new JsonParseException("Deserializing as a NatRule, but no type present in the json object"); + } + + final String natRuleType = jsonObject.get("type").getAsString(); + if ("SourceNatRule".equals(natRuleType)) { + return context.deserialize(jsonElement, SourceNatRule.class); + } else if ("DestinationNatRule".equals(natRuleType)) { + return context.deserialize(jsonElement, DestinationNatRule.class); + } + + throw new JsonParseException("Failed to deserialize type \"" + natRuleType + "\""); + } +} \ No newline at end of file diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraConstants.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraConstants.java new file mode 100644 index 00000000000..31adf9d3e2d --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraConstants.java @@ -0,0 +1,42 @@ +// +// 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.nicira; + +public class NiciraConstants { + + public static final String SEC_PROFILE_URI_PREFIX = "/ws.v1/security-profile"; + public static final String ACL_URI_PREFIX = "/ws.v1/acl"; + public static final String SWITCH_URI_PREFIX = "/ws.v1/lswitch"; + public static final String ROUTER_URI_PREFIX = "/ws.v1/lrouter"; + public static final String LOGIN_URL = "/ws.v1/login"; + public static final String CONTROL_CLUSTER_STATUS_URL = "/ws.v1/control-cluster/status"; + + public static final String ATTACHMENT_PATH_SEGMENT = "/attachment"; + public static final String NAT_PATH_SEGMENT = "/nat"; + public static final String LPORT_PATH_SEGMENT = "/lport"; + + public static final String ATTACHMENT_VIF_UUID_QUERY_PARAMETER_NAME = "attachment_vif_uuid"; + public static final String ATTACHMENT_VLAN_PARAMETER = "attachment_vlan"; + public static final String ATTACHMENT_GWSVC_UUID_QUERY_PARAMETER = "attachment_gwsvc_uuid"; + public static final String WILDCARD_QUERY_PARAMETER = "*"; + public static final String UUID_QUERY_PARAMETER = "uuid"; + public static final String FIELDS_QUERY_PARAMETER = "fields"; + +} diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpApi.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpApi.java new file mode 100644 index 00000000000..093d90da1ae --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpApi.java @@ -0,0 +1,627 @@ +// +// 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.nicira; + +import java.lang.reflect.Type; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.impl.client.CloseableHttpClient; + +import com.cloud.utils.rest.CloudstackRESTException; +import com.cloud.utils.rest.RESTServiceConnector; +import com.google.common.base.Optional; +import com.google.gson.JsonDeserializer; +import com.google.gson.reflect.TypeToken; + +@SuppressWarnings("rawtypes") +public class NiciraNvpApi { + + private static final Optional ABSENT = Optional.absent(); + + private static final String SWITCH_URI_PREFIX = NiciraConstants.SWITCH_URI_PREFIX; + private static final String ROUTER_URI_PREFIX = NiciraConstants.ROUTER_URI_PREFIX; + + private static final String ATTACHMENT_PATH_SEGMENT = NiciraConstants.ATTACHMENT_PATH_SEGMENT; + private static final String NAT_PATH_SEGMENT = NiciraConstants.NAT_PATH_SEGMENT; + private static final String LPORT_PATH_SEGMENT = NiciraConstants.LPORT_PATH_SEGMENT; + + private static final String ATTACHMENT_GWSVC_UUID_QUERY_PARAMETER = NiciraConstants.ATTACHMENT_GWSVC_UUID_QUERY_PARAMETER; + private static final String WILDCARD_QUERY_PARAMETER = NiciraConstants.WILDCARD_QUERY_PARAMETER; + private static final String UUID_QUERY_PARAMETER = NiciraConstants.UUID_QUERY_PARAMETER; + private static final String FIELDS_QUERY_PARAMETER = NiciraConstants.FIELDS_QUERY_PARAMETER; + + private static final int DEFAULT_MAX_RETRIES = 5; + + private final RESTServiceConnector restConnector; + + protected final static Map prefixMap; + + protected final static Map listTypeMap; + + protected final static Map defaultListParams; + + static { + prefixMap = new HashMap(); + prefixMap.put(SecurityProfile.class, NiciraConstants.SEC_PROFILE_URI_PREFIX); + prefixMap.put(Acl.class, NiciraConstants.ACL_URI_PREFIX); + prefixMap.put(LogicalSwitch.class, SWITCH_URI_PREFIX); + prefixMap.put(LogicalRouter.class, ROUTER_URI_PREFIX); + + listTypeMap = new HashMap(); + listTypeMap.put(SecurityProfile.class, new TypeToken>() { + }.getType()); + listTypeMap.put(Acl.class, new TypeToken>() { + }.getType()); + listTypeMap.put(LogicalSwitch.class, new TypeToken>() { + }.getType()); + listTypeMap.put(LogicalRouter.class, new TypeToken>() { + }.getType()); + + defaultListParams = new HashMap(); + defaultListParams.put(FIELDS_QUERY_PARAMETER, WILDCARD_QUERY_PARAMETER); + } + + private NiciraNvpApi(final Builder builder) { + final Map, JsonDeserializer> classToDeserializerMap = new HashMap<>(); + classToDeserializerMap.put(NatRule.class, new NatRuleAdapter()); + classToDeserializerMap.put(RoutingConfig.class, new RoutingConfigAdapter()); + + final NiciraRestClient niciraRestClient = NiciraRestClient.create() + .client(builder.httpClient) + .clientContext(builder.httpClientContext) + .hostname(builder.host) + .username(builder.username) + .password(builder.password) + .loginUrl(NiciraConstants.LOGIN_URL) + .executionLimit(DEFAULT_MAX_RETRIES) + .build(); + restConnector = RESTServiceConnector.create() + .classToDeserializerMap(classToDeserializerMap) + .client(niciraRestClient) + .build(); + } + + public static Builder create() { + return new Builder(); + } + + /** + * POST + * + * @param entity + * @return + * @throws NiciraNvpApiException + */ + private T create(final T entity) throws NiciraNvpApiException { + final String uri = prefixMap.get(entity.getClass()); + return createWithUri(entity, uri); + } + + /** + * POST + * + * @param entity + * @return + * @throws NiciraNvpApiException + */ + private T createWithUri(final T entity, final String uri) throws NiciraNvpApiException { + T createdEntity; + try { + createdEntity = restConnector.executeCreateObject(entity, uri, Collections. emptyMap()); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + + return createdEntity; + } + + /** + * GET list of items + * + * @param uuid + * + * @return + * @throws NiciraNvpApiException + */ + private List find(final Optional uuid, final Class clazz) throws NiciraNvpApiException { + final String uri = prefixMap.get(clazz); + Map params = defaultListParams; + if (uuid.isPresent()) { + params = new HashMap(defaultListParams); + params.put(UUID_QUERY_PARAMETER, uuid.get()); + } + + NiciraNvpList entities; + try { + entities = restConnector.executeRetrieveObject(listTypeMap.get(clazz), uri, params); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + + if (entities == null) { + throw new NiciraNvpApiException("Unexpected response from API"); + } + + return entities.getResults(); + } + + /** + * PUT item given a UUID as key and an item object with the new data + * + * @param item + * @param uuid + * @throws NiciraNvpApiException + */ + private void update(final T item, final String uuid) throws NiciraNvpApiException { + final String uri = prefixMap.get(item.getClass()) + "/" + uuid; + updateWithUri(item, uri); + } + + /** + * PUT item given a UUID as key and an item object with the new data + * + * @param item + * @param uuid + * @throws NiciraNvpApiException + */ + private void updateWithUri(final T item, final String uri) throws NiciraNvpApiException { + try { + restConnector.executeUpdateObject(item, uri, Collections. emptyMap()); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + /** + * DELETE Security Profile given a UUID as key + * + * @param securityProfileUuid + * @throws NiciraNvpApiException + */ + private void delete(final String uuid, final Class clazz) throws NiciraNvpApiException { + final String uri = prefixMap.get(clazz) + "/" + uuid; + deleteWithUri(uri); + } + + /** + * DELETE Security Profile given a UUID as key + * + * @param securityProfileUuid + * @throws NiciraNvpApiException + */ + private void deleteWithUri(final String uri) throws NiciraNvpApiException { + try { + restConnector.executeDeleteObject(uri); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + /** + * POST {@link SecurityProfile} + * + * @param securityProfile + * @return + * @throws NiciraNvpApiException + */ + public SecurityProfile createSecurityProfile(final SecurityProfile securityProfile) throws NiciraNvpApiException { + return create(securityProfile); + } + + /** + * GET list of {@link SecurityProfile} + * + * @return + * @throws NiciraNvpApiException + */ + public List findSecurityProfile() throws NiciraNvpApiException { + return find(ABSENT, SecurityProfile.class); + } + + /** + * GET list of {@link SecurityProfile} filtered by UUID + * + * We could have invoked the service: SEC_PROFILE_URI_PREFIX + "/" + securityProfileUuid but it is not working currently + * + * @param uuid + * @return + * @throws NiciraNvpApiException + */ + public List findSecurityProfile(final String uuid) throws NiciraNvpApiException { + return find(Optional.fromNullable(uuid), SecurityProfile.class); + } + + /** + * PUT {@link SecurityProfile} given a UUID as key and a {@link SecurityProfile} with the new data + * + * @param securityProfile + * @param securityProfileUuid + * @throws NiciraNvpApiException + */ + public void updateSecurityProfile(final SecurityProfile securityProfile, final String securityProfileUuid) throws NiciraNvpApiException { + update(securityProfile, securityProfileUuid); + } + + /** + * DELETE Security Profile given a UUID as key + * + * @param securityProfileUuid + * @throws NiciraNvpApiException + */ + public void deleteSecurityProfile(final String securityProfileUuid) throws NiciraNvpApiException { + delete(securityProfileUuid, SecurityProfile.class); + } + + /** + * POST {@link Acl} + * + * @param acl + * @return + * @throws NiciraNvpApiException + */ + public Acl createAcl(final Acl acl) throws NiciraNvpApiException { + return create(acl); + } + + /** + * GET list of {@link Acl} + * + * @return + * @throws NiciraNvpApiException + */ + public List findAcl() throws NiciraNvpApiException { + return findAcl(null); + } + + /** + * GET list of {@link Acl} filtered by UUID + * + * @param uuid + * @return + * @throws NiciraNvpApiException + */ + public List findAcl(final String uuid) throws NiciraNvpApiException { + return find(Optional.fromNullable(uuid), Acl.class); + } + + /** + * PUT {@link Acl} given a UUID as key and a {@link Acl} with the new data + * + * @param acl + * @param aclUuid + * @throws NiciraNvpApiException + */ + public void updateAcl(final Acl acl, final String aclUuid) throws NiciraNvpApiException { + update(acl, aclUuid); + } + + /** + * DELETE Acl given a UUID as key + * + * @param acl + * @throws NiciraNvpApiException + */ + public void deleteAcl(final String aclUuid) throws NiciraNvpApiException { + delete(aclUuid, Acl.class); + } + + public LogicalSwitch createLogicalSwitch(final LogicalSwitch logicalSwitch) throws NiciraNvpApiException { + return create(logicalSwitch); + } + + /** + * GET list of {@link LogicalSwitch} + * + * @return + * @throws NiciraNvpApiException + */ + public List findLogicalSwitch() throws NiciraNvpApiException { + return findLogicalSwitch(null); + } + + /** + * GET list of {@link LogicalSwitch} filtered by UUID + * + * @param uuid + * @return + * @throws NiciraNvpApiException + */ + public List findLogicalSwitch(final String uuid) throws NiciraNvpApiException { + return find(Optional.fromNullable(uuid), LogicalSwitch.class); + } + + /** + * PUT {@link LogicalSwitch} given a UUID as key and a {@link LogicalSwitch} with the new data + * + * @param logicalSwitch + * @param logicalSwitchUuid + * @throws NiciraNvpApiException + */ + public void updateLogicalSwitch(final LogicalSwitch logicalSwitch, final String logicalSwitchUuid) throws NiciraNvpApiException { + update(logicalSwitch, logicalSwitchUuid); + } + + public void deleteLogicalSwitch(final String uuid) throws NiciraNvpApiException { + delete(uuid, LogicalSwitch.class); + } + + public LogicalSwitchPort createLogicalSwitchPort(final String logicalSwitchUuid, final LogicalSwitchPort logicalSwitchPort) throws NiciraNvpApiException { + return createWithUri(logicalSwitchPort, buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT)); + } + + public void updateLogicalSwitchPort(final String logicalSwitchUuid, final LogicalSwitchPort logicalSwitchPort) throws NiciraNvpApiException { + updateWithUri(logicalSwitchPort, buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT, logicalSwitchPort.getUuid().toString())); + } + + public void updateLogicalSwitchPortAttachment(final String logicalSwitchUuid, final String logicalSwitchPortUuid, final Attachment attachment) throws NiciraNvpApiException { + updateWithUri(attachment, buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT, logicalSwitchPortUuid) + ATTACHMENT_PATH_SEGMENT); + } + + public void deleteLogicalSwitchPort(final String logicalSwitchUuid, final String logicalSwitchPortUuid) throws NiciraNvpApiException { + deleteWithUri(buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT, logicalSwitchPortUuid)); + } + + public String findLogicalSwitchPortUuidByVifAttachmentUuid(final String logicalSwitchUuid, final String vifAttachmentUuid) throws NiciraNvpApiException { + final String uri = buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(UUID_QUERY_PARAMETER); + params.put(NiciraConstants.ATTACHMENT_VIF_UUID_QUERY_PARAMETER_NAME, vifAttachmentUuid); + + NiciraNvpList niciraList; + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + niciraList = restConnector.executeRetrieveObject(niciraListType, uri, params); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + + final List lspl = niciraList.getResults(); + + final int listSize = lspl.size(); + if (listSize != 1) { + throw new NiciraNvpApiException("Expected 1 LogicalSwitchPort, but got " + listSize); + } + + final LogicalSwitchPort lsp = lspl.get(0); + return lsp.getUuid(); + } + + public ControlClusterStatus getControlClusterStatus() throws NiciraNvpApiException { + final String uri = NiciraConstants.CONTROL_CLUSTER_STATUS_URL; + try { + return restConnector.executeRetrieveObject(ControlClusterStatus.class, uri, new HashMap()); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + public List findLogicalSwitchPortsByUuid(final String logicalSwitchUuid, final String logicalSwitchPortUuid) throws NiciraNvpApiException { + final String uri = buildLogicalSwitchElementUri(logicalSwitchUuid, LPORT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(UUID_QUERY_PARAMETER); + params.put(UUID_QUERY_PARAMETER, logicalSwitchPortUuid); + + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + return restConnector.> executeRetrieveObject(niciraListType, uri, params).getResults(); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + public List findLogicalRouterPortsByUuid(final String logicalRouterUuid, final String logicalRouterPortUuid) throws NiciraNvpApiException { + final String uri = buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(UUID_QUERY_PARAMETER); + params.put(UUID_QUERY_PARAMETER, logicalRouterPortUuid); + + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + return restConnector.> executeRetrieveObject(niciraListType, uri, params).getResults(); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + public LogicalRouter createLogicalRouter(final LogicalRouter logicalRouter) throws NiciraNvpApiException { + return create(logicalRouter); + } + + /** + * GET list of {@link LogicalRouter} + * + * @return + * @throws NiciraNvpApiException + */ + public List findLogicalRouter() throws NiciraNvpApiException { + return findLogicalRouter(null); + } + + /** + * GET list of {@link LogicalRouter} filtered by UUID + * + * @param uuid + * @return + * @throws NiciraNvpApiException + */ + public List findLogicalRouter(final String uuid) throws NiciraNvpApiException { + return find(Optional.fromNullable(uuid), LogicalRouter.class); + } + + public LogicalRouter findOneLogicalRouterByUuid(final String logicalRouterUuid) throws NiciraNvpApiException { + return findLogicalRouter(logicalRouterUuid).get(0); + } + + public void updateLogicalRouter(final LogicalRouter logicalRouter, final String logicalRouterUuid) throws NiciraNvpApiException { + update(logicalRouter, logicalRouterUuid); + } + + public void deleteLogicalRouter(final String logicalRouterUuid) throws NiciraNvpApiException { + deleteWithUri(buildLogicalRouterUri(logicalRouterUuid)); + } + + public LogicalRouterPort createLogicalRouterPort(final String logicalRouterUuid, final LogicalRouterPort logicalRouterPort) throws NiciraNvpApiException { + return createWithUri(logicalRouterPort, buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT)); + } + + public void deleteLogicalRouterPort(final String logicalRouterUuid, final String logicalRouterPortUuid) throws NiciraNvpApiException { + deleteWithUri(buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT, logicalRouterPortUuid)); + } + + public void updateLogicalRouterPort(final String logicalRouterUuid, final LogicalRouterPort logicalRouterPort) throws NiciraNvpApiException { + updateWithUri(logicalRouterPort, buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT, logicalRouterPort.getUuid().toString())); + } + + public void updateLogicalRouterPortAttachment(final String logicalRouterUuid, final String logicalRouterPortUuid, final Attachment attachment) throws NiciraNvpApiException { + updateWithUri(attachment, buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT, logicalRouterPortUuid) + ATTACHMENT_PATH_SEGMENT); + } + + public NatRule createLogicalRouterNatRule(final String logicalRouterUuid, final NatRule natRule) throws NiciraNvpApiException { + return createWithUri(natRule, buildLogicalRouterElementUri(logicalRouterUuid, NAT_PATH_SEGMENT)); + } + + public void updateLogicalRouterNatRule(final String logicalRouterUuid, final NatRule natRule) throws NiciraNvpApiException { + updateWithUri(natRule, buildLogicalRouterElementUri(logicalRouterUuid, NAT_PATH_SEGMENT, natRule.getUuid().toString())); + } + + public void deleteLogicalRouterNatRule(final String logicalRouterUuid, final UUID natRuleUuid) throws NiciraNvpApiException { + deleteWithUri(buildLogicalRouterElementUri(logicalRouterUuid, NAT_PATH_SEGMENT, natRuleUuid.toString())); + } + + public List findLogicalRouterPortByGatewayServiceAndVlanId(final String logicalRouterUuid, final String gatewayServiceUuid, final long vlanId) + throws NiciraNvpApiException { + final String uri = buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(WILDCARD_QUERY_PARAMETER); + params.put(ATTACHMENT_GWSVC_UUID_QUERY_PARAMETER, gatewayServiceUuid); + params.put(NiciraConstants.ATTACHMENT_VLAN_PARAMETER, Long.toString(vlanId)); + + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + return restConnector.> executeRetrieveObject(niciraListType, uri, params).getResults(); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + public List findNatRulesByLogicalRouterUuid(final String logicalRouterUuid) throws NiciraNvpApiException { + final String uri = buildLogicalRouterElementUri(logicalRouterUuid, NAT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(WILDCARD_QUERY_PARAMETER); + + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + return restConnector.> executeRetrieveObject(niciraListType, uri, params).getResults(); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + public List findLogicalRouterPortByGatewayServiceUuid(final String logicalRouterUuid, final String l3GatewayServiceUuid) + throws NiciraNvpApiException { + final String uri = buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT); + final Map params = buildBasicParametersMap(WILDCARD_QUERY_PARAMETER); + params.put(ATTACHMENT_GWSVC_UUID_QUERY_PARAMETER, l3GatewayServiceUuid); + + try { + final Type niciraListType = new TypeToken>() { + }.getType(); + return restConnector.> executeRetrieveObject(niciraListType, uri, params).getResults(); + } catch (final CloudstackRESTException e) { + throw new NiciraNvpApiException(e); + } + } + + private static Map buildBasicParametersMap(final String fieldsQueryValue) { + final Map params = new HashMap(); + params.put(FIELDS_QUERY_PARAMETER, fieldsQueryValue); + return params; + } + + private static String buildUri(final String uriPrefix, final String uuid) { + return uriPrefix + "/" + uuid; + } + + private static String buildLogicalSwitchUri(final String logicalSwitchUuid) { + return buildUri(SWITCH_URI_PREFIX, logicalSwitchUuid); + } + + private static String buildLogicalSwitchElementUri(final String logicalSwitchUuid, final String logicalElementType) { + return buildLogicalSwitchUri(logicalSwitchUuid) + logicalElementType; + } + + private static String buildLogicalSwitchElementUri(final String logicalSwitchUuid, final String logicalElementType, final String elementUuid) { + return buildLogicalSwitchElementUri(logicalSwitchUuid, logicalElementType) + "/" + elementUuid.toString(); + } + + private static String buildLogicalRouterUri(final String logicalRouterUuid) { + return buildUri(ROUTER_URI_PREFIX, logicalRouterUuid); + } + + private static String buildLogicalRouterElementUri(final String logicalRouterUuid, final String logicalElementType) { + return buildLogicalRouterUri(logicalRouterUuid) + logicalElementType; + } + + private static String buildLogicalRouterElementUri(final String logicalRouterUuid, final String logicalRouterElementType, final String elementUuid) { + return buildLogicalRouterElementUri(logicalRouterUuid, logicalRouterElementType) + "/" + elementUuid.toString(); + } + + public static class Builder { + private String host; + private String username; + private String password; + private CloseableHttpClient httpClient; + private HttpClientContext httpClientContext = HttpClientContext.create(); + + public Builder host(final String host) { + this.host = host; + return this; + } + + public Builder username(final String username) { + this.username = username; + return this; + } + + public Builder password(final String password) { + this.password = password; + return this; + } + + public Builder httpClient(final CloseableHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + public Builder httpClientContext(final HttpClientContext httpClientContext) { + this.httpClientContext = httpClientContext; + return this; + } + + public NiciraNvpApi build() { + return new NiciraNvpApi(this); + } + } +} diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApiException.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpApiException.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApiException.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpApiException.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpList.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpList.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpList.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpList.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpTag.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpTag.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpTag.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraNvpTag.java diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraRestClient.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraRestClient.java new file mode 100644 index 00000000000..6ade3a53777 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/NiciraRestClient.java @@ -0,0 +1,202 @@ +// +// 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.nicira; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.http.HttpEntity; +import org.apache.http.StatusLine; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.util.EntityUtils; +import org.apache.log4j.Logger; + +import com.cloud.utils.rest.BasicRestClient; +import com.cloud.utils.rest.CloudstackRESTException; +import com.cloud.utils.rest.HttpConstants; +import com.cloud.utils.rest.HttpMethods; +import com.cloud.utils.rest.HttpStatusCodeHelper; +import com.cloud.utils.rest.HttpUriRequestBuilder; + +public class NiciraRestClient extends BasicRestClient { + + private static final Logger s_logger = Logger.getLogger(NiciraRestClient.class); + + private static final String CONTENT_TYPE = HttpConstants.CONTENT_TYPE; + private static final String TEXT_HTML_CONTENT_TYPE = HttpConstants.TEXT_HTML_CONTENT_TYPE; + + private static final int DEFAULT_BODY_RESP_MAX_LEN = 1024; + private static final int DEFAULT_EXECUTION_LIMIT = 5; + + private final ExecutionCounter counter; + private final int maxResponseErrorMesageLength; + private final int executionLimit; + + private final String username; + private final String password; + private final String loginUrl; + + private NiciraRestClient(final Builder builder) { + super(builder.client, builder.clientContext, builder.hostname); + executionLimit = builder.executionLimit; + counter = new ExecutionCounter(executionLimit); + maxResponseErrorMesageLength = builder.maxResponseErrorMesageLength; + username = builder.username; + password = builder.password; + loginUrl = builder.loginUrl; + } + + public static Builder create() { + return new Builder(); + } + + @Override + public CloseableHttpResponse execute(final HttpUriRequest request) throws CloudstackRESTException { + return execute(request, 0); + } + + private CloseableHttpResponse execute(final HttpUriRequest request, final int previousStatusCode) throws CloudstackRESTException { + if (counter.hasReachedExecutionLimit()) { + throw new CloudstackRESTException("Reached max executions limit of " + executionLimit); + } + counter.incrementExecutionCounter(); + s_logger.debug("Executing " + request.getMethod() + " request [execution count = " + counter.getValue() + "]"); + final CloseableHttpResponse response = super.execute(request); + + final StatusLine statusLine = response.getStatusLine(); + final int statusCode = statusLine.getStatusCode(); + s_logger.debug("Status of last request: " + statusLine.toString()); + if (HttpStatusCodeHelper.isUnauthorized(statusCode)) { + return handleUnauthorizedResponse(request, previousStatusCode, response, statusCode); + } else if (HttpStatusCodeHelper.isSuccess(statusCode)) { + return handleSuccessResponse(response); + } else { + throw new CloudstackRESTException("Unexpecetd status code: " + statusCode); + } + } + + private CloseableHttpResponse handleUnauthorizedResponse(final HttpUriRequest request, final int previousStatusCode, final CloseableHttpResponse response, final int statusCode) + throws CloudstackRESTException { + super.closeResponse(response); + if (HttpStatusCodeHelper.isUnauthorized(previousStatusCode)) { + s_logger.error(responseToErrorMessage(response)); + throw new CloudstackRESTException("Two consecutive failed attempts to authenticate against REST server"); + } + final HttpUriRequest authenticateRequest = createAuthenticationRequest(); + final CloseableHttpResponse loginResponse = execute(authenticateRequest, statusCode); + final int loginStatusCode = loginResponse.getStatusLine().getStatusCode(); + super.closeResponse(loginResponse); + return execute(request, loginStatusCode); + } + + private CloseableHttpResponse handleSuccessResponse(final CloseableHttpResponse response) { + counter.resetExecutionCounter(); + return response; + } + + private HttpUriRequest createAuthenticationRequest() { + final Map parameters = new HashMap<>(); + parameters.put("username", username); + parameters.put("password", password); + return HttpUriRequestBuilder.create() + .method(HttpMethods.POST) + .methodParameters(parameters) + .path(loginUrl) + .build(); + } + + private String responseToErrorMessage(final CloseableHttpResponse response) { + String errorMessage = response.getStatusLine().toString(); + if (response.containsHeader(CONTENT_TYPE) && TEXT_HTML_CONTENT_TYPE.equals(response.getFirstHeader(CONTENT_TYPE).getValue())) { + try { + final HttpEntity entity = response.getEntity(); + final String respobnseBody = EntityUtils.toString(entity); + errorMessage = respobnseBody.subSequence(0, maxResponseErrorMesageLength).toString(); + } catch (final IOException e) { + s_logger.debug("Could not read repsonse body. Response: " + response, e); + } + } + + return errorMessage; + } + + protected static class Builder extends BasicRestClient.Builder { + private CloseableHttpClient client; + private HttpClientContext clientContext; + private String hostname; + private String username; + private String password; + private String loginUrl; + private int executionLimit = DEFAULT_EXECUTION_LIMIT; + private int maxResponseErrorMesageLength = DEFAULT_BODY_RESP_MAX_LEN; + + public Builder hostname(final String hostname) { + this.hostname = hostname; + return this; + } + + public Builder username(final String username) { + this.username = username; + return this; + } + + public Builder password(final String password) { + this.password = password; + return this; + } + + public Builder loginUrl(final String loginUrl) { + this.loginUrl = loginUrl; + return this; + } + + @Override + public Builder client(final CloseableHttpClient client) { + this.client = client; + return this; + } + + @Override + public Builder clientContext(final HttpClientContext clientContext) { + this.clientContext = clientContext; + return this; + } + + public Builder executionLimit(final int executionLimit) { + this.executionLimit = executionLimit; + return this; + } + + public Builder maxResponseErrorMesageLength(final int maxResponseErrorMesageLength) { + this.maxResponseErrorMesageLength = maxResponseErrorMesageLength; + return this; + } + + @Override + public NiciraRestClient build() { + return new NiciraRestClient(this); + } + + } +} \ No newline at end of file diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/PatchAttachment.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/PatchAttachment.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/PatchAttachment.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/PatchAttachment.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RouterNextHop.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RouterNextHop.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RouterNextHop.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RouterNextHop.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RoutingConfig.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingConfig.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RoutingConfig.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingConfig.java diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingConfigAdapter.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingConfigAdapter.java new file mode 100644 index 00000000000..ad94f6343d8 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingConfigAdapter.java @@ -0,0 +1,52 @@ +// +// 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.nicira; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; + +public class RoutingConfigAdapter implements JsonDeserializer { + + private static final String ROUTING_TABLE_ROUTING_CONFIG = "RoutingTableRoutingConfig"; + private static final String SINGLE_DEFAULT_ROUTE_IMPLICIT_ROUTING_CONFIG = "SingleDefaultRouteImplicitRoutingConfig"; + + @Override + public RoutingConfig deserialize(final JsonElement jsonElement, final Type type, final JsonDeserializationContext context) throws JsonParseException { + final JsonObject jsonObject = jsonElement.getAsJsonObject(); + + if (!jsonObject.has("type")) { + throw new JsonParseException("Deserializing as a RoutingConfig, but no type present in the json object"); + } + + final String routingConfigType = jsonObject.get("type").getAsString(); + if (SINGLE_DEFAULT_ROUTE_IMPLICIT_ROUTING_CONFIG.equals(routingConfigType)) { + return context.deserialize(jsonElement, SingleDefaultRouteImplicitRoutingConfig.class); + } else if (ROUTING_TABLE_ROUTING_CONFIG.equals(routingConfigType)) { + return context.deserialize(jsonElement, RoutingTableRoutingConfig.class); + } + + throw new JsonParseException("Failed to deserialize type \"" + routingConfigType + "\""); + } +} \ No newline at end of file diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RoutingTableRoutingConfig.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingTableRoutingConfig.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/RoutingTableRoutingConfig.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/RoutingTableRoutingConfig.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SecurityProfile.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SecurityProfile.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SecurityProfile.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SecurityProfile.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SecurityRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SecurityRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SecurityRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SecurityRule.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SingleDefaultRouteImplicitRoutingConfig.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SingleDefaultRouteImplicitRoutingConfig.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SingleDefaultRouteImplicitRoutingConfig.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SingleDefaultRouteImplicitRoutingConfig.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SourceNatRule.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SourceNatRule.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/SourceNatRule.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/SourceNatRule.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/TransportZoneBinding.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/TransportZoneBinding.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/TransportZoneBinding.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/TransportZoneBinding.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/VifAttachment.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/VifAttachment.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/VifAttachment.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/nicira/VifAttachment.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpRequestWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpRequestWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpRequestWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpRequestWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpResource.java similarity index 78% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpResource.java index df40db4eb0b..d6355b2a6cd 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpResource.java @@ -19,6 +19,9 @@ package com.cloud.network.resource; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; import java.util.Map; import javax.naming.ConfigurationException; @@ -42,6 +45,8 @@ import com.cloud.network.nicira.NiciraNvpApiException; import com.cloud.network.nicira.SourceNatRule; import com.cloud.network.utils.CommandRetryUtility; import com.cloud.resource.ServerResource; +import com.cloud.utils.rest.CloudstackRESTException; +import com.cloud.utils.rest.HttpClientHelper; public class NiciraNvpResource implements ServerResource { @@ -49,6 +54,7 @@ public class NiciraNvpResource implements ServerResource { public static final int NAME_MAX_LEN = 40; public static final int NUM_RETRIES = 2; + private static final int MAX_REDIRECTS = 5; private String name; private String guid; @@ -58,39 +64,47 @@ public class NiciraNvpResource implements ServerResource { private NiciraNvpUtilities niciraNvpUtilities; private CommandRetryUtility retryUtility; - protected NiciraNvpApi createNiciraNvpApi() { - return new NiciraNvpApi(); + protected NiciraNvpApi createNiciraNvpApi(final String host, final String username, final String password) throws CloudstackRESTException { + try { + return NiciraNvpApi.create().host(host).username(username).password(password).httpClient(HttpClientHelper.createHttpClient(MAX_REDIRECTS)).build(); + } catch (final KeyManagementException e) { + throw new CloudstackRESTException("Could not create HTTP client", e); + } catch (final NoSuchAlgorithmException e) { + throw new CloudstackRESTException("Could not create HTTP client", e); + } catch (final KeyStoreException e) { + throw new CloudstackRESTException("Could not create HTTP client", e); + } } @Override public boolean configure(final String ignoredName, final Map params) throws ConfigurationException { - name = (String)params.get("name"); + name = (String) params.get("name"); if (name == null) { throw new ConfigurationException("Unable to find name"); } - guid = (String)params.get("guid"); + guid = (String) params.get("guid"); if (guid == null) { throw new ConfigurationException("Unable to find the guid"); } - zoneId = (String)params.get("zoneId"); + zoneId = (String) params.get("zoneId"); if (zoneId == null) { throw new ConfigurationException("Unable to find zone"); } - final String ip = (String)params.get("ip"); + final String ip = (String) params.get("ip"); if (ip == null) { throw new ConfigurationException("Unable to find IP"); } - final String adminuser = (String)params.get("adminuser"); + final String adminuser = (String) params.get("adminuser"); if (adminuser == null) { throw new ConfigurationException("Unable to find admin username"); } - final String adminpass = (String)params.get("adminpass"); + final String adminpass = (String) params.get("adminpass"); if (adminpass == null) { throw new ConfigurationException("Unable to find admin password"); } @@ -99,9 +113,11 @@ public class NiciraNvpResource implements ServerResource { retryUtility = CommandRetryUtility.getInstance(); retryUtility.setServerResource(this); - niciraNvpApi = createNiciraNvpApi(); - niciraNvpApi.setControllerAddress(ip); - niciraNvpApi.setAdminCredentials(adminuser, adminpass); + try { + niciraNvpApi = createNiciraNvpApi(ip, adminuser, adminpass); + } catch (final CloudstackRESTException e) { + throw new ConfigurationException("Could not create a Nicira Nvp API client: " + e.getMessage()); + } return true; } @@ -149,7 +165,7 @@ public class NiciraNvpResource implements ServerResource { sc.setPrivateIpAddress(""); sc.setStorageIpAddress(""); sc.setVersion(NiciraNvpResource.class.getPackage().getImplementationVersion()); - return new StartupCommand[] {sc}; + return new StartupCommand[] { sc }; } @Override @@ -212,16 +228,16 @@ public class NiciraNvpResource implements ServerResource { natRuleStr.append(m.getDestinationPort()); natRuleStr.append(" ]) -->"); if ("SourceNatRule".equals(rule.getType())) { - natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMin()); + natRuleStr.append(((SourceNatRule) rule).getToSourceIpAddressMin()); natRuleStr.append("-"); - natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMax()); + natRuleStr.append(((SourceNatRule) rule).getToSourceIpAddressMax()); natRuleStr.append(" ["); - natRuleStr.append(((SourceNatRule)rule).getToSourcePort()); + natRuleStr.append(((SourceNatRule) rule).getToSourcePort()); natRuleStr.append(" ])"); } else { - natRuleStr.append(((DestinationNatRule)rule).getToDestinationIpAddress()); + natRuleStr.append(((DestinationNatRule) rule).getToDestinationIpAddress()); natRuleStr.append(" ["); - natRuleStr.append(((DestinationNatRule)rule).getToDestinationPort()); + natRuleStr.append(((DestinationNatRule) rule).getToDestinationPort()); natRuleStr.append(" ])"); } return natRuleStr.toString(); @@ -247,25 +263,25 @@ public class NiciraNvpResource implements ServerResource { Match m = new Match(); m.setDestinationIpAddresses(outsideIp); rulepair[0].setMatch(m); - ((DestinationNatRule)rulepair[0]).setToDestinationIpAddress(insideIp); + ((DestinationNatRule) rulepair[0]).setToDestinationIpAddress(insideIp); // create matching snat rule m = new Match(); m.setSourceIpAddresses(insideIp); rulepair[1].setMatch(m); - ((SourceNatRule)rulepair[1]).setToSourceIpAddressMin(outsideIp); - ((SourceNatRule)rulepair[1]).setToSourceIpAddressMax(outsideIp); + ((SourceNatRule) rulepair[1]).setToSourceIpAddressMin(outsideIp); + ((SourceNatRule) rulepair[1]).setToSourceIpAddressMax(outsideIp); return rulepair; } public NatRule[] generatePortForwardingRulePair(final String insideIp, final int[] insidePorts, final String outsideIp, final int[] outsidePorts, - final String protocol) { + final String protocol) { // Start with a basic static nat rule, then add port and protocol details final NatRule[] rulepair = generateStaticNatRulePair(insideIp, outsideIp); - ((DestinationNatRule)rulepair[0]).setToDestinationPort(insidePorts[0]); + ((DestinationNatRule) rulepair[0]).setToDestinationPort(insidePorts[0]); rulepair[0].getMatch().setDestinationPort(outsidePorts[0]); rulepair[0].setOrder(50); rulepair[0].getMatch().setEthertype("IPv4"); @@ -275,7 +291,7 @@ public class NiciraNvpResource implements ServerResource { rulepair[0].getMatch().setProtocol(17); } - ((SourceNatRule)rulepair[1]).setToSourcePort(outsidePorts[0]); + ((SourceNatRule) rulepair[1]).setToSourcePort(outsidePorts[0]); rulepair[1].getMatch().setSourcePort(insidePorts[0]); rulepair[1].setOrder(50); rulepair[1].getMatch().setEthertype("IPv4"); diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpUtilities.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpUtilities.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpUtilities.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpUtilities.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java similarity index 93% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java index 89e7a6e02a4..ae0d4ba2702 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePortForwardingRulesCommandWrapper.java @@ -21,6 +21,8 @@ package com.cloud.network.resource.wrapper; import static com.cloud.network.resource.NiciraNvpResource.NUM_RETRIES; +import java.util.List; + import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; @@ -30,13 +32,12 @@ import com.cloud.agent.api.to.PortForwardingRuleTO; import com.cloud.network.nicira.NatRule; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.resource.NiciraNvpResource; import com.cloud.network.utils.CommandRetryUtility; import com.cloud.resource.CommandWrapper; import com.cloud.resource.ResourceWrapper; -@ResourceWrapper(handles = ConfigurePortForwardingRulesOnLogicalRouterCommand.class) +@ResourceWrapper(handles = ConfigurePortForwardingRulesOnLogicalRouterCommand.class) public final class NiciraNvpConfigurePortForwardingRulesCommandWrapper extends CommandWrapper { private static final Logger s_logger = Logger.getLogger(NiciraNvpConfigurePortForwardingRulesCommandWrapper.class); @@ -45,7 +46,7 @@ public final class NiciraNvpConfigurePortForwardingRulesCommandWrapper extends C public Answer execute(final ConfigurePortForwardingRulesOnLogicalRouterCommand command, final NiciraNvpResource niciraNvpResource) { final NiciraNvpApi niciraNvpApi = niciraNvpResource.getNiciraNvpApi(); try { - final NiciraNvpList existingRules = niciraNvpApi.findNatRulesByLogicalRouterUuid(command.getLogicalRouterUuid()); + final List existingRules = niciraNvpApi.findNatRulesByLogicalRouterUuid(command.getLogicalRouterUuid()); // Rules of the game (also known as assumptions-that-will-make-stuff-break-later-on) // A SourceNat rule with a match other than a /32 cidr is assumed to be the "main" SourceNat rule // Any other SourceNat rule should have a corresponding DestinationNat rule @@ -60,12 +61,13 @@ public final class NiciraNvpConfigurePortForwardingRulesCommandWrapper extends C return new ConfigurePortForwardingRulesOnLogicalRouterAnswer(command, false, "Nicira NVP doesn't support port ranges for port forwarding"); } - final NatRule[] rulepair = niciraNvpResource.generatePortForwardingRulePair(rule.getDstIp(), rule.getDstPortRange(), rule.getSrcIp(), rule.getSrcPortRange(), rule.getProtocol()); + final NatRule[] rulepair = niciraNvpResource.generatePortForwardingRulePair(rule.getDstIp(), rule.getDstPortRange(), rule.getSrcIp(), rule.getSrcPortRange(), + rule.getProtocol()); NatRule incoming = null; NatRule outgoing = null; - for (final NatRule storedRule : existingRules.getResults()) { + for (final NatRule storedRule : existingRules) { if (storedRule.equalsIgnoreUuid(rulepair[1])) { // The outgoing rule exists outgoing = storedRule; diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java similarity index 84% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java index e5d2dcd012d..d584629a5e1 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigurePublicIpsCommandWrapper.java @@ -21,19 +21,20 @@ package com.cloud.network.resource.wrapper; import static com.cloud.network.resource.NiciraNvpResource.NUM_RETRIES; +import java.util.List; + import com.cloud.agent.api.Answer; import com.cloud.agent.api.ConfigurePublicIpsOnLogicalRouterAnswer; import com.cloud.agent.api.ConfigurePublicIpsOnLogicalRouterCommand; import com.cloud.network.nicira.LogicalRouterPort; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.resource.NiciraNvpResource; import com.cloud.network.utils.CommandRetryUtility; import com.cloud.resource.CommandWrapper; import com.cloud.resource.ResourceWrapper; -@ResourceWrapper(handles = ConfigurePublicIpsOnLogicalRouterCommand.class) +@ResourceWrapper(handles = ConfigurePublicIpsOnLogicalRouterCommand.class) public final class NiciraNvpConfigurePublicIpsCommandWrapper extends CommandWrapper { @Override @@ -41,16 +42,16 @@ public final class NiciraNvpConfigurePublicIpsCommandWrapper extends CommandWrap final NiciraNvpApi niciraNvpApi = niciraNvpResource.getNiciraNvpApi(); try { - final NiciraNvpList ports = niciraNvpApi.findLogicalRouterPortByGatewayServiceUuid(command.getLogicalRouterUuid(), command.getL3GatewayServiceUuid()); - if (ports.getResultCount() != 1) { + final List ports = niciraNvpApi.findLogicalRouterPortByGatewayServiceUuid(command.getLogicalRouterUuid(), command.getL3GatewayServiceUuid()); + if (ports.size() != 1) { return new ConfigurePublicIpsOnLogicalRouterAnswer(command, false, "No logical router ports found, unable to set ip addresses"); } - final LogicalRouterPort lrp = ports.getResults().get(0); + final LogicalRouterPort lrp = ports.get(0); lrp.setIpAddresses(command.getPublicCidrs()); niciraNvpApi.updateLogicalRouterPort(command.getLogicalRouterUuid(), lrp); return new ConfigurePublicIpsOnLogicalRouterAnswer(command, true, "Configured " + command.getPublicCidrs().size() + " ip addresses on logical router uuid " + - command.getLogicalRouterUuid()); + command.getLogicalRouterUuid()); } catch (final NiciraNvpApiException e) { final CommandRetryUtility retryUtility = niciraNvpResource.getRetryUtility(); retryUtility.addRetry(command, NUM_RETRIES); diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java similarity index 94% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java index 1ce3cebd743..ae597842bce 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpConfigureStaticNatRulesCommandWrapper.java @@ -21,6 +21,8 @@ package com.cloud.network.resource.wrapper; import static com.cloud.network.resource.NiciraNvpResource.NUM_RETRIES; +import java.util.List; + import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; @@ -30,13 +32,12 @@ import com.cloud.agent.api.to.StaticNatRuleTO; import com.cloud.network.nicira.NatRule; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.resource.NiciraNvpResource; import com.cloud.network.utils.CommandRetryUtility; import com.cloud.resource.CommandWrapper; import com.cloud.resource.ResourceWrapper; -@ResourceWrapper(handles = ConfigureStaticNatRulesOnLogicalRouterCommand.class) +@ResourceWrapper(handles = ConfigureStaticNatRulesOnLogicalRouterCommand.class) public final class NiciraNvpConfigureStaticNatRulesCommandWrapper extends CommandWrapper { private static final Logger s_logger = Logger.getLogger(NiciraNvpConfigureStaticNatRulesCommandWrapper.class); @@ -46,7 +47,7 @@ public final class NiciraNvpConfigureStaticNatRulesCommandWrapper extends Comman final NiciraNvpApi niciraNvpApi = niciraNvpResource.getNiciraNvpApi(); try { - final NiciraNvpList existingRules = niciraNvpApi.findNatRulesByLogicalRouterUuid(command.getLogicalRouterUuid()); + final List existingRules = niciraNvpApi.findNatRulesByLogicalRouterUuid(command.getLogicalRouterUuid()); // Rules of the game (also known as assumptions-that-will-make-stuff-break-later-on) // A SourceNat rule with a match other than a /32 cidr is assumed to be the "main" SourceNat rule // Any other SourceNat rule should have a corresponding DestinationNat rule @@ -58,7 +59,7 @@ public final class NiciraNvpConfigureStaticNatRulesCommandWrapper extends Comman NatRule incoming = null; NatRule outgoing = null; - for (final NatRule storedRule : existingRules.getResults()) { + for (final NatRule storedRule : existingRules) { if (storedRule.equalsIgnoreUuid(rulepair[1])) { // The outgoing rule exists outgoing = storedRule; diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalRouterCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalRouterCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalRouterCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalRouterCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchPortCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchPortCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchPortCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpCreateLogicalSwitchPortCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalRouterCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalRouterCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalRouterCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalRouterCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchPortCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchPortCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchPortCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpDeleteLogicalSwitchPortCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java similarity index 89% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java index 40d58fcaf4d..8c11427d945 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java +++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpFindLogicalSwitchPortCommandWrapper.java @@ -21,19 +21,20 @@ package com.cloud.network.resource.wrapper; import static com.cloud.network.resource.NiciraNvpResource.NUM_RETRIES; +import java.util.List; + import com.cloud.agent.api.Answer; import com.cloud.agent.api.FindLogicalSwitchPortAnswer; import com.cloud.agent.api.FindLogicalSwitchPortCommand; import com.cloud.network.nicira.LogicalSwitchPort; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.resource.NiciraNvpResource; import com.cloud.network.utils.CommandRetryUtility; import com.cloud.resource.CommandWrapper; import com.cloud.resource.ResourceWrapper; -@ResourceWrapper(handles = FindLogicalSwitchPortCommand.class) +@ResourceWrapper(handles = FindLogicalSwitchPortCommand.class) public final class NiciraNvpFindLogicalSwitchPortCommandWrapper extends CommandWrapper { @Override @@ -44,8 +45,8 @@ public final class NiciraNvpFindLogicalSwitchPortCommandWrapper extends CommandW final NiciraNvpApi niciraNvpApi = niciraNvpResource.getNiciraNvpApi(); try { - final NiciraNvpList ports = niciraNvpApi.findLogicalSwitchPortsByUuid(logicalSwitchUuid, logicalSwitchPortUuid); - if (ports.getResultCount() == 0) { + final List ports = niciraNvpApi.findLogicalSwitchPortsByUuid(logicalSwitchUuid, logicalSwitchPortUuid); + if (ports.size() == 0) { return new FindLogicalSwitchPortAnswer(command, false, "Logical switchport " + logicalSwitchPortUuid + " not found", null); } else { return new FindLogicalSwitchPortAnswer(command, true, "Logical switchport " + logicalSwitchPortUuid + " found", logicalSwitchPortUuid); diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpMaintainCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpMaintainCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpMaintainCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpMaintainCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpReadyCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpReadyCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpReadyCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpReadyCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpUpdateLogicalSwitchPortCommandWrapper.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpUpdateLogicalSwitchPortCommandWrapper.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/wrapper/NiciraNvpUpdateLogicalSwitchPortCommandWrapper.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/wrapper/NiciraNvpUpdateLogicalSwitchPortCommandWrapper.java diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/utils/CommandRetryUtility.java similarity index 100% rename from plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java rename to plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/utils/CommandRetryUtility.java diff --git a/plugins/network-elements/nicira-nvp/resources/META-INF/cloudstack/nvp/module.properties b/plugins/network-elements/nicira-nvp/src/main/resources/META-INF/cloudstack/nvp/module.properties similarity index 100% rename from plugins/network-elements/nicira-nvp/resources/META-INF/cloudstack/nvp/module.properties rename to plugins/network-elements/nicira-nvp/src/main/resources/META-INF/cloudstack/nvp/module.properties diff --git a/plugins/network-elements/nicira-nvp/resources/META-INF/cloudstack/nvp/spring-nvp-context.xml b/plugins/network-elements/nicira-nvp/src/main/resources/META-INF/cloudstack/nvp/spring-nvp-context.xml similarity index 100% rename from plugins/network-elements/nicira-nvp/resources/META-INF/cloudstack/nvp/spring-nvp-context.xml rename to plugins/network-elements/nicira-nvp/src/main/resources/META-INF/cloudstack/nvp/spring-nvp-context.xml diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/element/NiciraNvpElementTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/element/NiciraNvpElementTest.java similarity index 100% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/element/NiciraNvpElementTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/element/NiciraNvpElementTest.java diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java similarity index 97% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java index 881c39fa72a..36e4643401e 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java @@ -114,13 +114,17 @@ public class NiciraNvpGuestNetworkGuruTest { when(offering.getGuestType()).thenReturn(GuestType.Isolated); final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); when(nosd.areServicesSupportedByNetworkOffering(NETWORK_ID, Service.Connectivity)).thenReturn(true); assertTrue(guru.canHandle(offering, NetworkType.Advanced, physnet) == true); + // Supported: IsolationMethod == VXLAN + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VXLAN"})); + assertTrue(guru.canHandle(offering, NetworkType.Advanced, physnet) == true); + // Not supported TrafficType != Guest when(offering.getTrafficType()).thenReturn(TrafficType.Management); assertFalse(guru.canHandle(offering, NetworkType.Advanced, physnet) == true); @@ -134,7 +138,7 @@ public class NiciraNvpGuestNetworkGuruTest { when(offering.getGuestType()).thenReturn(GuestType.Isolated); assertFalse(guru.canHandle(offering, NetworkType.Basic, physnet) == true); - // Not supported: IsolationMethod != STT + // Not supported: IsolationMethod != STT, VXLAN when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VLAN"})); assertFalse(guru.canHandle(offering, NetworkType.Advanced, physnet) == true); @@ -144,7 +148,7 @@ public class NiciraNvpGuestNetworkGuruTest { public void testDesign() { final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); when(physnetdao.findById((Long)any())).thenReturn(physnet); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class); @@ -171,7 +175,7 @@ public class NiciraNvpGuestNetworkGuruTest { public void testDesignNoElementOnPhysicalNetwork() { final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); when(physnetdao.findById((Long)any())).thenReturn(physnet); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); mock(NiciraNvpDeviceVO.class); @@ -217,7 +221,7 @@ public class NiciraNvpGuestNetworkGuruTest { public void testDesignNoConnectivityInOffering() { final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); when(physnetdao.findById((Long)any())).thenReturn(physnet); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class); @@ -243,7 +247,7 @@ public class NiciraNvpGuestNetworkGuruTest { public void testImplement() throws InsufficientVirtualNetworkCapacityException { final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); when(physnetdao.findById((Long)any())).thenReturn(physnet); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class); @@ -412,7 +416,7 @@ public class NiciraNvpGuestNetworkGuruTest { public void testShutdown() throws InsufficientVirtualNetworkCapacityException, URISyntaxException { final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class); when(physnetdao.findById((Long)any())).thenReturn(physnet); - when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"})); + when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT", "VXLAN"})); when(physnet.getId()).thenReturn(NETWORK_ID); final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class); diff --git a/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/ExecutionCounterTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/ExecutionCounterTest.java new file mode 100644 index 00000000000..18797dfc544 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/ExecutionCounterTest.java @@ -0,0 +1,55 @@ +// +// 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.nicira; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; + +import org.junit.Test; + +public class ExecutionCounterTest { + + @Test + public void testIncrementCounter() throws Exception { + final ExecutionCounter executionCounter = new ExecutionCounter(-1); + + executionCounter.incrementExecutionCounter().incrementExecutionCounter(); + + assertThat(executionCounter.getValue(), equalTo(2)); + } + + @Test + public void testHasNotYetReachedTheExecutuionLimit() throws Exception { + final ExecutionCounter executionCounter = new ExecutionCounter(2); + + executionCounter.incrementExecutionCounter(); + + assertThat(executionCounter.hasReachedExecutionLimit(), equalTo(false)); + } + + @Test + public void testHasAlreadyReachedTheExecutuionLimit() throws Exception { + final ExecutionCounter executionCounter = new ExecutionCounter(2); + + executionCounter.incrementExecutionCounter().incrementExecutionCounter(); + + assertThat(executionCounter.hasReachedExecutionLimit(), equalTo(true)); + } +} diff --git a/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleAdapterTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleAdapterTest.java new file mode 100644 index 00000000000..199a6feedd7 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleAdapterTest.java @@ -0,0 +1,60 @@ +// +// 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.nicira; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.instanceOf; + +import org.junit.Test; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; + +public class NatRuleAdapterTest { + private final Gson gson = new GsonBuilder() + .registerTypeAdapter(NatRule.class, new NatRuleAdapter()) + .create(); + + @Test(expected = JsonParseException.class) + public void testNatRuleAdapterNoType() { + gson.fromJson("{}", NatRule.class); + } + + @Test(expected = JsonParseException.class) + public void testNatRuleAdapterWrongType() { + gson.fromJson("{type : \"WrongType\"}", NatRule.class); + } + + @Test() + public void testNatRuleAdapterWithSourceNatRule() { + final SourceNatRule sourceNatRule = (SourceNatRule) gson.fromJson("{type : \"SourceNatRule\"}", NatRule.class); + + assertThat(sourceNatRule, instanceOf(SourceNatRule.class)); + } + + @Test() + public void testNatRuleAdapterWithDestinationNatRule() { + final DestinationNatRule destinationNatRule = (DestinationNatRule) gson.fromJson("{type : \"DestinationNatRule\"}", NatRule.class); + + assertThat(destinationNatRule, instanceOf(DestinationNatRule.class)); + } + +} diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NatRuleTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleTest.java similarity index 98% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NatRuleTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleTest.java index d4c65969ec0..e4072bd82a9 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NatRuleTest.java +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NatRuleTest.java @@ -32,7 +32,7 @@ public class NatRuleTest { @Test public void testNatRuleEncoding() { final Gson gson = - new GsonBuilder().registerTypeAdapter(NatRule.class, new NiciraNvpApi.NatRuleAdapter()) + new GsonBuilder().registerTypeAdapter(NatRule.class, new NatRuleAdapter()) .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .create(); diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiIT.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiIT.java similarity index 57% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiIT.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiIT.java index 3bb4b9db7a3..a95a8d673cf 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiIT.java +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiIT.java @@ -22,16 +22,15 @@ package com.cloud.network.nicira; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.util.Properties; import java.util.UUID; import org.junit.Before; import org.junit.Test; import com.cloud.utils.PropertiesUtil; +import com.cloud.utils.rest.HttpClientHelper; public class NiciraNvpApiIT { @@ -40,18 +39,23 @@ public class NiciraNvpApiIT { protected long timestamp = System.currentTimeMillis(); @Before - public void setup() throws IOException { - final Properties properties = PropertiesUtil.loadFromFile(PropertiesUtil.findConfigFile("config.properties")); - api = new NiciraNvpApi(); - api.setControllerAddress(properties.getProperty("nvp.host")); - api.setAdminCredentials(properties.getProperty("nvp.admin.user"), - properties.getProperty("nvp.admin.pwd")); + public void setup() throws Exception { + PropertiesUtil.loadFromFile(PropertiesUtil.findConfigFile("config.properties")); + final String host = System.getProperty("nvp.host"); + final String user = System.getProperty("nvp.admin.user"); + final String pass = System.getProperty("nvp.admin.pwd"); + api = NiciraNvpApi.create() + .host(host) + .username(user) + .password(pass) + .httpClient(HttpClientHelper.createHttpClient(5)) + .build(); } @Test - public void testCRUDSecurityProfile() throws NiciraNvpApiException { + public void testCRUDSecurityProfile() { SecurityProfile sProfile = new SecurityProfile(); - sProfile.setDisplayName("SecProfile"+timestamp); + sProfile.setDisplayName("SecProfile" + timestamp); final List egressRules = new ArrayList(); sProfile.setLogicalPortEgressRules(egressRules); @@ -73,27 +77,23 @@ public class NiciraNvpApiIT { sProfile = api.createSecurityProfile(sProfile); // We can now update the new entity - sProfile.setDisplayName("UpdatedSecProfile"+timestamp); + sProfile.setDisplayName("UpdatedSecProfile" + timestamp); api.updateSecurityProfile(sProfile, sProfile.getUuid()); // Read them all - NiciraNvpList profiles = api.findSecurityProfile(); + List profiles = api.findSecurityProfile(); SecurityProfile scInList = null; - for(final SecurityProfile iProfile : profiles.getResults()) { + for (final SecurityProfile iProfile : profiles) { if (iProfile.getUuid().equalsIgnoreCase(sProfile.getUuid())) { scInList = iProfile; } } - assertEquals("Read a Security Profile different from the one just created and updated", - sProfile, scInList); + assertEquals("Read a Security Profile different from the one just created and updated", sProfile, scInList); // Read them filtered by uuid (get one) profiles = api.findSecurityProfile(sProfile.getUuid()); - assertEquals("Read a Security Profile different from the one just created and updated", - sProfile, - profiles.getResults().get(0)); - assertEquals("Read a Security Profile filtered by unique id (UUID) with more than one item", - 1, profiles.getResults().size()); + assertEquals("Read a Security Profile different from the one just created and updated", sProfile, profiles.get(0)); + assertEquals("Read a Security Profile filtered by unique id (UUID) with more than one item", 1, profiles.size()); // We can now delete the new entity api.deleteSecurityProfile(sProfile.getUuid()); @@ -104,25 +104,21 @@ public class NiciraNvpApiIT { } @Test - public void testCRUDAcl() throws NiciraNvpApiException { + public void testCRUDAcl() { Acl acl = new Acl(); - acl.setDisplayName("Acl"+timestamp); + acl.setDisplayName("Acl" + timestamp); // Note that if the protocol is 6 (TCP) then you cannot put ICMP code and type // Note that if the protocol is 1 (ICMP) then you cannot put ports final List egressRules = new ArrayList(); acl.setLogicalPortEgressRules(egressRules); - egressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 1, "allow", null, null, - "1.10.10.0", "1.10.10.1", null, null, null, null, 0, 0, 5)); - egressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 6, "allow", null, null, - "1.10.10.6", "1.10.10.7", 80, 80, 80, 80, 1, null, null)); + egressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 1, "allow", null, null, "1.10.10.0", "1.10.10.1", null, null, null, null, 0, 0, 5)); + egressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 6, "allow", null, null, "1.10.10.6", "1.10.10.7", 80, 80, 80, 80, 1, null, null)); final List ingressRules = new ArrayList(); acl.setLogicalPortIngressRules(ingressRules); - ingressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 1, "allow", null, null, - "1.10.10.0", "1.10.10.1", null, null, null, null, 0, 0, 5)); - ingressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 6, "allow", null, null, - "1.10.10.6", "1.10.10.7", 80, 80, 80, 80, 1, null, null)); + ingressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 1, "allow", null, null, "1.10.10.0", "1.10.10.1", null, null, null, null, 0, 0, 5)); + ingressRules.add(new AclRule(AclRule.ETHERTYPE_IPV4, 6, "allow", null, null, "1.10.10.6", "1.10.10.7", 80, 80, 80, 80, 1, null, null)); final List tags = new ArrayList(); acl.setTags(tags); @@ -134,27 +130,23 @@ public class NiciraNvpApiIT { acl = api.createAcl(acl); // We can now update the new entity - acl.setDisplayName("UpdatedAcl"+timestamp); + acl.setDisplayName("UpdatedAcl" + timestamp); api.updateAcl(acl, acl.getUuid()); // Read them all - NiciraNvpList acls = api.findAcl(); + List acls = api.findAcl(); Acl scInList = null; - for(final Acl iAcl : acls.getResults()) { + for (final Acl iAcl : acls) { if (iAcl.getUuid().equalsIgnoreCase(acl.getUuid())) { scInList = iAcl; } } - assertEquals("Read a ACL different from the one just created and updated", - acl, scInList); + assertEquals("Read a ACL different from the one just created and updated", acl, scInList); // Read them filtered by uuid (get one) acls = api.findAcl(acl.getUuid()); - assertEquals("Read a ACL different from the one just created and updated", - acl, - acls.getResults().get(0)); - assertEquals("Read a ACL filtered by unique id (UUID) with more than one item", - 1, acls.getResults().size()); + assertEquals("Read a ACL different from the one just created and updated", acl, acls.get(0)); + assertEquals("Read a ACL filtered by unique id (UUID) with more than one item", 1, acls.size()); // We can now delete the new entity api.deleteAcl(acl.getUuid()); @@ -165,9 +157,9 @@ public class NiciraNvpApiIT { } @Test - public void testCRUDLogicalSwitch() throws NiciraNvpApiException { + public void testCRUDLogicalSwitch() throws Exception { LogicalSwitch logicalSwitch = new LogicalSwitch(); - logicalSwitch.setDisplayName("LogicalSwitch"+timestamp); + logicalSwitch.setDisplayName("LogicalSwitch" + timestamp); logicalSwitch.setPortIsolationEnabled(true); logicalSwitch.setReplicationMode("service"); logicalSwitch.setTags(new ArrayList()); @@ -175,78 +167,65 @@ public class NiciraNvpApiIT { // In the creation we don't get to specify UUID, href or schema: they don't exist yet - try { - logicalSwitch = api.createLogicalSwitch(logicalSwitch); + logicalSwitch = api.createLogicalSwitch(logicalSwitch); - // We can now update the new entity - logicalSwitch.setDisplayName("UpdatedLogicalSwitch"+timestamp); - api.updateLogicalSwitch(logicalSwitch, logicalSwitch.getUuid()); + // We can now update the new entity + logicalSwitch.setDisplayName("UpdatedLogicalSwitch" + timestamp); + api.updateLogicalSwitch(logicalSwitch, logicalSwitch.getUuid()); - // Read them all - NiciraNvpList logicalSwitches = api.findLogicalSwitch(); - for(final LogicalSwitch iLogicalSwitch : logicalSwitches.getResults()) { - if (iLogicalSwitch.getUuid().equalsIgnoreCase(logicalSwitch.getUuid())) { - assertEquals("Read a LogicalSwitch different from the one just created and updated", - logicalSwitch, iLogicalSwitch); - } + // Read them all + List logicalSwitches = api.findLogicalSwitch(); + for (final LogicalSwitch iLogicalSwitch : logicalSwitches) { + if (iLogicalSwitch.getUuid().equalsIgnoreCase(logicalSwitch.getUuid())) { + assertEquals("Read a LogicalSwitch different from the one just created and updated", logicalSwitch, iLogicalSwitch); } - - // Read them filtered by uuid (get one) - logicalSwitches = api.findLogicalSwitch(logicalSwitch.getUuid()); - assertEquals("Read a LogicalSwitch different from the one just created and updated", - logicalSwitch, - logicalSwitches.getResults().get(0)); - assertEquals("Read a LogicalSwitch filtered by unique id (UUID) with more than one item", - 1, logicalSwitches.getResults().size()); - - // Before deleting the test LogicalSwitch, test its ports - final List tags = new ArrayList(); - tags.add(new NiciraNvpTag("cs_account", "OwnerName")); - - LogicalSwitchPort logicalSwitchPort = new LogicalSwitchPort("LSwitchPort"+timestamp, tags, true); - logicalSwitchPort = api.createLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort); - - logicalSwitchPort.setDisplayName("UpdatedLSwitchPort"+timestamp); - api.updateLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort); - - final NiciraNvpList logicalSwitchePorts = - api.findLogicalSwitchPortsByUuid(logicalSwitch.getUuid(), logicalSwitchPort.getUuid()); - for(final LogicalSwitchPort iLSwitchPort : logicalSwitchePorts.getResults()) { - if (iLSwitchPort.getUuid().equalsIgnoreCase(logicalSwitchPort.getUuid())) { - assertEquals("Read a LogicalSwitchPort different from the one just created and updated", - logicalSwitchPort, iLSwitchPort); - } - } - - // And finally test attachments - final String attachmentUuid = UUID.randomUUID().toString(); - final VifAttachment vifAttachment = new VifAttachment(attachmentUuid); - api.updateLogicalSwitchPortAttachment(logicalSwitch.getUuid(), logicalSwitchPort.getUuid(), - vifAttachment); - - assertEquals("Read a LogicalSwitchPort by vifAttachment different than expected", - api.findLogicalSwitchPortUuidByVifAttachmentUuid(logicalSwitch.getUuid(), vifAttachment.getVifUuid()), - logicalSwitchPort.getUuid()); - - api.deleteLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort.getUuid()); - - // We can now delete the new entity - api.deleteLogicalSwitch(logicalSwitch.getUuid()); - } catch (final NiciraNvpApiException e) { - e.printStackTrace(); - assertTrue("Errors in LogicalSwitch CRUD", false); } + + // Read them filtered by uuid (get one) + logicalSwitches = api.findLogicalSwitch(logicalSwitch.getUuid()); + assertEquals("Read a LogicalSwitch different from the one just created and updated", logicalSwitch, logicalSwitches.get(0)); + assertEquals("Read a LogicalSwitch filtered by unique id (UUID) with more than one item", 1, logicalSwitches.size()); + + // Before deleting the test LogicalSwitch, test its ports + final List tags = new ArrayList(); + tags.add(new NiciraNvpTag("cs_account", "OwnerName")); + + LogicalSwitchPort logicalSwitchPort = new LogicalSwitchPort("LSwitchPort" + timestamp, tags, true); + logicalSwitchPort = api.createLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort); + + logicalSwitchPort.setDisplayName("UpdatedLSwitchPort" + timestamp); + api.updateLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort); + + final List logicalSwitchePorts = api.findLogicalSwitchPortsByUuid(logicalSwitch.getUuid(), logicalSwitchPort.getUuid()); + for (final LogicalSwitchPort iLSwitchPort : logicalSwitchePorts) { + if (iLSwitchPort.getUuid().equalsIgnoreCase(logicalSwitchPort.getUuid())) { + assertEquals("Read a LogicalSwitchPort different from the one just created and updated", logicalSwitchPort, iLSwitchPort); + } + } + + // And finally test attachments + final String attachmentUuid = UUID.randomUUID().toString(); + final VifAttachment vifAttachment = new VifAttachment(attachmentUuid); + api.updateLogicalSwitchPortAttachment(logicalSwitch.getUuid(), logicalSwitchPort.getUuid(), vifAttachment); + + assertEquals("Read a LogicalSwitchPort by vifAttachment different than expected", + api.findLogicalSwitchPortUuidByVifAttachmentUuid(logicalSwitch.getUuid(), vifAttachment.getVifUuid()), logicalSwitchPort.getUuid()); + + api.deleteLogicalSwitchPort(logicalSwitch.getUuid(), logicalSwitchPort.getUuid()); + + // We can now delete the new entity + api.deleteLogicalSwitch(logicalSwitch.getUuid()); } @Test - public void testCRUDLogicalRouter() throws NiciraNvpApiException { + public void testCRUDLogicalRouter() { LogicalRouter logicalRouter = new LogicalRouter(); - logicalRouter.setDisplayName("LogicalRouter"+timestamp); + logicalRouter.setDisplayName("LogicalRouter" + timestamp); logicalRouter.setDistributed(true); logicalRouter.setNatSynchronizationEnabled(true); logicalRouter.setReplicationMode(LogicalRouter.REPLICATION_MODE_SERVICE); final RoutingConfig routingConfig = new SingleDefaultRouteImplicitRoutingConfig( - new RouterNextHop("192.168.10.20")); + new RouterNextHop("192.168.10.20")); logicalRouter.setRoutingConfig(routingConfig); // In the creation we don't get to specify UUID, href or schema: they don't exist yet @@ -255,37 +234,32 @@ public class NiciraNvpApiIT { logicalRouter = api.createLogicalRouter(logicalRouter); // We can now update the new entity - logicalRouter.setDisplayName("UpdatedLogicalSwitch"+timestamp); + logicalRouter.setDisplayName("UpdatedLogicalSwitch" + timestamp); api.updateLogicalRouter(logicalRouter, logicalRouter.getUuid()); // Read them all - NiciraNvpList logicalRouters = api.findLogicalRouter(); + List logicalRouters = api.findLogicalRouter(); LogicalRouter lsInList = null; - for(final LogicalRouter iLogicalRouter : logicalRouters.getResults()) { + for (final LogicalRouter iLogicalRouter : logicalRouters) { if (iLogicalRouter.getUuid().equalsIgnoreCase(logicalRouter.getUuid())) { lsInList = iLogicalRouter; } } - assertEquals("Read a LogicalRouter different from the one just created and updated", - logicalRouter, lsInList); + assertEquals("Read a LogicalRouter different from the one just created and updated", logicalRouter, lsInList); // Read them filtered by uuid (get one) logicalRouters = api.findLogicalRouter(logicalRouter.getUuid()); - assertEquals("Read a LogicalRouter different from the one just created and updated", - logicalRouter, - logicalRouters.getResults().get(0)); - assertEquals("Read a LogicalRouter filtered by unique id (UUID) with more than one item", - 1, logicalRouters.getResults().size()); + assertEquals("Read a LogicalRouter different from the one just created and updated", logicalRouter, logicalRouters.get(0)); + assertEquals("Read a LogicalRouter filtered by unique id (UUID) with more than one item", 1, logicalRouters.size()); - assertEquals("", logicalRouters.getResults().get(0), - api.findOneLogicalRouterByUuid(logicalRouter.getUuid())); + assertEquals(logicalRouters.get(0), api.findOneLogicalRouterByUuid(logicalRouter.getUuid())); // Before deleting the test LogicalRouter, test its ports final List tags = new ArrayList(); tags.add(new NiciraNvpTag("cs_account", "OwnerName")); LogicalRouterPort logicalRouterPort = new LogicalRouterPort(); - logicalRouterPort.setDisplayName("LRouterPort"+timestamp); + logicalRouterPort.setDisplayName("LRouterPort" + timestamp); logicalRouterPort.setTags(tags); logicalRouterPort.setAdminStatusEnabled(true); logicalRouterPort.setPortno(1024); @@ -296,15 +270,13 @@ public class NiciraNvpApiIT { logicalRouterPort.setIpAddresses(ipAddresses); logicalRouterPort = api.createLogicalRouterPort(logicalRouter.getUuid(), logicalRouterPort); - logicalRouterPort.setDisplayName("UpdatedLRouterPort"+timestamp); + logicalRouterPort.setDisplayName("UpdatedLRouterPort" + timestamp); api.updateLogicalRouterPort(logicalRouter.getUuid(), logicalRouterPort); - final NiciraNvpList logicalRouterePorts = - api.findLogicalRouterPortsByUuid(logicalRouter.getUuid(), logicalRouterPort.getUuid()); - for(final LogicalRouterPort iLRouterPort : logicalRouterePorts.getResults()) { + final List logicalRouterePorts = api.findLogicalRouterPortsByUuid(logicalRouter.getUuid(), logicalRouterPort.getUuid()); + for (final LogicalRouterPort iLRouterPort : logicalRouterePorts) { if (iLRouterPort.getUuid().equalsIgnoreCase(logicalRouterPort.getUuid())) { - assertEquals("Read a LogicalRouterPort different from the one just created and updated", - logicalRouterPort, iLRouterPort); + assertEquals("Read a LogicalRouterPort different from the one just created and updated", logicalRouterPort, iLRouterPort); } } @@ -339,8 +311,8 @@ public class NiciraNvpApiIT { public void testGetControlClusterStatus() throws NiciraNvpApiException { final ControlClusterStatus controlClusterStatus = api.getControlClusterStatus(); final String clusterStatus = controlClusterStatus.getClusterStatus(); - final boolean correctStatus = (clusterStatus.equalsIgnoreCase("stable") || - clusterStatus.equalsIgnoreCase("joining") || clusterStatus.equalsIgnoreCase("unstable")); + final boolean correctStatus = clusterStatus.equalsIgnoreCase("stable") || + clusterStatus.equalsIgnoreCase("joining") || clusterStatus.equalsIgnoreCase("unstable"); assertTrue("Not recognizable cluster status", correctStatus); } diff --git a/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiTest.java new file mode 100644 index 00000000000..79546a68472 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraNvpApiTest.java @@ -0,0 +1,198 @@ +// +// 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.nicira; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.Matchers.hasSize; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.List; + +import org.apache.commons.httpclient.HttpStatus; +import org.apache.http.HttpHost; +import org.apache.http.HttpRequest; +import org.apache.http.ProtocolVersion; +import org.apache.http.StatusLine; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.message.BasicStatusLine; +import org.hamcrest.Matchers; +import org.junit.Test; + +import com.cloud.utils.rest.HttpClientHelper; +import com.cloud.utils.rest.HttpUriRequestMethodMatcher; +import com.cloud.utils.rest.HttpUriRequestPathMatcher; +import com.cloud.utils.rest.HttpUriRequestQueryMatcher; + +public class NiciraNvpApiTest { + private static final StatusLine HTTP_200_REPSONSE = new BasicStatusLine(new ProtocolVersion("HTTPS", 1, 1), HttpStatus.SC_OK, "OK"); + private static final StatusLine HTTP_201_REPSONSE = new BasicStatusLine(new ProtocolVersion("HTTPS", 1, 1), HttpStatus.SC_CREATED, "Created"); + + protected static final String UUID = "aaaa"; + protected static final String UUID2 = "bbbb"; + protected static final String UUID_SEC_PROFILE_URI = NiciraConstants.SEC_PROFILE_URI_PREFIX + "/aaaa"; + protected static final String SCHEMA = "myTestSchema"; + protected static final String SCHEMA2 = "myTestSchema2"; + protected static final String HREF = "myTestHref"; + protected static final String HREF2 = "myTestHref2"; + protected static final String SEC_PROFILE_JSON_RESPONSE = + "{\"uuid\" : \"aaaa\"," + + "\"display_name\" : \"myTestName\"," + + "\"href\" : \"myTestHref\"," + + "\"schema\" : \"myTestSchema\"}"; + + protected static final String SEC_PROFILE_LIST_JSON_RESPONSE = "{\"results\" : [{\"uuid\" : \"aaaa\"," + + "\"display_name\" : \"myTestName\"," + + "\"href\" : \"myTestHref\"," + + "\"schema\" : \"myTestSchema\"}," + + "{ \"uuid\" : \"bbbb\"," + + "\"display_name\" : \"myTestName2\"," + + "\"href\" : \"myTestHref2\"," + + "\"schema\" : \"myTestSchema2\"}]," + + "\"result_count\": 2}"; + + private static NiciraNvpApi buildApi(final CloseableHttpClient httpClient) { + return NiciraNvpApi.create() + .host("localhost") + .username("admin") + .password("adminpassword") + .httpClient(httpClient) + .build(); + } + + @Test + @SuppressWarnings("unchecked") + public void testFindSecurityProfile() throws Exception { + final CloseableHttpResponse response = mock(CloseableHttpResponse.class); + when(response.getStatusLine()).thenReturn(HTTP_200_REPSONSE); + when(response.getEntity()).thenReturn(new StringEntity(SEC_PROFILE_LIST_JSON_RESPONSE)); + final CloseableHttpClient httpClient = spy(HttpClientHelper.createHttpClient(2)); + doReturn(response).when(httpClient).execute(any(HttpHost.class), any(HttpRequest.class), any(HttpClientContext.class)); + final NiciraNvpApi api = buildApi(httpClient); + + final List actualProfiles = api.findSecurityProfile(); + + assertThat("Wrong number of results", actualProfiles, hasSize(2)); + assertThat("Wrong Uuid in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("uuid", equalTo(UUID)), + hasProperty("uuid", equalTo(UUID2)))); + assertThat("Wrong HREF in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("href", equalTo(HREF)), + hasProperty("href", equalTo(HREF2)))); + assertThat("Wrong Schema in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("schema", equalTo(SCHEMA)), + hasProperty("schema", equalTo(SCHEMA2)))); + verify(response, times(1)).close(); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestMethodMatcher.aMethod("GET"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestQueryMatcher.aQuery("fields=*"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestPathMatcher.aPath(NiciraConstants.SEC_PROFILE_URI_PREFIX), any(HttpClientContext.class)); + } + + @Test + @SuppressWarnings("unchecked") + public void testFindSecurityProfileByUuid() throws Exception { + final CloseableHttpResponse response = mock(CloseableHttpResponse.class); + when(response.getStatusLine()).thenReturn(HTTP_200_REPSONSE); + when(response.getEntity()).thenReturn(new StringEntity(SEC_PROFILE_LIST_JSON_RESPONSE)); + final CloseableHttpClient httpClient = spy(HttpClientHelper.createHttpClient(2)); + doReturn(response).when(httpClient).execute(any(HttpHost.class), any(HttpRequest.class), any(HttpClientContext.class)); + final NiciraNvpApi api = buildApi(httpClient); + + final List actualProfiles = api.findSecurityProfile(UUID); + + assertThat("Wrong number of results", actualProfiles, hasSize(2)); + assertThat("Wrong Uuid in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("uuid", equalTo(UUID)), + hasProperty("uuid", equalTo(UUID2)))); + assertThat("Wrong HREF in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("href", equalTo(HREF)), + hasProperty("href", equalTo(HREF2)))); + assertThat("Wrong Schema in the newly created SecurityProfile", actualProfiles, Matchers. contains( + hasProperty("schema", equalTo(SCHEMA)), + hasProperty("schema", equalTo(SCHEMA2)))); + verify(response, times(1)).close(); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestMethodMatcher.aMethod("GET"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestQueryMatcher.aQueryThatContains("uuid=" + UUID), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestQueryMatcher.aQueryThatContains("fields=*"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestPathMatcher.aPath(NiciraConstants.SEC_PROFILE_URI_PREFIX), any(HttpClientContext.class)); + } + + @Test + public void testCreateSecurityProfile() throws Exception { + final CloseableHttpResponse response = mock(CloseableHttpResponse.class); + when(response.getStatusLine()).thenReturn(HTTP_201_REPSONSE); + when(response.getEntity()).thenReturn(new StringEntity(SEC_PROFILE_JSON_RESPONSE)); + final CloseableHttpClient httpClient = spy(HttpClientHelper.createHttpClient(2)); + doReturn(response).when(httpClient).execute(any(HttpHost.class), any(HttpRequest.class), any(HttpClientContext.class)); + final NiciraNvpApi api = buildApi(httpClient); + + final SecurityProfile actualSecProfile = api.createSecurityProfile(new SecurityProfile()); + + assertThat("Wrong Uuid in the newly created SecurityProfile", actualSecProfile, hasProperty("uuid", equalTo(UUID))); + assertThat("Wrong Href in the newly created SecurityProfile", actualSecProfile, hasProperty("href", equalTo(HREF))); + assertThat("Wrong Schema in the newly created SecurityProfile", actualSecProfile, hasProperty("schema", equalTo(SCHEMA))); + verify(response, times(1)).close(); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestMethodMatcher.aMethod("POST"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestPathMatcher.aPath(NiciraConstants.SEC_PROFILE_URI_PREFIX), any(HttpClientContext.class)); + } + + @Test + public void testUpdateSecurityProfile() throws Exception { + final CloseableHttpResponse response = mock(CloseableHttpResponse.class); + when(response.getStatusLine()).thenReturn(HTTP_201_REPSONSE); + when(response.getEntity()).thenReturn(new StringEntity(SEC_PROFILE_JSON_RESPONSE)); + final CloseableHttpClient httpClient = spy(HttpClientHelper.createHttpClient(2)); + doReturn(response).when(httpClient).execute(any(HttpHost.class), any(HttpRequest.class), any(HttpClientContext.class)); + final NiciraNvpApi api = buildApi(httpClient); + + api.updateSecurityProfile(new SecurityProfile(), UUID); + + verify(response, times(1)).close(); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestMethodMatcher.aMethod("PUT"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestPathMatcher.aPath(NiciraConstants.SEC_PROFILE_URI_PREFIX + "/" + UUID), any(HttpClientContext.class)); + } + + @Test + public void testDeleteSecurityProfile() throws Exception { + final CloseableHttpResponse response = mock(CloseableHttpResponse.class); + when(response.getStatusLine()).thenReturn(HTTP_201_REPSONSE); + when(response.getEntity()).thenReturn(new StringEntity(SEC_PROFILE_JSON_RESPONSE)); + final CloseableHttpClient httpClient = spy(HttpClientHelper.createHttpClient(2)); + doReturn(response).when(httpClient).execute(any(HttpHost.class), any(HttpRequest.class), any(HttpClientContext.class)); + final NiciraNvpApi api = buildApi(httpClient); + + api.deleteSecurityProfile(UUID); + + verify(response, times(1)).close(); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestMethodMatcher.aMethod("DELETE"), any(HttpClientContext.class)); + verify(httpClient).execute(any(HttpHost.class), HttpUriRequestPathMatcher.aPath(NiciraConstants.SEC_PROFILE_URI_PREFIX + "/" + UUID), any(HttpClientContext.class)); + } + +} diff --git a/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraRestClientTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraRestClientTest.java new file mode 100644 index 00000000000..7fcab8001bb --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraRestClientTest.java @@ -0,0 +1,172 @@ +// +// 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.nicira; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.isEmptyOrNullString; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.sameInstance; +import static org.junit.Assert.fail; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; +import static org.powermock.api.mockito.PowerMockito.spy; +import static org.powermock.api.mockito.PowerMockito.verifyPrivate; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.http.HttpHost; +import org.apache.http.ProtocolVersion; +import org.apache.http.StatusLine; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.message.BasicStatusLine; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; + +import com.cloud.utils.rest.CloudstackRESTException; +import com.cloud.utils.rest.HttpMethods; +import com.cloud.utils.rest.HttpRequestMatcher; +import com.cloud.utils.rest.HttpUriRequestBuilder; + +@RunWith(PowerMockRunner.class) +@PrepareForTest(NiciraRestClient.class) +public class NiciraRestClientTest { + + private static final int HTTPS_PORT = 443; + + private static final String HTTPS = "HTTPS"; + private static final String LOGIN_PATH = "/login"; + private static final String LOCALHOST = "localhost"; + private static final String ADMIN = "admin"; + private static final String ADMIN_PASSWORD = "adminpassword"; + + private static final HttpHost HTTP_HOST = new HttpHost(LOCALHOST, HTTPS_PORT, HTTPS); + + private static final StatusLine HTTP_200_STATUSLINE = new BasicStatusLine(new ProtocolVersion(HTTPS, 1, 1), 200, "OK"); + private static final StatusLine HTTP_401_STATUSLINE = new BasicStatusLine(new ProtocolVersion(HTTPS, 1, 1), 401, "Unauthorized"); + + private static final Map loginParameters = new HashMap(); + private static HttpUriRequest request; + private static HttpUriRequest loginRequest; + private final CloseableHttpClient httpClient = mock(CloseableHttpClient.class); + private final CloseableHttpResponse mockResponse = mock(CloseableHttpResponse.class); + private HttpClientContext httpClientContext; + private NiciraRestClient client; + + @BeforeClass + public static void setupClass() { + loginParameters.put("username", ADMIN); + loginParameters.put("password", ADMIN_PASSWORD); + request = HttpUriRequestBuilder.create() + .method(HttpMethods.GET) + .path("/path") + .build(); + loginRequest = HttpUriRequestBuilder.create() + .method(HttpMethods.POST) + .methodParameters(loginParameters) + .path(LOGIN_PATH) + .build(); + } + + @Before + public void setup() { + httpClientContext = HttpClientContext.create(); + client = spy(NiciraRestClient.create() + .client(httpClient) + .clientContext(httpClientContext) + .hostname(LOCALHOST) + .username(ADMIN) + .password(ADMIN_PASSWORD) + .loginUrl(LOGIN_PATH) + .executionLimit(5) + .build()); + } + + @Test + public void testExecuteSuccessAtFirstAttempt() throws Exception { + when(mockResponse.getStatusLine()).thenReturn(HTTP_200_STATUSLINE); + when(httpClient.execute(eq(HTTP_HOST), eq(request), eq(httpClientContext))).thenReturn(mockResponse); + + final CloseableHttpResponse response = client.execute(request); + + assertThat(response, notNullValue()); + assertThat(response, sameInstance(mockResponse)); + verifyPrivate(client).invoke("execute", request, 0); + } + + @Test + public void testExecuteUnauthorizedThenSuccess() throws Exception { + when(mockResponse.getStatusLine()) + .thenReturn(HTTP_401_STATUSLINE) + .thenReturn(HTTP_200_STATUSLINE) + .thenReturn(HTTP_200_STATUSLINE); + when(httpClient.execute(eq(HTTP_HOST), HttpRequestMatcher.eq(request), eq(httpClientContext))) + .thenReturn(mockResponse) + .thenReturn(mockResponse); + when(httpClient.execute(eq(HTTP_HOST), HttpRequestMatcher.eq(loginRequest), eq(httpClientContext))) + .thenReturn(mockResponse); + + final CloseableHttpResponse response = client.execute(request); + + assertThat(response, notNullValue()); + assertThat(response, sameInstance(mockResponse)); + verifyPrivate(client).invoke("execute", HttpRequestMatcher.eq(request), eq(0)); + verifyPrivate(client).invoke("execute", HttpRequestMatcher.eq(loginRequest), eq(401)); + verifyPrivate(client).invoke("execute", HttpRequestMatcher.eq(request), eq(200)); + } + + @Test + public void testExecuteTwoConsecutiveUnauthorizedExecutions() throws Exception { + when(mockResponse.getStatusLine()) + .thenReturn(HTTP_401_STATUSLINE) + .thenReturn(HTTP_401_STATUSLINE); + when(httpClient.execute(eq(HTTP_HOST), HttpRequestMatcher.eq(request), eq(httpClientContext))) + .thenReturn(mockResponse); + when(httpClient.execute(eq(HTTP_HOST), HttpRequestMatcher.eq(loginRequest), eq(httpClientContext))) + .thenReturn(mockResponse); + final NiciraRestClient client = spy(NiciraRestClient.create() + .client(httpClient) + .clientContext(httpClientContext) + .hostname(LOCALHOST) + .username(ADMIN) + .password(ADMIN_PASSWORD) + .loginUrl(LOGIN_PATH) + .executionLimit(2) + .build()); + + try { + client.execute(request); + fail("Expected CloudstackRESTException exception"); + } catch (final CloudstackRESTException e) { + assertThat(e.getMessage(), not(isEmptyOrNullString())); + verifyPrivate(client).invoke("execute", HttpRequestMatcher.eq(request), eq(0)); + verifyPrivate(client).invoke("execute", HttpRequestMatcher.eq(loginRequest), eq(401)); + } + } +} diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraTagTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraTagTest.java similarity index 100% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraTagTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/NiciraTagTest.java diff --git a/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/RoutingConfigAdapterTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/RoutingConfigAdapterTest.java new file mode 100644 index 00000000000..44269b23544 --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/nicira/RoutingConfigAdapterTest.java @@ -0,0 +1,57 @@ +// +// 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.nicira; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.notNullValue; + +import org.junit.Test; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; + +public class RoutingConfigAdapterTest { + private final Gson gson = new GsonBuilder() + .registerTypeAdapter(RoutingConfig.class, new RoutingConfigAdapter()) + .create(); + + @Test(expected = JsonParseException.class) + public void testRoutingConfigAdapterNoType() { + gson.fromJson("{}", RoutingConfig.class); + } + + @Test(expected = JsonParseException.class) + public void testRoutingConfigAdapterWrongType() { + gson.fromJson("{type : \"WrongType\"}", RoutingConfig.class); + } + + @Test() + public void testRoutingConfigAdapter() throws Exception { + final String jsonString = "{type : \"SingleDefaultRouteImplicitRoutingConfig\"}"; + + final SingleDefaultRouteImplicitRoutingConfig object = gson.fromJson(jsonString, SingleDefaultRouteImplicitRoutingConfig.class); + + assertThat(object, notNullValue()); + assertThat(object, instanceOf(SingleDefaultRouteImplicitRoutingConfig.class)); + } + +} diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java similarity index 96% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java index 7fe6287455d..beb40591305 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpRequestWrapperTest.java @@ -45,7 +45,6 @@ import com.cloud.network.nicira.LogicalRouterPort; import com.cloud.network.nicira.LogicalSwitch; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.nicira.VifAttachment; public class NiciraNvpRequestWrapperTest { @@ -144,12 +143,8 @@ public class NiciraNvpRequestWrapperTest { final List listPorts = new ArrayList(); listPorts.add(port1); - final NiciraNvpList ports = new NiciraNvpList(); - ports.setResults(listPorts); - ports.setResultCount(1); - final String logicalRouterUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; - final String l3GatewayServiceUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; + final String l3GatewayServiceUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; final List publicCidrs = new ArrayList(); publicCidrs.add("10.1.1.0/24"); @@ -158,7 +153,7 @@ public class NiciraNvpRequestWrapperTest { when(niciraNvpResource.getNiciraNvpApi()).thenReturn(niciraNvpApi); try { - when(niciraNvpApi.findLogicalRouterPortByGatewayServiceUuid(command.getLogicalRouterUuid(), command.getL3GatewayServiceUuid())).thenReturn(ports); + when(niciraNvpApi.findLogicalRouterPortByGatewayServiceUuid(command.getLogicalRouterUuid(), command.getL3GatewayServiceUuid())).thenReturn(listPorts); doNothing().when(niciraNvpApi).updateLogicalRouterPort(command.getLogicalRouterUuid(), port1); } catch (final NiciraNvpApiException e) { fail(e.getMessage()); @@ -177,7 +172,7 @@ public class NiciraNvpRequestWrapperTest { final NiciraNvpApi niciraNvpApi = Mockito.mock(NiciraNvpApi.class); final String logicalSwitchUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; - final String logicalSwitchPortUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; + final String logicalSwitchPortUuid = "d2e05a9e-7120-4487-a5fc-414ab36d9345"; final DeleteLogicalSwitchPortCommand command = new DeleteLogicalSwitchPortCommand(logicalSwitchUuid, logicalSwitchPortUuid); diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpResourceTest.java similarity index 78% rename from plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java rename to plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpResourceTest.java index ddf2993fdb8..c0dedd28445 100644 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/resource/NiciraNvpResourceTest.java +++ b/plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpResourceTest.java @@ -83,7 +83,6 @@ import com.cloud.network.nicira.LogicalSwitchPort; import com.cloud.network.nicira.NatRule; import com.cloud.network.nicira.NiciraNvpApi; import com.cloud.network.nicira.NiciraNvpApiException; -import com.cloud.network.nicira.NiciraNvpList; import com.cloud.network.nicira.SourceNatRule; import com.cloud.network.utils.CommandRetryUtility; @@ -95,10 +94,10 @@ public class NiciraNvpResourceTest { private CommandRetryUtility retryUtility; @Before - public void setUp() throws ConfigurationException { + public void setUp() { resource = new NiciraNvpResource() { @Override - protected NiciraNvpApi createNiciraNvpApi() { + protected NiciraNvpApi createNiciraNvpApi(final String host, final String username, final String password) { return nvpApi; } }; @@ -120,20 +119,6 @@ public class NiciraNvpResourceTest { resource.configure("NiciraNvpResource", Collections. emptyMap()); } - @Test - public void resourceConfigure() throws ConfigurationException { - resource.configure("NiciraNvpResource", parameters); - - verify(nvpApi).setAdminCredentials("adminuser", "adminpass"); - verify(nvpApi).setControllerAddress("127.0.0.1"); - assertTrue("Incorrect resource name", "nvptestdevice".equals(resource.getName())); - - /* Pretty lame test, but here to assure this plugin fails - * if the type name ever changes from L2Networking - */ - assertTrue("Incorrect resource type", resource.getType() == Host.Type.L2Networking); - } - @Test public void testInitialization() throws ConfigurationException { resource.configure("NiciraNvpResource", parameters); @@ -189,10 +174,10 @@ public class NiciraNvpResourceTest { final LogicalSwitch ls = mock(LogicalSwitch.class); when(ls.getUuid()).thenReturn("cccc").thenReturn("cccc"); - when(nvpApi.createLogicalSwitch((LogicalSwitch)any())).thenThrow(new NiciraNvpApiException()).thenThrow(new NiciraNvpApiException()).thenReturn(ls); + when(nvpApi.createLogicalSwitch((LogicalSwitch) any())).thenThrow(new NiciraNvpApiException()).thenThrow(new NiciraNvpApiException()).thenReturn(ls); - final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String)parameters.get("guid"), "stt", "loigicalswitch", "owner"); - final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer)resource.executeRequest(clsc); + final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String) parameters.get("guid"), "stt", "loigicalswitch", "owner"); + final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer) resource.executeRequest(clsc); assertTrue(clsa.getResult()); } @@ -202,10 +187,10 @@ public class NiciraNvpResourceTest { final LogicalSwitch ls = mock(LogicalSwitch.class); when(ls.getUuid()).thenReturn("cccc").thenReturn("cccc"); - when(nvpApi.createLogicalSwitch((LogicalSwitch)any())).thenReturn(ls); + when(nvpApi.createLogicalSwitch((LogicalSwitch) any())).thenReturn(ls); - final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String)parameters.get("guid"), "stt", "loigicalswitch", "owner"); - final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer)resource.executeRequest(clsc); + final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String) parameters.get("guid"), "stt", "loigicalswitch", "owner"); + final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer) resource.executeRequest(clsc); assertTrue(clsa.getResult()); assertTrue("cccc".equals(clsa.getLogicalSwitchUuid())); } @@ -216,19 +201,19 @@ public class NiciraNvpResourceTest { final LogicalSwitch ls = mock(LogicalSwitch.class); when(ls.getUuid()).thenReturn("cccc").thenReturn("cccc"); - when(nvpApi.createLogicalSwitch((LogicalSwitch)any())).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalSwitch((LogicalSwitch) any())).thenThrow(new NiciraNvpApiException()); - final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String)parameters.get("guid"), "stt", "loigicalswitch", "owner"); - final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer)resource.executeRequest(clsc); + final CreateLogicalSwitchCommand clsc = new CreateLogicalSwitchCommand((String) parameters.get("guid"), "stt", "loigicalswitch", "owner"); + final CreateLogicalSwitchAnswer clsa = (CreateLogicalSwitchAnswer) resource.executeRequest(clsc); assertFalse(clsa.getResult()); } @Test - public void testDeleteLogicalSwitch() throws ConfigurationException, NiciraNvpApiException { + public void testDeleteLogicalSwitch() throws ConfigurationException { resource.configure("NiciraNvpResource", parameters); final DeleteLogicalSwitchCommand dlsc = new DeleteLogicalSwitchCommand("cccc"); - final DeleteLogicalSwitchAnswer dlsa = (DeleteLogicalSwitchAnswer)resource.executeRequest(dlsc); + final DeleteLogicalSwitchAnswer dlsa = (DeleteLogicalSwitchAnswer) resource.executeRequest(dlsc); assertTrue(dlsa.getResult()); } @@ -236,10 +221,10 @@ public class NiciraNvpResourceTest { public void testDeleteLogicalSwitchApiException() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalSwitch((String)any()); + doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalSwitch((String) any()); final DeleteLogicalSwitchCommand dlsc = new DeleteLogicalSwitchCommand("cccc"); - final DeleteLogicalSwitchAnswer dlsa = (DeleteLogicalSwitchAnswer)resource.executeRequest(dlsc); + final DeleteLogicalSwitchAnswer dlsa = (DeleteLogicalSwitchAnswer) resource.executeRequest(dlsc); assertFalse(dlsa.getResult()); } @@ -249,10 +234,10 @@ public class NiciraNvpResourceTest { final LogicalSwitchPort lsp = mock(LogicalSwitchPort.class); when(lsp.getUuid()).thenReturn("eeee"); - when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort)any())).thenReturn(lsp); + when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort) any())).thenReturn(lsp); final CreateLogicalSwitchPortCommand clspc = new CreateLogicalSwitchPortCommand("cccc", "dddd", "owner", "nicname"); - final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer)resource.executeRequest(clspc); + final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer) resource.executeRequest(clspc); assertTrue(clspa.getResult()); assertTrue("eeee".equals(clspa.getLogicalSwitchPortUuid())); @@ -264,10 +249,10 @@ public class NiciraNvpResourceTest { final LogicalSwitchPort lsp = mock(LogicalSwitchPort.class); when(lsp.getUuid()).thenReturn("eeee"); - when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort)any())).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort) any())).thenThrow(new NiciraNvpApiException()); final CreateLogicalSwitchPortCommand clspc = new CreateLogicalSwitchPortCommand("cccc", "dddd", "owner", "nicname"); - final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer)resource.executeRequest(clspc); + final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer) resource.executeRequest(clspc); assertFalse(clspa.getResult()); } @@ -277,21 +262,21 @@ public class NiciraNvpResourceTest { final LogicalSwitchPort lsp = mock(LogicalSwitchPort.class); when(lsp.getUuid()).thenReturn("eeee"); - when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort)any())).thenReturn(lsp); - doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalSwitchPortAttachment((String)any(), (String)any(), (Attachment)any()); + when(nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort) any())).thenReturn(lsp); + doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalSwitchPortAttachment((String) any(), (String) any(), (Attachment) any()); final CreateLogicalSwitchPortCommand clspc = new CreateLogicalSwitchPortCommand("cccc", "dddd", "owner", "nicname"); - final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer)resource.executeRequest(clspc); + final CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer) resource.executeRequest(clspc); assertFalse(clspa.getResult()); - verify(nvpApi, atLeastOnce()).deleteLogicalSwitchPort((String)any(), (String)any()); + verify(nvpApi, atLeastOnce()).deleteLogicalSwitchPort((String) any(), (String) any()); } @Test public void testDeleteLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalSwitchPort((String)any(), (String)any()); - final DeleteLogicalSwitchPortAnswer dlspa = (DeleteLogicalSwitchPortAnswer)resource.executeRequest(new DeleteLogicalSwitchPortCommand("aaaa", "bbbb")); + doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalSwitchPort((String) any(), (String) any()); + final DeleteLogicalSwitchPortAnswer dlspa = (DeleteLogicalSwitchPortAnswer) resource.executeRequest(new DeleteLogicalSwitchPortCommand("aaaa", "bbbb")); assertFalse(dlspa.getResult()); } @@ -299,9 +284,9 @@ public class NiciraNvpResourceTest { public void testUpdateLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalSwitchPortAttachment((String)any(), (String)any(), (Attachment)any()); + doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalSwitchPortAttachment((String) any(), (String) any(), (Attachment) any()); final UpdateLogicalSwitchPortAnswer dlspa = - (UpdateLogicalSwitchPortAnswer)resource.executeRequest(new UpdateLogicalSwitchPortCommand("aaaa", "bbbb", "cccc", "owner", "nicname")); + (UpdateLogicalSwitchPortAnswer) resource.executeRequest(new UpdateLogicalSwitchPortCommand("aaaa", "bbbb", "cccc", "owner", "nicname")); assertFalse(dlspa.getResult()); } @@ -309,13 +294,10 @@ public class NiciraNvpResourceTest { public void testFindLogicalSwitchPort() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - @SuppressWarnings("unchecked") - final - NiciraNvpList lspl = mock(NiciraNvpList.class); - when(lspl.getResultCount()).thenReturn(1); + final List lspl = Arrays.asList(new LogicalSwitchPort()); when(nvpApi.findLogicalSwitchPortsByUuid("aaaa", "bbbb")).thenReturn(lspl); - final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer)resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); + final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer) resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); assertTrue(flspa.getResult()); } @@ -324,12 +306,10 @@ public class NiciraNvpResourceTest { resource.configure("NiciraNvpResource", parameters); @SuppressWarnings("unchecked") - final - NiciraNvpList lspl = mock(NiciraNvpList.class); - when(lspl.getResultCount()).thenReturn(0); + final List lspl = Collections.EMPTY_LIST; when(nvpApi.findLogicalSwitchPortsByUuid("aaaa", "bbbb")).thenReturn(lspl); - final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer)resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); + final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer) resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); assertFalse(flspa.getResult()); } @@ -339,7 +319,7 @@ public class NiciraNvpResourceTest { when(nvpApi.findLogicalSwitchPortsByUuid("aaaa", "bbbb")).thenThrow(new NiciraNvpApiException()); - final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer)resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); + final FindLogicalSwitchPortAnswer flspa = (FindLogicalSwitchPortAnswer) resource.executeRequest(new FindLogicalSwitchPortCommand("aaaa", "bbbb")); assertFalse(flspa.getResult()); } @@ -353,24 +333,24 @@ public class NiciraNvpResourceTest { when(lrc.getUuid()).thenReturn("ccccc"); when(lrp.getUuid()).thenReturn("ddddd").thenReturn("eeeee"); when(lsp.getUuid()).thenReturn("fffff"); - when(nvpApi.createLogicalRouter((LogicalRouter)any())).thenReturn(lrc); - when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort)any())).thenReturn(lrp); - when(nvpApi.createLogicalSwitchPort(eq("bbbbb"), (LogicalSwitchPort)any())).thenReturn(lsp); + when(nvpApi.createLogicalRouter((LogicalRouter) any())).thenReturn(lrc); + when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort) any())).thenReturn(lrp); + when(nvpApi.createLogicalSwitchPort(eq("bbbbb"), (LogicalSwitchPort) any())).thenReturn(lsp); final CreateLogicalRouterCommand clrc = new CreateLogicalRouterCommand("aaaaa", 50, "bbbbb", "lrouter", "publiccidr", "nexthop", "internalcidr", "owner"); - final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer)resource.executeRequest(clrc); + final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer) resource.executeRequest(clrc); assertTrue(clra.getResult()); assertTrue("ccccc".equals(clra.getLogicalRouterUuid())); - verify(nvpApi, atLeast(1)).createLogicalRouterNatRule((String)any(), (NatRule)any()); + verify(nvpApi, atLeast(1)).createLogicalRouterNatRule((String) any(), (NatRule) any()); } @Test public void testCreateLogicalRouterApiException() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - when(nvpApi.createLogicalRouter((LogicalRouter)any())).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalRouter((LogicalRouter) any())).thenThrow(new NiciraNvpApiException()); final CreateLogicalRouterCommand clrc = new CreateLogicalRouterCommand("aaaaa", 50, "bbbbb", "lrouter", "publiccidr", "nexthop", "internalcidr", "owner"); - final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer)resource.executeRequest(clrc); + final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer) resource.executeRequest(clrc); assertFalse(clra.getResult()); } @@ -381,10 +361,10 @@ public class NiciraNvpResourceTest { final LogicalRouter lrc = mock(LogicalRouter.class); when(lrc.getUuid()).thenReturn("ccccc"); - when(nvpApi.createLogicalRouter((LogicalRouter)any())).thenReturn(lrc); - when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort)any())).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalRouter((LogicalRouter) any())).thenReturn(lrc); + when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort) any())).thenThrow(new NiciraNvpApiException()); final CreateLogicalRouterCommand clrc = new CreateLogicalRouterCommand("aaaaa", 50, "bbbbb", "lrouter", "publiccidr", "nexthop", "internalcidr", "owner"); - final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer)resource.executeRequest(clrc); + final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer) resource.executeRequest(clrc); assertFalse(clra.getResult()); verify(nvpApi, atLeast(1)).deleteLogicalRouter(eq("ccccc")); @@ -400,12 +380,12 @@ public class NiciraNvpResourceTest { when(lrc.getUuid()).thenReturn("ccccc"); when(lrp.getUuid()).thenReturn("ddddd").thenReturn("eeeee"); when(lsp.getUuid()).thenReturn("fffff"); - when(nvpApi.createLogicalRouter((LogicalRouter)any())).thenReturn(lrc); - when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort)any())).thenReturn(lrp); - when(nvpApi.createLogicalSwitchPort(eq("bbbbb"), (LogicalSwitchPort)any())).thenReturn(lsp); - when(nvpApi.createLogicalRouterNatRule((String)any(), (NatRule)any())).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalRouter((LogicalRouter) any())).thenReturn(lrc); + when(nvpApi.createLogicalRouterPort(eq("ccccc"), (LogicalRouterPort) any())).thenReturn(lrp); + when(nvpApi.createLogicalSwitchPort(eq("bbbbb"), (LogicalSwitchPort) any())).thenReturn(lsp); + when(nvpApi.createLogicalRouterNatRule((String) any(), (NatRule) any())).thenThrow(new NiciraNvpApiException()); final CreateLogicalRouterCommand clrc = new CreateLogicalRouterCommand("aaaaa", 50, "bbbbb", "lrouter", "publiccidr", "nexthop", "internalcidr", "owner"); - final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer)resource.executeRequest(clrc); + final CreateLogicalRouterAnswer clra = (CreateLogicalRouterAnswer) resource.executeRequest(clrc); assertFalse(clra.getResult()); verify(nvpApi, atLeast(1)).deleteLogicalRouter(eq("ccccc")); @@ -417,7 +397,7 @@ public class NiciraNvpResourceTest { resource.configure("NiciraNvpResource", parameters); doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalRouter(eq("aaaaa")); - final DeleteLogicalRouterAnswer dlspa = (DeleteLogicalRouterAnswer)resource.executeRequest(new DeleteLogicalRouterCommand("aaaaa")); + final DeleteLogicalRouterAnswer dlspa = (DeleteLogicalRouterAnswer) resource.executeRequest(new DeleteLogicalRouterCommand("aaaaa")); assertFalse(dlspa.getResult()); } @@ -427,15 +407,14 @@ public class NiciraNvpResourceTest { final ConfigurePublicIpsOnLogicalRouterCommand cmd = mock(ConfigurePublicIpsOnLogicalRouterCommand.class); @SuppressWarnings("unchecked") - final - NiciraNvpList list = mock(NiciraNvpList.class); + final List list = Collections.EMPTY_LIST; when(cmd.getLogicalRouterUuid()).thenReturn("aaaaa"); when(cmd.getL3GatewayServiceUuid()).thenReturn("bbbbb"); when(nvpApi.findLogicalRouterPortByGatewayServiceUuid("aaaaa", "bbbbb")).thenReturn(list); - doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalRouterPort((String)any(), (LogicalRouterPort)any()); + doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalRouterPort((String) any(), (LogicalRouterPort) any()); - final ConfigurePublicIpsOnLogicalRouterAnswer answer = (ConfigurePublicIpsOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePublicIpsOnLogicalRouterAnswer answer = (ConfigurePublicIpsOnLogicalRouterAnswer) resource.executeRequest(cmd); assertFalse(answer.getResult()); } @@ -450,7 +429,7 @@ public class NiciraNvpResourceTest { when(cmd.getL3GatewayServiceUuid()).thenReturn("bbbbb"); when(nvpApi.findLogicalRouterPortByGatewayServiceUuid("aaaaa", "bbbbb")).thenThrow(new NiciraNvpApiException("retry 1")).thenThrow(new NiciraNvpApiException("retry 2")); - final ConfigurePublicIpsOnLogicalRouterAnswer answer = (ConfigurePublicIpsOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePublicIpsOnLogicalRouterAnswer answer = (ConfigurePublicIpsOnLogicalRouterAnswer) resource.executeRequest(cmd); assertFalse(answer.getResult()); } @@ -458,9 +437,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigureStaticNatRulesOnLogicalRouter() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -473,27 +451,26 @@ public class NiciraNvpResourceTest { // Mock the api find call @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); + final List storedRules = Collections.EMPTY_LIST; when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); // Mock the api create calls final NatRule[] rulepair = resource.generateStaticNatRulePair("10.10.10.10", "11.11.11.11"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); - final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, atLeast(2)).createLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final NatRule rule = (NatRule)argument; - if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule)rule).getToDestinationIpAddress().equals("10.10.10.10")) { + final NatRule rule = (NatRule) argument; + if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule) rule).getToDestinationIpAddress().equals("10.10.10.10")) { return true; } - if (rule.getType().equals("SourceNatRule") && ((SourceNatRule)rule).getToSourceIpAddressMin().equals("11.11.11.11")) { + if (rule.getType().equals("SourceNatRule") && ((SourceNatRule) rule).getToSourceIpAddressMin().equals("11.11.11.11")) { return true; } return false; @@ -504,9 +481,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigureStaticNatRulesOnLogicalRouterExistingRules() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -521,27 +497,23 @@ public class NiciraNvpResourceTest { final NatRule[] rulepair = resource.generateStaticNatRulePair("10.10.10.10", "11.11.11.11"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); // Mock the api find call - @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(2); - when(storedRules.getResults()).thenReturn(Arrays.asList(rulepair)); + final List storedRules = Arrays.asList(rulepair); when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, never()).createLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final NatRule rule = (NatRule)argument; - if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule)rule).getToDestinationIpAddress().equals("10.10.10.10")) { + final NatRule rule = (NatRule) argument; + if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule) rule).getToDestinationIpAddress().equals("10.10.10.10")) { return true; } - if (rule.getType().equals("SourceNatRule") && ((SourceNatRule)rule).getToSourceIpAddressMin().equals("11.11.11.11")) { + if (rule.getType().equals("SourceNatRule") && ((SourceNatRule) rule).getToSourceIpAddressMin().equals("11.11.11.11")) { return true; } return false; @@ -552,9 +524,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigureStaticNatRulesOnLogicalRouterRemoveRules() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -571,23 +542,19 @@ public class NiciraNvpResourceTest { final UUID rule1Uuid = UUID.randomUUID(); rulepair[0].setUuid(rule0Uuid); rulepair[1].setUuid(rule1Uuid); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); // Mock the api find call - @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(2); - when(storedRules.getResults()).thenReturn(Arrays.asList(rulepair)); + final List storedRules = Arrays.asList(rulepair); when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, atLeast(2)).deleteLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final UUID uuid = (UUID)argument; + final UUID uuid = (UUID) argument; if (rule0Uuid.equals(uuid) || rule1Uuid.equals(uuid)) { return true; } @@ -599,9 +566,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigureStaticNatRulesOnLogicalRouterRollback() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -616,16 +582,14 @@ public class NiciraNvpResourceTest { final NatRule[] rulepair = resource.generateStaticNatRulePair("10.10.10.10", "11.11.11.11"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenThrow(new NiciraNvpApiException()); // Mock the api find call @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(0); + final List storedRules = Collections.EMPTY_LIST; when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigureStaticNatRulesOnLogicalRouterAnswer a = (ConfigureStaticNatRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertFalse(a.getResult()); verify(nvpApi, atLeastOnce()).deleteLogicalRouterNatRule(eq("aaaaa"), eq(rulepair[0].getUuid())); @@ -634,9 +598,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigurePortForwardingRulesOnLogicalRouter() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -649,27 +612,26 @@ public class NiciraNvpResourceTest { // Mock the api find call @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); + final List storedRules = Collections.EMPTY_LIST; when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); // Mock the api create calls - final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {8080, 8080}, "11.11.11.11", new int[] {80, 80}, "tcp"); + final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 8080, 8080 }, "11.11.11.11", new int[] { 80, 80 }, "tcp"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); - final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, atLeast(2)).createLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final NatRule rule = (NatRule)argument; - if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule)rule).getToDestinationIpAddress().equals("10.10.10.10")) { + final NatRule rule = (NatRule) argument; + if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule) rule).getToDestinationIpAddress().equals("10.10.10.10")) { return true; } - if (rule.getType().equals("SourceNatRule") && ((SourceNatRule)rule).getToSourceIpAddressMin().equals("11.11.11.11")) { + if (rule.getType().equals("SourceNatRule") && ((SourceNatRule) rule).getToSourceIpAddressMin().equals("11.11.11.11")) { return true; } return false; @@ -680,9 +642,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigurePortForwardingRulesOnLogicalRouterExistingRules() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -694,30 +655,26 @@ public class NiciraNvpResourceTest { when(cmd.getLogicalRouterUuid()).thenReturn("aaaaa"); // Mock the api create calls - final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {8080, 8080}, "11.11.11.11", new int[] {80, 80}, "tcp"); + final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 8080, 8080 }, "11.11.11.11", new int[] { 80, 80 }, "tcp"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); // Mock the api find call - @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(2); - when(storedRules.getResults()).thenReturn(Arrays.asList(rulepair)); + final List storedRules = Arrays.asList(rulepair); when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, never()).createLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final NatRule rule = (NatRule)argument; - if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule)rule).getToDestinationIpAddress().equals("10.10.10.10")) { + final NatRule rule = (NatRule) argument; + if (rule.getType().equals("DestinationNatRule") && ((DestinationNatRule) rule).getToDestinationIpAddress().equals("10.10.10.10")) { return true; } - if (rule.getType().equals("SourceNatRule") && ((SourceNatRule)rule).getToSourceIpAddressMin().equals("11.11.11.11")) { + if (rule.getType().equals("SourceNatRule") && ((SourceNatRule) rule).getToSourceIpAddressMin().equals("11.11.11.11")) { return true; } return false; @@ -728,9 +685,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigurePortForwardingRulesOnLogicalRouterRemoveRules() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -742,28 +698,24 @@ public class NiciraNvpResourceTest { when(cmd.getLogicalRouterUuid()).thenReturn("aaaaa"); // Mock the api create calls - final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {8080, 8080}, "11.11.11.11", new int[] {80, 80}, "tcp"); + final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 8080, 8080 }, "11.11.11.11", new int[] { 80, 80 }, "tcp"); final UUID rule0Uuid = UUID.randomUUID(); final UUID rule1Uuid = UUID.randomUUID(); rulepair[0].setUuid(rule0Uuid); rulepair[1].setUuid(rule1Uuid); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); // Mock the api find call - @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(2); - when(storedRules.getResults()).thenReturn(Arrays.asList(rulepair)); + final List storedRules = Arrays.asList(rulepair); when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertTrue(a.getResult()); verify(nvpApi, atLeast(2)).deleteLogicalRouterNatRule(eq("aaaaa"), argThat(new ArgumentMatcher() { @Override public boolean matches(final Object argument) { - final UUID uuid = (UUID)argument; + final UUID uuid = (UUID) argument; if (rule0Uuid.equals(uuid) || rule1Uuid.equals(uuid)) { return true; } @@ -775,9 +727,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigurePortForwardingRulesOnLogicalRouterRollback() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -789,19 +740,17 @@ public class NiciraNvpResourceTest { when(cmd.getLogicalRouterUuid()).thenReturn("aaaaa"); // Mock the api create calls - final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {8080, 8080}, "11.11.11.11", new int[] {80, 80}, "tcp"); + final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 8080, 8080 }, "11.11.11.11", new int[] { 80, 80 }, "tcp"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenThrow(new NiciraNvpApiException()); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenThrow(new NiciraNvpApiException()); // Mock the api find call @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); - when(storedRules.getResultCount()).thenReturn(0); + final List storedRules = Collections.EMPTY_LIST; when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); - final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); assertFalse(a.getResult()); verify(nvpApi, atLeastOnce()).deleteLogicalRouterNatRule(eq("aaaaa"), eq(rulepair[0].getUuid())); @@ -810,9 +759,8 @@ public class NiciraNvpResourceTest { @Test public void testConfigurePortForwardingRulesOnLogicalRouterPortRange() throws ConfigurationException, NiciraNvpApiException { resource.configure("NiciraNvpResource", parameters); - /* StaticNat - * Outside IP: 11.11.11.11 - * Inside IP: 10.10.10.10 + /* + * StaticNat Outside IP: 11.11.11.11 Inside IP: 10.10.10.10 */ // Mock the command @@ -825,17 +773,16 @@ public class NiciraNvpResourceTest { // Mock the api find call @SuppressWarnings("unchecked") - final - NiciraNvpList storedRules = mock(NiciraNvpList.class); + final List storedRules = Collections.EMPTY_LIST; when(nvpApi.findNatRulesByLogicalRouterUuid("aaaaa")).thenReturn(storedRules); // Mock the api create calls - final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {80, 85}, "11.11.11.11", new int[] {80, 85}, "tcp"); + final NatRule[] rulepair = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 80, 85 }, "11.11.11.11", new int[] { 80, 85 }, "tcp"); rulepair[0].setUuid(UUID.randomUUID()); rulepair[1].setUuid(UUID.randomUUID()); - when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule)any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); + when(nvpApi.createLogicalRouterNatRule(eq("aaaaa"), (NatRule) any())).thenReturn(rulepair[0]).thenReturn(rulepair[1]); - final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer)resource.executeRequest(cmd); + final ConfigurePortForwardingRulesOnLogicalRouterAnswer a = (ConfigurePortForwardingRulesOnLogicalRouterAnswer) resource.executeRequest(cmd); // The expected result is false, Nicira does not support port ranges in DNAT assertFalse(a.getResult()); @@ -848,12 +795,12 @@ public class NiciraNvpResourceTest { assertTrue("DestinationNatRule".equals(rules[0].getType())); assertTrue("SourceNatRule".equals(rules[1].getType())); - final DestinationNatRule dnr = (DestinationNatRule)rules[0]; + final DestinationNatRule dnr = (DestinationNatRule) rules[0]; assertTrue(dnr.getToDestinationIpAddress().equals("10.10.10.10")); assertTrue(dnr.getToDestinationPort() == null); assertTrue(dnr.getMatch().getDestinationIpAddresses().equals("11.11.11.11")); - final SourceNatRule snr = (SourceNatRule)rules[1]; + final SourceNatRule snr = (SourceNatRule) rules[1]; assertTrue(snr.getToSourceIpAddressMin().equals("11.11.11.11") && snr.getToSourceIpAddressMax().equals("11.11.11.11")); assertTrue(snr.getToSourcePort() == null); assertTrue(snr.getMatch().getSourceIpAddresses().equals("10.10.10.10")); @@ -861,18 +808,18 @@ public class NiciraNvpResourceTest { @Test public void testGeneratePortForwardingRulePair() { - final NatRule[] rules = resource.generatePortForwardingRulePair("10.10.10.10", new int[] {8080, 8080}, "11.11.11.11", new int[] {80, 80}, "tcp"); + final NatRule[] rules = resource.generatePortForwardingRulePair("10.10.10.10", new int[] { 8080, 8080 }, "11.11.11.11", new int[] { 80, 80 }, "tcp"); assertTrue("DestinationNatRule".equals(rules[0].getType())); assertTrue("SourceNatRule".equals(rules[1].getType())); - final DestinationNatRule dnr = (DestinationNatRule)rules[0]; + final DestinationNatRule dnr = (DestinationNatRule) rules[0]; assertTrue(dnr.getToDestinationIpAddress().equals("10.10.10.10")); assertTrue(dnr.getToDestinationPort() == 8080); assertTrue(dnr.getMatch().getDestinationIpAddresses().equals("11.11.11.11")); assertTrue(dnr.getMatch().getDestinationPort() == 80); assertTrue(dnr.getMatch().getEthertype().equals("IPv4") && dnr.getMatch().getProtocol() == 6); - final SourceNatRule snr = (SourceNatRule)rules[1]; + final SourceNatRule snr = (SourceNatRule) rules[1]; assertTrue(snr.getToSourceIpAddressMin().equals("11.11.11.11") && snr.getToSourceIpAddressMax().equals("11.11.11.11")); assertTrue(snr.getToSourcePort() == 80); assertTrue(snr.getMatch().getSourceIpAddresses().equals("10.10.10.10")); diff --git a/plugins/network-elements/nicira-nvp/test/resources/config.properties b/plugins/network-elements/nicira-nvp/src/test/resources/config.properties similarity index 100% rename from plugins/network-elements/nicira-nvp/test/resources/config.properties rename to plugins/network-elements/nicira-nvp/src/test/resources/config.properties diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java b/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java deleted file mode 100644 index 1435cc5f517..00000000000 --- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java +++ /dev/null @@ -1,339 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -package com.cloud.network.nicira; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Matchers.any; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.HttpMethod; -import org.apache.commons.httpclient.HttpStatus; -import org.apache.commons.httpclient.NameValuePair; -import org.apache.commons.httpclient.methods.DeleteMethod; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.commons.httpclient.methods.PutMethod; -import org.apache.commons.httpclient.params.HttpClientParams; -import org.junit.Before; -import org.junit.Test; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - -import com.google.gson.Gson; -import com.google.gson.JsonParseException; -import com.cloud.utils.rest.RESTServiceConnector; -import com.cloud.utils.rest.RESTValidationStrategy; - -public class NiciraNvpApiTest { - protected static final String UUID = "aaaa"; - protected static final String UUID2 = "bbbb"; - protected static final String UUID_SEC_PROFILE_URI = NiciraNvpApi.SEC_PROFILE_URI_PREFIX + "/aaaa"; - protected static final String SCHEMA = "myTestSchema"; - protected static final String SCHEMA2 = "myTestSchema2"; - protected static final String HREF = "myTestHref"; - protected static final String HREF2 = "myTestHref2"; - protected static final String SEC_PROFILE_JSON_RESPONSE = - "{\"uuid\" : \"aaaa\"," - + "\"display_name\" : \"myTestName\"," - + "\"href\" : \"myTestHref\"," - + "\"schema\" : \"myTestSchema\"}"; - - protected static final String SEC_PROFILE_LIST_JSON_RESPONSE = "{\"results\" : [{\"uuid\" : \"aaaa\"," - + "\"display_name\" : \"myTestName\"," - + "\"href\" : \"myTestHref\"," - + "\"schema\" : \"myTestSchema\"}," - + "{ \"uuid\" : \"bbbb\"," - + "\"display_name\" : \"myTestName2\"," - + "\"href\" : \"myTestHref2\"," - + "\"schema\" : \"myTestSchema2\"}]," - + "\"result_count\": 2}"; - - NiciraNvpApi api; - HttpClient client = mock(HttpClient.class); - HttpMethod method; - String type; - String uri; - - @Before - public void setUp() { - final HttpClientParams hmp = mock(HttpClientParams.class); - when(client.getParams()).thenReturn(hmp); - api = new NiciraNvpApi(); - - api.restConnector = new RESTServiceConnector(new RESTValidationStrategy()) { - @Override - public HttpClient createHttpClient() { - return client; - } - - @Override - public HttpMethod createMethod(final String newType, final String newUri) { - type = newType; - uri = newUri; - return method; - } - }; - - api.setAdminCredentials("admin", "adminpass"); - api.setControllerAddress("localhost"); - } - - @Test - public void testFindSecurityProfile() throws NiciraNvpApiException, IOException { - // Prepare - method = mock(GetMethod.class); - when(method.getStatusCode()).thenReturn(HttpStatus.SC_OK); - when(method.getResponseBodyAsString()).thenReturn(SEC_PROFILE_LIST_JSON_RESPONSE); - final NameValuePair[] queryString = new NameValuePair[]{ - new NameValuePair("fields","*")}; - - // Execute - final NiciraNvpList actualProfiles = api.findSecurityProfile(); - - // Assert - verify(method, times(1)).releaseConnection(); - verify(method, times(1)).setQueryString(queryString); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - UUID, actualProfiles.getResults().get(0).getUuid()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - HREF, actualProfiles.getResults().get(0).getHref()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - SCHEMA, actualProfiles.getResults().get(0).getSchema()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - UUID2, actualProfiles.getResults().get(1).getUuid()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - HREF2, actualProfiles.getResults().get(1).getHref()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - SCHEMA2, actualProfiles.getResults().get(1).getSchema()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - 2, actualProfiles.getResultCount()); - assertEquals("Wrong URI for SecurityProfile creation REST service", - NiciraNvpApi.SEC_PROFILE_URI_PREFIX, uri); - assertEquals("Wrong URI for SecurityProfile creation REST service", - NiciraNvpApi.GET_METHOD_TYPE, type); - } - - @Test - public void testFindSecurityProfileByUuid() throws NiciraNvpApiException, IOException { - // Prepare - method = mock(GetMethod.class); - when(method.getStatusCode()).thenReturn(HttpStatus.SC_OK); - when(method.getResponseBodyAsString()).thenReturn(SEC_PROFILE_LIST_JSON_RESPONSE); - final NameValuePair[] queryString = new NameValuePair[]{ - new NameValuePair("uuid", UUID), - new NameValuePair("fields","*") - }; - final List queryStringNvps = new ArrayList<>(); - doAnswer(new Answer() { - - @Override - public Void answer(InvocationOnMock invocation) throws Throwable { - final NameValuePair[] arguments = (NameValuePair[]) invocation.getArguments()[0]; - queryStringNvps.addAll(Arrays.asList(arguments)); - return null; - }}).when(method).setQueryString(any(NameValuePair[].class)); - - // Execute - final NiciraNvpList actualProfiles = api.findSecurityProfile(UUID); - - // Assert - verify(method, times(1)).releaseConnection(); - assertTrue(queryStringNvps.containsAll(Arrays.asList(queryString))); - assertEquals(queryString.length, queryStringNvps.size()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - UUID, actualProfiles.getResults().get(0).getUuid()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - HREF, actualProfiles.getResults().get(0).getHref()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - SCHEMA, actualProfiles.getResults().get(0).getSchema()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - UUID2, actualProfiles.getResults().get(1).getUuid()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - HREF2, actualProfiles.getResults().get(1).getHref()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - SCHEMA2, actualProfiles.getResults().get(1).getSchema()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - 2, actualProfiles.getResultCount()); - assertEquals("Wrong URI for SecurityProfile creation REST service", - NiciraNvpApi.SEC_PROFILE_URI_PREFIX, uri); - assertEquals("Wrong HTTP method for SecurityProfile creation REST service", - NiciraNvpApi.GET_METHOD_TYPE, type); - } - - @Test - public void testCreateSecurityProfile() throws NiciraNvpApiException, IOException { - // Prepare - final SecurityProfile inputSecProfile = new SecurityProfile(); - method = mock(PostMethod.class); - when(method.getStatusCode()).thenReturn(HttpStatus.SC_CREATED); - when(method.getResponseBodyAsString()).thenReturn(SEC_PROFILE_JSON_RESPONSE); - - // Execute - final SecurityProfile actualSecProfile = api.createSecurityProfile(inputSecProfile); - - // Assert - verify(method, times(1)).releaseConnection(); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - UUID, actualSecProfile.getUuid()); - assertEquals("Wrong Uuid in the newly created SecurityProfile", - HREF, actualSecProfile.getHref()); - assertEquals("Wrong Schema in the newly created SecurityProfile", - SCHEMA, actualSecProfile.getSchema()); - assertEquals("Wrong URI for SecurityProfile creation REST service", - NiciraNvpApi.SEC_PROFILE_URI_PREFIX, uri); - assertEquals("Wrong HTTP method for SecurityProfile creation REST service", - NiciraNvpApi.POST_METHOD_TYPE, type); - } - - @Test - public void testUpdateSecurityProfile() throws NiciraNvpApiException, IOException { - // Prepare - final SecurityProfile inputSecProfile = new SecurityProfile(); - method = mock(PutMethod.class); - when(method.getStatusCode()).thenReturn(HttpStatus.SC_OK); - - // Execute - api.updateSecurityProfile(inputSecProfile, UUID); - - // Assert - verify(method, times(1)).releaseConnection(); - assertEquals("Wrong URI for SecurityProfile creation REST service", - UUID_SEC_PROFILE_URI, uri); - assertEquals("Wrong HTTP method for SecurityProfile creation REST service", - NiciraNvpApi.PUT_METHOD_TYPE, type); - } - - @Test - public void testDeleteSecurityProfile() throws NiciraNvpApiException, IOException { - // Prepare - method = mock(DeleteMethod.class); - when(method.getStatusCode()).thenReturn(HttpStatus.SC_NO_CONTENT); - - // Execute - api.deleteSecurityProfile(UUID); - - // Assert - verify(method, times(1)).releaseConnection(); - assertEquals("Wrong URI for SecurityProfile deletion REST service", UUID_SEC_PROFILE_URI, uri); - assertEquals("Wrong HTTP method for SecurityProfile deletion REST service", NiciraNvpApi.DELETE_METHOD_TYPE, type); - } - - @Test(expected = JsonParseException.class) - public void testRoutingConfigAdapterNoType() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - gson.fromJson("{}", RoutingConfig.class); - - // Assert: JsonParseException should be thrown - } - - @Test(expected = JsonParseException.class) - public void testRoutingConfigAdapterWrongType() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - gson.fromJson("{type : \"WrongType\"}", RoutingConfig.class); - - // Assert: JsonParseException should be thrown - } - - @Test() - public void testRoutingConfigAdapter() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - final SingleDefaultRouteImplicitRoutingConfig singleDefaultRouteImplicitRoutingConfig = - (SingleDefaultRouteImplicitRoutingConfig) gson.fromJson("{type : \"SingleDefaultRouteImplicitRoutingConfig\"}", RoutingConfig.class); - - // Assert: JsonParseException should be thrown - assertEquals("", SingleDefaultRouteImplicitRoutingConfig.class, singleDefaultRouteImplicitRoutingConfig.getClass()); - } - - @Test(expected = JsonParseException.class) - public void testNatRuleAdapterNoType() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - gson.fromJson("{}", NatRule.class); - - // Assert: JsonParseException should be thrown - } - - @Test(expected = JsonParseException.class) - public void testNatRuleAdapterWrongType() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - gson.fromJson("{type : \"WrongType\"}", NatRule.class); - - // Assert: JsonParseException should be thrown - } - - @Test() - public void testRoutingConfigAdapterWithSourceNatRule() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - final SourceNatRule sourceNatRule = - (SourceNatRule) gson.fromJson("{type : \"SourceNatRule\"}", NatRule.class); - - // Assert: JsonParseException should be thrown - assertEquals("", SourceNatRule.class, sourceNatRule.getClass()); - } - - @Test() - public void testRoutingConfigAdapterWithDestinationNatRule() throws NiciraNvpApiException, IOException { - // Prepare - final NiciraNvpApi api = new NiciraNvpApi(); - final Gson gson = api.restConnector.getGson(); - - // Execute - final DestinationNatRule destinationNatRule = - (DestinationNatRule) gson.fromJson("{type : \"DestinationNatRule\"}", NatRule.class); - - // Assert: JsonParseException should be thrown - assertEquals("", DestinationNatRule.class, destinationNatRule.getClass()); - } - -} diff --git a/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java b/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java index 6dc1a003cfa..9bbaf409b4e 100644 --- a/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java +++ b/plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java @@ -288,7 +288,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru { try { s_logger.debug("Handling deallocate() call back, which is called when a VM is destroyed or interface is removed, " + "to delete VM Interface with IP " - + nic.getIp4Address() + " from a VM " + vm.getInstanceName() + " with state " + vm.getVirtualMachine().getState()); + + nic.getIPv4Address() + " from a VM " + vm.getInstanceName() + " with state " + vm.getVirtualMachine().getState()); DomainVO networksDomain = _domainDao.findById(network.getDomainId()); NicVO nicFrmDd = _nicDao.findById(nic.getId()); long networkOfferingId = _ntwkOfferingDao.findById(network.getNetworkOfferingId()).getId(); @@ -299,7 +299,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru { vpcUuid = vpcObj.getUuid(); } HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId()); - DeallocateVmVspCommand cmd = new DeallocateVmVspCommand(network.getUuid(), nicFrmDd.getUuid(), nic.getMacAddress(), nic.getIp4Address(), + DeallocateVmVspCommand cmd = new DeallocateVmVspCommand(network.getUuid(), nicFrmDd.getUuid(), nic.getMacAddress(), nic.getIPv4Address(), isL3Network(networkOfferingId), vpcUuid, networksDomain.getUuid(), vm.getInstanceName(), vm.getUuid()); DeallocateVmVspAnswer answer = (DeallocateVmVspAnswer)_agentMgr.easySend(nuageVspHost.getId(), cmd); if (answer == null || !answer.getResult()) { @@ -309,7 +309,7 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru { } } } catch (InsufficientVirtualNetworkCapacityException e) { - s_logger.error("Handling deallocate(). VM " + vm.getInstanceName() + " with NIC IP " + nic.getIp4Address() + s_logger.error("Handling deallocate(). VM " + vm.getInstanceName() + " with NIC IP " + nic.getIPv4Address() + " is getting destroyed. REST API failed to update the VM state in NuageVsp", e); } super.deallocate(network, nic, vm); @@ -383,9 +383,9 @@ public class NuageVspGuestNetworkGuru extends GuestNetworkGuru { for (Map interfaces : vmInterfacesDetails) { String macFromNuage = interfaces.get("mac"); if (StringUtils.equals(macFromNuage, nic.getMacAddress())) { - nic.setIp4Address(interfaces.get("ip4Address")); - nic.setGateway(interfaces.get("gateway")); - nic.setNetmask(interfaces.get("netmask")); + nic.setIPv4Address(interfaces.get("ip4Address")); + nic.setIPv4Gateway(interfaces.get("gateway")); + nic.setIPv4Netmask(interfaces.get("netmask")); break; } } diff --git a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java index 04d21fd354b..9024abb1ad8 100644 --- a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java +++ b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java @@ -16,32 +16,6 @@ // under the License. package com.cloud.network.ovs; -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.agent.api.OvsCreateTunnelAnswer; -import com.cloud.agent.api.OvsCreateTunnelCommand; -import com.cloud.agent.api.OvsDestroyBridgeCommand; -import com.cloud.agent.api.OvsDestroyTunnelCommand; -import com.cloud.agent.api.OvsFetchInterfaceAnswer; -import com.cloud.agent.api.OvsFetchInterfaceCommand; -import com.cloud.agent.api.OvsSetupBridgeCommand; -import com.cloud.agent.api.OvsVpcPhysicalTopologyConfigCommand; -import com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand; -import com.cloud.network.dao.NetworkDao; -import com.cloud.network.dao.NetworkVO; -import com.cloud.network.vpc.NetworkACLVO; -import com.cloud.network.vpc.NetworkACLItemDao; -import com.cloud.network.vpc.NetworkACLItemVO; -import com.cloud.network.vpc.dao.VpcDao; -import com.cloud.network.vpc.VpcManager; -import com.cloud.network.vpc.VpcVO; -import com.cloud.network.vpc.dao.NetworkACLDao; -import com.cloud.utils.fsm.StateMachine2; -import com.cloud.vm.VMInstanceVO; -import com.cloud.vm.dao.VMInstanceDao; -import com.cloud.vm.Nic; -import com.cloud.vm.NicVO; -import com.cloud.vm.VirtualMachine; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -53,14 +27,24 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; import javax.persistence.EntityExistsException; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.framework.messagebus.MessageBus; import org.apache.cloudstack.framework.messagebus.MessageSubscriber; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; -import org.apache.cloudstack.framework.config.dao.ConfigurationDao; - import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.agent.api.OvsCreateTunnelAnswer; +import com.cloud.agent.api.OvsCreateTunnelCommand; +import com.cloud.agent.api.OvsDestroyBridgeCommand; +import com.cloud.agent.api.OvsDestroyTunnelCommand; +import com.cloud.agent.api.OvsFetchInterfaceAnswer; +import com.cloud.agent.api.OvsFetchInterfaceCommand; +import com.cloud.agent.api.OvsSetupBridgeCommand; +import com.cloud.agent.api.OvsVpcPhysicalTopologyConfigCommand; +import com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand; import com.cloud.agent.manager.Commands; import com.cloud.configuration.Config; import com.cloud.exception.AgentUnavailableException; @@ -73,24 +57,39 @@ import com.cloud.network.Network; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.TrafficType; import com.cloud.network.PhysicalNetworkTrafficType; +import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao; +import com.cloud.network.ovs.dao.OvsTunnel; import com.cloud.network.ovs.dao.OvsTunnelInterfaceDao; import com.cloud.network.ovs.dao.OvsTunnelInterfaceVO; import com.cloud.network.ovs.dao.OvsTunnelNetworkDao; import com.cloud.network.ovs.dao.OvsTunnelNetworkVO; -import com.cloud.network.ovs.dao.OvsTunnel; import com.cloud.network.ovs.dao.VpcDistributedRouterSeqNoDao; import com.cloud.network.ovs.dao.VpcDistributedRouterSeqNoVO; +import com.cloud.network.vpc.NetworkACLItemDao; +import com.cloud.network.vpc.NetworkACLItemVO; +import com.cloud.network.vpc.NetworkACLVO; +import com.cloud.network.vpc.VpcManager; +import com.cloud.network.vpc.VpcVO; +import com.cloud.network.vpc.dao.NetworkACLDao; +import com.cloud.network.vpc.dao.VpcDao; import com.cloud.utils.component.ManagerBase; import com.cloud.utils.concurrency.NamedThreadFactory; import com.cloud.utils.db.DB; -import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.db.Transaction; import com.cloud.utils.db.TransactionCallback; -import com.cloud.utils.fsm.StateListener; +import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.StateListener; +import com.cloud.utils.fsm.StateMachine2; +import com.cloud.vm.Nic; +import com.cloud.vm.NicVO; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachine; import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.NicDao; +import com.cloud.vm.dao.VMInstanceDao; @Component @Local(value = {OvsTunnelManager.class}) @@ -510,7 +509,8 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage Answer ans = _agentMgr.send(host.getId(), cmd); handleDestroyBridgeAnswer(ans, host.getId(), nw.getId()); } catch (Exception e) { - + s_logger.info("[ignored]" + + "exception while removing host from networks: " + e.getLocalizedMessage()); } } else { List vmIds = _ovsNetworkToplogyGuru.getActiveVmsInNetworkOnHost(nw.getId(), host.getId(), true); @@ -770,7 +770,8 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage try { remoteIp = getGreEndpointIP(hostDetails, network); } catch (Exception e) { - + s_logger.info("[ignored]" + + "error getting GRE endpoint: " + e.getLocalizedMessage()); } } OvsVpcPhysicalTopologyConfigCommand.Host host = new OvsVpcPhysicalTopologyConfigCommand.Host(hostId, remoteIp); @@ -803,7 +804,7 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage Network network = _networkDao.findById(vmNic.getNetworkId()); if (network.getTrafficType() == TrafficType.Guest) { OvsVpcPhysicalTopologyConfigCommand.Nic nic = new OvsVpcPhysicalTopologyConfigCommand.Nic( - vmNic.getIp4Address(), vmNic.getMacAddress(), network.getUuid()); + vmNic.getIPv4Address(), vmNic.getMacAddress(), network.getUuid()); vmNics.add(nic); } } diff --git a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java index cc7c8efafbc..b7ae4d43ffd 100644 --- a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java +++ b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java @@ -393,7 +393,7 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore } @Override - public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback) { + public void revertSnapshot(SnapshotInfo snapshot, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback) { throw new UnsupportedOperationException(); } diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java index e416bf86e64..e92e8f6e04f 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java @@ -46,6 +46,7 @@ import org.apache.cloudstack.storage.command.CopyCmdAnswer; import org.apache.cloudstack.storage.command.CopyCommand; import org.apache.cloudstack.storage.command.CreateObjectCommand; import org.apache.cloudstack.storage.command.DeleteCommand; +import org.apache.cloudstack.storage.command.RevertSnapshotCommand; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.to.SnapshotObjectTO; @@ -323,7 +324,28 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri } @Override - public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback) { + public void revertSnapshot(SnapshotInfo snapshot, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback) { + SnapshotObjectTO snapshotTO = (SnapshotObjectTO)snapshot.getTO(); + RevertSnapshotCommand cmd = new RevertSnapshotCommand(snapshotTO); + + CommandResult result = new CommandResult(); + try { + EndPoint ep = epSelector.select(snapshotOnPrimaryStore); + if ( ep == null ){ + String errMsg = "No remote endpoint to send RevertSnapshotCommand, check if host or ssvm is down?"; + s_logger.error(errMsg); + result.setResult(errMsg); + } else { + Answer answer = ep.sendMessage(cmd); + if (answer != null && !answer.getResult()) { + result.setResult(answer.getDetails()); + } + } + } catch (Exception ex) { + s_logger.debug("Unable to revert snapshot " + snapshot.getId(), ex); + result.setResult(ex.toString()); + } + callback.complete(result); } @Override diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java index 38e9d9c9d0c..ab9cecf8127 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java @@ -29,6 +29,8 @@ import java.util.UUID; import javax.inject.Inject; +import org.apache.log4j.Logger; + import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; @@ -40,7 +42,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -49,6 +50,7 @@ import com.cloud.agent.api.DeleteStoragePoolCommand; import com.cloud.agent.api.StoragePoolInfo; import com.cloud.alert.AlertManager; import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.StorageConflictException; import com.cloud.host.Host; import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; @@ -188,6 +190,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore try { hostPath = URLDecoder.decode(uri.getPath(), "UTF-8"); } catch (UnsupportedEncodingException e) { + s_logger.error("[ignored] we are on a platform not supporting \"UTF-8\"!?!", e); } if (hostPath == null) { // if decoding fails, use getPath() anyway hostPath = uri.getPath(); @@ -410,6 +413,9 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore try { storageMgr.connectHostToSharedPool(h.getId(), primarystore.getId()); poolHosts.add(h); + } catch (StorageConflictException se) { + primaryDataStoreDao.expunge(primarystore.getId()); + throw new CloudRuntimeException("Storage has already been added as local storage"); } catch (Exception e) { s_logger.warn("Unable to establish a connection between " + h + " and " + primarystore, e); } @@ -434,6 +440,9 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore try { storageMgr.connectHostToSharedPool(host.getId(), dataStore.getId()); poolHosts.add(host); + } catch (StorageConflictException se) { + primaryDataStoreDao.expunge(dataStore.getId()); + throw new CloudRuntimeException("Storage has already been added as local storage to host: " + host.getName()); } catch (Exception e) { s_logger.warn("Unable to establish a connection between " + host + " and " + dataStore, e); } diff --git a/plugins/storage/volume/nexenta/src/org/apache/cloudstack/storage/datastore/driver/NexentaPrimaryDataStoreDriver.java b/plugins/storage/volume/nexenta/src/org/apache/cloudstack/storage/datastore/driver/NexentaPrimaryDataStoreDriver.java index 7ce46a2c511..752470316d3 100644 --- a/plugins/storage/volume/nexenta/src/org/apache/cloudstack/storage/datastore/driver/NexentaPrimaryDataStoreDriver.java +++ b/plugins/storage/volume/nexenta/src/org/apache/cloudstack/storage/datastore/driver/NexentaPrimaryDataStoreDriver.java @@ -130,7 +130,7 @@ public class NexentaPrimaryDataStoreDriver implements PrimaryDataStoreDriver { public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback) {} @Override - public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback) {} + public void revertSnapshot(SnapshotInfo snapshot, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback) {} @Override public void createAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback callback) { diff --git a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java index 7c989d26ac3..0a4cfd6c080 100644 --- a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java +++ b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java @@ -210,7 +210,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver } @Override - public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback) { + public void revertSnapshot(SnapshotInfo snapshot, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback) { } @Override diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java index 62a03a49078..e9344265ae1 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java @@ -77,6 +77,7 @@ import com.cloud.utils.exception.CloudRuntimeException; public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { private static final Logger s_logger = Logger.getLogger(SolidFirePrimaryDataStoreDriver.class); private static final int s_lockTimeInSeconds = 300; + private static final int s_lowestHypervisorSnapshotReserve = 10; @Inject private AccountDao _accountDao; @Inject private AccountDetailsDao _accountDetailsDao; @@ -306,6 +307,18 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { usedSpace += volumeSize; } + else { + SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePool.getId(), _storagePoolDetailsDao); + long lVolumeId = Long.parseLong(volume.getFolder()); + + SolidFireUtil.SolidFireVolume sfVolume = SolidFireUtil.getSolidFireVolume(sfConnection, lVolumeId); + + // SolidFireUtil.VOLUME_SIZE was introduced in 4.5. + // To be backward compatible with releases prior to 4.5, call updateVolumeDetails here. + // That way if SolidFireUtil.VOLUME_SIZE wasn't put in the volume_details table when the + // volume was initially created, it can be placed in volume_details here. + updateVolumeDetails(volume.getId(), sfVolume.getTotalSize()); + } } } @@ -352,9 +365,7 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { Integer hypervisorSnapshotReserve = volume.getHypervisorSnapshotReserve(); if (hypervisorSnapshotReserve != null) { - if (hypervisorSnapshotReserve < 50) { - hypervisorSnapshotReserve = 50; - } + hypervisorSnapshotReserve = Math.max(hypervisorSnapshotReserve, s_lowestHypervisorSnapshotReserve); volumeSize += volumeSize * (hypervisorSnapshotReserve / 100f); } @@ -418,8 +429,6 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { if (dataObject.getType() == DataObjectType.VOLUME) { VolumeInfo volumeInfo = (VolumeInfo)dataObject; - AccountVO account = _accountDao.findById(volumeInfo.getAccountId()); - String sfAccountName = SolidFireUtil.getSolidFireAccountName(account.getUuid(), account.getAccountId()); long storagePoolId = dataStore.getId(); @@ -428,6 +437,8 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { AccountDetailVO accountDetail = SolidFireUtil.getAccountDetail(volumeInfo.getAccountId(), storagePoolId, _accountDetailsDao); if (accountDetail == null || accountDetail.getValue() == null) { + AccountVO account = _accountDao.findById(volumeInfo.getAccountId()); + String sfAccountName = SolidFireUtil.getSolidFireAccountName(account.getUuid(), account.getAccountId()); SolidFireUtil.SolidFireAccount sfAccount = SolidFireUtil.getSolidFireAccount(sfConnection, sfAccountName); if (sfAccount == null) { @@ -677,7 +688,7 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { } @Override - public void revertSnapshot(SnapshotInfo snapshotInfo, AsyncCompletionCallback callback) { + public void revertSnapshot(SnapshotInfo snapshot, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback) { throw new UnsupportedOperationException("Reverting not supported. Create a template or volume based on the snapshot instead."); } diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java index bc22ac7342b..7cb690014bb 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java @@ -20,9 +20,9 @@ package org.apache.cloudstack.storage.datastore.lifecycle; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.HashMap; import javax.inject.Inject; @@ -43,9 +43,6 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.datastore.util.SolidFireUtil; import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; -import com.cloud.template.TemplateManager; -import com.cloud.user.AccountDetailsDao; -import com.cloud.user.AccountVO; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; import com.cloud.agent.api.CreateStoragePoolCommand; @@ -56,19 +53,22 @@ import com.cloud.dc.ClusterDetailsVO; import com.cloud.dc.ClusterVO; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.DataCenterDao; -import com.cloud.host.dao.HostDao; import com.cloud.host.Host; import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.resource.ResourceManager; import com.cloud.storage.Storage.StoragePoolType; -import com.cloud.storage.dao.StoragePoolHostDao; import com.cloud.storage.StorageManager; import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolAutomation; import com.cloud.storage.StoragePoolHostVO; import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.template.TemplateManager; import com.cloud.user.Account; +import com.cloud.user.AccountDetailsDao; +import com.cloud.user.AccountVO; import com.cloud.user.dao.AccountDao; import com.cloud.utils.exception.CloudRuntimeException; @@ -178,6 +178,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor lMinIops = Long.parseLong(minIops); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "error getting minimals iops: " + ex.getLocalizedMessage()); } try { @@ -187,6 +189,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor lMaxIops = Long.parseLong(maxIops); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "error getting maximal iops: " + ex.getLocalizedMessage()); } try { @@ -196,6 +200,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor lBurstIops = Long.parseLong(burstIops); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "error getting iops bursts: " + ex.getLocalizedMessage()); } if (lMinIops > lMaxIops) { @@ -325,9 +331,9 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor SolidFireUtil.SolidFireAccount sfAccount = SolidFireUtil.getSolidFireAccount(sfConnection, sfAccountName); if (sfAccount == null) { - long accountNumber = SolidFireUtil.createSolidFireAccount(sfConnection, sfAccountName); + long sfAccountNumber = SolidFireUtil.createSolidFireAccount(sfConnection, sfAccountName); - sfAccount = SolidFireUtil.getSolidFireAccountById(sfConnection, accountNumber); + sfAccount = SolidFireUtil.getSolidFireAccountById(sfConnection, sfAccountNumber); } long sfVolumeId = SolidFireUtil.createSolidFireVolume(sfConnection, SolidFireUtil.getSolidFireVolumeName(volumeName), sfAccount.getId(), volumeSize, @@ -526,7 +532,7 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor if (answer != null && answer.getResult()) { s_logger.info("Successfully deleted storage pool using Host ID " + host.getHostId()); - HostVO hostVO = this._hostDao.findById(host.getHostId()); + HostVO hostVO = _hostDao.findById(host.getHostId()); if (hostVO != null) { clusterId = hostVO.getClusterId(); diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java index 8ff4454ad33..9c486db429c 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java @@ -38,9 +38,6 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; -import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; -import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao; -import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO; import org.apache.commons.lang.StringUtils; import org.apache.http.HttpResponse; import org.apache.http.auth.AuthScope; @@ -53,12 +50,16 @@ import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.BasicClientConnectionManager; - -import org.apache.cloudstack.utils.security.SSLUtils; +import org.apache.log4j.Logger; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO; +import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao; +import org.apache.cloudstack.utils.security.SSLUtils; + import com.cloud.dc.ClusterDetailsDao; import com.cloud.dc.ClusterDetailsVO; import com.cloud.host.Host; @@ -68,6 +69,7 @@ import com.cloud.user.AccountDetailsDao; import com.cloud.utils.exception.CloudRuntimeException; public class SolidFireUtil { + private static final Logger s_logger = Logger.getLogger(SolidFireUtil.class); public static final String PROVIDER_NAME = "SolidFire"; public static final String SHARED_PROVIDER_NAME = "SolidFireShared"; @@ -1272,7 +1274,7 @@ public class SolidFireUtil { } private static final class VolumeToDeleteParams { - private long volumeID; + private final long volumeID; private VolumeToDeleteParams(final long lVolumeId) { volumeID = lVolumeId; @@ -1291,7 +1293,7 @@ public class SolidFireUtil { } private static final class VolumeToPurgeParams { - private long volumeID; + private final long volumeID; private VolumeToPurgeParams(final long lVolumeId) { volumeID = lVolumeId; @@ -1309,8 +1311,8 @@ public class SolidFireUtil { } private static final class SnapshotToCreateParams { - private long volumeID; - private String name; + private final long volumeID; + private final String name; private SnapshotToCreateParams(final long lVolumeId, final String snapshotName) { volumeID = lVolumeId; @@ -1330,7 +1332,7 @@ public class SolidFireUtil { } private static final class SnapshotToDeleteParams { - private long snapshotID; + private final long snapshotID; private SnapshotToDeleteParams(final long lSnapshotId) { snapshotID = lSnapshotId; @@ -1348,8 +1350,8 @@ public class SolidFireUtil { } private static final class RollbackToInitiateParams { - private long volumeID; - private long snapshotID; + private final long volumeID; + private final long snapshotID; private RollbackToInitiateParams(final long lVolumeId, final long lSnapshotId) { volumeID = lVolumeId; @@ -1368,9 +1370,9 @@ public class SolidFireUtil { } private static final class CloneToCreateParams { - private long volumeID; - private long snapshotID; - private String name; + private final long volumeID; + private final long snapshotID; + private final String name; private CloneToCreateParams(final long lVolumeId, final long lSnapshotId, final String cloneName) { volumeID = lVolumeId; @@ -1456,7 +1458,7 @@ public class SolidFireUtil { } private static final class AccountToRemoveParams { - private long accountID; + private final long accountID; private AccountToRemoveParams(final long lAccountId) { accountID = lAccountId; @@ -1565,7 +1567,7 @@ public class SolidFireUtil { } private static final class VagToDeleteParams { - private long volumeAccessGroupID; + private final long volumeAccessGroupID; private VagToDeleteParams(final long lVagId) { volumeAccessGroupID = lVagId; @@ -1772,6 +1774,8 @@ public class SolidFireUtil { try { httpClient.getConnectionManager().shutdown(); } catch (Exception t) { + s_logger.info("[ignored]" + + "error shutting down http client: " + t.getLocalizedMessage()); } } } diff --git a/plugins/user-authenticators/ldap/pom.xml b/plugins/user-authenticators/ldap/pom.xml index d24a5be5ab3..22cdeb722d6 100644 --- a/plugins/user-authenticators/ldap/pom.xml +++ b/plugins/user-authenticators/ldap/pom.xml @@ -24,7 +24,7 @@ org.codehaus.gmaven gmaven-plugin - 1.5 + 1.3 1.7 diff --git a/plugins/user-authenticators/ldap/resources/META-INF/cloudstack/ldap/spring-ldap-context.xml b/plugins/user-authenticators/ldap/resources/META-INF/cloudstack/ldap/spring-ldap-context.xml index 34a2befe971..07d6b381328 100644 --- a/plugins/user-authenticators/ldap/resources/META-INF/cloudstack/ldap/spring-ldap-context.xml +++ b/plugins/user-authenticators/ldap/resources/META-INF/cloudstack/ldap/spring-ldap-context.xml @@ -30,10 +30,11 @@ - + + diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkDomainToLdapCmd.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkDomainToLdapCmd.java new file mode 100644 index 00000000000..0ffa8408ce3 --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkDomainToLdapCmd.java @@ -0,0 +1,115 @@ +/* + * 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.api.command; + +import javax.inject.Inject; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.User; +import com.cloud.user.UserAccount; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.LinkDomainToLdapResponse; +import org.apache.cloudstack.ldap.LdapManager; +import org.apache.cloudstack.ldap.LdapUser; +import org.apache.cloudstack.ldap.NoLdapUserMatchingQueryException; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +import java.util.UUID; + +@APICommand(name = "linkDomainToLdap", description = "link an existing cloudstack domain to group or OU in ldap", responseObject = LinkDomainToLdapResponse.class, since = "4.6.0", + requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +public class LinkDomainToLdapCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(LinkDomainToLdapCmd.class.getName()); + private static final String s_name = "linkdomaintoldapresponse"; + + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = true, entityType = DomainResponse.class, description = "The id of the domain which has to be " + + "linked to LDAP.") + private Long domainId; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, description = "type of the ldap name. GROUP or OU") + private String type; + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the group or OU in LDAP") + private String name; + + @Parameter(name = ApiConstants.ADMIN, type = CommandType.STRING, required = false, description = "domain admin username in LDAP ") + private String admin; + + @Parameter(name = ApiConstants.ACCOUNT_TYPE, type = CommandType.SHORT, required = true, description = "Type of the account to auto import. Specify 0 for user and 2 for " + + "domain admin") + private short accountType; + + @Inject + private LdapManager _ldapManager; + + @Override + public void execute() throws ServerApiException { + try { + LinkDomainToLdapResponse response = _ldapManager.linkDomainToLdap(domainId, type, name, accountType); + if(admin!=null) { + LdapUser ldapUser = null; + try { + ldapUser = _ldapManager.getUser(admin, type, name); + } catch (NoLdapUserMatchingQueryException e) { + s_logger.debug("no ldap user matching username " + admin + " in the given group/ou", e); + } + if (ldapUser != null && !ldapUser.isDisabled()) { + Account account = _accountService.getActiveAccountByName(admin, domainId); + if (account == null) { + try { + UserAccount userAccount = _accountService.createUserAccount(admin, "", ldapUser.getFirstname(), ldapUser.getLastname(), ldapUser.getEmail(), null, + admin, Account.ACCOUNT_TYPE_DOMAIN_ADMIN, domainId, admin, null, UUID.randomUUID().toString(), UUID.randomUUID().toString(), User.Source.LDAP); + response.setAdminId(String.valueOf(userAccount.getAccountId())); + s_logger.info("created an account with name " + admin + " in the given domain " + domainId); + } catch (Exception e) { + s_logger.info("an exception occurred while creating account with name " + admin +" in domain " + domainId, e); + } + } else { + s_logger.debug("an account with name " + admin + " already exists in the domain " + domainId); + } + } else { + s_logger.debug("ldap user with username "+admin+" is disabled in the given group/ou"); + } + } + response.setObjectName("LinkDomainToLdap"); + response.setResponseName(getCommandName()); + setResponseObject(response); + } catch (final InvalidParameterValueException e) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString()); + } + } + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java new file mode 100644 index 00000000000..b0032b04b4d --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java @@ -0,0 +1,78 @@ +/* + * 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.api.response; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +public class LinkDomainToLdapResponse extends BaseResponse { + + @SerializedName(ApiConstants.DOMAIN_ID) + @Param(description = "id of the Domain which is linked to LDAP") + private long domainId; + + @SerializedName(ApiConstants.NAME) + @Param(description = "name of the group or OU in LDAP which is linked to the domain") + private String name; + + @SerializedName(ApiConstants.TYPE) + @Param(description = "type of the name in LDAP which is linke to the domain") + private String type; + + @SerializedName(ApiConstants.ACCOUNT_TYPE) + @Param(description = "Type of the account to auto import") + private short accountType; + + @SerializedName(ApiConstants.ACCOUNT_ID) + @Param(description = "Domain Admin accountId that is created") + private String adminId; + + public LinkDomainToLdapResponse(long domainId, String type, String name, short accountType) { + this.domainId = domainId; + this.name = name; + this.type = type; + this.accountType = accountType; + } + + public long getDomainId() { + return domainId; + } + + public String getName() { + return name; + } + + public String getType() { + return type; + } + + public short getAccountType() { + return accountType; + } + + public String getAdminId() { + return adminId; + } + + public void setAdminId(String adminId) { + this.adminId = adminId; + } +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java new file mode 100644 index 00000000000..0df638ad228 --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java @@ -0,0 +1,104 @@ +/* + * 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.ldap; + +import java.util.ArrayList; +import java.util.List; + +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; +import javax.naming.ldap.LdapContext; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +public class ADLdapUserManagerImpl extends OpenLdapUserManagerImpl implements LdapUserManager { + public static final Logger s_logger = Logger.getLogger(ADLdapUserManagerImpl.class.getName()); + private static final String MICROSOFT_AD_NESTED_MEMBERS_FILTER = "memberOf:1.2.840.113556.1.4.1941:"; + private static final String MICROSOFT_AD_MEMBERS_FILTER = "memberOf"; + + @Override + public List getUsersInGroup(String groupName, LdapContext context) throws NamingException { + if (StringUtils.isBlank(groupName)) { + throw new IllegalArgumentException("ldap group name cannot be blank"); + } + + String basedn = _ldapConfiguration.getBaseDn(); + if (StringUtils.isBlank(basedn)) { + throw new IllegalArgumentException("ldap basedn is not configured"); + } + + final SearchControls searchControls = new SearchControls(); + searchControls.setSearchScope(_ldapConfiguration.getScope()); + searchControls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); + + NamingEnumeration results = context.search(basedn, generateADGroupSearchFilter(groupName), searchControls); + final List users = new ArrayList(); + while (results.hasMoreElements()) { + final SearchResult result = results.nextElement(); + users.add(createUser(result)); + } + return users; + } + + private String generateADGroupSearchFilter(String groupName) { + final StringBuilder userObjectFilter = new StringBuilder(); + userObjectFilter.append("(objectClass="); + userObjectFilter.append(_ldapConfiguration.getUserObject()); + userObjectFilter.append(")"); + + final StringBuilder memberOfFilter = new StringBuilder(); + String groupCnName = _ldapConfiguration.getCommonNameAttribute() + "=" +groupName + "," + _ldapConfiguration.getBaseDn(); + memberOfFilter.append("(").append(getMemberOfAttribute()).append("="); + memberOfFilter.append(groupCnName); + memberOfFilter.append(")"); + + final StringBuilder result = new StringBuilder(); + result.append("(&"); + result.append(userObjectFilter); + result.append(memberOfFilter); + result.append(")"); + + s_logger.debug("group search filter = " + result); + return result.toString(); + } + + protected boolean isUserDisabled(SearchResult result) throws NamingException { + boolean isDisabledUser = false; + String userAccountControl = LdapUtils.getAttributeValue(result.getAttributes(), _ldapConfiguration.getUserAccountControlAttribute()); + if (userAccountControl != null) { + int control = Integer.parseInt(userAccountControl); + // second bit represents disabled user flag in AD + if ((control & 2) > 0) { + isDisabledUser = true; + } + } + return isDisabledUser; + } + + protected String getMemberOfAttribute() { + if(_ldapConfiguration.isNestedGroupsEnabled()) { + return MICROSOFT_AD_NESTED_MEMBERS_FILTER; + } else { + return MICROSOFT_AD_MEMBERS_FILTER; + } + } +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java index 8c6820f8458..24991c35587 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java @@ -17,6 +17,9 @@ package org.apache.cloudstack.ldap; import com.cloud.server.auth.DefaultUserAuthenticator; +import com.cloud.user.Account; +import com.cloud.user.AccountManager; +import com.cloud.user.User; import com.cloud.user.UserAccount; import com.cloud.user.dao.UserAccountDao; import com.cloud.utils.Pair; @@ -25,6 +28,7 @@ import org.apache.log4j.Logger; import javax.inject.Inject; import java.util.Map; +import java.util.UUID; public class LdapAuthenticator extends DefaultUserAuthenticator { private static final Logger s_logger = Logger.getLogger(LdapAuthenticator.class.getName()); @@ -33,6 +37,8 @@ public class LdapAuthenticator extends DefaultUserAuthenticator { private LdapManager _ldapManager; @Inject private UserAccountDao _userAccountDao; + @Inject + private AccountManager _accountManager; public LdapAuthenticator() { super(); @@ -52,21 +58,71 @@ public class LdapAuthenticator extends DefaultUserAuthenticator { return new Pair(false, null); } - final UserAccount user = _userAccountDao.getUserAccount(username, domainId); + boolean result = false; + ActionOnFailedAuthentication action = null; - if (user == null) { - s_logger.debug("Unable to find user with " + username + " in domain " + domainId); - return new Pair(false, null); - } else if (_ldapManager.isLdapEnabled()) { - boolean result = _ldapManager.canAuthenticate(username, password); - ActionOnFailedAuthentication action = null; - if (result == false) { + if (_ldapManager.isLdapEnabled()) { + final UserAccount user = _userAccountDao.getUserAccount(username, domainId); + LdapTrustMapVO ldapTrustMapVO = _ldapManager.getDomainLinkedToLdap(domainId); + if(ldapTrustMapVO != null) { + try { + LdapUser ldapUser = _ldapManager.getUser(username, ldapTrustMapVO.getType().toString(), ldapTrustMapVO.getName()); + if(!ldapUser.isDisabled()) { + result = _ldapManager.canAuthenticate(ldapUser.getPrincipal(), password); + if(result) { + if(user == null) { + // import user to cloudstack + createCloudStackUserAccount(ldapUser, domainId, ldapTrustMapVO.getAccountType()); + } else { + enableUserInCloudStack(user); + } + } + } else { + //disable user in cloudstack + disableUserInCloudStack(user); + } + } catch (NoLdapUserMatchingQueryException e) { + s_logger.debug(e.getMessage()); + } + + } else { + //domain is not linked to ldap follow normal authentication + if(user != null ) { + try { + LdapUser ldapUser = _ldapManager.getUser(username); + if(!ldapUser.isDisabled()) { + result = _ldapManager.canAuthenticate(ldapUser.getPrincipal(), password); + } else { + s_logger.debug("user with principal "+ ldapUser.getPrincipal() + " is disabled in ldap"); + } + } catch (NoLdapUserMatchingQueryException e) { + s_logger.debug(e.getMessage()); + } + } + } + if (!result && user != null) { action = ActionOnFailedAuthentication.INCREMENT_INCORRECT_LOGIN_ATTEMPT_COUNT; } - return new Pair(result, action); + } - } else { - return new Pair(false, ActionOnFailedAuthentication.INCREMENT_INCORRECT_LOGIN_ATTEMPT_COUNT); + return new Pair(result, action); + } + + private void enableUserInCloudStack(UserAccount user) { + if(user != null && (user.getState().equalsIgnoreCase(Account.State.disabled.toString()))) { + _accountManager.enableUser(user.getId()); + } + } + + private void createCloudStackUserAccount(LdapUser user, long domainId, short accountType) { + String username = user.getUsername(); + _accountManager.createUserAccount(username, "", user.getFirstname(), user.getLastname(), user.getEmail(), null, username, accountType, domainId, username, null, + UUID.randomUUID().toString(), UUID.randomUUID().toString(), User.Source.LDAP); + } + + private void disableUserInCloudStack(UserAccount user) { + if (user != null) { + _accountManager.disableUser(user.getId()); } } diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapConfiguration.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapConfiguration.java index c171ebfcc0b..56b39a8b3d1 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapConfiguration.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapConfiguration.java @@ -21,12 +21,12 @@ import java.util.List; import javax.inject.Inject; import javax.naming.directory.SearchControls; -import org.apache.cloudstack.api.command.LdapListConfigurationCmd; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import com.cloud.utils.Pair; +import org.apache.cloudstack.ldap.dao.LdapConfigurationDao; public class LdapConfiguration implements Configurable{ private final static String factory = "com.sun.jndi.ldap.LdapCtxFactory"; @@ -36,6 +36,11 @@ public class LdapConfiguration implements Configurable{ private static final ConfigKey ldapPageSize = new ConfigKey(Integer.class, "ldap.request.page.size", "Advanced", "1000", "page size sent to ldap server on each request to get user", true, ConfigKey.Scope.Global, 1); + private static final ConfigKey ldapProvider = new ConfigKey(String.class, "ldap.provider", "Advanced", "openldap", "ldap provider ex:openldap, microsoftad", + true, ConfigKey.Scope.Global, null); + + private static final ConfigKey ldapEnableNestedGroups = new ConfigKey(Boolean.class, "ldap.nested.groups.enable", "Advanced", "true", + "if true, nested groups will also be queried", true, ConfigKey.Scope.Global, null); private final static int scope = SearchControls.SUBTREE_SCOPE; @@ -43,14 +48,14 @@ public class LdapConfiguration implements Configurable{ private ConfigurationDao _configDao; @Inject - private LdapManager _ldapManager; + private LdapConfigurationDao _ldapConfigurationDao; public LdapConfiguration() { } - public LdapConfiguration(final ConfigurationDao configDao, final LdapManager ldapManager) { + public LdapConfiguration(final ConfigurationDao configDao, final LdapConfigurationDao ldapConfigurationDao) { _configDao = configDao; - _ldapManager = ldapManager; + _ldapConfigurationDao = ldapConfigurationDao; } public String getAuthentication() { @@ -94,7 +99,7 @@ public class LdapConfiguration implements Configurable{ public String getProviderUrl() { final String protocol = getSSLStatus() == true ? "ldaps://" : "ldap://"; - final Pair, Integer> result = _ldapManager.listConfigurations(new LdapListConfigurationCmd(_ldapManager)); + final Pair, Integer> result = _ldapConfigurationDao.searchConfigurations(null, 0); final StringBuilder providerUrls = new StringBuilder(); String delim = ""; for (final LdapConfigurationVO resource : result.first()) { @@ -106,7 +111,8 @@ public class LdapConfiguration implements Configurable{ } public String[] getReturnAttributes() { - return new String[] {getUsernameAttribute(), getEmailAttribute(), getFirstnameAttribute(), getLastnameAttribute(), getCommonNameAttribute()}; + return new String[] {getUsernameAttribute(), getEmailAttribute(), getFirstnameAttribute(), getLastnameAttribute(), getCommonNameAttribute(), + getUserAccountControlAttribute()}; } public int getScope() { @@ -157,6 +163,10 @@ public class LdapConfiguration implements Configurable{ return "cn"; } + public String getUserAccountControlAttribute() { + return "userAccountControl"; + } + public Long getReadTimeout() { return ldapReadTimeout.value(); } @@ -165,6 +175,21 @@ public class LdapConfiguration implements Configurable{ return ldapPageSize.value(); } + public LdapUserManager.Provider getLdapProvider() { + LdapUserManager.Provider provider; + try { + provider = LdapUserManager.Provider.valueOf(ldapProvider.value().toUpperCase()); + } catch (IllegalArgumentException ex) { + //openldap is the default + provider = LdapUserManager.Provider.OPENLDAP; + } + return provider; + } + + public boolean isNestedGroupsEnabled() { + return ldapEnableNestedGroups.value(); + } + @Override public String getConfigComponentName() { return LdapConfiguration.class.getSimpleName(); @@ -172,6 +197,6 @@ public class LdapConfiguration implements Configurable{ @Override public ConfigKey[] getConfigKeys() { - return new ConfigKey[] {ldapReadTimeout, ldapPageSize}; + return new ConfigKey[] {ldapReadTimeout, ldapPageSize, ldapProvider, ldapEnableNestedGroups}; } } \ No newline at end of file diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManager.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManager.java index 31205c457ad..6af2c4ebd95 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManager.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManager.java @@ -25,12 +25,15 @@ import org.apache.cloudstack.api.response.LdapUserResponse; import com.cloud.exception.InvalidParameterValueException; import com.cloud.utils.Pair; import com.cloud.utils.component.PluggableService; +import org.apache.cloudstack.api.response.LinkDomainToLdapResponse; public interface LdapManager extends PluggableService { + enum LinkType { GROUP, OU;} + LdapConfigurationResponse addConfiguration(String hostname, int port) throws InvalidParameterValueException; - boolean canAuthenticate(String username, String password); + boolean canAuthenticate(String principal, String password); LdapConfigurationResponse createLdapConfigurationResponse(LdapConfigurationVO configuration); @@ -40,6 +43,8 @@ public interface LdapManager extends PluggableService { LdapUser getUser(final String username) throws NoLdapUserMatchingQueryException; + LdapUser getUser(String username, String type, String name) throws NoLdapUserMatchingQueryException; + List getUsers() throws NoLdapUserMatchingQueryException; List getUsersInGroup(String groupName) throws NoLdapUserMatchingQueryException; @@ -49,4 +54,8 @@ public interface LdapManager extends PluggableService { Pair, Integer> listConfigurations(LdapListConfigurationCmd cmd); List searchUsers(String query) throws NoLdapUserMatchingQueryException; + + LinkDomainToLdapResponse linkDomainToLdap(Long domainId, String type, String name, short accountType); + + public LdapTrustMapVO getDomainLinkedToLdap(long domainId); } \ No newline at end of file diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java index dfd39a3c7c1..3fd928225fc 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java @@ -25,6 +25,10 @@ import javax.inject.Inject; import javax.naming.NamingException; import javax.naming.ldap.LdapContext; +import org.apache.cloudstack.api.command.LinkDomainToLdapCmd; +import org.apache.cloudstack.api.response.LinkDomainToLdapResponse; +import org.apache.cloudstack.ldap.dao.LdapTrustMapDao; +import org.apache.commons.lang.Validate; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; @@ -57,17 +61,25 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { private LdapContextFactory _ldapContextFactory; @Inject - private LdapUserManager _ldapUserManager; + private LdapConfiguration _ldapConfiguration; + + @Inject LdapUserManagerFactory _ldapUserManagerFactory; + + @Inject + LdapTrustMapDao _ldapTrustMapDao; + public LdapManagerImpl() { super(); } - public LdapManagerImpl(final LdapConfigurationDao ldapConfigurationDao, final LdapContextFactory ldapContextFactory, final LdapUserManager ldapUserManager) { + public LdapManagerImpl(final LdapConfigurationDao ldapConfigurationDao, final LdapContextFactory ldapContextFactory, final LdapUserManagerFactory ldapUserManagerFactory, + final LdapConfiguration ldapConfiguration) { super(); _ldapConfigurationDao = ldapConfigurationDao; _ldapContextFactory = ldapContextFactory; - _ldapUserManager = ldapUserManager; + _ldapUserManagerFactory = ldapUserManagerFactory; + _ldapConfiguration = ldapConfiguration; } @Override @@ -94,17 +106,14 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { } @Override - public boolean canAuthenticate(final String username, final String password) { - final String escapedUsername = LdapUtils.escapeLDAPSearchFilter(username); + public boolean canAuthenticate(final String principal, final String password) { try { - final LdapUser user = getUser(escapedUsername); - final String principal = user.getPrincipal(); final LdapContext context = _ldapContextFactory.createUserContext(principal, password); closeContext(context); return true; - } catch (NamingException | IOException | NoLdapUserMatchingQueryException e) { - s_logger.debug("Exception while doing an LDAP bind for user "+" "+username, e); - s_logger.info("Failed to authenticate user: " + username + ". incorrect password."); + } catch (NamingException | IOException e) { + s_logger.debug("Exception while doing an LDAP bind for user "+" "+principal, e); + s_logger.info("Failed to authenticate user: " + principal + ". incorrect password."); return false; } } @@ -115,7 +124,7 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { context.close(); } } catch (final NamingException e) { - s_logger.warn(e.getMessage(),e); + s_logger.warn(e.getMessage(), e); } } @@ -163,6 +172,7 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { cmdList.add(LdapImportUsersCmd.class); cmdList.add(LDAPConfigCmd.class); cmdList.add(LDAPRemoveCmd.class); + cmdList.add(LinkDomainToLdapCmd.class); return cmdList; } @@ -173,7 +183,7 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { context = _ldapContextFactory.createBindContext(); final String escapedUsername = LdapUtils.escapeLDAPSearchFilter(username); - return _ldapUserManager.getUser(escapedUsername, context); + return _ldapUserManagerFactory.getInstance(_ldapConfiguration.getLdapProvider()).getUser(escapedUsername, context); } catch (NamingException | IOException e) { s_logger.debug("ldap Exception: ",e); @@ -183,12 +193,27 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { } } + @Override + public LdapUser getUser(final String username, final String type, final String name) throws NoLdapUserMatchingQueryException { + LdapContext context = null; + try { + context = _ldapContextFactory.createBindContext(); + final String escapedUsername = LdapUtils.escapeLDAPSearchFilter(username); + return _ldapUserManagerFactory.getInstance(_ldapConfiguration.getLdapProvider()).getUser(escapedUsername, type, name, context); + } catch (NamingException | IOException e) { + s_logger.debug("ldap Exception: ",e); + throw new NoLdapUserMatchingQueryException("No Ldap User found for username: "+username + "name: " + name + "of type: " + type); + } finally { + closeContext(context); + } + } + @Override public List getUsers() throws NoLdapUserMatchingQueryException { LdapContext context = null; try { context = _ldapContextFactory.createBindContext(); - return _ldapUserManager.getUsers(context); + return _ldapUserManagerFactory.getInstance(_ldapConfiguration.getLdapProvider()).getUsers(context); } catch (NamingException | IOException e) { s_logger.debug("ldap Exception: ",e); throw new NoLdapUserMatchingQueryException("*"); @@ -202,7 +227,7 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { LdapContext context = null; try { context = _ldapContextFactory.createBindContext(); - return _ldapUserManager.getUsersInGroup(groupName, context); + return _ldapUserManagerFactory.getInstance(_ldapConfiguration.getLdapProvider()).getUsersInGroup(groupName, context); } catch (NamingException | IOException e) { s_logger.debug("ldap NamingException: ",e); throw new NoLdapUserMatchingQueryException("groupName=" + groupName); @@ -230,7 +255,7 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { try { context = _ldapContextFactory.createBindContext(); final String escapedUsername = LdapUtils.escapeLDAPSearchFilter(username); - return _ldapUserManager.getUsers("*" + escapedUsername + "*", context); + return _ldapUserManagerFactory.getInstance(_ldapConfiguration.getLdapProvider()).getUsers("*" + escapedUsername + "*", context); } catch (NamingException | IOException e) { s_logger.debug("ldap Exception: ",e); throw new NoLdapUserMatchingQueryException(username); @@ -238,4 +263,22 @@ public class LdapManagerImpl implements LdapManager, LdapValidator { closeContext(context); } } + + @Override + public LinkDomainToLdapResponse linkDomainToLdap(Long domainId, String type, String name, short accountType) { + Validate.notNull(type, "type cannot be null. It should either be GROUP or OU"); + Validate.notNull(domainId, "domainId cannot be null."); + Validate.notEmpty(name, "GROUP or OU name cannot be empty"); + //Account type should be 0 or 2. check the constants in com.cloud.user.Account + Validate.isTrue(accountType==0 || accountType==2, "accountype should be either 0(normal user) or 2(domain admin)"); + LinkType linkType = LdapManager.LinkType.valueOf(type.toUpperCase()); + LdapTrustMapVO vo = _ldapTrustMapDao.persist(new LdapTrustMapVO(domainId, linkType, name, accountType)); + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(vo.getDomainId(), vo.getType().toString(), vo.getName(), vo.getAccountType()); + return response; + } + + @Override + public LdapTrustMapVO getDomainLinkedToLdap(long domainId){ + return _ldapTrustMapDao.findByDomainId(domainId); + } } diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapTrustMapVO.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapTrustMapVO.java new file mode 100644 index 00000000000..8b1363816fa --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapTrustMapVO.java @@ -0,0 +1,115 @@ +/* + * 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.ldap; + +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 = "ldap_trust_map") +public class LdapTrustMapVO implements InternalIdentity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private Long id; + + @Column(name = "type") + private LdapManager.LinkType type; + + @Column(name = "name") + private String name; + + @Column(name = "domain_id") + private long domainId; + + @Column(name = "account_type") + private short accountType; + + + public LdapTrustMapVO() { + } + + public LdapTrustMapVO(long domainId, LdapManager.LinkType type, String name, short accountType) { + this.domainId = domainId; + this.type = type; + this.name = name; + this.accountType = accountType; + } + + @Override + public long getId() { + return id; + } + + public LdapManager.LinkType getType() { + return type; + } + + public String getName() { + return name; + } + + public long getDomainId() { + return domainId; + } + + public short getAccountType() { + return accountType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + LdapTrustMapVO that = (LdapTrustMapVO) o; + + if (domainId != that.domainId) { + return false; + } + if (accountType != that.accountType) { + return false; + } + if (type != that.type) { + return false; + } + return name.equals(that.name); + + } + + @Override + public int hashCode() { + int result = type.hashCode(); + result = 31 * result + name.hashCode(); + result = 31 * result + (int) (domainId ^ (domainId >>> 32)); + result = 31 * result + (int) accountType; + return result; + } +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUser.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUser.java index 0a998f2655a..c4c334b5b6e 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUser.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUser.java @@ -23,14 +23,16 @@ public class LdapUser implements Comparable { private final String lastname; private final String username; private final String domain; + private final boolean disabled; - public LdapUser(final String username, final String email, final String firstname, final String lastname, final String principal, String domain) { + public LdapUser(final String username, final String email, final String firstname, final String lastname, final String principal, String domain, boolean disabled) { this.username = username; this.email = email; this.firstname = firstname; this.lastname = lastname; this.principal = principal; this.domain = domain; + this.disabled = disabled; } @Override @@ -74,6 +76,11 @@ public class LdapUser implements Comparable { return domain; } + public boolean isDisabled() { + return disabled; + } + + @Override public int hashCode() { return getUsername().hashCode(); diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java index 654a601a476..4e2bcf816b2 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManager.java @@ -1,227 +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. +/* + * 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.ldap; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import javax.inject.Inject; -import javax.naming.NamingEnumeration; import javax.naming.NamingException; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; -import javax.naming.ldap.Control; import javax.naming.ldap.LdapContext; -import javax.naming.ldap.PagedResultsControl; -import javax.naming.ldap.PagedResultsResponseControl; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +public interface LdapUserManager { -public class LdapUserManager { - private static final Logger s_logger = Logger.getLogger(LdapUserManager.class.getName()); - - @Inject - private LdapConfiguration _ldapConfiguration; - - public LdapUserManager() { + public enum Provider { + MICROSOFTAD, OPENLDAP; } - public LdapUserManager(final LdapConfiguration ldapConfiguration) { - _ldapConfiguration = ldapConfiguration; - } + public LdapUser getUser(final String username, final LdapContext context) throws NamingException, IOException; - private LdapUser createUser(final SearchResult result) throws NamingException { - final Attributes attributes = result.getAttributes(); + public LdapUser getUser(final String username, final String type, final String name, final LdapContext context) throws NamingException, IOException; - final String username = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getUsernameAttribute()); - final String email = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getEmailAttribute()); - final String firstname = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getFirstnameAttribute()); - final String lastname = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getLastnameAttribute()); - final String principal = result.getNameInNamespace(); + public List getUsers(final LdapContext context) throws NamingException, IOException; - String domain = principal.replace("cn=" + LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getCommonNameAttribute()) + ",", ""); - domain = domain.replace("," + _ldapConfiguration.getBaseDn(), ""); - domain = domain.replace("ou=", ""); + public List getUsers(final String username, final LdapContext context) throws NamingException, IOException; - return new LdapUser(username, email, firstname, lastname, principal, domain); - } + public List getUsersInGroup(String groupName, LdapContext context) throws NamingException; - private String generateSearchFilter(final String username) { - final StringBuilder userObjectFilter = new StringBuilder(); - userObjectFilter.append("(objectClass="); - userObjectFilter.append(_ldapConfiguration.getUserObject()); - userObjectFilter.append(")"); + public List searchUsers(final LdapContext context) throws NamingException, IOException; - final StringBuilder usernameFilter = new StringBuilder(); - usernameFilter.append("("); - usernameFilter.append(_ldapConfiguration.getUsernameAttribute()); - usernameFilter.append("="); - usernameFilter.append((username == null ? "*" : username)); - usernameFilter.append(")"); - - final StringBuilder memberOfFilter = new StringBuilder(); - if (_ldapConfiguration.getSearchGroupPrinciple() != null) { - memberOfFilter.append("(memberof="); - memberOfFilter.append(_ldapConfiguration.getSearchGroupPrinciple()); - memberOfFilter.append(")"); - } - - final StringBuilder result = new StringBuilder(); - result.append("(&"); - result.append(userObjectFilter); - result.append(usernameFilter); - result.append(memberOfFilter); - result.append(")"); - - return result.toString(); - } - - private String generateGroupSearchFilter(final String groupName) { - final StringBuilder groupObjectFilter = new StringBuilder(); - groupObjectFilter.append("(objectClass="); - groupObjectFilter.append(_ldapConfiguration.getGroupObject()); - groupObjectFilter.append(")"); - - final StringBuilder groupNameFilter = new StringBuilder(); - groupNameFilter.append("("); - groupNameFilter.append(_ldapConfiguration.getCommonNameAttribute()); - groupNameFilter.append("="); - groupNameFilter.append((groupName == null ? "*" : groupName)); - groupNameFilter.append(")"); - - final StringBuilder result = new StringBuilder(); - result.append("(&"); - result.append(groupObjectFilter); - result.append(groupNameFilter); - result.append(")"); - - return result.toString(); - } - - public LdapUser getUser(final String username, final LdapContext context) throws NamingException, IOException { - List result = searchUsers(username, context); - if (result!= null && result.size() == 1) { - return result.get(0); - } else { - throw new NamingException("No user found for username " + username); - } - } - - public List getUsers(final LdapContext context) throws NamingException, IOException { - return getUsers(null, context); - } - - public List getUsers(final String username, final LdapContext context) throws NamingException, IOException { - List users = searchUsers(username, context); - - if (CollectionUtils.isNotEmpty(users)) { - Collections.sort(users); - } - return users; - } - - public List getUsersInGroup(String groupName, LdapContext context) throws NamingException { - String attributeName = _ldapConfiguration.getGroupUniqueMemeberAttribute(); - final SearchControls controls = new SearchControls(); - controls.setSearchScope(_ldapConfiguration.getScope()); - controls.setReturningAttributes(new String[] {attributeName}); - - NamingEnumeration result = context.search(_ldapConfiguration.getBaseDn(), generateGroupSearchFilter(groupName), controls); - - final List users = new ArrayList(); - //Expecting only one result which has all the users - if (result.hasMoreElements()) { - Attribute attribute = result.nextElement().getAttributes().get(attributeName); - NamingEnumeration values = attribute.getAll(); - - while (values.hasMoreElements()) { - String userdn = String.valueOf(values.nextElement()); - try{ - users.add(getUserForDn(userdn, context)); - } catch (NamingException e){ - s_logger.info("Userdn: " + userdn + " Not Found:: Exception message: " + e.getMessage()); - } - } - } - - Collections.sort(users); - - return users; - } - - private LdapUser getUserForDn(String userdn, LdapContext context) throws NamingException { - final SearchControls controls = new SearchControls(); - controls.setSearchScope(_ldapConfiguration.getScope()); - controls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); - - NamingEnumeration result = context.search(userdn, "(objectClass=" + _ldapConfiguration.getUserObject() + ")", controls); - if (result.hasMoreElements()) { - return createUser(result.nextElement()); - } else { - throw new NamingException("No user found for dn " + userdn); - } - } - - public List searchUsers(final LdapContext context) throws NamingException, IOException { - return searchUsers(null, context); - } - - public List searchUsers(final String username, final LdapContext context) throws NamingException, IOException { - - final SearchControls searchControls = new SearchControls(); - - searchControls.setSearchScope(_ldapConfiguration.getScope()); - searchControls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); - - String basedn = _ldapConfiguration.getBaseDn(); - if (StringUtils.isBlank(basedn)) { - throw new IllegalArgumentException("ldap basedn is not configured"); - } - byte[] cookie = null; - int pageSize = _ldapConfiguration.getLdapPageSize(); - context.setRequestControls(new Control[]{new PagedResultsControl(pageSize, Control.NONCRITICAL)}); - final List users = new ArrayList(); - NamingEnumeration results; - do { - results = context.search(basedn, generateSearchFilter(username), searchControls); - while (results.hasMoreElements()) { - final SearchResult result = results.nextElement(); - users.add(createUser(result)); - } - Control[] contextControls = context.getResponseControls(); - if (contextControls != null) { - for (Control control : contextControls) { - if (control instanceof PagedResultsResponseControl) { - PagedResultsResponseControl prrc = (PagedResultsResponseControl) control; - cookie = prrc.getCookie(); - } - } - } else { - s_logger.info("No controls were sent from the ldap server"); - } - context.setRequestControls(new Control[] {new PagedResultsControl(pageSize, cookie, Control.CRITICAL)}); - } while (cookie != null); - - return users; - } -} \ No newline at end of file + public List searchUsers(final String username, final LdapContext context) throws NamingException, IOException; +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManagerFactory.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManagerFactory.java new file mode 100644 index 00000000000..f796ce23b4e --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapUserManagerFactory.java @@ -0,0 +1,64 @@ +/* + * 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.ldap; + +import org.apache.log4j.Logger; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.config.AutowireCapableBeanFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.HashMap; +import java.util.Map; + +public class LdapUserManagerFactory implements ApplicationContextAware { + + + public static final Logger s_logger = Logger.getLogger(LdapUserManagerFactory.class.getName()); + + private static Map ldapUserManagerMap = new HashMap<>(); + + private ApplicationContext applicationCtx; + + public LdapUserManager getInstance(LdapUserManager.Provider provider) { + LdapUserManager ldapUserManager; + if (provider == LdapUserManager.Provider.MICROSOFTAD) { + ldapUserManager = ldapUserManagerMap.get(LdapUserManager.Provider.MICROSOFTAD); + if (ldapUserManager == null) { + ldapUserManager = new ADLdapUserManagerImpl(); + applicationCtx.getAutowireCapableBeanFactory().autowireBeanProperties(ldapUserManager, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true); + ldapUserManagerMap.put(LdapUserManager.Provider.MICROSOFTAD, ldapUserManager); + } + } else { + //defaults to openldap + ldapUserManager = ldapUserManagerMap.get(LdapUserManager.Provider.OPENLDAP); + if (ldapUserManager == null) { + ldapUserManager = new OpenLdapUserManagerImpl(); + applicationCtx.getAutowireCapableBeanFactory().autowireBeanProperties(ldapUserManager, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true); + ldapUserManagerMap.put(LdapUserManager.Provider.OPENLDAP, ldapUserManager); + } + } + return ldapUserManager; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + applicationCtx = applicationContext; + } +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/OpenLdapUserManagerImpl.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/OpenLdapUserManagerImpl.java new file mode 100644 index 00000000000..0c3e0d71705 --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/OpenLdapUserManagerImpl.java @@ -0,0 +1,303 @@ +// 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.ldap; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import javax.inject.Inject; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.Attribute; +import javax.naming.directory.Attributes; +import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; +import javax.naming.ldap.Control; +import javax.naming.ldap.LdapContext; +import javax.naming.ldap.PagedResultsControl; +import javax.naming.ldap.PagedResultsResponseControl; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +public class OpenLdapUserManagerImpl implements LdapUserManager { + private static final Logger s_logger = Logger.getLogger(OpenLdapUserManagerImpl.class.getName()); + + @Inject + protected LdapConfiguration _ldapConfiguration; + + public OpenLdapUserManagerImpl() { + } + + public OpenLdapUserManagerImpl(final LdapConfiguration ldapConfiguration) { + _ldapConfiguration = ldapConfiguration; + } + + protected LdapUser createUser(final SearchResult result) throws NamingException { + final Attributes attributes = result.getAttributes(); + + final String username = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getUsernameAttribute()); + final String email = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getEmailAttribute()); + final String firstname = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getFirstnameAttribute()); + final String lastname = LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getLastnameAttribute()); + final String principal = result.getNameInNamespace(); + + String domain = principal.replace("cn=" + LdapUtils.getAttributeValue(attributes, _ldapConfiguration.getCommonNameAttribute()) + ",", ""); + domain = domain.replace("," + _ldapConfiguration.getBaseDn(), ""); + domain = domain.replace("ou=", ""); + + boolean disabled = isUserDisabled(result); + + return new LdapUser(username, email, firstname, lastname, principal, domain, disabled); + } + + private String generateSearchFilter(final String username) { + final StringBuilder userObjectFilter = new StringBuilder(); + userObjectFilter.append("(objectClass="); + userObjectFilter.append(_ldapConfiguration.getUserObject()); + userObjectFilter.append(")"); + + final StringBuilder usernameFilter = new StringBuilder(); + usernameFilter.append("("); + usernameFilter.append(_ldapConfiguration.getUsernameAttribute()); + usernameFilter.append("="); + usernameFilter.append((username == null ? "*" : username)); + usernameFilter.append(")"); + + final StringBuilder memberOfFilter = new StringBuilder(); + if (_ldapConfiguration.getSearchGroupPrinciple() != null) { + memberOfFilter.append("(memberof="); + memberOfFilter.append(_ldapConfiguration.getSearchGroupPrinciple()); + memberOfFilter.append(")"); + } + + final StringBuilder result = new StringBuilder(); + result.append("(&"); + result.append(userObjectFilter); + result.append(usernameFilter); + result.append(memberOfFilter); + result.append(")"); + + return result.toString(); + } + + private String generateGroupSearchFilter(final String groupName) { + final StringBuilder groupObjectFilter = new StringBuilder(); + groupObjectFilter.append("(objectClass="); + groupObjectFilter.append(_ldapConfiguration.getGroupObject()); + groupObjectFilter.append(")"); + + final StringBuilder groupNameFilter = new StringBuilder(); + groupNameFilter.append("("); + groupNameFilter.append(_ldapConfiguration.getCommonNameAttribute()); + groupNameFilter.append("="); + groupNameFilter.append((groupName == null ? "*" : groupName)); + groupNameFilter.append(")"); + + final StringBuilder result = new StringBuilder(); + result.append("(&"); + result.append(groupObjectFilter); + result.append(groupNameFilter); + result.append(")"); + + return result.toString(); + } + + @Override + public LdapUser getUser(final String username, final LdapContext context) throws NamingException, IOException { + List result = searchUsers(username, context); + if (result!= null && result.size() == 1) { + return result.get(0); + } else { + throw new NamingException("No user found for username " + username); + } + } + + @Override + public LdapUser getUser(final String username, final String type, final String name, final LdapContext context) throws NamingException, IOException { + String basedn; + if("OU".equals(type)) { + basedn = name; + } else { + basedn = _ldapConfiguration.getBaseDn(); + } + + final StringBuilder userObjectFilter = new StringBuilder(); + userObjectFilter.append("(objectClass="); + userObjectFilter.append(_ldapConfiguration.getUserObject()); + userObjectFilter.append(")"); + + final StringBuilder usernameFilter = new StringBuilder(); + usernameFilter.append("("); + usernameFilter.append(_ldapConfiguration.getUsernameAttribute()); + usernameFilter.append("="); + usernameFilter.append((username == null ? "*" : username)); + usernameFilter.append(")"); + + final StringBuilder memberOfFilter = new StringBuilder(); + if ("GROUP".equals(type)) { + memberOfFilter.append("(").append(getMemberOfAttribute()).append("="); + memberOfFilter.append(name); + memberOfFilter.append(")"); + } + + final StringBuilder searchQuery = new StringBuilder(); + searchQuery.append("(&"); + searchQuery.append(userObjectFilter); + searchQuery.append(usernameFilter); + searchQuery.append(memberOfFilter); + searchQuery.append(")"); + + return searchUser(basedn, searchQuery.toString(), context); + } + + protected String getMemberOfAttribute() { + return "memberof"; + } + + @Override + public List getUsers(final LdapContext context) throws NamingException, IOException { + return getUsers(null, context); + } + + @Override + public List getUsers(final String username, final LdapContext context) throws NamingException, IOException { + List users = searchUsers(username, context); + + if (CollectionUtils.isNotEmpty(users)) { + Collections.sort(users); + } + return users; + } + + @Override + public List getUsersInGroup(String groupName, LdapContext context) throws NamingException { + String attributeName = _ldapConfiguration.getGroupUniqueMemeberAttribute(); + final SearchControls controls = new SearchControls(); + controls.setSearchScope(_ldapConfiguration.getScope()); + controls.setReturningAttributes(new String[] {attributeName}); + + NamingEnumeration result = context.search(_ldapConfiguration.getBaseDn(), generateGroupSearchFilter(groupName), controls); + + final List users = new ArrayList(); + //Expecting only one result which has all the users + if (result.hasMoreElements()) { + Attribute attribute = result.nextElement().getAttributes().get(attributeName); + NamingEnumeration values = attribute.getAll(); + + while (values.hasMoreElements()) { + String userdn = String.valueOf(values.nextElement()); + try{ + users.add(getUserForDn(userdn, context)); + } catch (NamingException e){ + s_logger.info("Userdn: " + userdn + " Not Found:: Exception message: " + e.getMessage()); + } + } + } + + Collections.sort(users); + + return users; + } + + private LdapUser getUserForDn(String userdn, LdapContext context) throws NamingException { + final SearchControls controls = new SearchControls(); + controls.setSearchScope(_ldapConfiguration.getScope()); + controls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); + + NamingEnumeration result = context.search(userdn, "(objectClass=" + _ldapConfiguration.getUserObject() + ")", controls); + if (result.hasMoreElements()) { + return createUser(result.nextElement()); + } else { + throw new NamingException("No user found for dn " + userdn); + } + } + + @Override + public List searchUsers(final LdapContext context) throws NamingException, IOException { + return searchUsers(null, context); + } + + protected boolean isUserDisabled(SearchResult result) throws NamingException { + return false; + } + + public LdapUser searchUser(final String basedn, final String searchString, final LdapContext context) throws NamingException, IOException { + final SearchControls searchControls = new SearchControls(); + + searchControls.setSearchScope(_ldapConfiguration.getScope()); + searchControls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); + + NamingEnumeration results = context.search(basedn, searchString, searchControls); + final List users = new ArrayList(); + while (results.hasMoreElements()) { + final SearchResult result = results.nextElement(); + users.add(createUser(result)); + } + + if (users.size() == 1) { + return users.get(0); + } else { + throw new NamingException("No user found for basedn " + basedn + " and searchString " + searchString); + } + } + + @Override + public List searchUsers(final String username, final LdapContext context) throws NamingException, IOException { + + final SearchControls searchControls = new SearchControls(); + + searchControls.setSearchScope(_ldapConfiguration.getScope()); + searchControls.setReturningAttributes(_ldapConfiguration.getReturnAttributes()); + + String basedn = _ldapConfiguration.getBaseDn(); + if (StringUtils.isBlank(basedn)) { + throw new IllegalArgumentException("ldap basedn is not configured"); + } + byte[] cookie = null; + int pageSize = _ldapConfiguration.getLdapPageSize(); + context.setRequestControls(new Control[]{new PagedResultsControl(pageSize, Control.NONCRITICAL)}); + final List users = new ArrayList(); + NamingEnumeration results; + do { + results = context.search(basedn, generateSearchFilter(username), searchControls); + while (results.hasMoreElements()) { + final SearchResult result = results.nextElement(); + if (!isUserDisabled(result)) { + users.add(createUser(result)); + } + } + Control[] contextControls = context.getResponseControls(); + if (contextControls != null) { + for (Control control : contextControls) { + if (control instanceof PagedResultsResponseControl) { + PagedResultsResponseControl prrc = (PagedResultsResponseControl) control; + cookie = prrc.getCookie(); + } + } + } else { + s_logger.info("No controls were sent from the ldap server"); + } + context.setRequestControls(new Control[] {new PagedResultsControl(pageSize, cookie, Control.CRITICAL)}); + } while (cookie != null); + + return users; + } +} \ No newline at end of file diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDao.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDao.java new file mode 100644 index 00000000000..7ef3799b3d8 --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDao.java @@ -0,0 +1,27 @@ +/* + * 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.ldap.dao; + +import org.apache.cloudstack.ldap.LdapTrustMapVO; + +import com.cloud.utils.db.GenericDao; + +public interface LdapTrustMapDao extends GenericDao { + LdapTrustMapVO findByDomainId(long domainId); +} diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDaoImpl.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDaoImpl.java new file mode 100644 index 00000000000..fb0d74d122d --- /dev/null +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/dao/LdapTrustMapDaoImpl.java @@ -0,0 +1,48 @@ +/* + * 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.ldap.dao; + +import javax.ejb.Local; + +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import org.apache.cloudstack.ldap.LdapTrustMapVO; +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; + +@Component +@Local(value = {LdapTrustMapDao.class}) +public class LdapTrustMapDaoImpl extends GenericDaoBase implements LdapTrustMapDao { + private final SearchBuilder domainIdSearch; + + public LdapTrustMapDaoImpl() { + super(); + domainIdSearch = createSearchBuilder(); + domainIdSearch.and("domainId", domainIdSearch.entity().getDomainId(), SearchCriteria.Op.EQ); + domainIdSearch.done(); + } + + @Override + public LdapTrustMapVO findByDomainId(long domainId) { + final SearchCriteria sc = domainIdSearch.create(); + sc.setParameters("domainId", domainId); + return findOneBy(sc); + } +} diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/ADLdapUserManagerImplSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/ADLdapUserManagerImplSpec.groovy new file mode 100644 index 00000000000..93b1b17a460 --- /dev/null +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/ADLdapUserManagerImplSpec.groovy @@ -0,0 +1,85 @@ +/* + * 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 groovy.org.apache.cloudstack.ldap + +import org.apache.cloudstack.ldap.ADLdapUserManagerImpl +import org.apache.cloudstack.ldap.LdapConfiguration +import spock.lang.Shared + +import javax.naming.directory.SearchControls +import javax.naming.ldap.LdapContext + +class ADLdapUserManagerImplSpec extends spock.lang.Specification { + + @Shared + ADLdapUserManagerImpl adLdapUserManager; + + @Shared + LdapConfiguration ldapConfiguration; + + def setup() { + adLdapUserManager = new ADLdapUserManagerImpl(); + ldapConfiguration = Mock(LdapConfiguration); + adLdapUserManager._ldapConfiguration = ldapConfiguration; + } + + def "test generate AD search filter with nested groups enabled"() { + ldapConfiguration.getUserObject() >> "user" + ldapConfiguration.getCommonNameAttribute() >> "CN" + ldapConfiguration.getBaseDn() >> "DC=cloud,DC=citrix,DC=com" + ldapConfiguration.isNestedGroupsEnabled() >> true + + def result = adLdapUserManager.generateADGroupSearchFilter(group); + expect: + assert result.contains("memberOf:1.2.840.113556.1.4.1941:=") + result == "(&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=" + group + ",DC=cloud,DC=citrix,DC=com))" + where: + group << ["dev", "dev-hyd"] + } + + def "test generate AD search filter with nested groups disabled"() { + ldapConfiguration.getUserObject() >> "user" + ldapConfiguration.getCommonNameAttribute() >> "CN" + ldapConfiguration.getBaseDn() >> "DC=cloud,DC=citrix,DC=com" + ldapConfiguration.isNestedGroupsEnabled() >> false + + def result = adLdapUserManager.generateADGroupSearchFilter(group); + expect: + assert result.contains("memberOf=") + result == "(&(objectClass=user)(memberOf=CN=" + group + ",DC=cloud,DC=citrix,DC=com))" + where: + group << ["dev", "dev-hyd"] + } + + def "test getUsersInGroup null group"() { + ldapConfiguration.getScope() >> SearchControls.SUBTREE_SCOPE + ldapConfiguration.getReturnAttributes() >> ["username", "firstname", "lastname", "email"] + ldapConfiguration.getBaseDn() >>> [null, null, "DC=cloud,DC=citrix,DC=com"] + + LdapContext context = Mock(LdapContext); + + when: + def result = adLdapUserManager.getUsersInGroup(group, context) + then: + thrown(IllegalArgumentException) + where: + group << [null, "group", null] + + } +} diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapAuthenticatorSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapAuthenticatorSpec.groovy index 51f8e84559a..ca19e8c633b 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapAuthenticatorSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapAuthenticatorSpec.groovy @@ -16,84 +16,234 @@ // under the License. package groovy.org.apache.cloudstack.ldap +import com.cloud.server.auth.UserAuthenticator +import com.cloud.user.Account +import com.cloud.user.AccountManager +import com.cloud.user.User +import com.cloud.user.UserAccount import com.cloud.user.UserAccountVO import com.cloud.user.dao.UserAccountDao import com.cloud.utils.Pair import org.apache.cloudstack.ldap.LdapAuthenticator -import org.apache.cloudstack.ldap.LdapConfigurationVO import org.apache.cloudstack.ldap.LdapManager +import org.apache.cloudstack.ldap.LdapTrustMapVO +import org.apache.cloudstack.ldap.LdapUser class LdapAuthenticatorSpec extends spock.lang.Specification { def "Test a failed authentication due to user not being found within cloudstack"() { - given: "We have an LdapManager, userAccountDao and ldapAuthenticator and the user doesn't exist within cloudstack." + given: "We have an LdapManager, userAccountDao and ldapAuthenticator and the user doesn't exist within cloudstack." LdapManager ldapManager = Mock(LdapManager) UserAccountDao userAccountDao = Mock(UserAccountDao) userAccountDao.getUserAccount(_, _) >> null def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) - when: "A user authentications" + when: "A user authentications" def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) - then: "their authentication fails" - result.first() == false + then: "their authentication fails" + result.first() == false } def "Test failed authentication due to ldap bind being unsuccessful"() { - given: "We have an LdapManager, LdapConfiguration, userAccountDao and LdapAuthenticator" - def ldapManager = Mock(LdapManager) - ldapManager.isLdapEnabled() >> true - ldapManager.canAuthenticate(_, _) >> false + given: "We have an LdapManager, LdapConfiguration, userAccountDao and LdapAuthenticator" + def ldapManager = Mock(LdapManager) + def ldapUser = Mock(LdapUser) + ldapUser.isDisabled() >> false + ldapManager.isLdapEnabled() >> true + ldapManager.getUser("rmurphy") >> ldapUser + ldapManager.canAuthenticate(_, _) >> false - UserAccountDao userAccountDao = Mock(UserAccountDao) - userAccountDao.getUserAccount(_, _) >> new UserAccountVO() - def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) + UserAccountDao userAccountDao = Mock(UserAccountDao) + userAccountDao.getUserAccount(_, _) >> new UserAccountVO() + def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) - when: "The user authenticates with an incorrect password" - def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) + when: "The user authenticates with an incorrect password" + def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) - then: "their authentication fails" - result.first() == false + then: "their authentication fails" + result.first() == false } def "Test failed authentication due to ldap not being configured"() { - given: "We have an LdapManager, A configured LDAP server, a userAccountDao and LdapAuthenticator" - def ldapManager = Mock(LdapManager) - ldapManager.isLdapEnabled() >> false + given: "We have an LdapManager, A configured LDAP server, a userAccountDao and LdapAuthenticator" + def ldapManager = Mock(LdapManager) + ldapManager.isLdapEnabled() >> false - UserAccountDao userAccountDao = Mock(UserAccountDao) - userAccountDao.getUserAccount(_, _) >> new UserAccountVO() + UserAccountDao userAccountDao = Mock(UserAccountDao) + userAccountDao.getUserAccount(_, _) >> new UserAccountVO() - def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) - when: "The user authenticates" - def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) - then: "their authentication fails" - result.first() == false + def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) + when: "The user authenticates" + def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) + then: "their authentication fails" + result.first() == false } - def "Test successful authentication"() { - given: "We have an LdapManager, LdapConfiguration, userAccountDao and LdapAuthenticator" - def ldapManager = Mock(LdapManager) - ldapManager.isLdapEnabled() >> true - ldapManager.canAuthenticate(_, _) >> true + def "Test successful authentication"() { + given: "We have an LdapManager, LdapConfiguration, userAccountDao and LdapAuthenticator" + def ldapManager = Mock(LdapManager) + def ldapUser = Mock(LdapUser) + ldapUser.isDisabled() >> false + ldapManager.isLdapEnabled() >> true + ldapManager.canAuthenticate(_, _) >> true + ldapManager.getUser("rmurphy") >> ldapUser - UserAccountDao userAccountDao = Mock(UserAccountDao) - userAccountDao.getUserAccount(_, _) >> new UserAccountVO() - def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) + UserAccountDao userAccountDao = Mock(UserAccountDao) + userAccountDao.getUserAccount(_, _) >> new UserAccountVO() + def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) - when: "The user authenticates with an incorrect password" - def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) + when: "The user authenticates with an incorrect password" + def result = ldapAuthenticator.authenticate("rmurphy", "password", 0, null) - then: "their authentication passes" - result.first() == true - } + then: "their authentication passes" + result.first() == true + } def "Test that encode doesn't change the input"() { - given: "We have an LdapManager, userAccountDao and LdapAuthenticator" - LdapManager ldapManager = Mock(LdapManager) - UserAccountDao userAccountDao = Mock(UserAccountDao) - def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) - when: "a users password is encoded" - def result = ldapAuthenticator.encode("password") - then: "it doesn't change" - result == "password" + given: "We have an LdapManager, userAccountDao and LdapAuthenticator" + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) + when: "a users password is encoded" + def result = ldapAuthenticator.encode("password") + then: "it doesn't change" + result == "password" + } + + def "test authentication when ldap is disabled"(){ + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + def ldapAuthenticator = new LdapAuthenticator(ldapManager, userAccountDao) + ldapManager.isLdapEnabled() >> false + + when: + Pair result = ldapAuthenticator.authenticate("rajanik", "password", 1, null) + then: + result.first() == false + result.second() == null + + } + + // tests when domain is linked to LDAP + def "test authentication when domain is linked and user disabled in ldap"(){ + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + AccountManager accountManager = Mock(AccountManager) + + def ldapAuthenticator = new LdapAuthenticator() + ldapAuthenticator._ldapManager = ldapManager + ldapAuthenticator._userAccountDao = userAccountDao + ldapAuthenticator._accountManager = accountManager + + long domainId = 1; + String username = "rajanik" + LdapManager.LinkType type = LdapManager.LinkType.GROUP + String name = "CN=test,DC=ccp,DC=citrix,DC=com" + + ldapManager.isLdapEnabled() >> true + UserAccount userAccount = Mock(UserAccount) + userAccountDao.getUserAccount(username, domainId) >> userAccount + userAccount.getId() >> 1 + ldapManager.getDomainLinkedToLdap(domainId) >> new LdapTrustMapVO(domainId, type, name, (short)2) + ldapManager.getUser(username, type.toString(), name) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", true) + //user should be disabled in cloudstack + accountManager.disableUser(1) >> userAccount + + when: + Pair result = ldapAuthenticator.authenticate(username, "password", domainId, null) + then: + result.first() == false + result.second() == UserAuthenticator.ActionOnFailedAuthentication.INCREMENT_INCORRECT_LOGIN_ATTEMPT_COUNT + } + + def "test authentication when domain is linked and first time user can authenticate in ldap"(){ + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + AccountManager accountManager = Mock(AccountManager) + + def ldapAuthenticator = new LdapAuthenticator() + ldapAuthenticator._ldapManager = ldapManager + ldapAuthenticator._userAccountDao = userAccountDao + ldapAuthenticator._accountManager = accountManager + + long domainId = 1; + String username = "rajanik" + LdapManager.LinkType type = LdapManager.LinkType.GROUP + String name = "CN=test,DC=ccp,DC=citrix,DC=com" + + ldapManager.isLdapEnabled() >> true + userAccountDao.getUserAccount(username, domainId) >> null + ldapManager.getDomainLinkedToLdap(domainId) >> new LdapTrustMapVO(domainId, type, name, (short)0) + ldapManager.getUser(username, type.toString(), name) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", false) + ldapManager.canAuthenticate(_,_) >> true + //user should be created in cloudstack + accountManager.createUserAccount(username, "", "firstname", "lastname", "email", null, username, (short) 2, domainId, username, null, _, _, User.Source.LDAP) >> Mock(UserAccount) + + when: + Pair result = ldapAuthenticator.authenticate(username, "password", domainId, null) + then: + result.first() == true + result.second() == null + } + + def "test authentication when domain is linked and existing user can authenticate in ldap"(){ + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + AccountManager accountManager = Mock(AccountManager) + + def ldapAuthenticator = new LdapAuthenticator() + ldapAuthenticator._ldapManager = ldapManager + ldapAuthenticator._userAccountDao = userAccountDao + ldapAuthenticator._accountManager = accountManager + + long domainId = 1; + String username = "rajanik" + LdapManager.LinkType type = LdapManager.LinkType.GROUP + String name = "CN=test,DC=ccp,DC=citrix,DC=com" + + ldapManager.isLdapEnabled() >> true + UserAccount userAccount = Mock(UserAccount) + userAccountDao.getUserAccount(username, domainId) >> userAccount + userAccount.getId() >> 1 + userAccount.getState() >> Account.State.disabled.toString() + ldapManager.getDomainLinkedToLdap(domainId) >> new LdapTrustMapVO(domainId, type, name, (short)2) + ldapManager.getUser(username, type.toString(), name) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", false) + ldapManager.canAuthenticate(_,_) >> true + //user should be enabled in cloudstack if disabled + accountManager.enableUser(1) >> userAccount + + when: + Pair result = ldapAuthenticator.authenticate(username, "password", domainId, null) + then: + result.first() == true + result.second() == null + } + + def "test authentication when domain is linked and user cannot authenticate in ldap"(){ + LdapManager ldapManager = Mock(LdapManager) + UserAccountDao userAccountDao = Mock(UserAccountDao) + AccountManager accountManager = Mock(AccountManager) + + def ldapAuthenticator = new LdapAuthenticator() + ldapAuthenticator._ldapManager = ldapManager + ldapAuthenticator._userAccountDao = userAccountDao + ldapAuthenticator._accountManager = accountManager + + long domainId = 1; + String username = "rajanik" + LdapManager.LinkType type = LdapManager.LinkType.GROUP + String name = "CN=test,DC=ccp,DC=citrix,DC=com" + + ldapManager.isLdapEnabled() >> true + UserAccount userAccount = Mock(UserAccount) + userAccountDao.getUserAccount(username, domainId) >> userAccount + ldapManager.getDomainLinkedToLdap(domainId) >> new LdapTrustMapVO(domainId, type, name, (short)2) + ldapManager.getUser(username, type.toString(), name) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", false) + ldapManager.canAuthenticate(_,_) >> false + + when: + Pair result = ldapAuthenticator.authenticate(username, "password", domainId, null) + then: + result.first() == false + result.second() == UserAuthenticator.ActionOnFailedAuthentication.INCREMENT_INCORRECT_LOGIN_ATTEMPT_COUNT } } diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapConfigurationSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapConfigurationSpec.groovy index adc3463afde..6f967cc6d8b 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapConfigurationSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapConfigurationSpec.groovy @@ -25,6 +25,8 @@ import org.apache.cloudstack.framework.config.impl.ConfigurationVO import org.apache.cloudstack.ldap.LdapConfiguration import org.apache.cloudstack.ldap.LdapConfigurationVO import org.apache.cloudstack.ldap.LdapManager +import org.apache.cloudstack.ldap.LdapUserManager +import org.apache.cloudstack.ldap.dao.LdapConfigurationDao import org.apache.cxf.common.util.StringUtils import javax.naming.directory.SearchControls @@ -33,8 +35,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def "Test that getAuthentication returns none"() { given: "We have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get authentication is called" String authentication = ldapConfiguration.getAuthentication() then: "none should be returned" @@ -44,8 +46,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def "Test that getAuthentication returns simple"() { given: "We have a configDao, LdapManager and LdapConfiguration with bind principle and password set" def configDao = Mock(ConfigurationDao) - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) configDao.getValue("ldap.bind.password") >> "password" configDao.getValue("ldap.bind.principal") >> "cn=rmurphy,dc=cloudstack,dc=org" when: "Get authentication is called" @@ -58,8 +60,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao, LdapManager and ldapConfiguration with a baseDn value set." def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.basedn") >> "dc=cloudstack,dc=org" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get basedn is called" String baseDn = ldapConfiguration.getBaseDn(); then: "The set baseDn should be returned" @@ -70,8 +72,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "Given that we have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.email.attribute") >> "mail" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get Email Attribute is called" String emailAttribute = ldapConfiguration.getEmailAttribute() then: "mail should be returned" @@ -81,8 +83,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def "Test that getFactory returns com.sun.jndi.ldap.LdapCtxFactory"() { given: "We have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get Factory is scalled" String factory = ldapConfiguration.getFactory(); then: "com.sun.jndi.ldap.LdapCtxFactory is returned" @@ -93,8 +95,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.firstname.attribute") >> "givenname" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get firstname attribute is called" String firstname = ldapConfiguration.getFirstnameAttribute() then: "givennam should be returned" @@ -105,8 +107,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.lastname.attribute") >> "sn" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get Lastname Attribute is scalled " String lastname = ldapConfiguration.getLastnameAttribute() then: "sn should be returned" @@ -120,19 +122,19 @@ class LdapConfigurationSpec extends spock.lang.Specification { configDao.getValue("ldap.lastname.attribute") >> "sn" configDao.getValue("ldap.username.attribute") >> "uid" configDao.getValue("ldap.email.attribute") >> "mail" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get return attributes is called" String[] returnAttributes = ldapConfiguration.getReturnAttributes() then: "An array containing uid, mail, givenname, sn and cn is returned" - returnAttributes == ["uid", "mail", "givenname", "sn", "cn"] + returnAttributes == ["uid", "mail", "givenname", "sn", "cn", "userAccountControl"] } def "Test that getScope returns SearchControls.SUBTREE_SCOPE"() { given: "We have ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get scope is called" int scope = ldapConfiguration.getScope() then: "SearchControls.SUBTRE_SCOPE should be returned" @@ -143,8 +145,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.username.attribute") >> "uid" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get Username Attribute is called" String usernameAttribute = ldapConfiguration.getUsernameAttribute() then: "uid should be returned" @@ -155,8 +157,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao, LdapManager and LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.user.object") >> "inetOrgPerson" - def ldapManager = Mock(LdapManager) - def ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + def ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "Get user object is called" String userObject = ldapConfiguration.getUserObject() then: "inetOrgPerson is returned" @@ -166,14 +168,14 @@ class LdapConfigurationSpec extends spock.lang.Specification { def "Test that providerUrl successfully returns a URL when a configuration is available"() { given: "We have a ConfigDao, LdapManager, LdapConfiguration" def configDao = Mock(ConfigurationDao) - def ldapManager = Mock(LdapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) List ldapConfigurationList = new ArrayList() ldapConfigurationList.add(new LdapConfigurationVO("localhost", 389)) Pair, Integer> result = new Pair, Integer>(); result.set(ldapConfigurationList, ldapConfigurationList.size()) - ldapManager.listConfigurations(_) >> result + ldapConfigurationDao.searchConfigurations(_,_) >> result - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "A request is made to get the providerUrl" String providerUrl = ldapConfiguration.getProviderUrl() @@ -186,8 +188,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao with a value for ldap.search.group.principle and an LdapConfiguration" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.search.group.principle") >> "cn=cloudstack,cn=users,dc=cloudstack,dc=org" - def ldapManager = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "A request is made to get the search group principle" String result = ldapConfiguration.getSearchGroupPrinciple(); @@ -200,8 +202,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { given: "We have a ConfigDao with a value for truststore password" def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.truststore.password") >> "password" - def ldapManager = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "A request is made to get the truststore password" String result = ldapConfiguration.getTrustStorePassword() @@ -215,8 +217,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.truststore") >> "/tmp/ldap.ts" configDao.getValue("ldap.truststore.password") >> "password" - def ldapManager = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManager) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) when: "A request is made to get the status of SSL" boolean result = ldapConfiguration.getSSLStatus(); @@ -230,8 +232,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.group.object") >> groupObject - def ldapManger = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManger) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) def expectedResult = groupObject == null ? "groupOfUniqueNames" : groupObject def result = ldapConfiguration.getGroupObject() @@ -246,8 +248,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { def configDao = Mock(ConfigurationDao) configDao.getValue("ldap.group.user.uniquemember") >> groupObject - def ldapManger = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManger) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) def expectedResult = groupObject == null ? "uniquemember" : groupObject def result = ldapConfiguration.getGroupUniqueMemeberAttribute() @@ -268,8 +270,8 @@ class LdapConfigurationSpec extends spock.lang.Specification { configDepotImpl.global() >> configDao ConfigKey.init(configDepotImpl) - def ldapManger = Mock(LdapManager) - LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapManger) + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) def expected = timeout == null ? 1000 : timeout.toLong() //1000 is the default value @@ -280,4 +282,28 @@ class LdapConfigurationSpec extends spock.lang.Specification { timeout << ["1000000", "1000", null] } + def "Test getLdapProvider()"() { + given: "We have configdao for ldap group object" + def configDao = Mock(ConfigurationDao) + ConfigurationVO configurationVo = new ConfigurationVO("ldap.read.timeout", LdapConfiguration.ldapProvider); + configurationVo.setValue(provider) + configDao.findById("ldap.provider") >> configurationVo + + def configDepotImpl = Mock(ConfigDepotImpl) + configDepotImpl.global() >> configDao + ConfigKey.init(configDepotImpl) + + def ldapConfigurationDao = Mock(LdapConfigurationDao) + LdapConfiguration ldapConfiguration = new LdapConfiguration(configDao, ldapConfigurationDao) + + def expected = provider.equalsIgnoreCase("microsoftad") ? LdapUserManager.Provider.MICROSOFTAD : LdapUserManager.Provider.OPENLDAP //"openldap" is the default value + + def result = ldapConfiguration.getLdapProvider() + expect: + println "asserting for provider configuration: " + provider + result == expected + where: + provider << ["openldap", "microsoftad", "", " ", "xyz", "MicrosoftAd", "OpenLdap", "MicrosoftAD"] + } + } diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapContextFactorySpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapContextFactorySpec.groovy index 2a665283edd..15408833a65 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapContextFactorySpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapContextFactorySpec.groovy @@ -61,7 +61,7 @@ class LdapContextFactorySpec extends spock.lang.Specification { password = "password" } - def "Test succcessfully creating a initial context"() { + def "Test successfully creating a initial context"() { given: "We have a LdapContextFactory" def ldapContextFactory = new LdapContextFactory(ldapConfiguration) when: "A context attempts to bind and no Ldap server is avaiable" diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapCreateAccountCmdSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapCreateAccountCmdSpec.groovy index c57cc7872df..a0b20bbcb13 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapCreateAccountCmdSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapCreateAccountCmdSpec.groovy @@ -53,11 +53,11 @@ class LdapCreateAccountCmdSpec extends spock.lang.Specification { def "Test failed creation due to a null response from cloudstack account creater"() { given: "We have an LdapManager, AccountService and LdapCreateAccountCmd" LdapManager ldapManager = Mock(LdapManager) - ldapManager.getUser(_) >> new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") + ldapManager.getUser(_) >> new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false) AccountService accountService = Mock(AccountService) def ldapCreateAccountCmd = Spy(LdapCreateAccountCmd, constructorArgs: [ldapManager, accountService]) ldapCreateAccountCmd.getCurrentContext() >> Mock(CallContext) - ldapCreateAccountCmd.createCloudstackUserAccount(_) >> null + ldapCreateAccountCmd.createCloudstackUserAccount(_, _, _) >> null when: "Cloudstack fail to create the user" ldapCreateAccountCmd.execute() then: "An exception is thrown" @@ -105,7 +105,7 @@ class LdapCreateAccountCmdSpec extends spock.lang.Specification { AccountService accountService = Mock(AccountService) def ldapCreateAccountCmd = new LdapCreateAccountCmd(ldapManager, accountService); when: "a user with an username, email, firstname and lastname is validated" - def result = ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", "firstname", "lastname", "principal", "domain")) + def result = ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", "firstname", "lastname", "principal", "domain", false)) then: "the result is true" result == true } @@ -116,7 +116,7 @@ class LdapCreateAccountCmdSpec extends spock.lang.Specification { AccountService accountService = Mock(AccountService) def ldapCreateAccountCmd = new LdapCreateAccountCmd(ldapManager, accountService) when: "A user with no email address attempts to validate" - ldapCreateAccountCmd.validateUser(new LdapUser("username", null, "firstname", "lastname", "principal", "domain")) + ldapCreateAccountCmd.validateUser(new LdapUser("username", null, "firstname", "lastname", "principal", "domain", false)) then: "An exception is thrown" thrown Exception } @@ -127,7 +127,7 @@ class LdapCreateAccountCmdSpec extends spock.lang.Specification { AccountService accountService = Mock(AccountService) def ldapCreateAccountCmd = new LdapCreateAccountCmd(ldapManager, accountService) when: "A user with no firstname attempts to validate" - ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", null, "lastname", "principal")) + ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", null, "lastname", "principal", false)) then: "An exception is thrown" thrown Exception } @@ -138,7 +138,7 @@ class LdapCreateAccountCmdSpec extends spock.lang.Specification { AccountService accountService = Mock(AccountService) def ldapCreateAccountCmd = new LdapCreateAccountCmd(ldapManager, accountService) when: "A user with no lastname attempts to validate" - ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", "firstname", null, "principal", "domain")) + ldapCreateAccountCmd.validateUser(new LdapUser("username", "email", "firstname", null, "principal", "domain", false)) then: "An exception is thown" thrown Exception } diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapImportUsersCmdSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapImportUsersCmdSpec.groovy index 6e0759f85c1..514caeb17da 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapImportUsersCmdSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapImportUsersCmdSpec.groovy @@ -53,8 +53,8 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { def accountService = Mock(AccountService) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) - users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) + users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsers() >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") LdapUserResponse response2 = new LdapUserResponse("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering") @@ -81,8 +81,8 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { def accountService = Mock(AccountService) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) - users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) + users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsersInGroup("TestGroup") >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") LdapUserResponse response2 = new LdapUserResponse("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering") @@ -110,8 +110,8 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { def accountService = Mock(AccountService) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) - users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) + users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsersInGroup("TestGroup") >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") LdapUserResponse response2 = new LdapUserResponse("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering") @@ -139,8 +139,8 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { def accountService = Mock(AccountService) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) - users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) + users.add(new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsers() >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") LdapUserResponse response2 = new LdapUserResponse("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering") @@ -169,8 +169,8 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { ldapImportUsersCmd.domainId = varDomainId ldapImportUsersCmd.groupName = varGroupName - def ldapUser1 = new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") - def ldapUser2 = new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering"); + def ldapUser1 = new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false) + def ldapUser2 = new LdapUser("bob", "bob@test.com", "Robert", "Young", "cn=bob,ou=engineering,dc=cloudstack,dc=org", "engineering", false); Domain domain = new DomainVO(expectedDomainName, 1L, 1L, expectedDomainName, UUID.randomUUID().toString()); if (varDomainId != null) { @@ -204,7 +204,7 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { given: "We have an LdapManager, DomainService, two users and a LdapImportUsersCmd" def ldapManager = Mock(LdapManager) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsers() >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") ldapManager.createLdapUserResponse(_) >>> response1 @@ -234,7 +234,7 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { given: "We have an LdapManager, DomainService, two users and a LdapImportUsersCmd" def ldapManager = Mock(LdapManager) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsers() >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") ldapManager.createLdapUserResponse(_) >>> response1 @@ -263,7 +263,7 @@ class LdapImportUsersCmdSpec extends spock.lang.Specification { given: "We have an LdapManager, DomainService, two users and a LdapImportUsersCmd" def ldapManager = Mock(LdapManager) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapManager.getUsers() >> users LdapUserResponse response1 = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering") ldapManager.createLdapUserResponse(_) >>> response1 diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapListUsersCmdSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapListUsersCmdSpec.groovy index 4b32eb1ecd6..5247a1ec895 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapListUsersCmdSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapListUsersCmdSpec.groovy @@ -53,7 +53,7 @@ class LdapListUsersCmdSpec extends spock.lang.Specification { given: "We have an LdapManager, one user, QueryService and a LdapListUsersCmd" def ldapManager = Mock(LdapManager) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null)) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false)) ldapManager.getUsers() >> users LdapUserResponse response = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) ldapManager.createLdapUserResponse(_) >> response @@ -92,7 +92,7 @@ class LdapListUsersCmdSpec extends spock.lang.Specification { queryService.searchForUsers(_) >> queryServiceResponse - def ldapUser = new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) + def ldapUser = new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false) def ldapListUsersCmd = new LdapListUsersCmd(ldapManager,queryService) when: "isACloudstackUser is executed" @@ -109,7 +109,7 @@ class LdapListUsersCmdSpec extends spock.lang.Specification { queryService.searchForUsers(_) >> new ListResponse() - def ldapUser = new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) + def ldapUser = new LdapUser("rmurphy", "rmurphy@cloudstack.org", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false) def ldapListUsersCmd = new LdapListUsersCmd(ldapManager,queryService) when: "isACloudstackUser is executed" diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapManagerImplSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapManagerImplSpec.groovy index ee317206854..c9af0020848 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapManagerImplSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapManagerImplSpec.groovy @@ -24,6 +24,9 @@ import org.apache.cloudstack.api.command.LdapDeleteConfigurationCmd import org.apache.cloudstack.api.command.LdapImportUsersCmd import org.apache.cloudstack.api.command.LdapListUsersCmd import org.apache.cloudstack.api.command.LdapUserSearchCmd +import org.apache.cloudstack.api.command.LinkDomainToLdapCmd +import org.apache.cloudstack.api.response.LinkDomainToLdapResponse +import org.apache.cloudstack.ldap.dao.LdapTrustMapDao import javax.naming.NamingException import javax.naming.ldap.InitialLdapContext @@ -35,14 +38,19 @@ import org.apache.cloudstack.ldap.dao.LdapConfigurationDaoImpl import com.cloud.exception.InvalidParameterValueException import com.cloud.utils.Pair +import javax.naming.ldap.LdapContext + class LdapManagerImplSpec extends spock.lang.Specification { def "Test failing of getUser due to bind issue"() { given: "We have an LdapConfigurationDao, LdapContextFactory, LdapUserManager and LdapManager" def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> { throw new NoLdapUserMatchingQueryException() } - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for a user but there is a bind issue" ldapManager.getUser("rmurphy") then: "an exception is thrown" @@ -54,8 +62,11 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> { throw new NamingException() } - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for a group of users but there is a bind issue" ldapManager.getUsers() then: "An exception is thrown" @@ -67,8 +78,11 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> { throw new NamingException() } - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for users" ldapManager.searchUsers("rmurphy") then: "An exception is thrown" @@ -80,7 +94,10 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A ldap configuration response is generated" def result = ldapManager.createLdapConfigurationResponse(new LdapConfigurationVO("localhost", 389)) then: "the result of the response should match the given LdapConfigurationVO" @@ -93,10 +110,13 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A ldap user response is generated" def result = ldapManager.createLdapUserResponse(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", - "engineering")) + "engineering", false)) then: "The result of the response should match the given ldap user" result.username == "rmurphy" result.email == "rmurphy@test.com" @@ -111,11 +131,14 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> null List users = new ArrayList<>(); - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null)) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false)) ldapUserManager.getUsers(_) >> users; - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for a group of users" def result = ldapManager.getUsers() then: "A list greater than 0 is returned" @@ -127,9 +150,12 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> null - ldapUserManager.getUser(_, _) >> new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + ldapUserManager.getUser(_, _) >> new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for a user" def result = ldapManager.getUser("rmurphy") then: "The user is returned" @@ -145,7 +171,10 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "The context is closed" def context = Mock(InitialLdapContext) ldapManager.closeContext(context) @@ -159,7 +188,10 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapContextFactory = Mock(LdapContextFactory) ldapContextFactory.createUserContext(_, _) >> { throw new NamingException() } def ldapUserManager = Mock(LdapUserManager) - def ldapManager = Spy(LdapManagerImpl, constructorArgs: [ldapConfigurationDao, ldapContextFactory, ldapUserManager]) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapConfiguration = Mock(LdapConfiguration) + def ldapManager = Spy(LdapManagerImpl, constructorArgs: [ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration]) ldapManager.getUser(_) >> { new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) } when: "The user attempts to authenticate with a bad password" def result = ldapManager.canAuthenticate("rmurphy", "password") @@ -167,26 +199,16 @@ class LdapManagerImplSpec extends spock.lang.Specification { result == false } - def "Test successful failed result from canAuthenticate due to user not found"() { - given: "We have an LdapConfigurationDao, LdapContextFactory, LdapUserManager and LdapManager" - def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) - def ldapContextFactory = Mock(LdapContextFactory) - def ldapUserManager = Mock(LdapUserManager) - def ldapManager = Spy(LdapManagerImpl, constructorArgs: [ldapConfigurationDao, ldapContextFactory, ldapUserManager]) - ldapManager.getUser(_) >> { throw new NamingException() } - when: "The user attempts to authenticate and the user is not found" - def result = ldapManager.canAuthenticate("rmurphy", "password") - then: "the authentication fails" - result == false - } - def "Test successful failed result from deleteConfiguration due to configuration not existing"() { given: "We have an LdapConfigurationDao, LdapContextFactory, LdapUserManager and LdapManager" def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapConfigurationDao.findByHostname(_) >> null - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A ldap configuration that doesn't exist is deleted" ldapManager.deleteConfiguration("localhost") then: "A exception is thrown" @@ -198,7 +220,10 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "The context is closed" def context = Mock(InitialLdapContext) context.close() >> { throw new NamingException() } @@ -213,7 +238,10 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapContextFactory = Mock(LdapContextFactory) ldapContextFactory.createUserContext(_, _) >> null def ldapUserManager = Mock(LdapUserManager) - def ldapManager = Spy(LdapManagerImpl, constructorArgs: [ldapConfigurationDao, ldapContextFactory, ldapUserManager]) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapManager = Spy(LdapManagerImpl, constructorArgs: [ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration]) ldapManager.getUser(_) >> { new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) } when: "A user authenticates" def result = ldapManager.canAuthenticate("rmurphy", "password") @@ -226,13 +254,16 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapConfiguration = Mock(LdapConfiguration) ldapConfigurationDao.findByHostname(_) >> { def configuration = new LdapConfigurationVO("localhost", 389) configuration.setId(0); return configuration; } ldapConfigurationDao.remove(_) >> null - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A ldap configuration is deleted" def result = ldapManager.deleteConfiguration("localhost") then: "The deleted configuration is returned" @@ -245,13 +276,16 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapConfiguration = Mock(LdapConfiguration) ldapContextFactory.createBindContext() >> null; List users = new ArrayList(); - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,ou=engineering,dc=cloudstack,dc=org", "engineering", false)) ldapUserManager.getUsers(_, _) >> users; - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for users" def result = ldapManager.searchUsers("rmurphy"); then: "A list of atleast 1 is returned" @@ -263,9 +297,12 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext(_) >> null ldapConfigurationDao.persist(_) >> null - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A ldap configuration is added" def result = ldapManager.addConfiguration("localhost", 389) then: "the resulting object contain the given hostname and port" @@ -278,8 +315,11 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext(_) >> { throw new NamingException() } - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A configuration is added that can not be binded" ldapManager.addConfiguration("localhost", 389) then: "An exception is thrown" @@ -291,8 +331,11 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapConfigurationDao.findByHostname(_) >> new LdapConfigurationVO("localhost", 389) - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "a configuration that already exists is added" ldapManager.addConfiguration("localhost", 389) then: "An exception is thrown" @@ -310,6 +353,7 @@ class LdapManagerImplSpec extends spock.lang.Specification { cmdList.add(LdapImportUsersCmd.class); cmdList.add(LDAPConfigCmd.class); cmdList.add(LDAPRemoveCmd.class); + cmdList.add(LinkDomainToLdapCmd.class) return cmdList } @@ -318,8 +362,11 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapConfiguration = Mock(LdapConfiguration) final List> cmdList = supportedLdapCommands() - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "Get commands is called" def result = ldapManager.getCommands() then: "it must return all the commands" @@ -332,12 +379,15 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager List ldapConfigurationList = new ArrayList() ldapConfigurationList.add(new LdapConfigurationVO("localhost", 389)) Pair, Integer> configurations = new Pair, Integer>(); configurations.set(ldapConfigurationList, ldapConfigurationList.size()) ldapConfigurationDao.searchConfigurations(_, _) >> configurations - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A request for configurations is made" def result = ldapManager.listConfigurations(new LdapListConfigurationCmd()) then: "Then atleast 1 ldap configuration is returned" @@ -349,12 +399,15 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager List ldapConfigurationList = new ArrayList() ldapConfigurationList.add(new LdapConfigurationVO("localhost", 389)) Pair, Integer> configurations = new Pair, Integer>(); configurations.set(ldapConfigurationList, ldapConfigurationList.size()) ldapConfigurationDao.searchConfigurations(_, _) >> configurations - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "A request to find out is ldap enabled" def result = ldapManager.isLdapEnabled(); then: "true is returned because a configuration was found" @@ -366,14 +419,167 @@ class LdapManagerImplSpec extends spock.lang.Specification { def ldapConfigurationDao = Mock(LdapConfigurationDaoImpl) def ldapContextFactory = Mock(LdapContextFactory) def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + def ldapConfiguration = Mock(LdapConfiguration) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager ldapContextFactory.createBindContext() >> null List users = new ArrayList<>(); - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", "engineering")) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", "engineering", false)) ldapUserManager.getUsersInGroup("engineering", _) >> users; - def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManager) + def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration) when: "We search for a group of users" def result = ldapManager.getUsersInGroup("engineering") then: "A list greater of size one is returned" result.size() == 1; } + + def "test linkDomainToLdap invalid ldap group type"() { + def ldapManager = new LdapManagerImpl() + LdapTrustMapDao ldapTrustMapDao = Mock(LdapTrustMapDao) + ldapManager._ldapTrustMapDao = ldapTrustMapDao + + def domainId = 1 + when: + println("using type: " + type) + LinkDomainToLdapResponse response = ldapManager.linkDomainToLdap(domainId, type, "CN=test,DC=CCP,DC=Citrix,DC=Com", (short)2) + then: + thrown(IllegalArgumentException) + where: + type << ["", null, "TEST", "TEST TEST"] + } + def "test linkDomainToLdap invalid domain"() { + def ldapManager = new LdapManagerImpl() + LdapTrustMapDao ldapTrustMapDao = Mock(LdapTrustMapDao) + ldapManager._ldapTrustMapDao = ldapTrustMapDao + + when: + LinkDomainToLdapResponse response = ldapManager.linkDomainToLdap(null, "GROUP", "CN=test,DC=CCP,DC=Citrix,DC=Com", (short)2) + then: + thrown(IllegalArgumentException) + } + def "test linkDomainToLdap invalid ldap name"() { + def ldapManager = new LdapManagerImpl() + LdapTrustMapDao ldapTrustMapDao = Mock(LdapTrustMapDao) + ldapManager._ldapTrustMapDao = ldapTrustMapDao + + def domainId = 1 + when: + println("using name: " + name) + LinkDomainToLdapResponse response = ldapManager.linkDomainToLdap(domainId, "GROUP", name, (short)2) + then: + thrown(IllegalArgumentException) + where: + name << ["", null] + } + def "test linkDomainToLdap invalid accountType"(){ + + def ldapManager = new LdapManagerImpl() + LdapTrustMapDao ldapTrustMapDao = Mock(LdapTrustMapDao) + ldapManager._ldapTrustMapDao = ldapTrustMapDao + + def domainId = 1 + when: + println("using accountType: " + accountType) + LinkDomainToLdapResponse response = ldapManager.linkDomainToLdap(domainId, "GROUP", "TEST", (short)accountType) + then: + thrown(IllegalArgumentException) + where: + accountType << [-1, 1, 3, 4, 5, 6, 20000, -500000] + } + def "test linkDomainToLdap when all is well"(){ + def ldapManager = new LdapManagerImpl() + LdapTrustMapDao ldapTrustMapDao = Mock(LdapTrustMapDao) + ldapManager._ldapTrustMapDao = ldapTrustMapDao + + def domainId=1 + def type=LdapManager.LinkType.GROUP + def name="CN=test,DC=CCP, DC=citrix,DC=com" + short accountType=2 + + 1 * ldapTrustMapDao.persist(new LdapTrustMapVO(domainId, type, name, accountType)) >> new LdapTrustMapVO(domainId, type, name, accountType) + + when: + LinkDomainToLdapResponse response = ldapManager.linkDomainToLdap(domainId, type.toString(), name, accountType) + then: + response.getDomainId() == domainId + response.getType() == type.toString() + response.getName() == name + response.getAccountType() == accountType + } + + def "test getUser(username,type,group) when username disabled in ldap"(){ + def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapContextFactory = Mock(LdapContextFactory) + ldapContextFactory.createBindContext() >> Mock(LdapContext) + def ldapConfiguration = Mock(LdapConfiguration) + + def ldapManager = new LdapManagerImpl() + ldapManager._ldapUserManagerFactory = ldapUserManagerFactory + ldapManager._ldapContextFactory = ldapContextFactory + ldapManager._ldapConfiguration = ldapConfiguration + + def username = "admin" + def type = "GROUP" + def name = "CN=test,DC=citrix,DC=com" + + ldapUserManager.getUser(username, type, name, _) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", true) + + when: + LdapUser user = ldapManager.getUser(username, type, name) + then: + user.getUsername() == username + user.isDisabled() == true + } + + def "test getUser(username,type,group) when username doesnt exist in ldap"(){ + def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapContextFactory = Mock(LdapContextFactory) + ldapContextFactory.createBindContext() >> Mock(LdapContext) + def ldapConfiguration = Mock(LdapConfiguration) + + def ldapManager = new LdapManagerImpl() + ldapManager._ldapUserManagerFactory = ldapUserManagerFactory + ldapManager._ldapContextFactory = ldapContextFactory + ldapManager._ldapConfiguration = ldapConfiguration + + def username = "admin" + def type = "GROUP" + def name = "CN=test,DC=citrix,DC=com" + + ldapUserManager.getUser(username, type, name, _) >> { throw new NamingException("Test naming exception") } + + when: + LdapUser user = ldapManager.getUser(username, type, name) + then: + thrown(NoLdapUserMatchingQueryException) + } + def "test getUser(username,type,group) when username is an active member of the group in ldap"(){ + def ldapUserManager = Mock(LdapUserManager) + def ldapUserManagerFactory = Mock(LdapUserManagerFactory) + ldapUserManagerFactory.getInstance(_) >> ldapUserManager + def ldapContextFactory = Mock(LdapContextFactory) + ldapContextFactory.createBindContext() >> Mock(LdapContext) + def ldapConfiguration = Mock(LdapConfiguration) + + def ldapManager = new LdapManagerImpl() + ldapManager._ldapUserManagerFactory = ldapUserManagerFactory + ldapManager._ldapContextFactory = ldapContextFactory + ldapManager._ldapConfiguration = ldapConfiguration + + def username = "admin" + def type = "GROUP" + def name = "CN=test,DC=citrix,DC=com" + + ldapUserManager.getUser(username, type, name, _) >> new LdapUser(username, "email", "firstname", "lastname", "principal", "domain", false) + + when: + LdapUser user = ldapManager.getUser(username, type, name) + then: + user.getUsername() == username + user.isDisabled() == false + } } diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapSearchUserCmdSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapSearchUserCmdSpec.groovy index 1411c29f7b4..55510875899 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapSearchUserCmdSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapSearchUserCmdSpec.groovy @@ -48,7 +48,7 @@ class LdapSearchUserCmdSpec extends spock.lang.Specification { given: "We have an Ldap manager and ldap user search cmd" def ldapManager = Mock(LdapManager) List users = new ArrayList() - users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null)) + users.add(new LdapUser("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null, false)) ldapManager.searchUsers(_) >> users LdapUserResponse response = new LdapUserResponse("rmurphy", "rmurphy@test.com", "Ryan", "Murphy", "cn=rmurphy,dc=cloudstack,dc=org", null) ldapManager.createLdapUserResponse(_) >> response diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerFactorySpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerFactorySpec.groovy new file mode 100644 index 00000000000..ca423d3e630 --- /dev/null +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerFactorySpec.groovy @@ -0,0 +1,57 @@ +/* + * 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 groovy.org.apache.cloudstack.ldap + +import org.apache.cloudstack.ldap.ADLdapUserManagerImpl +import org.apache.cloudstack.ldap.LdapUserManager +import org.apache.cloudstack.ldap.LdapUserManagerFactory +import org.apache.cloudstack.ldap.OpenLdapUserManagerImpl +import org.springframework.beans.factory.config.AutowireCapableBeanFactory +import org.springframework.context.ApplicationContext +import spock.lang.Shared + +class LdapUserManagerFactorySpec extends spock.lang.Specification { + + @Shared + def LdapUserManagerFactory ldapUserManagerFactory; + + def setupSpec() { + ldapUserManagerFactory = new LdapUserManagerFactory(); + ApplicationContext applicationContext = Mock(ApplicationContext); + AutowireCapableBeanFactory autowireCapableBeanFactory = Mock(AutowireCapableBeanFactory); + applicationContext.getAutowireCapableBeanFactory() >> autowireCapableBeanFactory; + ldapUserManagerFactory.setApplicationContext(applicationContext); + } + + def "Test getInstance() from factory"() { + def result = ldapUserManagerFactory.getInstance(id); + + def expected; + if(id == LdapUserManager.Provider.MICROSOFTAD) { + expected = ADLdapUserManagerImpl.class; + } else { + expected = OpenLdapUserManagerImpl.class; + } + + expect: + assert result.class.is(expected) + where: + id << [LdapUserManager.Provider.MICROSOFTAD, LdapUserManager.Provider.OPENLDAP, null] + } +} diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserResponseSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserResponseSpec.groovy index 9a64539eec5..506f5e4b74e 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserResponseSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserResponseSpec.groovy @@ -20,7 +20,7 @@ import org.apache.cloudstack.api.response.LdapUserResponse class LdapUserResponseSpec extends spock.lang.Specification { - def "Testing succcessful setting of LdapUserResponse email"() { + def "Testing successful setting of LdapUserResponse email"() { given: "We have an LdapResponse" LdapUserResponse response = new LdapUserResponse(); when: "An email address is set" diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserSpec.groovy index 6df947be22a..8ddfc9a23b8 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserSpec.groovy @@ -22,7 +22,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing LdapUsers hashCode generation"() { given: - def userA = new LdapUser(usernameA, "", "", "", "", "") + def userA = new LdapUser(usernameA, "", "", "", "", "", false) expect: userA.hashCode() == usernameA.hashCode() where: @@ -31,8 +31,8 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing that LdapUser successfully gives the correct result for a compare to"() { given: "You have created two LDAP user objects" - def userA = new LdapUser(usernameA, "", "", "", "", "") - def userB = new LdapUser(usernameB, "", "", "", "", "") + def userA = new LdapUser(usernameA, "", "", "", "", "", false) + def userB = new LdapUser(usernameB, "", "", "", "", "", false) expect: "That when compared the result is less than or equal to 0" userA.compareTo(userB) <= 0 where: "The following values are used" @@ -43,8 +43,8 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing that LdapUsers equality"() { given: - def userA = new LdapUser(usernameA, "", "", "", "", "") - def userB = new LdapUser(usernameB, "", "", "", "", "") + def userA = new LdapUser(usernameA, "", "", "", "", "", false) + def userB = new LdapUser(usernameB, "", "", "", "", "", false) expect: userA.equals(userA) == true userA.equals(new Object()) == false @@ -56,7 +56,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing that the username is correctly set with the ldap object"() { given: "You have created a LDAP user object with a username" - def user = new LdapUser(username, "", "", "", "", "") + def user = new LdapUser(username, "", "", "", "", "", false) expect: "The username is equal to the given data source" user.getUsername() == username where: "The username is set to " @@ -65,7 +65,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing the email is correctly set with the ldap object"() { given: "You have created a LDAP user object with a email" - def user = new LdapUser("", email, "", "", "", "") + def user = new LdapUser("", email, "", "", "", "", false) expect: "The email is equal to the given data source" user.getEmail() == email where: "The email is set to " @@ -74,7 +74,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing the firstname is correctly set with the ldap object"() { given: "You have created a LDAP user object with a firstname" - def user = new LdapUser("", "", firstname, "", "", "") + def user = new LdapUser("", "", firstname, "", "", "", false) expect: "The firstname is equal to the given data source" user.getFirstname() == firstname where: "The firstname is set to " @@ -83,7 +83,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing the lastname is correctly set with the ldap object"() { given: "You have created a LDAP user object with a lastname" - def user = new LdapUser("", "", "", lastname, "", "") + def user = new LdapUser("", "", "", lastname, "", "", false) expect: "The lastname is equal to the given data source" user.getLastname() == lastname where: "The lastname is set to " @@ -92,7 +92,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing the principal is correctly set with the ldap object"() { given: "You have created a LDAP user object with a principal" - def user = new LdapUser("", "", "", "", principal, "") + def user = new LdapUser("", "", "", "", principal, "", false) expect: "The principal is equal to the given data source" user.getPrincipal() == principal where: "The principal is set to " @@ -101,7 +101,7 @@ class LdapUserSpec extends spock.lang.Specification { def "Testing the domain is correctly set with the ldap object"() { given: "You have created a LDAP user object with a principal" - def user = new LdapUser("", "", "", "", "", domain) + def user = new LdapUser("", "", "", "", "", domain, false) expect: "The principal is equal to the given data source" user.getDomain() == domain where: "The username is set to " diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LinkDomainToLdapCmdSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LinkDomainToLdapCmdSpec.groovy new file mode 100644 index 00000000000..9d667bf4cfb --- /dev/null +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LinkDomainToLdapCmdSpec.groovy @@ -0,0 +1,232 @@ +/* + * 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 groovy.org.apache.cloudstack.ldap + +import com.cloud.exception.InvalidParameterValueException +import com.cloud.user.Account +import com.cloud.user.AccountService +import com.cloud.user.User +import com.cloud.user.UserAccount +import org.apache.cloudstack.api.ServerApiException +import org.apache.cloudstack.api.command.LinkDomainToLdapCmd +import org.apache.cloudstack.api.response.LinkDomainToLdapResponse +import org.apache.cloudstack.ldap.LdapManager +import org.apache.cloudstack.ldap.LdapUser +import org.apache.cloudstack.ldap.NoLdapUserMatchingQueryException +import spock.lang.Shared +import spock.lang.Specification + +class LinkDomainToLdapCmdSpec extends Specification { + + @Shared + private LdapManager _ldapManager; + + @Shared + public AccountService _accountService; + + @Shared + public LinkDomainToLdapCmd linkDomainToLdapCmd; + + def setup() { + _ldapManager = Mock(LdapManager) + _accountService = Mock(AccountService) + + linkDomainToLdapCmd = new LinkDomainToLdapCmd() + linkDomainToLdapCmd._accountService = _accountService + linkDomainToLdapCmd._ldapManager = _ldapManager + } + + def "test invalid params"() { + _ldapManager.linkDomainToLdap(_,_,_,_) >> {throw new InvalidParameterValueException("invalid param")} + when: + linkDomainToLdapCmd.execute(); + then: + thrown(ServerApiException) + } + def "test valid params without admin"(){ + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(1, "GROUP", "CN=test,DC=ccp,DC=citrix,DC=com", (short)2) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + } + + def "test with valid params and with disabled admin"() { + def domainId = 1; + def type = "GROUP"; + def name = "CN=test,DC=ccp,DC=Citrix,DC=com" + def accountType = 2; + def username = "admin" + + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(domainId, type, name, (short)accountType) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + _ldapManager.getUser(username, type, name) >> new LdapUser(username, "admin@ccp.citrix.com", "Admin", "Admin", name, "ccp", true) + + linkDomainToLdapCmd.admin = username + linkDomainToLdapCmd.type = type + linkDomainToLdapCmd.name = name + linkDomainToLdapCmd.domainId = domainId + + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + result.getDomainId() == domainId + result.getType() == type + result.getName() == name + result.getAdminId() == null + } + + def "test with valid params and with admin who exist in cloudstack already"() { + def domainId = 1; + def type = "GROUP"; + def name = "CN=test,DC=ccp,DC=Citrix,DC=com" + def accountType = 2; + def username = "admin" + + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(domainId, type, name, (short)accountType) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + _ldapManager.getUser(username, type, name) >> new LdapUser(username, "admin@ccp.citrix.com", "Admin", "Admin", name, "ccp", false) + + _accountService.getActiveAccountByName(username, domainId) >> Mock(Account) + + linkDomainToLdapCmd.admin = username + linkDomainToLdapCmd.type = type + linkDomainToLdapCmd.name = name + linkDomainToLdapCmd.domainId = domainId + + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + result.getDomainId() == domainId + result.getType() == type + result.getName() == name + result.getAdminId() == null + } + + def "test with valid params and with admin who doesnt exist in cloudstack"() { + def domainId = 1; + def type = "GROUP"; + def name = "CN=test,DC=ccp,DC=Citrix,DC=com" + def accountType = 2; + def username = "admin" + def accountId = 24 + + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(domainId, type, name, (short)accountType) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + _ldapManager.getUser(username, type, name) >> new LdapUser(username, "admin@ccp.citrix.com", "Admin", "Admin", name, "ccp", false) + + _accountService.getActiveAccountByName(username, domainId) >> null + UserAccount userAccount = Mock(UserAccount) + userAccount.getAccountId() >> 24 + _accountService.createUserAccount(username, "", "Admin", "Admin", "admin@ccp.citrix.com", null, username, Account.ACCOUNT_TYPE_DOMAIN_ADMIN, domainId, + username, null, _, _, User.Source.LDAP) >> userAccount + + linkDomainToLdapCmd.admin = username + linkDomainToLdapCmd.type = type + linkDomainToLdapCmd.name = name + linkDomainToLdapCmd.domainId = domainId + + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + result.getDomainId() == domainId + result.getType() == type + result.getName() == name + result.getAdminId() == String.valueOf(accountId) + } + + def "test when admin doesnt exist in ldap"() { + def domainId = 1; + def type = "GROUP"; + def name = "CN=test,DC=ccp,DC=Citrix,DC=com" + def accountType = 2; + def username = "admin" + + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(domainId, type, name, (short)accountType) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + _ldapManager.getUser(username, type, name) >> {throw new NoLdapUserMatchingQueryException("get ldap user failed from mock")} + + linkDomainToLdapCmd.admin = username + linkDomainToLdapCmd.type = type + linkDomainToLdapCmd.name = name + linkDomainToLdapCmd.domainId = domainId + + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + result.getDomainId() == domainId + result.getType() == type + result.getName() == name + result.getAdminId() == null + } + + /** + * api should not fail in this case as link domain to ldap is successful + */ + def "test when create user account throws a run time exception"() { + def domainId = 1; + def type = "GROUP"; + def name = "CN=test,DC=ccp,DC=Citrix,DC=com" + def accountType = 2; + def username = "admin" + def accountId = 24 + + LinkDomainToLdapResponse response = new LinkDomainToLdapResponse(domainId, type, name, (short)accountType) + _ldapManager.linkDomainToLdap(_,_,_,_) >> response + _ldapManager.getUser(username, type, name) >> new LdapUser(username, "admin@ccp.citrix.com", "Admin", "Admin", name, "ccp", false) + + _accountService.getActiveAccountByName(username, domainId) >> null + UserAccount userAccount = Mock(UserAccount) + userAccount.getAccountId() >> 24 + _accountService.createUserAccount(username, "", "Admin", "Admin", "admin@ccp.citrix.com", null, username, Account.ACCOUNT_TYPE_DOMAIN_ADMIN, domainId, + username, null, _, _, User.Source.LDAP) >> { throw new RuntimeException("created failed from mock") } + + linkDomainToLdapCmd.admin = username + linkDomainToLdapCmd.type = type + linkDomainToLdapCmd.name = name + linkDomainToLdapCmd.domainId = domainId + + when: + linkDomainToLdapCmd.execute() + then: + LinkDomainToLdapResponse result = (LinkDomainToLdapResponse)linkDomainToLdapCmd.getResponseObject() + result.getObjectName() == "LinkDomainToLdap" + result.getResponseName() == linkDomainToLdapCmd.getCommandName() + result.getDomainId() == domainId + result.getType() == type + result.getName() == name + result.getAdminId() == null + } + +} diff --git a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/OpenLdapUserManagerSpec.groovy similarity index 92% rename from plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy rename to plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/OpenLdapUserManagerSpec.groovy index d1f3667b8c6..cb08c8fd47c 100644 --- a/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/LdapUserManagerSpec.groovy +++ b/plugins/user-authenticators/ldap/test/groovy/org/apache/cloudstack/ldap/OpenLdapUserManagerSpec.groovy @@ -18,6 +18,7 @@ package groovy.org.apache.cloudstack.ldap import org.apache.cloudstack.ldap.LdapConfiguration import org.apache.cloudstack.ldap.LdapUserManager +import org.apache.cloudstack.ldap.OpenLdapUserManagerImpl import spock.lang.Shared import javax.naming.NamingException @@ -29,7 +30,7 @@ import javax.naming.directory.SearchResult import javax.naming.ldap.InitialLdapContext import javax.naming.ldap.LdapContext -class LdapUserManagerSpec extends spock.lang.Specification { +class OpenLdapUserManagerSpec extends spock.lang.Specification { @Shared private def ldapConfiguration @@ -184,7 +185,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { given: "We have attributes, a search and a user manager" def attributes = createUserAttributes(username, email, firstname, lastname) def search = createSearchResult(attributes) - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) def result = userManager.createUser(search) expect: "The crated user the data supplied from LDAP" @@ -199,7 +200,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "Test successfully returning a list from get users"() { given: "We have a LdapUserManager" - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "A request for users is made" def result = userManager.getUsers(username, createContext()) @@ -211,7 +212,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "Test successfully returning a list from get users when no username is given"() { given: "We have a LdapUserManager" - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "Get users is called without a username" def result = userManager.getUsers(createContext()) @@ -222,7 +223,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "Test successfully returning a ldap user from searchUsers"() { given: "We have a LdapUserManager" - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "We search for users" def result = userManager.searchUsers(createContext()) @@ -234,7 +235,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "Test successfully returning an Ldap user from a get user request"() { given: "We have a LdapUserMaanger" - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "A request for a user is made" def result = userManager.getUser(username, createContext()) @@ -255,7 +256,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def context = Mock(LdapContext) context.search(_, _, _) >> searchUsersResults; - def userManager = new LdapUserManager(ldapConfiguration) + def userManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "a get user request is made and no user is found" def result = userManager.getUser(username, context) @@ -266,14 +267,14 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "Test that a newly created Ldap User Manager is not null"() { given: "You have created a new Ldap user manager object" - def result = new LdapUserManager(); + def result = new OpenLdapUserManagerImpl(); expect: "The result is not null" result != null } def "test successful generateGroupSearchFilter"() { given: "ldap user manager and ldap config" - def ldapUserManager = new LdapUserManager(ldapConfiguration) + def ldapUserManager = new OpenLdapUserManagerImpl(ldapConfiguration) def groupName = varGroupName == null ? "*" : varGroupName def expectedResult = "(&(objectClass=groupOfUniqueNames)(cn=" + groupName + "))"; @@ -286,7 +287,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "test successful getUsersInGroup one user"() { given: "ldap user manager and ldap config" - def ldapUserManager = new LdapUserManager(ldapConfiguration) + def ldapUserManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "A request for users is made" def result = ldapUserManager.getUsersInGroup("engineering", createGroupSearchContextOneUser()) @@ -296,7 +297,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "test successful getUsersInGroup no user"() { given: "ldap user manager and ldap config" - def ldapUserManager = new LdapUserManager(ldapConfiguration) + def ldapUserManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "A request for users is made" def result = ldapUserManager.getUsersInGroup("engineering", createGroupSearchContextNoUser()) @@ -306,7 +307,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { def "test successful getUserForDn"() { given: "ldap user manager and ldap config" - def ldapUserManager = new LdapUserManager(ldapConfiguration) + def ldapUserManager = new OpenLdapUserManagerImpl(ldapConfiguration) when: "A request for users is made" def result = ldapUserManager.getUserForDn("cn=Ryan Murphy,ou=engineering,dc=cloudstack,dc=org", createContext()) @@ -324,7 +325,7 @@ class LdapUserManagerSpec extends spock.lang.Specification { given: "ldap configuration where basedn is not set" def ldapconfig = Mock(LdapConfiguration) ldapconfig.getBaseDn() >> null - def ldapUserManager = new LdapUserManager(ldapconfig) + def ldapUserManager = new OpenLdapUserManagerImpl(ldapconfig) when: "A request for search users is made" def result = ldapUserManager.searchUsers(new InitialLdapContext()) diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java index 75353f2c3c4..89e3f31c6f8 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java @@ -206,16 +206,28 @@ public class GetServiceProviderMetaDataCmd extends BaseCmd implements APIAuthent spSSODescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS); spEntityDescriptor.getRoleDescriptors().add(spSSODescriptor); - ContactPerson contactPerson = new ContactPersonBuilder().buildObject(); + // Add technical contact GivenName givenName = new GivenNameBuilder().buildObject(); givenName.setName(spMetadata.getContactPersonName()); EmailAddress emailAddress = new EmailAddressBuilder().buildObject(); emailAddress.setAddress(spMetadata.getContactPersonEmail()); + ContactPerson contactPerson = new ContactPersonBuilder().buildObject(); contactPerson.setType(ContactPersonTypeEnumeration.TECHNICAL); contactPerson.setGivenName(givenName); contactPerson.getEmailAddresses().add(emailAddress); spEntityDescriptor.getContactPersons().add(contactPerson); + // Add administrative/support contact + GivenName givenNameAdmin = new GivenNameBuilder().buildObject(); + givenNameAdmin.setName(spMetadata.getContactPersonName()); + EmailAddress emailAddressAdmin = new EmailAddressBuilder().buildObject(); + emailAddressAdmin.setAddress(spMetadata.getContactPersonEmail()); + ContactPerson contactPersonAdmin = new ContactPersonBuilder().buildObject(); + contactPersonAdmin.setType(ContactPersonTypeEnumeration.ADMINISTRATIVE); + contactPersonAdmin.setGivenName(givenNameAdmin); + contactPersonAdmin.getEmailAddresses().add(emailAddressAdmin); + spEntityDescriptor.getContactPersons().add(contactPersonAdmin); + Organization organization = new OrganizationBuilder().buildObject(); OrganizationName organizationName = new OrganizationNameBuilder().buildObject(); organizationName.setName(new LocalizedString(spMetadata.getOrganizationName(), Locale.getDefault().getLanguage())); @@ -267,7 +279,7 @@ public class GetServiceProviderMetaDataCmd extends BaseCmd implements APIAuthent } } if (_samlAuthManager == null) { - s_logger.error("No suitable Pluggable Authentication Manager found for SAML2 Login Cmd"); + s_logger.error("No suitable Pluggable Authentication Manager found for SAML2 getSPMetadata Cmd"); } } } diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmd.java new file mode 100644 index 00000000000..2fdf6a1a000 --- /dev/null +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmd.java @@ -0,0 +1,206 @@ +// 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.api.command; + +import com.cloud.api.response.ApiResponseSerializer; +import com.cloud.domain.Domain; +import com.cloud.domain.dao.DomainDao; +import com.cloud.exception.CloudAuthenticationException; +import com.cloud.user.Account; +import com.cloud.user.User; +import com.cloud.user.UserAccount; +import com.cloud.user.UserAccountVO; +import com.cloud.user.dao.UserAccountDao; +import com.cloud.user.dao.UserDao; +import com.cloud.utils.HttpUtils; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.ApiServerService; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.auth.APIAuthenticationType; +import org.apache.cloudstack.api.auth.APIAuthenticator; +import org.apache.cloudstack.api.auth.PluggableAPIAuthenticator; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.LoginCmdResponse; +import org.apache.cloudstack.api.response.SamlUserAccountResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.UserResponse; +import org.apache.cloudstack.saml.SAML2AuthManager; +import org.apache.cloudstack.saml.SAMLUtils; +import org.apache.log4j.Logger; + +import javax.inject.Inject; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.io.IOException; +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +@APICommand(name = "listAndSwitchSamlAccount", description = "Lists and switches to other SAML accounts owned by the SAML user", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +public class ListAndSwitchSAMLAccountCmd extends BaseCmd implements APIAuthenticator { + public static final Logger s_logger = Logger.getLogger(ListAndSwitchSAMLAccountCmd.class.getName()); + private static final String s_name = "listandswitchsamlaccountresponse"; + + @Inject + ApiServerService _apiServer; + + @Inject + private UserAccountDao _userAccountDao; + @Inject + private UserDao _userDao; + @Inject + private DomainDao _domainDao; + + SAML2AuthManager _samlAuthManager; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, required = false, description = "User uuid") + private Long userId; + + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, required = false, description = "Domain uuid") + private Long domainId; + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + throw new ServerApiException(ApiErrorCode.METHOD_NOT_ALLOWED, "This is an authentication plugin api, cannot be used directly"); + } + + @Override + public String authenticate(final String command, final Map params, final HttpSession session, InetAddress remoteAddress, final String responseType, final StringBuilder auditTrailSb, final HttpServletRequest req, final HttpServletResponse resp) throws ServerApiException { + if (session == null || session.isNew()) { + throw new ServerApiException(ApiErrorCode.UNAUTHORIZED, _apiServer.getSerializedApiError(ApiErrorCode.UNAUTHORIZED.getHttpCode(), + "Only authenticated saml users can request this API", + params, responseType)); + } + + if (!HttpUtils.validateSessionKey(session, params, req.getCookies(), ApiConstants.SESSIONKEY)) { + throw new ServerApiException(ApiErrorCode.UNAUTHORIZED, _apiServer.getSerializedApiError(ApiErrorCode.UNAUTHORIZED.getHttpCode(), + "Unauthorized session, please re-login", + params, responseType)); + } + + final long currentUserId = (Long) session.getAttribute("userid"); + final UserAccount currentUserAccount = _accountService.getUserAccountById(currentUserId); + if (currentUserAccount == null || currentUserAccount.getSource() != User.Source.SAML2) { + throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(), + "Only authenticated saml users can request this API", + params, responseType)); + } + + String userUuid = null; + String domainUuid = null; + if (params.containsKey(ApiConstants.USER_ID)) { + userUuid = ((String[])params.get(ApiConstants.USER_ID))[0]; + } + if (params.containsKey(ApiConstants.DOMAIN_ID)) { + domainUuid = ((String[])params.get(ApiConstants.DOMAIN_ID))[0]; + } + + if (userUuid != null && domainUuid != null) { + final User user = _userDao.findByUuid(userUuid); + final Domain domain = _domainDao.findByUuid(domainUuid); + final UserAccount nextUserAccount = _accountService.getUserAccountById(user.getId()); + if (nextUserAccount != null && !nextUserAccount.getAccountState().equals(Account.State.enabled.toString())) { + throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.PARAM_ERROR.getHttpCode(), + "The requested user account is locked and cannot be switched to, please contact your administrator.", + params, responseType)); + } + if (nextUserAccount == null + || !nextUserAccount.getAccountState().equals(Account.State.enabled.toString()) + || !nextUserAccount.getUsername().equals(currentUserAccount.getUsername()) + || !nextUserAccount.getExternalEntity().equals(currentUserAccount.getExternalEntity()) + || (nextUserAccount.getDomainId() != domain.getId()) + || (nextUserAccount.getSource() != User.Source.SAML2)) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.PARAM_ERROR.getHttpCode(), + "User account is not allowed to switch to the requested account", + params, responseType)); + } + try { + if (_apiServer.verifyUser(nextUserAccount.getId())) { + final LoginCmdResponse loginResponse = (LoginCmdResponse) _apiServer.loginUser(session, nextUserAccount.getUsername(), nextUserAccount.getUsername() + nextUserAccount.getSource().toString(), + nextUserAccount.getDomainId(), null, remoteAddress, params); + SAMLUtils.setupSamlUserCookies(loginResponse, resp); + resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); + return ApiResponseSerializer.toSerializedString(loginResponse, responseType); + } + } catch (CloudAuthenticationException | IOException exception) { + s_logger.debug("Failed to switch to request SAML user account due to: " + exception.getMessage()); + } + } else { + List switchableAccounts = _userAccountDao.getAllUsersByNameAndEntity(currentUserAccount.getUsername(), currentUserAccount.getExternalEntity()); + if (switchableAccounts != null && switchableAccounts.size() > 0 && currentUserId != User.UID_SYSTEM) { + List accountResponses = new ArrayList(); + for (UserAccountVO userAccount: switchableAccounts) { + User user = _userDao.getUser(userAccount.getId()); + Domain domain = _domainService.getDomain(userAccount.getDomainId()); + SamlUserAccountResponse accountResponse = new SamlUserAccountResponse(); + accountResponse.setUserId(user.getUuid()); + accountResponse.setUserName(user.getUsername()); + accountResponse.setDomainId(domain.getUuid()); + accountResponse.setDomainName(domain.getName()); + accountResponse.setAccountName(userAccount.getAccountName()); + accountResponse.setIdpId(user.getExternalEntity()); + accountResponses.add(accountResponse); + } + ListResponse response = new ListResponse(); + response.setResponses(accountResponses); + response.setResponseName(getCommandName()); + return ApiResponseSerializer.toSerializedString(response, responseType); + } + } + throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(), + "Unable to switch to requested SAML account. Please make sure your user/account is enabled. Please contact your administrator.", + params, responseType)); + } + + @Override + public APIAuthenticationType getAPIType() { + return APIAuthenticationType.READONLY_API; + } + + @Override + public void setAuthenticators(List authenticators) { + for (PluggableAPIAuthenticator authManager: authenticators) { + if (authManager != null && authManager instanceof SAML2AuthManager) { + _samlAuthManager = (SAML2AuthManager) authManager; + } + } + if (_samlAuthManager == null) { + s_logger.error("No suitable Pluggable Authentication Manager found for SAML2 listAndSwitchSamlAccount Cmd"); + } + } +} \ No newline at end of file diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListIdpsCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListIdpsCmd.java index ad387044b5f..026a0ca93c7 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListIdpsCmd.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/ListIdpsCmd.java @@ -111,4 +111,4 @@ public class ListIdpsCmd extends BaseCmd implements APIAuthenticator { s_logger.error("No suitable Pluggable Authentication Manager found for SAML2 Login Cmd"); } } -} \ No newline at end of file +} diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java index 8e67408b5f0..41005ab8f9c 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java @@ -23,7 +23,6 @@ import com.cloud.user.DomainManager; import com.cloud.user.UserAccount; import com.cloud.user.UserAccountVO; import com.cloud.user.dao.UserAccountDao; -import com.cloud.utils.HttpUtils; import com.cloud.utils.db.EntityManager; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; @@ -64,7 +63,6 @@ import org.opensaml.xml.validation.ValidationException; import org.xml.sax.SAXException; import javax.inject.Inject; -import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -72,8 +70,6 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.FactoryConfigurationError; import java.io.IOException; import java.net.InetAddress; -import java.net.URLEncoder; - import java.util.List; import java.util.Map; @@ -197,7 +193,6 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent } String username = null; - Long domainId = null; Issuer issuer = processedSAMLResponse.getIssuer(); SAMLProviderMetadata spMetadata = _samlAuthManager.getSPMetadata(); SAMLProviderMetadata idpMetadata = _samlAuthManager.getIdPMetadata(issuer.getValue()); @@ -206,9 +201,6 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent s_logger.debug("Received SAMLResponse in response to id=" + responseToId); SAMLTokenVO token = _samlAuthManager.getToken(responseToId); if (token != null) { - if (token.getDomainId() != null) { - domainId = token.getDomainId(); - } if (!(token.getEntity().equalsIgnoreCase(issuer.getValue()))) { throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(), "The SAML response contains Issuer Entity ID that is different from the original SAML request", @@ -300,46 +292,32 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent UserAccount userAccount = null; List possibleUserAccounts = _userAccountDao.getAllUsersByNameAndEntity(username, issuer.getValue()); if (possibleUserAccounts != null && possibleUserAccounts.size() > 0) { - if (possibleUserAccounts.size() == 1) { - userAccount = possibleUserAccounts.get(0); - } else if (possibleUserAccounts.size() > 1) { - if (domainId != null) { - userAccount = _userAccountDao.getUserAccount(username, domainId); - } else { - throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(), - "You have accounts in multiple domains, please re-login by specifying the domain you want to log into.", - params, responseType)); + // Log into the first enabled user account + // Users can switch to other allowed accounts later + for (UserAccountVO possibleUserAccount: possibleUserAccounts) { + if (possibleUserAccount.getAccountState().equals(Account.State.enabled.toString())) { + userAccount = possibleUserAccount; + break; } } } if (userAccount == null || userAccount.getExternalEntity() == null || !_samlAuthManager.isUserAuthorized(userAccount.getId(), issuer.getValue())) { throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR, _apiServer.getSerializedApiError(ApiErrorCode.ACCOUNT_ERROR.getHttpCode(), - "Your authenticated user is not authorized, please contact your administrator", + "Your authenticated user is not authorized for SAML Single Sign-On, please contact your administrator", params, responseType)); } - if (userAccount != null) { - try { - if (_apiServer.verifyUser(userAccount.getId())) { - LoginCmdResponse loginResponse = (LoginCmdResponse) _apiServer.loginUser(session, userAccount.getUsername(), userAccount.getUsername() + userAccount.getSource().toString(), - userAccount.getDomainId(), null, remoteAddress, params); - resp.addCookie(new Cookie("userid", URLEncoder.encode(loginResponse.getUserId(), HttpUtils.UTF_8))); - resp.addCookie(new Cookie("domainid", URLEncoder.encode(loginResponse.getDomainId(), HttpUtils.UTF_8))); - resp.addCookie(new Cookie("role", URLEncoder.encode(loginResponse.getType(), HttpUtils.UTF_8))); - resp.addCookie(new Cookie("username", URLEncoder.encode(loginResponse.getUsername(), HttpUtils.UTF_8))); - resp.addCookie(new Cookie("account", URLEncoder.encode(loginResponse.getAccount(), HttpUtils.UTF_8))); - String timezone = loginResponse.getTimeZone(); - if (timezone != null) { - resp.addCookie(new Cookie("timezone", URLEncoder.encode(timezone, HttpUtils.UTF_8))); - } - resp.addCookie(new Cookie("userfullname", URLEncoder.encode(loginResponse.getFirstName() + " " + loginResponse.getLastName(), HttpUtils.UTF_8).replace("+", "%20"))); - resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, loginResponse.getSessionKey())); - resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); - return ApiResponseSerializer.toSerializedString(loginResponse, responseType); - } - } catch (final CloudAuthenticationException ignored) { + try { + if (_apiServer.verifyUser(userAccount.getId())) { + LoginCmdResponse loginResponse = (LoginCmdResponse) _apiServer.loginUser(session, userAccount.getUsername(), userAccount.getUsername() + userAccount.getSource().toString(), + userAccount.getDomainId(), null, remoteAddress, params); + SAMLUtils.setupSamlUserCookies(loginResponse, resp); + resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); + return ApiResponseSerializer.toSerializedString(loginResponse, responseType); } + } catch (CloudAuthenticationException | IOException exception) { + s_logger.debug("SAML Login failed to log in the user due to: " + exception.getMessage()); } } } catch (IOException e) { diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java index 817e62c3f35..6791880fa4a 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java @@ -94,6 +94,7 @@ public class SAML2LogoutAPIAuthenticatorCmd extends BaseCmd implements APIAuthen try { resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); } catch (IOException ignored) { + s_logger.info("[ignored] sending redirected failed.", ignored); } return responseString; } @@ -123,6 +124,7 @@ public class SAML2LogoutAPIAuthenticatorCmd extends BaseCmd implements APIAuthen try { resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); } catch (IOException ignored) { + s_logger.info("[ignored] second redirected sending failed.", ignored); } return responseString; } @@ -134,6 +136,7 @@ public class SAML2LogoutAPIAuthenticatorCmd extends BaseCmd implements APIAuthen try { resp.sendRedirect(SAML2AuthManager.SAMLCloudStackRedirectionUrl.value()); } catch (IOException ignored) { + s_logger.info("[ignored] final redirected failed.", ignored); } return responseString; } diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/response/SamlUserAccountResponse.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/response/SamlUserAccountResponse.java new file mode 100644 index 00000000000..f0927e3f6d3 --- /dev/null +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/response/SamlUserAccountResponse.java @@ -0,0 +1,99 @@ +// 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.api.response; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +public class SamlUserAccountResponse extends AuthenticationCmdResponse { + @SerializedName("userId") + @Param(description = "The User Id") + private String userId; + + @SerializedName("domainId") + @Param(description = "The Domain Id") + private String domainId; + + @SerializedName("userName") + @Param(description = "The User Name") + private String userName; + + @SerializedName("accountName") + @Param(description = "The Account Name") + private String accountName; + + @SerializedName("domainName") + @Param(description = "The Domain Name") + private String domainName; + + @SerializedName("idpId") + @Param(description = "The IDP ID") + private String idpId; + + public SamlUserAccountResponse() { + super(); + setObjectName("samluseraccount"); + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getDomainId() { + return domainId; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public String getDomainName() { + return domainName; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + public String getIdpId() { + return idpId; + } + + public void setIdpId(String idpId) { + this.idpId = idpId; + } +} diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java index 7232ac9e074..a8740ac2709 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java @@ -26,6 +26,7 @@ import com.cloud.utils.component.AdapterBase; import org.apache.cloudstack.api.auth.PluggableAPIAuthenticator; import org.apache.cloudstack.api.command.AuthorizeSAMLSSOCmd; import org.apache.cloudstack.api.command.GetServiceProviderMetaDataCmd; +import org.apache.cloudstack.api.command.ListAndSwitchSAMLAccountCmd; import org.apache.cloudstack.api.command.ListIdpsCmd; import org.apache.cloudstack.api.command.ListSamlAuthorizationCmd; import org.apache.cloudstack.api.command.SAML2LoginAPIAuthenticatorCmd; @@ -104,6 +105,10 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage private int _refreshInterval = SAMLPluginConstants.SAML_REFRESH_INTERVAL; private AbstractReloadingMetadataProvider _idpMetaDataProvider; + public String getSAMLIdentityProviderMetadataURL(){ + return SAMLIdentityProviderMetadataURL.value(); + } + @Inject private KeystoreDao _ksDao; @@ -119,12 +124,12 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage @Override public boolean start() { if (isSAMLPluginEnabled()) { - setup(); s_logger.info("SAML auth plugin loaded"); + return setup(); } else { s_logger.info("SAML auth plugin not enabled so not loading"); + return super.start(); } - return super.start(); } @Override @@ -135,7 +140,7 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage return super.stop(); } - private boolean initSP() { + protected boolean initSP() { KeystoreVO keyStoreVO = _ksDao.findByName(SAMLPluginConstants.SAMLSP_KEYPAIR); if (keyStoreVO == null) { try { @@ -283,18 +288,21 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage try { idpMetadata.setSigningCertificate(KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0)); } catch (CertificateException ignored) { + s_logger.info("[ignored] encountered invalid certificate signing.", ignored); } } if (kd.getUse() == UsageType.ENCRYPTION) { try { idpMetadata.setEncryptionCertificate(KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0)); } catch (CertificateException ignored) { + s_logger.info("[ignored] encountered invalid certificate encryption.", ignored); } } if (kd.getUse() == UsageType.UNSPECIFIED) { try { unspecifiedKey = KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0); } catch (CertificateException ignored) { + s_logger.info("[ignored] encountered invalid certificate.", ignored); } } } @@ -338,6 +346,7 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage return; } s_logger.debug("Starting SAML IDP Metadata Refresh Task"); + Map metadataMap = new HashMap(); try { discoverAndAddIdp(_idpMetaDataProvider.getMetadata(), metadataMap); @@ -358,7 +367,7 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage } _timer = new Timer(); final HttpClient client = new HttpClient(); - final String idpMetaDataUrl = SAMLIdentityProviderMetadataURL.value(); + final String idpMetaDataUrl = getSAMLIdentityProviderMetadataURL(); if (SAMLTimeout.value() != null && SAMLTimeout.value() > SAMLPluginConstants.SAML_REFRESH_INTERVAL) { _refreshInterval = SAMLTimeout.value(); } @@ -368,21 +377,31 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage _idpMetaDataProvider = new HTTPMetadataProvider(_timer, client, idpMetaDataUrl); } else { File metadataFile = PropertiesUtil.findConfigFile(idpMetaDataUrl); - s_logger.debug("Provided Metadata is not a URL, trying to read metadata file from local path: " + metadataFile.getAbsolutePath()); - _idpMetaDataProvider = new FilesystemMetadataProvider(_timer, metadataFile); + if (metadataFile == null) { + s_logger.error("Provided Metadata is not a URL, Unable to locate metadata file from local path: " + idpMetaDataUrl); + return false; + } + else{ + s_logger.debug("Provided Metadata is not a URL, trying to read metadata file from local path: " + metadataFile.getAbsolutePath()); + _idpMetaDataProvider = new FilesystemMetadataProvider(_timer, metadataFile); + } } _idpMetaDataProvider.setRequireValidMetadata(true); _idpMetaDataProvider.setParserPool(new BasicParserPool()); _idpMetaDataProvider.initialize(); _timer.scheduleAtFixedRate(new MetadataRefreshTask(), 0, _refreshInterval * 1000); + } catch (MetadataProviderException e) { s_logger.error("Unable to read SAML2 IDP MetaData URL, error:" + e.getMessage()); s_logger.error("SAML2 Authentication may be unavailable"); + return false; } catch (ConfigurationException | FactoryConfigurationError e) { s_logger.error("OpenSAML bootstrapping failed: error: " + e.getMessage()); + return false; } catch (NullPointerException e) { s_logger.error("Unable to setup SAML Auth Plugin due to NullPointerException" + " please check the SAML global settings: " + e.getMessage()); + return false; } return true; } @@ -491,6 +510,7 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage cmdList.add(SAML2LogoutAPIAuthenticatorCmd.class); cmdList.add(GetServiceProviderMetaDataCmd.class); cmdList.add(ListIdpsCmd.class); + cmdList.add(ListAndSwitchSAMLAccountCmd.class); return cmdList; } diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2UserAuthenticator.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2UserAuthenticator.java index 5c8a39088ae..65a7959d997 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2UserAuthenticator.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2UserAuthenticator.java @@ -23,18 +23,9 @@ import com.cloud.user.dao.UserDao; import com.cloud.utils.Pair; import org.apache.cxf.common.util.StringUtils; import org.apache.log4j.Logger; -import org.opensaml.DefaultBootstrap; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.xml.ConfigurationException; -import org.opensaml.xml.io.UnmarshallingException; -import org.xml.sax.SAXException; import javax.ejb.Local; import javax.inject.Inject; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.stream.FactoryConfigurationError; -import java.io.IOException; import java.util.Map; @Local(value = {UserAuthenticator.class}) @@ -63,18 +54,7 @@ public class SAML2UserAuthenticator extends DefaultUserAuthenticator { return new Pair(false, null); } else { User user = _userDao.getUser(userAccount.getId()); - if (user != null && requestParameters != null && requestParameters.containsKey(SAMLPluginConstants.SAML_RESPONSE)) { - final String samlResponse = ((String[])requestParameters.get(SAMLPluginConstants.SAML_RESPONSE))[0]; - Response responseObject = null; - try { - DefaultBootstrap.bootstrap(); - responseObject = SAMLUtils.decodeSAMLResponse(samlResponse); - } catch (ConfigurationException | FactoryConfigurationError | ParserConfigurationException | SAXException | IOException | UnmarshallingException e) { - return new Pair(false, null); - } - if (!responseObject.getStatus().getStatusCode().getValue().equals(StatusCode.SUCCESS_URI)) { - return new Pair(false, null); - } + if (user != null && user.getSource() == User.Source.SAML2 && user.getExternalEntity() != null) { return new Pair(true, null); } } diff --git a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java index 77714a1f6a4..ec6b2c11e5e 100644 --- a/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java +++ b/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java @@ -20,6 +20,8 @@ package org.apache.cloudstack.saml; import com.cloud.utils.HttpUtils; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.response.LoginCmdResponse; import org.apache.log4j.Logger; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.x509.X509V1CertificateGenerator; @@ -62,6 +64,8 @@ import org.w3c.dom.Element; import org.xml.sax.SAXException; import javax.security.auth.x500.X500Principal; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -352,4 +356,18 @@ public class SAMLUtils { return certGen.generate(keyPair.getPrivate(), "BC"); } + public static void setupSamlUserCookies(final LoginCmdResponse loginResponse, final HttpServletResponse resp) throws IOException { + resp.addCookie(new Cookie("userid", URLEncoder.encode(loginResponse.getUserId(), HttpUtils.UTF_8))); + resp.addCookie(new Cookie("domainid", URLEncoder.encode(loginResponse.getDomainId(), HttpUtils.UTF_8))); + resp.addCookie(new Cookie("role", URLEncoder.encode(loginResponse.getType(), HttpUtils.UTF_8))); + resp.addCookie(new Cookie("username", URLEncoder.encode(loginResponse.getUsername(), HttpUtils.UTF_8))); + resp.addCookie(new Cookie("account", URLEncoder.encode(loginResponse.getAccount(), HttpUtils.UTF_8))); + String timezone = loginResponse.getTimeZone(); + if (timezone != null) { + resp.addCookie(new Cookie("timezone", URLEncoder.encode(timezone, HttpUtils.UTF_8))); + } + resp.addCookie(new Cookie("userfullname", URLEncoder.encode(loginResponse.getFirstName() + " " + loginResponse.getLastName(), HttpUtils.UTF_8).replace("+", "%20"))); + resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly", ApiConstants.SESSIONKEY, loginResponse.getSessionKey())); + } + } diff --git a/plugins/user-authenticators/saml2/test/org/apache/cloudstack/SAML2AuthManagerImplTest.java b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/SAML2AuthManagerImplTest.java new file mode 100644 index 00000000000..b06a1372a87 --- /dev/null +++ b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/SAML2AuthManagerImplTest.java @@ -0,0 +1,174 @@ +/* + * 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; + +import com.cloud.user.DomainManager; +import com.cloud.user.User; +import com.cloud.user.UserVO; +import com.cloud.user.dao.UserDao; +import junit.framework.TestCase; +import org.apache.cloudstack.framework.security.keystore.KeystoreDao; +import org.apache.cloudstack.saml.SAML2AuthManagerImpl; +import org.apache.cloudstack.saml.SAMLTokenDao; +import org.apache.cloudstack.saml.SAMLTokenVO; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; + +import java.lang.reflect.Field; + +@RunWith(MockitoJUnitRunner.class) +public class SAML2AuthManagerImplTest extends TestCase { + @Mock + private KeystoreDao ksDao; + + @Mock + private SAMLTokenDao samlTokenDao; + + @Mock + private UserDao userDao; + + @Mock + DomainManager domainMgr; + + SAML2AuthManagerImpl saml2AuthManager; + + @Override + @Before + public void setUp() throws NoSuchFieldException, IllegalAccessException { + saml2AuthManager = Mockito.spy(new SAML2AuthManagerImpl()); + + Field ksDaoField = SAML2AuthManagerImpl.class.getDeclaredField("_ksDao"); + ksDaoField.setAccessible(true); + ksDaoField.set(saml2AuthManager, ksDao); + + Field samlTokenDaoField = SAML2AuthManagerImpl.class.getDeclaredField("_samlTokenDao"); + samlTokenDaoField.setAccessible(true); + samlTokenDaoField.set(saml2AuthManager, samlTokenDao); + + Field userDaoField = SAML2AuthManagerImpl.class.getDeclaredField("_userDao"); + userDaoField.setAccessible(true); + userDaoField.set(saml2AuthManager, userDao); + + Field domainMgrField = SAML2AuthManagerImpl.class.getDeclaredField("_domainMgr"); + domainMgrField.setAccessible(true); + domainMgrField.set(saml2AuthManager, domainMgr); + + // enable the plugin + Mockito.doReturn(true).when(saml2AuthManager).isSAMLPluginEnabled(); + } + + @Test + public void testIsUserAuthorized() { + final String entityID = "some IDP ID"; + + // Test unauthorized user + UserVO user = new UserVO(200L); + user.setUsername("someuser"); + user.setSource(User.Source.UNKNOWN); + user.setExternalEntity(entityID); + Mockito.when(userDao.getUser(Mockito.anyLong())).thenReturn(user); + assertFalse(saml2AuthManager.isUserAuthorized(user.getId(), "someID")); + + // Test authorized user with wrong IDP + user.setSource(User.Source.SAML2); + Mockito.when(userDao.getUser(Mockito.anyLong())).thenReturn(user); + assertFalse(saml2AuthManager.isUserAuthorized(user.getId(), "someID")); + + // Test authorized user with wrong IDP + user.setSource(User.Source.SAML2); + Mockito.when(userDao.getUser(Mockito.anyLong())).thenReturn(user); + assertTrue(saml2AuthManager.isUserAuthorized(user.getId(), entityID)); + } + + @Test + public void testAuthorizeUser() { + // Test invalid user + Mockito.when(userDao.getUser(Mockito.anyLong())).thenReturn(null); + assertFalse(saml2AuthManager.authorizeUser(1L, "someID", true)); + + // Test valid user + UserVO user = new UserVO(200L); + user.setUsername("someuser"); + Mockito.when(userDao.getUser(Mockito.anyLong())).thenReturn(user); + assertTrue(saml2AuthManager.authorizeUser(1L, "someID", true)); + Mockito.verify(userDao, Mockito.atLeastOnce()).update(Mockito.anyLong(), Mockito.any(user.getClass())); + } + + + + @Test + public void testSaveToken() { + // duplicate token test + Mockito.when(samlTokenDao.findByUuid(Mockito.anyString())).thenReturn(new SAMLTokenVO()); + saml2AuthManager.saveToken("someAuthnID", null, "https://idp.bhaisaab.org/profile/shibboleth"); + Mockito.verify(samlTokenDao, Mockito.times(0)).persist(Mockito.any(SAMLTokenVO.class)); + + // valid test + Mockito.when(samlTokenDao.findByUuid(Mockito.anyString())).thenReturn(null); + saml2AuthManager.saveToken("someAuthnID", null, "https://idp.bhaisaab.org/profile/shibboleth"); + Mockito.verify(samlTokenDao, Mockito.times(1)).persist(Mockito.any(SAMLTokenVO.class)); + } + + @Test + public void testGetToken() { + SAMLTokenVO randomToken = new SAMLTokenVO("uuid", 1L, "someIDPDI"); + Mockito.when(samlTokenDao.findByUuid(Mockito.anyString())).thenReturn(randomToken); + assertEquals(saml2AuthManager.getToken("someAuthnID"), randomToken); + } + + @Test + public void testExpireToken() { + saml2AuthManager.expireTokens(); + Mockito.verify(samlTokenDao, Mockito.atLeast(1)).expireTokens(); + } + + @Test + public void testPluginEnabled() { + assertTrue(saml2AuthManager.isSAMLPluginEnabled()); + } + + @Test + public void testPluginComponentName() { + assertEquals(saml2AuthManager.getConfigComponentName(), "SAML2-PLUGIN"); + } + + @Test + public void testGetCommands() { + // Plugin enabled + assertTrue(saml2AuthManager.getCommands().size() > 0); + assertTrue(saml2AuthManager.getAuthCommands().size() > 0); + + // Plugin disabled + Mockito.doReturn(false).when(saml2AuthManager).isSAMLPluginEnabled(); + assertTrue(saml2AuthManager.getCommands().size() == 0); + assertTrue(saml2AuthManager.getAuthCommands().size() == 0); + // Re-enable the plugin + Mockito.doReturn(true).when(saml2AuthManager).isSAMLPluginEnabled(); + } + + @Test + public void testConfigKeys() { + assertTrue(saml2AuthManager.getConfigKeys().length > 0); + } +} diff --git a/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmdTest.java b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmdTest.java new file mode 100644 index 00000000000..8985a0fbf3f --- /dev/null +++ b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/ListAndSwitchSAMLAccountCmdTest.java @@ -0,0 +1,202 @@ +/* + * 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.api.command; + +import com.cloud.domain.DomainVO; +import com.cloud.domain.dao.DomainDao; +import com.cloud.user.Account; +import com.cloud.user.AccountService; +import com.cloud.user.User; +import com.cloud.user.UserAccountVO; +import com.cloud.user.UserVO; +import com.cloud.user.dao.UserAccountDao; +import com.cloud.user.dao.UserDao; +import com.cloud.utils.HttpUtils; +import junit.framework.TestCase; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.ApiServerService; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.auth.APIAuthenticationType; +import org.apache.cloudstack.api.response.LoginCmdResponse; +import org.apache.cloudstack.saml.SAML2AuthManager; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.lang.reflect.Field; +import java.net.InetAddress; +import java.util.HashMap; +import java.util.Map; + +@RunWith(MockitoJUnitRunner.class) +public class ListAndSwitchSAMLAccountCmdTest extends TestCase { + @Mock + ApiServerService apiServer; + + @Mock + SAML2AuthManager samlAuthManager; + + @Mock + AccountService accountService; + + @Mock + UserAccountDao userAccountDao; + + @Mock + UserDao userDao; + + @Mock + DomainDao domainDao; + + @Mock + HttpSession session; + + @Mock + HttpServletResponse resp; + + @Mock + HttpServletRequest req; + + @Test + public void testListAndSwitchSAMLAccountCmd() throws Exception { + // Setup + final Map params = new HashMap(); + final String sessionKeyValue = "someSessionIDValue"; + Mockito.when(session.getAttribute(ApiConstants.SESSIONKEY)).thenReturn(sessionKeyValue); + Mockito.when(session.getAttribute("userid")).thenReturn(2L); + params.put(ApiConstants.USER_ID, new String[]{"2"}); + params.put(ApiConstants.DOMAIN_ID, new String[]{"1"}); + Mockito.when(userDao.findByUuid(Mockito.anyString())).thenReturn(new UserVO(2L)); + Mockito.when(domainDao.findByUuid(Mockito.anyString())).thenReturn(new DomainVO()); + + // Mock/field setup + ListAndSwitchSAMLAccountCmd cmd = new ListAndSwitchSAMLAccountCmd(); + Field apiServerField = ListAndSwitchSAMLAccountCmd.class.getDeclaredField("_apiServer"); + apiServerField.setAccessible(true); + apiServerField.set(cmd, apiServer); + + Field managerField = ListAndSwitchSAMLAccountCmd.class.getDeclaredField("_samlAuthManager"); + managerField.setAccessible(true); + managerField.set(cmd, samlAuthManager); + + Field accountServiceField = BaseCmd.class.getDeclaredField("_accountService"); + accountServiceField.setAccessible(true); + accountServiceField.set(cmd, accountService); + + Field userAccountDaoField = ListAndSwitchSAMLAccountCmd.class.getDeclaredField("_userAccountDao"); + userAccountDaoField.setAccessible(true); + userAccountDaoField.set(cmd, userAccountDao); + + Field userDaoField = ListAndSwitchSAMLAccountCmd.class.getDeclaredField("_userDao"); + userDaoField.setAccessible(true); + userDaoField.set(cmd, userDao); + + Field domainDaoField = ListAndSwitchSAMLAccountCmd.class.getDeclaredField("_domainDao"); + domainDaoField.setAccessible(true); + domainDaoField.set(cmd, domainDao); + + // invalid session test + try { + cmd.authenticate("command", params, null, null, HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); + } catch (ServerApiException exception) { + assertEquals(exception.getErrorCode(), ApiErrorCode.UNAUTHORIZED); + } finally { + Mockito.verify(accountService, Mockito.times(0)).getUserAccountById(Mockito.anyLong()); + } + + // invalid sessionkey value test + params.put(ApiConstants.SESSIONKEY, new String[]{"someOtherValue"}); + try { + Mockito.when(session.isNew()).thenReturn(false); + cmd.authenticate("command", params, session, null, HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); + } catch (ServerApiException exception) { + assertEquals(exception.getErrorCode(), ApiErrorCode.UNAUTHORIZED); + } finally { + Mockito.verify(accountService, Mockito.times(0)).getUserAccountById(Mockito.anyLong()); + } + + // valid sessionkey value test + params.put(ApiConstants.SESSIONKEY, new String[]{sessionKeyValue}); + try { + cmd.authenticate("command", params, session, null, HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); + } catch (ServerApiException exception) { + assertEquals(exception.getErrorCode(), ApiErrorCode.ACCOUNT_ERROR); + } finally { + Mockito.verify(accountService, Mockito.times(1)).getUserAccountById(Mockito.anyLong()); + } + + // valid sessionkey, invalid useraccount type (non-saml) value test + UserAccountVO mockedUserAccount = new UserAccountVO(); + mockedUserAccount.setId(2L); + mockedUserAccount.setAccountState(Account.State.enabled.toString()); + mockedUserAccount.setUsername("someUsername"); + mockedUserAccount.setExternalEntity("some IDP ID"); + mockedUserAccount.setDomainId(0L); + mockedUserAccount.setSource(User.Source.UNKNOWN); + Mockito.when(accountService.getUserAccountById(Mockito.anyLong())).thenReturn(mockedUserAccount); + try { + cmd.authenticate("command", params, session, null, HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); + } catch (ServerApiException exception) { + assertEquals(exception.getErrorCode(), ApiErrorCode.ACCOUNT_ERROR); + } finally { + // accountService should have been called twice by now, for this case and the case above + Mockito.verify(accountService, Mockito.times(2)).getUserAccountById(Mockito.anyLong()); + } + + // all valid test + mockedUserAccount.setSource(User.Source.SAML2); + Mockito.when(accountService.getUserAccountById(Mockito.anyLong())).thenReturn(mockedUserAccount); + Mockito.when(apiServer.verifyUser(Mockito.anyLong())).thenReturn(true); + LoginCmdResponse loginCmdResponse = new LoginCmdResponse(); + loginCmdResponse.setUserId("1"); + loginCmdResponse.setDomainId("1"); + loginCmdResponse.setType("1"); + loginCmdResponse.setUsername("userName"); + loginCmdResponse.setAccount("someAccount"); + loginCmdResponse.setFirstName("firstName"); + loginCmdResponse.setLastName("lastName"); + loginCmdResponse.setSessionKey("newSessionKeyString"); + Mockito.when(apiServer.loginUser(Mockito.any(HttpSession.class), Mockito.anyString(), Mockito.anyString(), + Mockito.anyLong(), Mockito.anyString(), Mockito.any(InetAddress.class), Mockito.anyMap())).thenReturn(loginCmdResponse); + try { + cmd.authenticate("command", params, session, null, HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); + } catch (ServerApiException exception) { + fail("SAML list and switch account API failed to pass for all valid data: " + exception.getMessage()); + } finally { + // accountService should have been called 4 times by now, for this case twice and 2 for cases above + Mockito.verify(accountService, Mockito.times(4)).getUserAccountById(Mockito.anyLong()); + Mockito.verify(resp, Mockito.times(1)).sendRedirect(Mockito.anyString()); + } + } + + @Test + public void testGetAPIType() { + Assert.assertTrue(new ListAndSwitchSAMLAccountCmd().getAPIType() == APIAuthenticationType.READONLY_API); + } + +} diff --git a/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java index 0c72512082d..36140f2bedd 100644 --- a/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java +++ b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java @@ -19,12 +19,15 @@ package org.apache.cloudstack.api.command; +import static org.junit.Assert.assertFalse; + import com.cloud.domain.Domain; import com.cloud.user.AccountService; import com.cloud.user.DomainManager; import com.cloud.user.UserAccountVO; import com.cloud.user.dao.UserAccountDao; import com.cloud.utils.HttpUtils; + import org.apache.cloudstack.api.ApiServerService; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.ServerApiException; @@ -64,6 +67,7 @@ import org.opensaml.saml2.core.impl.SubjectBuilder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; + import java.lang.reflect.Field; import java.security.KeyPair; import java.security.cert.X509Certificate; @@ -154,8 +158,6 @@ public class SAML2LoginAPIAuthenticatorCmdTest { userAccountDaoField.setAccessible(true); userAccountDaoField.set(cmd, userAccountDao); - String spId = "someSPID"; - String url = "someUrl"; KeyPair kp = SAMLUtils.generateRandomKeyPair(); X509Certificate cert = SAMLUtils.generateRandomX509Certificate(kp); @@ -187,10 +189,13 @@ public class SAML2LoginAPIAuthenticatorCmdTest { // SSO SAMLResponse verification test, this should throw ServerApiException for auth failure params.put(SAMLPluginConstants.SAML_RESPONSE, new String[]{"Some String"}); Mockito.stub(cmd.processSAMLResponse(Mockito.anyString())).toReturn(buildMockResponse()); + boolean failing = true; try { cmd.authenticate("command", params, session, InetAddress.getByName("127.0.0.1"), HttpUtils.RESPONSE_TYPE_JSON, new StringBuilder(), req, resp); } catch (ServerApiException ignored) { + failing = false; } + assertFalse("authentication should not have succeeded", failing); Mockito.verify(userAccountDao, Mockito.times(0)).getUserAccount(Mockito.anyString(), Mockito.anyLong()); Mockito.verify(apiServer, Mockito.times(0)).verifyUser(Mockito.anyLong()); } diff --git a/plugins/user-authenticators/saml2/test/org/apache/cloudstack/saml/SAML2AuthManagerImplTest.java b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/saml/SAML2AuthManagerImplTest.java new file mode 100755 index 00000000000..8e811d0c5b6 --- /dev/null +++ b/plugins/user-authenticators/saml2/test/org/apache/cloudstack/saml/SAML2AuthManagerImplTest.java @@ -0,0 +1,75 @@ +// 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.saml; + +import com.cloud.user.DomainManager; +import com.cloud.user.dao.UserDao; +import org.apache.cloudstack.framework.security.keystore.KeystoreDao; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Spy; +import org.mockito.runners.MockitoJUnitRunner; + +import static org.junit.Assert.assertFalse; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.when; + + +@RunWith(MockitoJUnitRunner.class) +public class SAML2AuthManagerImplTest { + + @Mock + private KeystoreDao _ksDao; + + @Mock + private SAMLTokenDao _samlTokenDao; + + @Mock + private UserDao _userDao; + + @Mock + DomainManager _domainMgr; + + @InjectMocks + @Spy + SAML2AuthManagerImpl saml2AuthManager = new SAML2AuthManagerImpl(); + + @Before + public void setUp() { + doReturn(true).when(saml2AuthManager).isSAMLPluginEnabled(); + doReturn(true).when(saml2AuthManager).initSP(); + } + + @Test + public void testStart() { + when(saml2AuthManager.getSAMLIdentityProviderMetadataURL()).thenReturn("file://does/not/exist"); + boolean started = saml2AuthManager.start(); + assertFalse("saml2authmanager should not start as the file doesnt exist", started); + + when(saml2AuthManager.getSAMLIdentityProviderMetadataURL()).thenReturn(" "); + started = saml2AuthManager.start(); + assertFalse("saml2authmanager should not start as the file doesnt exist", started); + + when(saml2AuthManager.getSAMLIdentityProviderMetadataURL()).thenReturn(""); + started = saml2AuthManager.start(); + assertFalse("saml2authmanager should not start as the file doesnt exist", started); + + } +} diff --git a/pom.xml b/pom.xml index e76d74735c3..219402c18d8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,23 @@ - + 4.0.0 @@ -32,7 +43,7 @@ jira https://issues.apache.org/jira/browse/CLOUDSTACK - + 3.0.4 @@ -66,7 +77,7 @@ 18.0 18.0 6.2.0-3.1 - 4.3.6 + 4.5 4.4 3.1 5.1.34 @@ -85,7 +96,7 @@ 3.2.12.RELEASE 1.9.5 1.5.3 - 1.9.8 + 1.3.22 2.6 3.4 2.4 @@ -423,15 +434,9 @@ - - junit - junit - ${cs.junit.version} - test - org.hamcrest - hamcrest-library + hamcrest-all ${cs.hamcrest.version} test @@ -440,17 +445,35 @@ mockito-all ${cs.mockito.version} test + + + hamcrest-core + org.hamcrest + + - org.powermock - powermock-module-junit4 - ${cs.powermock.version} + junit + junit + ${cs.junit.version} + test + + + hamcrest-core + org.hamcrest + + - org.powermock - powermock-api-mockito - ${cs.powermock.version} - test + org.powermock + powermock-module-junit4 + ${cs.powermock.version} + + + org.powermock + powermock-api-mockito + ${cs.powermock.version} + test org.springframework @@ -485,13 +508,13 @@ org.apache.maven.plugins maven-checkstyle-plugin - - - cloudstack-checkstyle - none - false - - + + + cloudstack-checkstyle + none + false + + com.mycila @@ -570,9 +593,9 @@ true
LICENSE.header
- XML_STYLE -     DOUBLESLASH_STYLE -     SEMICOLON_STYLE + XML_STYLE + DOUBLESLASH_STYLE + SEMICOLON_STYLE false @@ -627,8 +650,8 @@
- + org.eclipse.m2e lifecycle-mapping @@ -646,7 +669,7 @@ - + @@ -659,7 +682,7 @@ - + @@ -682,12 +705,12 @@ gmaven-plugin [1.3,) - compile - testCompile + compile + testCompile - + @@ -715,8 +738,8 @@ README.md INSTALL.md CONTRIBUTING.md - Dockerfile - supervisord.conf + tools/docker/Dockerfile + tools/docker/supervisord.conf .idea/ **/*.log **/*.patch @@ -841,7 +864,7 @@ tools/ngui/static/js/lib/* **/.checkstyle scripts/installer/windows/acs_license.rtf - **/*.md + **/*.md @@ -943,9 +966,9 @@
false - - cloud-pmd.xml - + + cloud-pmd.xml + @@ -962,7 +985,7 @@ maven-surefire-plugin 2.18.1 - -Djava.security.egd=file:/dev/./urandom + -Djava.security.egd=file:/dev/./urandom -noverify
@@ -986,18 +1009,18 @@ - org.apache.maven.plugins - maven-javadoc-plugin - ${cs.javadoc.version} - - 128m - 1g - + org.apache.maven.plugins + maven-javadoc-plugin + ${cs.javadoc.version} + + 128m + 1g + - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.7 + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 org.codehaus.mojo @@ -1072,17 +1095,17 @@ org.apache.maven.plugins maven-checkstyle-plugin - - - cloudstack-checkstyle - none - true - - + + + cloudstack-checkstyle + none + true + +
- + enablefindbugs @@ -1090,17 +1113,17 @@ org.codehaus.mojo findbugs-maven-plugin - - - cloudstack-findbugs - process-classes - true - - + + + cloudstack-findbugs + process-classes + true + + - + buildw diff --git a/python/lib/cloud_utils.py b/python/lib/cloud_utils.py index 243bb408d41..a98d1c6d58c 100644 --- a/python/lib/cloud_utils.py +++ b/python/lib/cloud_utils.py @@ -685,24 +685,6 @@ class SetupCgRules(ConfigTask): enable_service("cgred") -class SetupCgroupControllers(ConfigTask): - name = "qemu cgroup controllers setup" - cfgline = "cgroup_controllers = [ \"cpu\" ]" - filename = "/etc/libvirt/qemu.conf" - - def done(self): - try: - return self.cfgline in file(self.filename,"r").read(-1) - except IOError,e: - if e.errno is 2: raise TaskFailed("qemu has not been properly installed on this system") - raise - - def execute(self): - libvirtqemu = file(self.filename,"r").read(-1) - libvirtqemu = libvirtqemu + "\n" + self.cfgline + "\n" - file("/etc/libvirt/qemu.conf","w").write(libvirtqemu) - - class SetupSecurityDriver(ConfigTask): name = "security driver setup" cfgline = "security_driver = \"none\"" @@ -887,7 +869,6 @@ def config_tasks(brname, pubNic, prvNic): SetupNetworking(brname, pubNic, prvNic), SetupCgConfig(), SetupCgRules(), - SetupCgroupControllers(), SetupSecurityDriver(), SetupLibvirt(), SetupLiveMigration(), diff --git a/python/lib/cloudutils/serviceConfig.py b/python/lib/cloudutils/serviceConfig.py index b2adc315ad4..b1bdfbb88f5 100755 --- a/python/lib/cloudutils/serviceConfig.py +++ b/python/lib/cloudutils/serviceConfig.py @@ -56,7 +56,7 @@ class serviceCfgBase(object): if self.syscfg.env.mode == "Server": raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupManagement.log for detail"%self.serviceName) else: - raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupAgent.log for detail"%self.serviceName) + raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/agent/setup.log for detail"%self.serviceName) def backup(self): if self.status is None: @@ -428,7 +428,7 @@ class securityPolicyConfigUbuntu(serviceCfgBase): return True except: - raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloudstack/setupAgent.log for detail, \ + raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloudstack/agent/setup.log for detail, \ or you can manually disable it before starting myCloud") def restore(self): @@ -458,7 +458,7 @@ class securityPolicyConfigRedhat(serviceCfgBase): cfo.replace_line("SELINUX=", "SELINUX=permissive") return True except: - raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloudstack/setupAgent.log for detail, \ + raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloudstack/agent/setup.log for detail, \ or you can manually disable it before starting myCloud") else: return True @@ -493,7 +493,6 @@ class libvirtConfigRedhat(serviceCfgBase): filename = "/etc/libvirt/qemu.conf" cfo = configFileOps(filename, self) - cfo.addEntry("cgroup_controllers", "[\"cpu\"]") cfo.addEntry("security_driver", "\"none\"") cfo.addEntry("user", "\"root\"") cfo.addEntry("group", "\"root\"") diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py index 88e2d1c6f9b..762c69b9b7c 100755 --- a/python/lib/cloudutils/utilities.py +++ b/python/lib/cloudutils/utilities.py @@ -112,7 +112,7 @@ class Distribution: version = file("/etc/redhat-release").readline() if version.find("Red Hat Enterprise Linux Server release 6") != -1 or version.find("Scientific Linux release 6") != -1 or version.find("CentOS Linux release 6") != -1 or version.find("CentOS release 6.") != -1: self.distro = "RHEL6" - elif version.find("Red Hat Enterprise Linux Server release 7") != -1: + elif version.find("Red Hat Enterprise Linux Server release 7") != -1 or version.find("Scientific Linux release 7") != -1 or version.find("CentOS Linux release 7") != -1 or version.find("CentOS release 7.") != -1: self.distro = "RHEL7" elif version.find("CentOS release") != -1: self.distro = "CentOS" diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh index 4225407caab..b8caa2e03bd 100755 --- a/scripts/storage/qcow2/managesnapshot.sh +++ b/scripts/storage/qcow2/managesnapshot.sh @@ -235,12 +235,21 @@ backup_snapshot() { fi return 0 } + +revert_snapshot() { + local snapshotPath=$1 + local destPath=$2 + ${qemu_img} convert -f qcow2 -O qcow2 "$snapshotPath" "$destPath" || \ + ( printf "${qemu_img} failed to revert snapshot ${snapshotPath} to disk ${destPath}.\n" >&2; return 2 ) + return 0 +} #set -x cflag= dflag= rflag= bflag= +vflag= nflag= pathval= snapshot= @@ -249,7 +258,7 @@ deleteDir= dmsnapshot=no dmrollback=no -while getopts 'c:d:r:n:b:p:t:f' OPTION +while getopts 'c:d:r:n:b:v:p:t:f' OPTION do case $OPTION in c) cflag=1 @@ -264,6 +273,9 @@ do b) bflag=1 pathval="$OPTARG" ;; + v) vflag=1 + pathval="$OPTARG" + ;; n) nflag=1 snapshot="$OPTARG" ;; @@ -304,6 +316,10 @@ elif [ "$rflag" == "1" ] then rollback_snapshot $pathval "$snapshot" $destPath exit $? +elif [ "$vflag" == "1" ] +then + revert_snapshot $pathval $destPath + exit $? fi diff --git a/scripts/storage/secondary/cloud-install-sys-tmplt b/scripts/storage/secondary/cloud-install-sys-tmplt index 68409ddfc9d..91b3a7c9088 100755 --- a/scripts/storage/secondary/cloud-install-sys-tmplt +++ b/scripts/storage/secondary/cloud-install-sys-tmplt @@ -8,9 +8,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 @@ -37,48 +37,49 @@ templateId= hyper= msKey=password DISKSPACE=2120000 #free disk space required in kilobytes -dbHost= -dbUser= +dbHost="localhost" +dbUser="root" dbPassword= -dbPort= +dbPort=3306 jasypt='/usr/share/cloudstack-common/lib/jasypt-1.9.2.jar' while getopts 'm:h:f:u:Ft:e:s:o:r:d:p:'# OPTION do case $OPTION in - m) mflag=1 - mntpoint="$OPTARG" - ;; - f) fflag=1 - tmpltimg="$OPTARG" - ;; - u) uflag=1 - url="$OPTARG" - ;; - F) Fflag=1 ;; + m) mflag=1 + mntpoint="$OPTARG" + ;; + f) fflag=1 + tmpltimg="$OPTARG" + ;; + u) uflag=1 + url="$OPTARG" + ;; + F) Fflag=1 + ;; t) templateId="$OPTARG" - ;; + ;; e) ext="$OPTARG" - ;; + ;; h) hyper="$OPTARG" - ;; + ;; s) sflag=1 - msKey="$OPTARG" - ;; + msKey="$OPTARG" + ;; o) oflag=1 dbHost="$OPTARG" - ;; + ;; r) rflag=1 dbUser="$OPTARG" - ;; + ;; d) dflag=1 dbPassword="$OPTARG" - ;; + ;; p) pflag=1 dbPort="$OPTARG" - ;; - ?) usage - failed 2 - ;; + ;; + ?) usage + failed 2 + ;; esac done @@ -94,30 +95,35 @@ then failed 2 fi -if [ ! -d $mntpoint ] +if [ ! -d $mntpoint ] then echo "mount point $mntpoint doesn't exist\n" failed 4 fi -if [[ "$fflag" == "1" && ! -f $tmpltimg ]] +if [[ "$fflag" == "1" && ! -f $tmpltimg ]] then echo "template image file $tmpltimg doesn't exist" failed 3 fi -if [ "$pflag" != 1 ]; then - dbPort=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.port' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') -fi +if [ -f /etc/cloudstack/management/db.properties ] +then + if [ "$pflag" != 1 ] + then + dbPort=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.port' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + fi -if [ "$oflag" != 1 ]; then - dbHost=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.host' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') -fi -if [ "$rflag" != 1 ]; then - dbUser=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.username' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') -fi + if [ "$oflag" != 1 ] + then + dbHost=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.host' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + fi + + if [ "$rflag" != 1 ] + then + dbUser=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.username' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + fi -if [ -f /etc/cloudstack/management/db.properties ]; then encType=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.encryption.type' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') if [ "$encType" == "file" ] then @@ -130,23 +136,24 @@ if [ -f /etc/cloudstack/management/db.properties ]; then failed 9 fi fi -fi -if [[ "$encType" == "file" || "$encType" == "web" ]] -then - encPassword=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.password' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'i | sed 's/^ENC(\(.*\))/\1/') - if [ ! $encPassword == "" ] - then - dbPassword=(`java -classpath $jasypt org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$encPassword password=$msKey verbose=false`) - if [ ! $dbPassword ] - then - echo "Failed to decrypt DB password from db.properties" - failed 9 - fi - fi -else - if [ "$dflag" != 1 ]; then - dbPassword=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.password' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'i ) + if [[ "$encType" == "file" || "$encType" == "web" ]] + then + encPassword=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.password' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'i | sed 's/^ENC(\(.*\))/\1/') + if [ ! $encPassword == "" ] + then + dbPassword=(`java -classpath $jasypt org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$encPassword password=$msKey verbose=false`) + if [ ! $dbPassword ] + then + echo "Failed to decrypt DB password from db.properties" + failed 9 + fi + fi + else + if [ "$dflag" != 1 ] + then + dbPassword=$(sed '/^\#/d' /etc/cloudstack/management/db.properties | grep 'db.cloud.password' | tail -n 1 | cut -d "=" -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'i ) + fi fi fi @@ -184,14 +191,14 @@ fi if [ ! $templateId ] then - echo "Unable to get template Id from database" - failed 8 + echo "Unable to get template Id from database" + failed 8 fi _uuid=$(uuidgen) localfile=$_uuid.$ext -_res=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names -U cloud -e "update cloud.vm_template set uuid=\"$_uuid\", url=\"$url\" where id=\"$templateId\""`) +_res=(`mysql -P $dbPort -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names -U cloud -e "update cloud.vm_template set uuid=\"$_uuid\", url=\"$url\" where id=\"$templateId\""`) mntpoint=`echo "$mntpoint" | sed 's|/*$||'` diff --git a/scripts/vm/hypervisor/kvm/setup-cgroups.sh b/scripts/vm/hypervisor/kvm/setup-cgroups.sh deleted file mode 100755 index 4d6e7555501..00000000000 --- a/scripts/vm/hypervisor/kvm/setup-cgroups.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# 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. - - - -# Script to fix cgroups co-mounted issue -# Applies to RHEL7 versions only -# Detect if cpu,cpuacct cgroups are co-mounted -# If co-mounted, unmount and mount them seperately - -#set -x - -#Check distribution version for RHEL -if [ -f '/etc/redhat-release' ]; -then - #Check RHEL version for 7 - if grep 'Red Hat Enterprise Linux Server release 7' /etc/redhat-release > /dev/null - then - # Check if cgroups if co-mounted - if [ -d '/sys/fs/cgroup/cpu,cpuacct' ]; - then - # cgroups co-mounted. Requires remount - umount /sys/fs/cgroup/cpu,cpuacct - rm /sys/fs/cgroup/cpu - rm /sys/fs/cgroup/cpuacct - rm -rf /sys/fs/cgroup/cpu,cpuacct - mkdir -p /sys/fs/cgroup/cpu - mkdir -p /sys/fs/cgroup/cpuacct - mount -t cgroup -o cpu cpu "/sys/fs/cgroup/cpu" - mount -t cgroup -o cpuacct cpuacct "/sys/fs/cgroup/cpuacct" - # Verify that cgroups are not co-mounted - if [ -d '/sys/fs/cgroup/cpu,cpuacct' ]; - then - echo "cgroups still co-mounted" - exit 1; - fi - fi - fi -fi - -exit 0 diff --git a/scripts/vm/hypervisor/xenserver/cloudlog b/scripts/vm/hypervisor/xenserver/cloudlog index bc78596efec..ea84312de05 100644 --- a/scripts/vm/hypervisor/xenserver/cloudlog +++ b/scripts/vm/hypervisor/xenserver/cloudlog @@ -18,7 +18,7 @@ # Version @VERSION@ # -# A log rotat config for CS plugin log +# A log rotate config for CS plugin log diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py index 7279518c43d..4392d4871e6 100755 --- a/scripts/vm/network/security_group.py +++ b/scripts/vm/network/security_group.py @@ -860,8 +860,10 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif for ip in ips: execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " " + direction + " " + ip + " -j "+ action) - if allow_any and protocol != 'all': - if protocol != 'icmp': + if allow_any: + if protocol == 'all': + execute("iptables -I " + vmchain + " -m state --state NEW " + direction + " 0.0.0.0/0 -j "+action) + elif protocol != 'icmp': execute("iptables -I " + vmchain + " -p " + protocol + " -m " + protocol + " --dport " + range + " -m state --state NEW -j "+ action) else: range = start + "/" + end @@ -958,13 +960,9 @@ def getBrfw(brname): def addFWFramework(brname): try: - cfo = configFileOps("/etc/sysctl.conf") - cfo.addEntry("net.bridge.bridge-nf-call-arptables", "1") - cfo.addEntry("net.bridge.bridge-nf-call-iptables", "1") - cfo.addEntry("net.bridge.bridge-nf-call-ip6tables", "1") - cfo.save() - - execute("sysctl -p /etc/sysctl.conf") + execute("sysctl -w net.bridge.bridge-nf-call-arptables=1") + execute("sysctl -w net.bridge.bridge-nf-call-iptables=1") + execute("sysctl -w net.bridge.bridge-nf-call-ip6tables=1") except: logging.debug("failed to turn on bridge netfilter") return False diff --git a/scripts/vm/systemvm/injectkeys.sh b/scripts/vm/systemvm/injectkeys.sh index cd5d9f9a06c..f69e33168d7 100755 --- a/scripts/vm/systemvm/injectkeys.sh +++ b/scripts/vm/systemvm/injectkeys.sh @@ -85,10 +85,14 @@ systemvmpath=$3 command -v mkisofs > /dev/null || (echo "$(basename $0): mkisofs not found, please install or ensure PATH is accurate" ; exit 4) -inject_into_iso systemvm.iso $newpubkey - -[ $? -ne 0 ] && exit 5 - -copy_priv_key $newprivkey +# if running into Docker as unprivileges, skip ssh verification as iso cannot be mounted. +if [ -e /dev/loop0 ]; then + inject_into_iso systemvm.iso $newpubkey + [ $? -ne 0 ] && exit 5 + copy_priv_key $newprivkey +else + # this mean it's a docker instance, ssh key cannot be verify. + echo "No loop device found, skipping ssh key insertion in systemvm.iso" +fi exit $? diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 99a80f8a44f..06c68c4e1b2 100644 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -30,8 +30,7 @@ import java.util.TimeZone; import javax.inject.Inject; -import org.apache.log4j.Logger; - +import org.apache.commons.collections.CollectionUtils; import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.affinity.AffinityGroup; @@ -158,6 +157,7 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.usage.Usage; import org.apache.cloudstack.usage.UsageService; import org.apache.cloudstack.usage.UsageTypes; +import org.apache.log4j.Logger; import com.cloud.agent.api.VgpuTypesInfo; import com.cloud.api.query.ViewResponseHelper; @@ -505,7 +505,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } snapshotResponse.setTags(tagResponses); @@ -790,7 +790,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } ipResponse.setTags(tagResponses); @@ -832,7 +832,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } lbResponse.setTags(tagResponses); @@ -1119,7 +1119,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } response.setTags(tagResponses); @@ -1257,18 +1257,18 @@ public class ApiResponseHelper implements ResponseGenerator { Network network = ApiDBUtils.findNetworkById(singleNicProfile.getNetworkId()); if (network != null) { if (network.getTrafficType() == TrafficType.Management) { - vmResponse.setPrivateIp(singleNicProfile.getIp4Address()); + vmResponse.setPrivateIp(singleNicProfile.getIPv4Address()); vmResponse.setPrivateMacAddress(singleNicProfile.getMacAddress()); - vmResponse.setPrivateNetmask(singleNicProfile.getNetmask()); + vmResponse.setPrivateNetmask(singleNicProfile.getIPv4Netmask()); } else if (network.getTrafficType() == TrafficType.Control) { - vmResponse.setLinkLocalIp(singleNicProfile.getIp4Address()); + vmResponse.setLinkLocalIp(singleNicProfile.getIPv4Address()); vmResponse.setLinkLocalMacAddress(singleNicProfile.getMacAddress()); - vmResponse.setLinkLocalNetmask(singleNicProfile.getNetmask()); + vmResponse.setLinkLocalNetmask(singleNicProfile.getIPv4Netmask()); } else if (network.getTrafficType() == TrafficType.Public) { - vmResponse.setPublicIp(singleNicProfile.getIp4Address()); + vmResponse.setPublicIp(singleNicProfile.getIPv4Address()); vmResponse.setPublicMacAddress(singleNicProfile.getMacAddress()); - vmResponse.setPublicNetmask(singleNicProfile.getNetmask()); - vmResponse.setGateway(singleNicProfile.getGateway()); + vmResponse.setPublicNetmask(singleNicProfile.getIPv4Netmask()); + vmResponse.setGateway(singleNicProfile.getIPv4Gateway()); } else if (network.getTrafficType() == TrafficType.Guest) { /* * In basic zone, public ip has TrafficType.Guest in case EIP service is not enabled. @@ -1285,10 +1285,10 @@ public class ApiResponseHelper implements ResponseGenerator { vmResponse.setGateway(vlan.getVlanGateway()); } } else { - vmResponse.setPublicIp(singleNicProfile.getIp4Address()); + vmResponse.setPublicIp(singleNicProfile.getIPv4Address()); vmResponse.setPublicMacAddress(singleNicProfile.getMacAddress()); - vmResponse.setPublicNetmask(singleNicProfile.getNetmask()); - vmResponse.setGateway(singleNicProfile.getGateway()); + vmResponse.setPublicNetmask(singleNicProfile.getIPv4Netmask()); + vmResponse.setGateway(singleNicProfile.getIPv4Gateway()); } } } @@ -2072,7 +2072,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } response.setTags(tagResponses); @@ -2158,7 +2158,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } response.setTags(tagResponses); @@ -2209,7 +2209,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } response.setTags(tagResponses); @@ -2645,6 +2645,8 @@ public class ApiResponseHelper implements ResponseGenerator { @Override public ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag, boolean keyValueOnly) { ResourceTagJoinVO rto = ApiDBUtils.newResourceTagView(resourceTag); + if(rto == null) + return null; return ApiDBUtils.newResourceTagResponse(rto, keyValueOnly); } @@ -2753,7 +2755,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses, tagResponse); } response.setTags(tagResponses); response.setObjectName("vpc"); @@ -2944,7 +2946,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses,tagResponse); } response.setTags(tagResponses); response.setObjectName("staticroute"); @@ -3422,7 +3424,7 @@ public class ApiResponseHelper implements ResponseGenerator { response.setVmId(vm.getUuid()); } - response.setIpaddress(result.getIp4Address()); + response.setIpaddress(result.getIPv4Address()); if (result.getSecondaryIp()) { List secondaryIps = ApiDBUtils.findNicSecondaryIps(result.getId()); @@ -3438,12 +3440,12 @@ public class ApiResponseHelper implements ResponseGenerator { } } - response.setGateway(result.getGateway()); - response.setNetmask(result.getNetmask()); + response.setGateway(result.getIPv4Gateway()); + response.setNetmask(result.getIPv4Netmask()); response.setMacAddress(result.getMacAddress()); - if (result.getIp6Address() != null) { - response.setIp6Address(result.getIp6Address()); + if (result.getIPv6Address() != null) { + response.setIp6Address(result.getIPv6Address()); } response.setDeviceId(String.valueOf(result.getDeviceId())); @@ -3512,7 +3514,7 @@ public class ApiResponseHelper implements ResponseGenerator { List tagResponses = new ArrayList(); for (ResourceTag tag : tags) { ResourceTagResponse tagResponse = createResourceTagResponse(tag, true); - tagResponses.add(tagResponse); + CollectionUtils.addIgnoreNull(tagResponses,tagResponse); } lbResponse.setTags(tagResponses); diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java index e30a6ca2ba2..4322154a947 100644 --- a/server/src/com/cloud/api/ApiServlet.java +++ b/server/src/com/cloud/api/ApiServlet.java @@ -245,13 +245,7 @@ public class ApiServlet extends HttpServlet { userId = (Long)session.getAttribute("userid"); final String account = (String) session.getAttribute("account"); final Object accountObj = session.getAttribute("accountobj"); - final String sessionKey = (String) session.getAttribute(ApiConstants.SESSIONKEY); - final String sessionKeyFromCookie = HttpUtils.findCookie(req.getCookies(), ApiConstants.SESSIONKEY); - final String[] sessionKeyFromParams = (String[]) params.get(ApiConstants.SESSIONKEY); - if ((sessionKey == null) - || (sessionKeyFromParams == null && sessionKeyFromCookie == null) - || (sessionKeyFromParams != null && !sessionKey.equals(sessionKeyFromParams[0])) - || (sessionKeyFromCookie != null && !sessionKey.equals(sessionKeyFromCookie))) { + if (!HttpUtils.validateSessionKey(session, params, req.getCookies(), ApiConstants.SESSIONKEY)) { try { session.invalidate(); } catch (final IllegalStateException ise) { diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 8c304b99347..6994b27327b 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -103,6 +103,8 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.query.QueryService; import org.apache.log4j.Logger; @@ -223,7 +225,7 @@ import com.cloud.vm.dao.UserVmDetailsDao; @Component @Local(value = {QueryService.class}) -public class QueryManagerImpl extends ManagerBase implements QueryService { +public class QueryManagerImpl extends ManagerBase implements QueryService, Configurable { public static final Logger s_logger = Logger.getLogger(QueryManagerImpl.class); @@ -979,8 +981,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sc.setParameters("hypervisorType", hypervisor); } - // Don't show Destroyed and Expunging vms to the end user - if (!isAdmin) { + // Don't show Destroyed and Expunging vms to the end user if the AllowUserViewDestroyedVM flag is not set. + if (!isAdmin && !AllowUserViewDestroyedVM.valueIn(caller.getAccountId())) { sc.setParameters("stateNIN", "Destroyed", "Expunging"); } @@ -3685,4 +3687,13 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { return resourceDetailResponse; } + @Override + public String getConfigComponentName() { + return QueryService.class.getSimpleName(); + } + + @Override + public ConfigKey[] getConfigKeys() { + return new ConfigKey[] {AllowUserViewDestroyedVM}; + } } diff --git a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java index bb4df1dd556..1c544276e2d 100644 --- a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java @@ -24,25 +24,28 @@ import java.util.Set; import javax.ejb.Local; import javax.inject.Inject; -import com.cloud.server.ResourceTag; import org.apache.cloudstack.api.response.ResourceTagResponse; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.api.ApiDBUtils; import com.cloud.api.ApiResponseHelper; import com.cloud.api.query.vo.ResourceTagJoinVO; import com.cloud.api.query.vo.SecurityGroupJoinVO; import com.cloud.network.security.SecurityGroup; +import com.cloud.network.security.SecurityGroupVMMapVO; import com.cloud.network.security.SecurityRule.SecurityRuleType; +import com.cloud.network.security.dao.SecurityGroupVMMapDao; +import com.cloud.server.ResourceTag; import com.cloud.user.Account; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; @Component @Local(value = {SecurityGroupJoinDao.class}) @@ -51,9 +54,12 @@ public class SecurityGroupJoinDaoImpl extends GenericDaoBase sgSearch; @@ -125,6 +131,17 @@ public class SecurityGroupJoinDaoImpl extends GenericDaoBase securityGroupVmMap = _securityGroupVMMapDao.listBySecurityGroup(vsg.getId()); + s_logger.debug("newSecurityGroupResponse() -> virtualmachine count: " + securityGroupVmMap.size()); + sgResponse.setVirtualMachineCount(securityGroupVmMap.size()); + + for(SecurityGroupVMMapVO securityGroupVMMapVO : securityGroupVmMap) { + final UserVmVO userVmVO = _userVmDao.findById(securityGroupVMMapVO.getInstanceId()); + if (userVmVO != null) { + sgResponse.addVirtualMachineId(userVmVO.getUuid()); + } + } + // update tag information Long tag_id = vsg.getTagId(); if (tag_id != null && tag_id.longValue() > 0) { diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index ca898819f6e..182ec50e300 100644 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -405,7 +405,7 @@ public enum Config { MaxNumberOfSecondaryIPsPerNIC( "Network", ManagementServer.class, Integer.class, "vm.network.nic.max.secondary.ipaddresses", "256", - "Specify the number of secondary ip addresses per nic per vm", null), + "Specify the number of secondary ip addresses per nic per vm. Default value 10 is used, if not specified.", null), EnableServiceMonitoring( "Network", ManagementServer.class, Boolean.class, diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 50e120a1720..fc7bff9c2aa 100644 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -3312,6 +3312,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati // Check if the VLAN has any allocated public IPs final List ips = _publicIpAddressDao.listByVlanId(vlanDbId); if (isAccountSpecific) { + int resourceCountToBeDecrement = 0; try { vlanRange = _vlanDao.acquireInLockTable(vlanDbId, 30); if (vlanRange == null) { @@ -3338,19 +3339,23 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip + " belonging to the range has firewall rules applied. Cleanup the rules first"); } - if(ip.getAllocatedTime() != null) {// This means IP is allocated + if (ip.getAllocatedTime() != null) {// This means IP is allocated // release public ip address here success = _ipAddrMgr.disassociatePublicIpAddress(ip.getId(), userId, caller); } if (!success) { s_logger.warn("Some ip addresses failed to be released as a part of vlan " + vlanDbId + " removal"); } else { + resourceCountToBeDecrement++; UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, acctVln.get(0).getAccountId(), ip.getDataCenterId(), ip.getId(), ip.getAddress().toString(), ip.isSourceNat(), vlanRange.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid()); } } } finally { _vlanDao.releaseFromLockTable(vlanDbId); + if (resourceCountToBeDecrement > 0) { //Making sure to decrement the count of only success operations above. For any reaason if disassociation fails then this number will vary from original range length. + _resourceLimitMgr.decrementResourceCount(acctVln.get(0).getAccountId(), ResourceType.public_ip, new Long(resourceCountToBeDecrement)); + } } } else { // !isAccountSpecific final NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(vlanRange.getVlanGateway(), vlanRange.getNetworkId(), NicIpAlias.state.active); diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java index d2f6fd24021..54ae38248de 100644 --- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java +++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java @@ -30,11 +30,6 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - import org.apache.cloudstack.config.ApiServiceConfiguration; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; @@ -47,6 +42,7 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -141,6 +137,8 @@ import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.ConsoleProxyDao; import com.cloud.vm.dao.UserVmDetailsDao; import com.cloud.vm.dao.VMInstanceDao; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; // // Possible console proxy state transition cases @@ -1330,16 +1328,16 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy for (NicProfile nic : profile.getNics()) { int deviceId = nic.getDeviceId(); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { buf.append(" eth").append(deviceId).append("ip=").append("0.0.0.0"); buf.append(" eth").append(deviceId).append("mask=").append("0.0.0.0"); } else { - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); } if (nic.isDefaultNic()) { - buf.append(" gateway=").append(nic.getGateway()); + buf.append(" gateway=").append(nic.getIPv4Gateway()); } if (nic.getTrafficType() == TrafficType.Management) { @@ -1384,11 +1382,11 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy for (NicProfile nic : nics) { if ((nic.getTrafficType() == TrafficType.Public && dc.getNetworkType() == NetworkType.Advanced) || (nic.getTrafficType() == TrafficType.Guest && (dc.getNetworkType() == NetworkType.Basic || dc.isSecurityGroupEnabled()))) { - proxy.setPublicIpAddress(nic.getIp4Address()); - proxy.setPublicNetmask(nic.getNetmask()); + proxy.setPublicIpAddress(nic.getIPv4Address()); + proxy.setPublicNetmask(nic.getIPv4Netmask()); proxy.setPublicMacAddress(nic.getMacAddress()); } else if (nic.getTrafficType() == TrafficType.Management) { - proxy.setPrivateIpAddress(nic.getIp4Address()); + proxy.setPrivateIpAddress(nic.getIPv4Address()); proxy.setPrivateMacAddress(nic.getMacAddress()); } } @@ -1404,7 +1402,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy for (NicProfile nic : profile.getNics()) { if (nic.getTrafficType() == TrafficType.Management) { managementNic = nic; - } else if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) { + } else if (nic.getTrafficType() == TrafficType.Control && nic.getIPv4Address() != null) { controlNic = nic; } } @@ -1422,7 +1420,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy controlNic = managementNic; } - CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922); + CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922); cmds.addCommand("checkSsh", check); return true; diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 57abb9204c4..bfd6af4b480 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -358,7 +358,7 @@ StateListener { } } } - s_logger.debug("Cannnot deploy to specified host, returning."); + s_logger.debug("Cannot deploy to specified host, returning."); return null; } @@ -400,10 +400,21 @@ StateListener { "memoryOvercommitRatio"); Float cpuOvercommitRatio = Float.parseFloat(cluster_detail_cpu.getValue()); Float memoryOvercommitRatio = Float.parseFloat(cluster_detail_ram.getValue()); - if (_capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, true, - cpuOvercommitRatio, memoryOvercommitRatio, true) - && _capacityMgr.checkIfHostHasCpuCapability(host.getId(), offering.getCpu(), - offering.getSpeed())) { + + boolean hostHasCpuCapability, hostHasCapacity = false; + hostHasCpuCapability = _capacityMgr.checkIfHostHasCpuCapability(host.getId(), offering.getCpu(), offering.getSpeed()); + + if (hostHasCpuCapability) { + // first check from reserved capacity + hostHasCapacity = _capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, true, cpuOvercommitRatio, memoryOvercommitRatio, true); + + // if not reserved, check the free capacity + if (!hostHasCapacity) + hostHasCapacity = _capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, false, cpuOvercommitRatio, memoryOvercommitRatio, true); + } + + if (hostHasCapacity + && hostHasCpuCapability) { s_logger.debug("The last host of this VM is UP and has enough capacity"); s_logger.debug("Now checking for suitable pools under zone: " + host.getDataCenterId() + ", pod: " + host.getPodId() + ", cluster: " + host.getClusterId()); diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java index 1ecdfcdc17c..cce44578929 100644 --- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java +++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java @@ -31,7 +31,6 @@ import javax.naming.ConfigurationException; import org.apache.log4j.Logger; import org.apache.log4j.NDC; - import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContext; @@ -220,7 +219,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } } - return Status.Alert; + return hostState; } @Override @@ -231,7 +230,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } if (host.getHypervisorType() == HypervisorType.VMware || host.getHypervisorType() == HypervisorType.Hyperv) { - s_logger.info("Don't restart for VMs on host " + host.getId() + " as the host is VMware host or on Hyperv Host"); + s_logger.info("Don't restart VMs on host " + host.getId() + " as it is a " + host.getHypervisorType().toString() + " host"); return; } @@ -242,16 +241,18 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai // send an email alert that the host is down StringBuilder sb = null; + List reorderedVMList = new ArrayList(); if ((vms != null) && !vms.isEmpty()) { sb = new StringBuilder(); - sb.append(" Starting HA on the following VMs: "); + sb.append(" Starting HA on the following VMs:"); // collect list of vm names for the alert email - VMInstanceVO vm = vms.get(0); - if (vm.isHaEnabled()) { - sb.append(" " + vm); - } - for (int i = 1; i < vms.size(); i++) { - vm = vms.get(i); + for (int i = 0; i < vms.size(); i++) { + VMInstanceVO vm = vms.get(i); + if (vm.getType() == VirtualMachine.Type.User) { + reorderedVMList.add(vm); + } else { + reorderedVMList.add(0, vm); + } if (vm.isHaEnabled()) { sb.append(" " + vm.getHostName()); } @@ -261,25 +262,21 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai // send an email alert that the host is down, include VMs HostPodVO podVO = _podDao.findById(host.getPodId()); String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName(); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc, + "Host [" + hostDesc + "] is down." + ((sb != null) ? sb.toString() : "")); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc, "Host [" + hostDesc + - "] is down." + - ((sb != null) ? sb.toString() : "")); - - if (vms != null) { - for (VMInstanceVO vm : vms) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getInstanceName()); - } - vm = _instanceDao.findByUuid(vm.getUuid()); - Long hostId = vm.getHostId(); - if (hostId != null && !hostId.equals(host.getId())) { - s_logger.debug("VM " + vm.getInstanceName() + " is not on down host " + host.getId() + " it is on other host " - + hostId + " VM HA is done"); - continue; - } - scheduleRestart(vm, investigate); + for (VMInstanceVO vm : reorderedVMList) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getInstanceName()); } + vm = _instanceDao.findByUuid(vm.getUuid()); + Long hostId = vm.getHostId(); + if (hostId != null && !hostId.equals(host.getId())) { + s_logger.debug("VM " + vm.getInstanceName() + " is not on down host " + host.getId() + " it is on other host " + + hostId + " VM HA is done"); + continue; + } + scheduleRestart(vm, investigate); } } @@ -386,10 +383,10 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } List items = _haDao.findPreviousHA(vm.getId()); - int maxRetries = 0; + int timesTried = 0; for (HaWorkVO item : items) { - if (maxRetries < item.getTimesTried() && !item.canScheduleNew(_timeBetweenFailures)) { - maxRetries = item.getTimesTried(); + if (timesTried < item.getTimesTried() && !item.canScheduleNew(_timeBetweenFailures)) { + timesTried = item.getTimesTried(); break; } } @@ -399,7 +396,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } HaWorkVO work = new HaWorkVO(vm.getId(), vm.getType(), WorkType.HA, investigate ? Step.Investigating : Step.Scheduled, - hostId != null ? hostId : 0L, vm.getState(), maxRetries + 1, vm.getUpdated()); + hostId != null ? hostId : 0L, vm.getState(), timesTried, vm.getUpdated()); _haDao.persist(work); if (s_logger.isInfoEnabled()) { @@ -410,7 +407,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } - protected Long restart(HaWorkVO work) { + protected Long restart(final HaWorkVO work) { List items = _haDao.listFutureHaWorkForVm(work.getInstanceId(), work.getId()); if (items.size() > 0) { StringBuilder str = new StringBuilder("Cancelling this work item because newer ones have been scheduled. Work Ids = ["); @@ -574,11 +571,6 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai return null; } - if (work.getTimesTried() > _maxRetries) { - s_logger.warn("Retried to max times so deleting: " + vmId); - return null; - } - try { HashMap params = new HashMap(); if (_haTag != null) { @@ -666,7 +658,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai _haDao.delete(vm.getId(), WorkType.Destroy); } - protected Long destroyVM(HaWorkVO work) { + protected Long destroyVM(final HaWorkVO work) { final VirtualMachine vm = _itMgr.findById(work.getInstanceId()); s_logger.info("Destroying " + vm.toString()); try { @@ -693,7 +685,6 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai s_logger.debug("concurrent operation: " + e.getMessage()); } - work.setTimesTried(work.getTimesTried() + 1); return (System.currentTimeMillis() >> 10) + _stopRetryInterval; } @@ -741,10 +732,6 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai s_logger.debug("operation timed out: " + e.getMessage()); } - work.setTimesTried(work.getTimesTried() + 1); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Stop was unsuccessful. Rescheduling"); - } return (System.currentTimeMillis() >> 10) + _stopRetryInterval; } @@ -768,6 +755,56 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai return vms; } + private void rescheduleWork(final HaWorkVO work, final long nextTime) { + s_logger.info("Rescheduling work " + work + " to try again at " + new Date(nextTime << 10)); + work.setTimeToTry(nextTime); + work.setTimesTried(work.getTimesTried() + 1); + work.setServerId(null); + work.setDateTaken(null); + } + + private void processWork(final HaWorkVO work) { + try { + final WorkType wt = work.getWorkType(); + Long nextTime = null; + if (wt == WorkType.Migration) { + nextTime = migrate(work); + } else if (wt == WorkType.HA) { + nextTime = restart(work); + } else if (wt == WorkType.Stop || wt == WorkType.CheckStop || wt == WorkType.ForceStop) { + nextTime = stopVM(work); + } else if (wt == WorkType.Destroy) { + nextTime = destroyVM(work); + } else { + assert false : "How did we get here with " + wt.toString(); + return; + } + + if (nextTime == null) { + s_logger.info("Completed work " + work); + work.setStep(Step.Done); + } else { + rescheduleWork(work, nextTime.longValue()); + } + } catch (Exception e) { + s_logger.warn("Encountered unhandled exception during HA process, reschedule work", e); + + long nextTime = (System.currentTimeMillis() >> 10) + _restartRetryInterval; + rescheduleWork(work, nextTime); + + // if restart failed in the middle due to exception, VM state may has been changed + // recapture into the HA worker so that it can really continue in it next turn + VMInstanceVO vm = _instanceDao.findById(work.getInstanceId()); + work.setUpdateTime(vm.getUpdated()); + work.setPreviousState(vm.getState()); + } + if (!Step.Done.equals(work.getStep()) && work.getTimesTried() >= _maxRetries) { + s_logger.warn("Giving up, retried max. times for work: " + work); + work.setStep(Step.Done); + } + _haDao.update(work.getId(), work); + } + @Override public boolean configure(final String name, final Map xmlParams) throws ConfigurationException { _serverId = _msServer.getId(); @@ -884,7 +921,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai private void runWithContext() { HaWorkVO work = null; try { - s_logger.trace("Checking the database"); + s_logger.trace("Checking the database for work"); work = _haDao.take(_serverId); if (work == null) { try { @@ -899,56 +936,8 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } NDC.push("work-" + work.getId()); - s_logger.info("Processing " + work); - - try { - final WorkType wt = work.getWorkType(); - Long nextTime = null; - if (wt == WorkType.Migration) { - nextTime = migrate(work); - } else if (wt == WorkType.HA) { - nextTime = restart(work); - } else if (wt == WorkType.Stop || wt == WorkType.CheckStop || wt == WorkType.ForceStop) { - nextTime = stopVM(work); - } else if (wt == WorkType.Destroy) { - nextTime = destroyVM(work); - } else { - assert false : "How did we get here with " + wt.toString(); - return; - } - - if (nextTime == null) { - s_logger.info("Completed " + work); - work.setStep(Step.Done); - } else { - s_logger.info("Rescheduling " + work + " to try again at " + new Date(nextTime << 10)); - work.setTimeToTry(nextTime); - work.setTimesTried(work.getTimesTried() + 1); - work.setServerId(null); - work.setDateTaken(null); - } - } catch (Exception e) { - s_logger.warn("Encountered unhandled exception during HA process, reschedule retry", e); - - long nextTime = (System.currentTimeMillis() >> 10) + _restartRetryInterval; - - s_logger.info("Rescheduling " + work + " to try again at " + new Date(nextTime << 10)); - work.setTimeToTry(nextTime); - work.setTimesTried(work.getTimesTried() + 1); - work.setServerId(null); - work.setDateTaken(null); - - // if restart failed in the middle due to exception, VM state may has been changed - // recapture into the HA worker so that it can really continue in it next turn - VMInstanceVO vm = _instanceDao.findById(work.getInstanceId()); - work.setUpdateTime(vm.getUpdated()); - work.setPreviousState(vm.getState()); - if (!Step.Done.equals(work.getStep()) && work.getTimesTried() >= _maxRetries) { - s_logger.warn("Giving up, retries max times for work: " + work); - work.setStep(Step.Done); - } - } - _haDao.update(work.getId(), work); + s_logger.info("Processing work " + work); + processWork(work); } catch (final Throwable th) { s_logger.error("Caught this throwable, ", th); } finally { diff --git a/server/src/com/cloud/ha/KVMFencer.java b/server/src/com/cloud/ha/KVMFencer.java index 7392dffc3e3..b5834efe91a 100644 --- a/server/src/com/cloud/ha/KVMFencer.java +++ b/server/src/com/cloud/ha/KVMFencer.java @@ -26,6 +26,7 @@ import javax.naming.ConfigurationException; import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; +import com.cloud.alert.AlertManager; import com.cloud.agent.api.FenceAnswer; import com.cloud.agent.api.FenceCommand; import com.cloud.exception.AgentUnavailableException; @@ -48,6 +49,8 @@ public class KVMFencer extends AdapterBase implements FenceBuilder { @Inject AgentManager _agentMgr; @Inject + AlertManager _alertMgr; + @Inject ResourceManager _resourceMgr; @Override @@ -75,18 +78,22 @@ public class KVMFencer extends AdapterBase implements FenceBuilder { @Override public Boolean fenceOff(VirtualMachine vm, Host host) { if (host.getHypervisorType() != HypervisorType.KVM && host.getHypervisorType() != HypervisorType.LXC) { - s_logger.debug("Don't know how to fence non kvm hosts " + host.getHypervisorType()); + s_logger.warn("Don't know how to fence non kvm hosts " + host.getHypervisorType()); return null; } List hosts = _resourceMgr.listAllHostsInCluster(host.getClusterId()); FenceCommand fence = new FenceCommand(vm, host); + int i = 0; for (HostVO h : hosts) { if (h.getHypervisorType() == HypervisorType.KVM || h.getHypervisorType() == HypervisorType.LXC) { if (h.getStatus() != Status.Up) { continue; } + + i++; + if (h.getId() == host.getId()) { continue; } @@ -94,14 +101,10 @@ public class KVMFencer extends AdapterBase implements FenceBuilder { try { answer = (FenceAnswer)_agentMgr.send(h.getId(), fence); } catch (AgentUnavailableException e) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Moving on to the next host because " + h.toString() + " is unavailable"); - } + s_logger.info("Moving on to the next host because " + h.toString() + " is unavailable"); continue; } catch (OperationTimedoutException e) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Moving on to the next host because " + h.toString() + " is unavailable"); - } + s_logger.info("Moving on to the next host because " + h.toString() + " is unavailable"); continue; } if (answer != null && answer.getResult()) { @@ -110,9 +113,12 @@ public class KVMFencer extends AdapterBase implements FenceBuilder { } } - if (s_logger.isDebugEnabled()) { - s_logger.debug("Unable to fence off " + vm.toString() + " on " + host.toString()); - } + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), + "Unable to fence off host: " + host.getId(), + "Fencing off host " + host.getId() + " did not succeed after asking " + i + " hosts. " + + "Check Agent logs for more information."); + + s_logger.error("Unable to fence off " + vm.toString() + " on " + host.toString()); return false; } diff --git a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java index 89901d9719e..9f361b0de63 100644 --- a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java +++ b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java @@ -71,13 +71,13 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl { } for (Nic nic : nics) { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { continue; } // get the data center IP address, find a host on the pod, use that host to ping the data center IP address List otherHosts = findHostByPod(vmHost.getPodId(), vm.getHostId()); for (Long otherHost : otherHosts) { - Status vmState = testIpAddress(otherHost, nic.getIp4Address()); + Status vmState = testIpAddress(otherHost, nic.getIPv4Address()); assert vmState != null; // In case of Status.Unknown, next host will be tried if (vmState == Status.Up) { diff --git a/server/src/com/cloud/ha/RecreatableFencer.java b/server/src/com/cloud/ha/RecreatableFencer.java index 80bdd1d71d3..4aa74385dff 100644 --- a/server/src/com/cloud/ha/RecreatableFencer.java +++ b/server/src/com/cloud/ha/RecreatableFencer.java @@ -58,7 +58,7 @@ public class RecreatableFencer extends AdapterBase implements FenceBuilder { for (VolumeVO vol : vols) { if (!vol.isRecreatable()) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Unable to f ence off volumes that are not recreatable: " + vol); + s_logger.debug("Unable to fence off volumes that are not recreatable: " + vol); } return null; } diff --git a/server/src/com/cloud/ha/UserVmDomRInvestigator.java b/server/src/com/cloud/ha/UserVmDomRInvestigator.java index 782e4b3e2ec..63d9bf055c1 100644 --- a/server/src/com/cloud/ha/UserVmDomRInvestigator.java +++ b/server/src/com/cloud/ha/UserVmDomRInvestigator.java @@ -70,7 +70,7 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl { List nics = _networkMgr.getNicsForTraffic(userVm.getId(), TrafficType.Guest); for (Nic nic : nics) { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { continue; } @@ -154,7 +154,7 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl { } private Boolean testUserVM(VirtualMachine vm, Nic nic, VirtualRouter router) { - String privateIp = nic.getIp4Address(); + String privateIp = nic.getIPv4Address(); String routerPrivateIp = router.getPrivateIpAddress(); List otherHosts = new ArrayList(); diff --git a/server/src/com/cloud/hypervisor/HypervisorGuruBase.java b/server/src/com/cloud/hypervisor/HypervisorGuruBase.java index 72c24da16a4..fb14dc4408a 100644 --- a/server/src/com/cloud/hypervisor/HypervisorGuruBase.java +++ b/server/src/com/cloud/hypervisor/HypervisorGuruBase.java @@ -85,12 +85,12 @@ public abstract class HypervisorGuruBase extends AdapterBase implements Hypervis to.setDeviceId(profile.getDeviceId()); to.setBroadcastType(profile.getBroadcastType()); to.setType(profile.getTrafficType()); - to.setIp(profile.getIp4Address()); - to.setNetmask(profile.getNetmask()); + to.setIp(profile.getIPv4Address()); + to.setNetmask(profile.getIPv4Netmask()); to.setMac(profile.getMacAddress()); - to.setDns1(profile.getDns1()); - to.setDns2(profile.getDns2()); - to.setGateway(profile.getGateway()); + to.setDns1(profile.getIPv4Dns1()); + to.setDns2(profile.getIPv4Dns2()); + to.setGateway(profile.getIPv4Gateway()); to.setDefaultNic(profile.isDefaultNic()); to.setBroadcastUri(profile.getBroadCastUri()); to.setIsolationuri(profile.getIsolationUri()); diff --git a/server/src/com/cloud/network/ExternalDeviceUsageManagerImpl.java b/server/src/com/cloud/network/ExternalDeviceUsageManagerImpl.java index 67ff77388bf..9e53341db06 100644 --- a/server/src/com/cloud/network/ExternalDeviceUsageManagerImpl.java +++ b/server/src/com/cloud/network/ExternalDeviceUsageManagerImpl.java @@ -29,11 +29,10 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.agent.AgentManager; import com.cloud.agent.api.ExternalNetworkResourceUsageAnswer; @@ -272,7 +271,7 @@ public class ExternalDeviceUsageManagerImpl extends ManagerBase implements Exter if (mapping != null) { NicVO nic = _nicDao.findById(mapping.getNicId()); - String loadBalancingIpAddress = nic.getIp4Address(); + String loadBalancingIpAddress = nic.getIPv4Address(); bytesSentAndReceived = lbAnswer.ipBytes.get(loadBalancingIpAddress); if (bytesSentAndReceived != null) { @@ -542,7 +541,7 @@ public class ExternalDeviceUsageManagerImpl extends ManagerBase implements Exter if (mapping != null) { NicVO nic = _nicDao.findById(mapping.getNicId()); - String loadBalancingIpAddress = nic.getIp4Address(); + String loadBalancingIpAddress = nic.getIPv4Address(); bytesSentAndReceived = answer.ipBytes.get(loadBalancingIpAddress); if (bytesSentAndReceived != null) { diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java index 15974311c7a..f0d862257aa 100644 --- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java +++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java @@ -25,13 +25,12 @@ import java.util.Map; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.response.ExternalFirewallResponse; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -545,7 +544,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl if (!add) { List nics = _nicDao.listByNetworkId(network.getId()); for (NicVO nic : nics) { - if (nic.getVmType() == null && nic.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && nic.getIp4Address().equals(network.getGateway())) { + if (nic.getVmType() == null && nic.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && nic.getIPv4Address().equals(network.getGateway())) { s_logger.debug("Removing placeholder nic " + nic + " for the network " + network); _nicDao.remove(nic.getId()); } diff --git a/server/src/com/cloud/network/ExternalIpAddressAllocator.java b/server/src/com/cloud/network/ExternalIpAddressAllocator.java index 3cf358067ee..58b30f4d57b 100644 --- a/server/src/com/cloud/network/ExternalIpAddressAllocator.java +++ b/server/src/com/cloud/network/ExternalIpAddressAllocator.java @@ -16,6 +16,8 @@ // under the License. package com.cloud.network; +import static com.cloud.utils.AutoCloseableUtil.closeAutoCloseable; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -81,12 +83,7 @@ public class ExternalIpAddressAllocator extends AdapterBase implements IpAddrAll } catch (IOException e) { return new IpAddr(); } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - } - } + closeAutoCloseable(in, "closing buffered reader"); } } @@ -121,12 +118,7 @@ public class ExternalIpAddressAllocator extends AdapterBase implements IpAddrAll } catch (IOException e) { return false; } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - } - } + closeAutoCloseable(in, "buffered reader close"); } } diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java index d36c22d8b18..d7ee2b67737 100644 --- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java +++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java @@ -27,13 +27,12 @@ import java.util.UUID; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -821,7 +820,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase // On the firewall provider for the network, create a static NAT rule between the source IP // address and the load balancing IP address try { - applyStaticNatRuleForInlineLBRule(zone, network, revoked, srcIp, loadBalancingIpNic.getIp4Address()); + applyStaticNatRuleForInlineLBRule(zone, network, revoked, srcIp, loadBalancingIpNic.getIPv4Address()); } catch (ResourceUnavailableException ex) { // Rollback db operation _inlineLoadBalancerNicMapDao.expunge(mapping.getId()); @@ -843,7 +842,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase if (count == 0) { // On the firewall provider for the network, delete the static NAT rule between the source IP // address and the load balancing IP address - applyStaticNatRuleForInlineLBRule(zone, network, revoked, srcIp, loadBalancingIpNic.getIp4Address()); + applyStaticNatRuleForInlineLBRule(zone, network, revoked, srcIp, loadBalancingIpNic.getIPv4Address()); // Delete the mapping between the source IP address and the load balancing IP address _inlineLoadBalancerNicMapDao.expunge(mapping.getId()); @@ -914,7 +913,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase } // Change the source IP address for the load balancing rule to be the load balancing IP address - srcIp = loadBalancingIpNic.getIp4Address(); + srcIp = loadBalancingIpNic.getIPv4Address(); } if ((destinations != null && !destinations.isEmpty()) || rule.isAutoScaleConfig()) { @@ -1037,7 +1036,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase + " Either network implement failed half way through or already network shutdown is completed. So just returning."); return true; } - selfIp = selfipNic.getIp4Address(); + selfIp = selfipNic.getIPv4Address(); } // It's a hack, using isOneToOneNat field for indicate if it's inline or not @@ -1196,7 +1195,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase // Change the source IP address for the load balancing rule to // be the load balancing IP address - srcIp = loadBalancingIpNic.getIp4Address(); + srcIp = loadBalancingIpNic.getIPv4Address(); } if ((destinations != null && !destinations.isEmpty()) || !rule.isAutoScaleConfig()) { @@ -1235,7 +1234,7 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase for (NicVO guestIp : guestIps) { // only external firewall and external load balancer will create NicVO with PlaceHolder reservation strategy if (guestIp.getReservationStrategy().equals(ReservationStrategy.PlaceHolder) && guestIp.getVmType() == null && guestIp.getReserver() == null && - !guestIp.getIp4Address().equals(network.getGateway())) { + !guestIp.getIPv4Address().equals(network.getGateway())) { return guestIp; } } diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java index 552e56bf902..28df9712553 100644 --- a/server/src/com/cloud/network/IpAddressManagerImpl.java +++ b/server/src/com/cloud/network/IpAddressManagerImpl.java @@ -1845,7 +1845,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage boolean ipv4 = false; if (network.getGateway() != null) { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { ipv4 = true; PublicIp ip = null; @@ -1853,9 +1853,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage if (requestedIpv4 != null && vm.getType() == VirtualMachine.Type.DomainRouter) { Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null); if (placeholderNic != null) { - IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIp4Address()); + IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIPv4Address()); ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId())); - s_logger.debug("Nic got an ip address " + placeholderNic.getIp4Address() + " stored in placeholder nic for the network " + network); + s_logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network); } } @@ -1863,9 +1863,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage ip = assignPublicIpAddress(dc.getId(), null, vm.getOwner(), VlanType.DirectAttached, network.getId(), requestedIpv4, false); } - nic.setIp4Address(ip.getAddress().toString()); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Address(ip.getAddress().toString()); + nic.setIPv4Gateway(ip.getGateway()); + nic.setIPv4Netmask(ip.getNetmask()); nic.setIsolationUri(IsolationType.Vlan.toUri(ip.getVlanTag())); //nic.setBroadcastType(BroadcastDomainType.Vlan); //nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(ip.getVlanTag())); @@ -1878,18 +1878,18 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage nic.setReservationId(String.valueOf(ip.getVlanTag())); nic.setMacAddress(ip.getMacAddress()); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } //FIXME - get ipv6 address from the placeholder if it's stored there if (network.getIp6Gateway() != null) { - if (nic.getIp6Address() == null) { + if (nic.getIPv6Address() == null) { UserIpv6Address ip = _ipv6Mgr.assignDirectIp6Address(dc.getId(), vm.getOwner(), network.getId(), requestedIpv6); Vlan vlan = _vlanDao.findById(ip.getVlanId()); - nic.setIp6Address(ip.getAddress().toString()); - nic.setIp6Gateway(vlan.getIp6Gateway()); - nic.setIp6Cidr(vlan.getIp6Cidr()); + nic.setIPv6Address(ip.getAddress().toString()); + nic.setIPv6Gateway(vlan.getIp6Gateway()); + nic.setIPv6Cidr(vlan.getIp6Cidr()); if (ipv4) { nic.setFormat(AddressFormat.DualStack); } else { @@ -1901,8 +1901,8 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage nic.setMacAddress(ip.getMacAddress()); } } - nic.setIp6Dns1(dc.getIp6Dns1()); - nic.setIp6Dns2(dc.getIp6Dns2()); + nic.setIPv6Dns1(dc.getIp6Dns1()); + nic.setIPv6Dns2(dc.getIp6Dns2()); } } }); @@ -1922,7 +1922,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage boolean ipv4 = false; if (network.getGateway() != null) { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { ipv4 = true; // PublicIp ip = null; @@ -1933,8 +1933,8 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage } // nic ip address isn ot set here. Because the DHCP is external to cloudstack - nic.setGateway(network.getGateway()); - nic.setNetmask(network.getCidr()); + nic.setIPv4Gateway(network.getGateway()); + nic.setIPv4Netmask(network.getCidr()); List vlan = _vlanDao.listVlansByNetworkId(network.getId()); @@ -1951,19 +1951,19 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage nic.setMacAddress(_networkModel.getNextAvailableMacAddressInNetwork(network.getId())); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } // TODO: the IPv6 logic is not changed. //FIXME - get ipv6 address from the placeholder if it's stored there if (network.getIp6Gateway() != null) { - if (nic.getIp6Address() == null) { + if (nic.getIPv6Address() == null) { UserIpv6Address ip = _ipv6Mgr.assignDirectIp6Address(dc.getId(), vm.getOwner(), network.getId(), requestedIpv6); Vlan vlan = _vlanDao.findById(ip.getVlanId()); - nic.setIp6Address(ip.getAddress().toString()); - nic.setIp6Gateway(vlan.getIp6Gateway()); - nic.setIp6Cidr(vlan.getIp6Cidr()); + nic.setIPv6Address(ip.getAddress().toString()); + nic.setIPv6Gateway(vlan.getIp6Gateway()); + nic.setIPv6Cidr(vlan.getIp6Cidr()); if (ipv4) { nic.setFormat(AddressFormat.DualStack); } else { @@ -1975,8 +1975,8 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage nic.setMacAddress(ip.getMacAddress()); } } - nic.setIp6Dns1(dc.getIp6Dns1()); - nic.setIp6Dns2(dc.getIp6Dns2()); + nic.setIPv6Dns1(dc.getIp6Dns1()); + nic.setIPv6Dns2(dc.getIp6Dns2()); } } }); diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java index 7a85c9dce9e..154e666c7a3 100644 --- a/server/src/com/cloud/network/NetworkModelImpl.java +++ b/server/src/com/cloud/network/NetworkModelImpl.java @@ -34,13 +34,11 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.utils.StringUtils; -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; - import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao; +import org.apache.commons.codec.binary.Base64; +import org.apache.log4j.Logger; import com.cloud.api.ApiDBUtils; import com.cloud.configuration.Config; @@ -105,6 +103,7 @@ import com.cloud.user.AccountManager; import com.cloud.user.AccountVO; import com.cloud.user.DomainManager; import com.cloud.user.dao.AccountDao; +import com.cloud.utils.StringUtils; import com.cloud.utils.component.AdapterBase; import com.cloud.utils.component.ManagerBase; import com.cloud.utils.db.DB; @@ -827,15 +826,15 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { @Override public String getIpInNetwork(long vmId, long networkId) { Nic guestNic = getNicInNetwork(vmId, networkId); - assert (guestNic != null && guestNic.getIp4Address() != null) : "Vm doesn't belong to network associated with " + "ipAddress or ip4 address is null"; - return guestNic.getIp4Address(); + assert (guestNic != null && guestNic.getIPv4Address() != null) : "Vm doesn't belong to network associated with " + "ipAddress or ip4 address is null"; + return guestNic.getIPv4Address(); } @Override public String getIpInNetworkIncludingRemoved(long vmId, long networkId) { Nic guestNic = getNicInNetworkIncludingRemoved(vmId, networkId); - assert (guestNic != null && guestNic.getIp4Address() != null) : "Vm doesn't belong to network associated with " + "ipAddress or ip4 address is null"; - return guestNic.getIp4Address(); + assert (guestNic != null && guestNic.getIPv4Address() != null) : "Vm doesn't belong to network associated with " + "ipAddress or ip4 address is null"; + return guestNic.getIPv4Address(); } @Override @@ -942,7 +941,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { NicVO networkElementNic = _nicDao.findByNetworkIdAndType(virtualNetwork.getId(), Type.DomainRouter); if (networkElementNic != null) { - return networkElementNic.getIp4Address(); + return networkElementNic.getIPv4Address(); } else { s_logger.warn("Unable to set find network element for the network id=" + virtualNetwork.getId()); return null; @@ -2195,20 +2194,20 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { public NicVO getPlaceholderNicForRouter(Network network, Long podId) { List nics = _nicDao.listPlaceholderNicsByNetworkIdAndVmType(network.getId(), VirtualMachine.Type.DomainRouter); for (NicVO nic : nics) { - if (nic.getReserver() == null && (nic.getIp4Address() != null || nic.getIp6Address() != null)) { + if (nic.getReserver() == null && (nic.getIPv4Address() != null || nic.getIPv6Address() != null)) { if (podId == null) { return nic; } else { //return nic only when its ip address belong to the pod range (for the Basic zone case) List vlans = _vlanDao.listVlansForPod(podId); for (Vlan vlan : vlans) { - if (nic.getIp4Address() != null) { - IpAddress ip = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), nic.getIp4Address()); + if (nic.getIPv4Address() != null) { + IpAddress ip = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), nic.getIPv4Address()); if (ip != null && ip.getVlanId() == vlan.getId()) { return nic; } } else { - UserIpv6AddressVO ipv6 = _ipv6Dao.findByNetworkIdAndIp(network.getId(), nic.getIp6Address()); + UserIpv6AddressVO ipv6 = _ipv6Dao.findByNetworkIdAndIp(network.getId(), nic.getIPv6Address()); if (ipv6 != null && ipv6.getVlanId() == vlan.getId()) { return nic; } diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index e47baeafe5d..abee17833fb 100644 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -16,6 +16,49 @@ // under the License. package com.cloud.network; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.URI; +import java.net.UnknownHostException; +import java.security.InvalidParameterException; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; +import java.util.UUID; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.acl.ControlledEntity.ACLType; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.command.admin.network.CreateNetworkCmdByAdmin; +import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd; +import org.apache.cloudstack.api.command.admin.network.ListDedicatedGuestVlanRangesCmd; +import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd; +import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd; +import org.apache.cloudstack.api.command.user.network.ListNetworksCmd; +import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd; +import org.apache.cloudstack.api.command.user.vm.ListNicsCmd; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.framework.messagebus.MessageBus; +import org.apache.cloudstack.framework.messagebus.PublishScope; +import org.apache.cloudstack.network.element.InternalLoadBalancerElementService; +import org.apache.log4j.Logger; + import com.cloud.api.ApiDBUtils; import com.cloud.configuration.Config; import com.cloud.configuration.ConfigurationManager; @@ -151,49 +194,6 @@ import com.cloud.vm.dao.NicSecondaryIpVO; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; -import org.apache.cloudstack.acl.ControlledEntity.ACLType; -import org.apache.cloudstack.acl.SecurityChecker.AccessType; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.command.admin.network.CreateNetworkCmdByAdmin; -import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd; -import org.apache.cloudstack.api.command.admin.network.ListDedicatedGuestVlanRangesCmd; -import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd; -import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd; -import org.apache.cloudstack.api.command.user.network.ListNetworksCmd; -import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd; -import org.apache.cloudstack.api.command.user.vm.ListNicsCmd; -import org.apache.cloudstack.context.CallContext; -import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; -import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.cloudstack.framework.messagebus.MessageBus; -import org.apache.cloudstack.framework.messagebus.PublishScope; -import org.apache.cloudstack.network.element.InternalLoadBalancerElementService; -import org.apache.log4j.Logger; - -import javax.ejb.Local; -import javax.inject.Inject; -import javax.naming.ConfigurationException; - -import java.net.Inet6Address; -import java.net.InetAddress; -import java.net.URI; -import java.net.UnknownHostException; -import java.security.InvalidParameterException; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import java.util.UUID; - /** * NetworkServiceImpl implements NetworkService. */ @@ -2185,11 +2185,11 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { s_logger.info("The specified guest vm cidr has " + range + " IPs"); for (NicVO nic : nicsPresent) { - long nicIp = NetUtils.ip2Long(nic.getIp4Address()); + long nicIp = NetUtils.ip2Long(nic.getIPv4Address()); //check if nic IP is outside the guest vm cidr if (nicIp < startIp || nicIp > endIp) { if (!(nic.getState() == Nic.State.Deallocating)) { - throw new InvalidParameterValueException("Active IPs like " + nic.getIp4Address() + " exist outside the Guest VM CIDR. Cannot apply reservation "); + throw new InvalidParameterValueException("Active IPs like " + nic.getIPv4Address() + " exist outside the Guest VM CIDR. Cannot apply reservation "); } } } diff --git a/server/src/com/cloud/network/element/CloudZonesNetworkElement.java b/server/src/com/cloud/network/element/CloudZonesNetworkElement.java index c7489917d50..5dfc127c8a1 100644 --- a/server/src/com/cloud/network/element/CloudZonesNetworkElement.java +++ b/server/src/com/cloud/network/element/CloudZonesNetworkElement.java @@ -214,7 +214,7 @@ public class CloudZonesNetworkElement extends AdapterBase implements NetworkElem Commands cmds = new Commands(Command.OnError.Continue); if (password != null && nic.isDefaultNic()) { - SavePasswordCommand cmd = new SavePasswordCommand(password, nic.getIp4Address(), uservm.getHostName(), _networkMgr.getExecuteInSeqNtwkElmtCmd()); + SavePasswordCommand cmd = new SavePasswordCommand(password, nic.getIPv4Address(), uservm.getHostName(), _networkMgr.getExecuteInSeqNtwkElmtCmd()); cmds.addCommand("password", cmd); } String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(uservm.getServiceOfferingId()).getDisplayText(); @@ -222,7 +222,7 @@ public class CloudZonesNetworkElement extends AdapterBase implements NetworkElem cmds.addCommand( "vmdata", - generateVmDataCommand(nic.getIp4Address(), userData, serviceOffering, zoneName, nic.getIp4Address(), uservm.getHostName(), uservm.getInstanceName(), + generateVmDataCommand(nic.getIPv4Address(), userData, serviceOffering, zoneName, nic.getIPv4Address(), uservm.getHostName(), uservm.getInstanceName(), uservm.getId(), uservm.getUuid(), sshPublicKey)); try { _agentManager.send(dest.getHost().getId(), cmds); diff --git a/server/src/com/cloud/network/guru/ControlNetworkGuru.java b/server/src/com/cloud/network/guru/ControlNetworkGuru.java index 355842ce8a2..5e80bea0a17 100644 --- a/server/src/com/cloud/network/guru/ControlNetworkGuru.java +++ b/server/src/com/cloud/network/guru/ControlNetworkGuru.java @@ -22,9 +22,8 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.log4j.Logger; import com.cloud.configuration.Config; import com.cloud.dc.DataCenter; @@ -151,10 +150,10 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu // in basic mode and in VMware case, control network will be shared with guest network String mac = _networkMgr.getNextAvailableMacAddressInNetwork(config.getId()); nic.setMacAddress(mac); - nic.setIp4Address("0.0.0.0"); - nic.setNetmask("0.0.0.0"); + nic.setIPv4Address("0.0.0.0"); + nic.setIPv4Netmask("0.0.0.0"); nic.setFormat(AddressFormat.Ip4); - nic.setGateway("0.0.0.0"); + nic.setIPv4Gateway("0.0.0.0"); return; } } @@ -163,11 +162,11 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu if (ip == null) { throw new InsufficientAddressCapacityException("Insufficient link local address capacity", DataCenter.class, dest.getDataCenter().getId()); } - nic.setIp4Address(ip); + nic.setIPv4Address(ip); nic.setMacAddress(NetUtils.long2Mac(NetUtils.ip2Long(ip) | (14l << 40))); - nic.setNetmask("255.255.0.0"); + nic.setIPv4Netmask("255.255.0.0"); nic.setFormat(AddressFormat.Ip4); - nic.setGateway(NetUtils.getLinkLocalGateway()); + nic.setIPv4Gateway(NetUtils.getLinkLocalGateway()); } @Override diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java index 18f7641b3f4..9686f8087dd 100644 --- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java +++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java @@ -21,10 +21,8 @@ import java.util.List; import javax.ejb.Local; import javax.inject.Inject; -import com.cloud.utils.exception.CloudRuntimeException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; @@ -48,6 +46,10 @@ import com.cloud.network.NetworkProfile; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.Mode; import com.cloud.network.Networks.TrafficType; +import com.cloud.network.dao.IPAddressDao; +import com.cloud.network.dao.IPAddressVO; +import com.cloud.network.dao.NetworkVO; +import com.cloud.network.dao.UserIpv6AddressDao; import com.cloud.offering.NetworkOffering; import com.cloud.offerings.dao.NetworkOfferingDao; import com.cloud.user.Account; @@ -57,6 +59,7 @@ import com.cloud.utils.db.Transaction; import com.cloud.utils.db.TransactionCallbackNoReturn; import com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn; import com.cloud.utils.db.TransactionStatus; +import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.ExceptionUtil; import com.cloud.vm.Nic; import com.cloud.vm.Nic.ReservationStrategy; @@ -67,10 +70,6 @@ import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.NicDao; import com.cloud.vm.dao.NicSecondaryIpDao; -import com.cloud.network.dao.IPAddressDao; -import com.cloud.network.dao.IPAddressVO; -import com.cloud.network.dao.NetworkVO; -import com.cloud.network.dao.UserIpv6AddressDao; @Local(value = {NetworkGuru.class}) @@ -194,10 +193,10 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { public void updateNicProfile(NicProfile profile, Network network) { DataCenter dc = _dcDao.findById(network.getDataCenterId()); if (profile != null) { - profile.setDns1(dc.getDns1()); - profile.setDns2(dc.getDns2()); - profile.setIp6Dns1(dc.getIp6Dns1()); - profile.setIp6Dns2(dc.getIp6Dns2()); + profile.setIPv4Dns1(dc.getDns1()); + profile.setIPv4Dns2(dc.getDns2()); + profile.setIPv6Dns1(dc.getIp6Dns1()); + profile.setIPv6Dns2(dc.getIp6Dns2()); } } @@ -209,14 +208,14 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { if (nic == null) { nic = new NicProfile(ReservationStrategy.Create, null, null, null, null); - } else if (nic.getIp4Address() == null && nic.getIp6Address() == null) { - nic.setStrategy(ReservationStrategy.Start); + } else if (nic.getIPv4Address() == null && nic.getIPv6Address() == null) { + nic.setReservationStrategy(ReservationStrategy.Start); } else { - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } - allocateDirectIp(nic, network, vm, dc, nic.getRequestedIpv4(), nic.getRequestedIpv6()); - nic.setStrategy(ReservationStrategy.Create); + allocateDirectIp(nic, network, vm, dc, nic.getRequestedIPv4(), nic.getRequestedIPv6()); + nic.setReservationStrategy(ReservationStrategy.Create); if (nic.getMacAddress() == null) { nic.setMacAddress(_networkModel.getNextAvailableMacAddressInNetwork(network.getId())); @@ -231,9 +230,9 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { @Override public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { - if (nic.getIp4Address() == null && nic.getIp6Address() == null) { + if (nic.getIPv4Address() == null && nic.getIPv6Address() == null) { allocateDirectIp(nic, network, vm, dest.getDataCenter(), null, null); - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } } @@ -254,9 +253,9 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { if (vm.getType() == VirtualMachine.Type.DomainRouter) { Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null); if (placeholderNic == null) { - s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " and ipv6 address " + nic.getIp6Address() + + s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " and ipv6 address " + nic.getIPv6Address() + " for the network " + network); - _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), nic.getIp6Address(), VirtualMachine.Type.DomainRouter); + _networkMgr.savePlaceholderNic(network, nic.getIPv4Address(), nic.getIPv6Address(), VirtualMachine.Type.DomainRouter); } } } @@ -284,18 +283,18 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { @DB public void deallocate(final Network network, final NicProfile nic, VirtualMachineProfile vm) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address()); + s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address()); } - if (nic.getIp4Address() != null) { - final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + if (nic.getIPv4Address() != null) { + final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null) { Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(TransactionStatus status) { // if the ip address a part of placeholder, don't release it Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null); - if (placeholderNic != null && placeholderNic.getIp4Address().equalsIgnoreCase(ip.getAddress().addr())) { + if (placeholderNic != null && placeholderNic.getIPv4Address().equalsIgnoreCase(ip.getAddress().addr())) { s_logger.debug("Not releasing direct ip " + ip.getId() + " yet as its ip is saved in the placeholder"); } else { _ipAddrMgr.markIpAsUnavailable(ip.getId()); @@ -316,8 +315,8 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { } } - if (nic.getIp6Address() != null) { - _ipv6Mgr.revokeDirectIpv6Address(nic.getNetworkId(), nic.getIp6Address()); + if (nic.getIPv6Address() != null) { + _ipv6Mgr.revokeDirectIpv6Address(nic.getNetworkId(), nic.getIPv6Address()); } nic.deallocate(); } @@ -338,9 +337,9 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { @Override public void doInTransactionWithoutResult(TransactionStatus status) { for (Nic nic : nics) { - if (nic.getIp4Address() != null) { - s_logger.debug("Releasing ip " + nic.getIp4Address() + " of placeholder nic " + nic); - IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + if (nic.getIPv4Address() != null) { + s_logger.debug("Releasing ip " + nic.getIPv4Address() + " of placeholder nic " + nic); + IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null) { _ipAddrMgr.markIpAsUnavailable(ip.getId()); _ipAddressDao.unassignIpAddress(ip.getId()); diff --git a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java index f2843c610de..26c80151add 100644 --- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java +++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java @@ -21,9 +21,8 @@ import java.util.List; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; - import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; import com.cloud.configuration.ZoneConfig; import com.cloud.dc.DataCenter; @@ -105,16 +104,16 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { rsStrategy = ReservationStrategy.Create; } - if (nic != null && nic.getRequestedIpv4() != null) { + if (nic != null && nic.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + nic); } if (nic == null) { nic = new NicProfile(rsStrategy, null, null, null, null); - } else if (nic.getIp4Address() == null) { - nic.setStrategy(ReservationStrategy.Start); + } else if (nic.getIPv4Address() == null) { + nic.setReservationStrategy(ReservationStrategy.Start); } else { - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } if (rsStrategy == ReservationStrategy.Create) { @@ -129,7 +128,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { - String oldIp = nic.getIp4Address(); + String oldIp = nic.getIPv4Address(); boolean getNewIp = false; if (oldIp == null) { @@ -149,7 +148,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { } }); - nic.setIp4Address(null); + nic.setIPv4Address(null); getNewIp = true; } } @@ -161,15 +160,15 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { } DataCenter dc = _dcDao.findById(network.getDataCenterId()); - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } @DB protected void getIp(final NicProfile nic, final Pod pod, final VirtualMachineProfile vm, final Network network) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { final DataCenter dc = _dcDao.findById(pod.getDataCenterId()); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { Transaction.execute(new TransactionCallbackWithExceptionNoReturn() { @Override public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientAddressCapacityException { @@ -183,9 +182,9 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { if (vm.getType() == VirtualMachine.Type.DomainRouter) { Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, pod.getId()); if (placeholderNic != null) { - IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIp4Address()); + IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIPv4Address()); ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId())); - s_logger.debug("Nic got an ip address " + placeholderNic.getIp4Address() + " stored in placeholder nic for the network " + network + + s_logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network + " and gateway " + podRangeGateway); } } @@ -194,10 +193,10 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), null, false); } - nic.setIp4Address(ip.getAddress().toString()); + nic.setIPv4Address(ip.getAddress().toString()); nic.setFormat(AddressFormat.Ip4); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Gateway(ip.getGateway()); + nic.setIPv4Netmask(ip.getNetmask()); if (ip.getVlanTag() != null && ip.getVlanTag().equalsIgnoreCase(Vlan.UNTAGGED)) { nic.setIsolationUri(IsolationType.Ec2.toUri(Vlan.UNTAGGED)); nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED)); @@ -210,15 +209,15 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru { if (vm.getType() == VirtualMachine.Type.DomainRouter) { Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, pod.getId()); if (placeholderNic == null) { - s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIp4Address() + " for the network " + network); - _networkMgr.savePlaceholderNic(network, nic.getIp4Address(), null, VirtualMachine.Type.DomainRouter); + s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " for the network " + network); + _networkMgr.savePlaceholderNic(network, nic.getIPv4Address(), null, VirtualMachine.Type.DomainRouter); } } } }); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } } diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java index d01a65bfcc5..b1d123669cc 100644 --- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java +++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java @@ -21,10 +21,9 @@ import java.util.List; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; - import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; @@ -43,15 +42,15 @@ import com.cloud.network.Network.State; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.PhysicalNetwork; import com.cloud.network.PhysicalNetwork.IsolationMethod; +import com.cloud.network.dao.FirewallRulesCidrsDao; +import com.cloud.network.dao.FirewallRulesCidrsVO; +import com.cloud.network.dao.FirewallRulesDao; import com.cloud.network.dao.IPAddressDao; import com.cloud.network.dao.IPAddressVO; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.NetworkVO; -import com.cloud.network.dao.FirewallRulesCidrsDao; -import com.cloud.network.dao.FirewallRulesDao; import com.cloud.network.rules.FirewallRule; import com.cloud.network.rules.FirewallRuleVO; -import com.cloud.network.dao.FirewallRulesCidrsVO; import com.cloud.network.rules.PortForwardingRuleVO; import com.cloud.network.rules.dao.PortForwardingRulesDao; import com.cloud.offering.NetworkOffering; @@ -191,9 +190,9 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru { // Mask the Ipv4 address of all nics that use this network with the new guest VLAN offset List nicsInNetwork = _nicDao.listByNetworkId(config.getId()); for (NicVO nic : nicsInNetwork) { - if (nic.getIp4Address() != null) { - long ipMask = getIpMask(nic.getIp4Address(), cidrSize); - nic.setIp4Address(NetUtils.long2Ip(newCidrAddress | ipMask)); + if (nic.getIPv4Address() != null) { + long ipMask = getIpMask(nic.getIPv4Address(), cidrSize); + nic.setIPv4Address(NetUtils.long2Ip(newCidrAddress | ipMask)); _nicDao.persist(nic); } } @@ -250,18 +249,18 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru { public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { - if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId()) && nic != null && nic.getRequestedIpv4() != null) { + if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId()) && nic != null && nic.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + nic); } NicProfile profile = super.allocate(config, nic, vm); if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId())) { - profile.setStrategy(ReservationStrategy.Start); + profile.setReservationStrategy(ReservationStrategy.Start); /* We won't clear IP address, because router may set gateway as it IP, and it would be updated properly later */ //profile.setIp4Address(null); - profile.setGateway(null); - profile.setNetmask(null); + profile.setIPv4Gateway(null); + profile.setIPv4Netmask(null); } return profile; @@ -273,9 +272,9 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru { super.deallocate(config, nic, vm); if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId())) { - nic.setIp4Address(null); - nic.setGateway(null); - nic.setNetmask(null); + nic.setIPv4Address(null); + nic.setIPv4Gateway(null); + nic.setIPv4Netmask(null); nic.setBroadcastUri(null); nic.setIsolationUri(null); } @@ -291,23 +290,23 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru { if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId())) { nic.setBroadcastUri(config.getBroadcastUri()); nic.setIsolationUri(config.getBroadcastUri()); - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); - nic.setNetmask(NetUtils.cidr2Netmask(config.getCidr())); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); + nic.setIPv4Netmask(NetUtils.cidr2Netmask(config.getCidr())); long cidrAddress = NetUtils.ip2Long(config.getCidr().split("/")[0]); int cidrSize = getGloballyConfiguredCidrSize(); - nic.setGateway(config.getGateway()); + nic.setIPv4Gateway(config.getGateway()); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { String guestIp = _ipAddrMgr.acquireGuestIpAddress(config, null); if (guestIp == null) { throw new InsufficientVirtualNetworkCapacityException("Unable to acquire guest IP address for network " + config, DataCenter.class, dc.getId()); } - nic.setIp4Address(guestIp); + nic.setIPv4Address(guestIp); } else { - long ipMask = NetUtils.ip2Long(nic.getIp4Address()) & ~(0xffffffffffffffffl << (32 - cidrSize)); - nic.setIp4Address(NetUtils.long2Ip(cidrAddress | ipMask)); + long ipMask = NetUtils.ip2Long(nic.getIPv4Address()) & ~(0xffffffffffffffffl << (32 - cidrSize)); + nic.setIPv4Address(NetUtils.long2Ip(cidrAddress | ipMask)); } } else { super.reserve(nic, config, vm, dest, context); diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java index 25b1f54798e..92613c47482 100644 --- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java +++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java @@ -234,10 +234,10 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur public void deallocate(final Network network, final NicProfile nic, final VirtualMachineProfile vm) { if (network.getSpecifyIpRanges()) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address()); + s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address()); } - final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null) { Transaction.execute(new TransactionCallbackNoReturn() { @Override @@ -342,14 +342,14 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur final DataCenter dc = _dcDao.findById(network.getDataCenterId()); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { nic.setBroadcastUri(network.getBroadcastUri()); nic.setIsolationUri(network.getBroadcastUri()); - nic.setGateway(network.getGateway()); + nic.setIPv4Gateway(network.getGateway()); String guestIp = null; if (network.getSpecifyIpRanges()) { - _ipAddrMgr.allocateDirectIp(nic, dc, vm, network, nic.getRequestedIpv4(), null); + _ipAddrMgr.allocateDirectIp(nic, dc, vm, network, nic.getRequestedIPv4(), null); } else { //if Vm is router vm and source nat is enabled in the network, set ip4 to the network gateway boolean isGateway = false; @@ -370,23 +370,23 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur if (isGateway) { guestIp = network.getGateway(); } else { - guestIp = _ipAddrMgr.acquireGuestIpAddress(network, nic.getRequestedIpv4()); + guestIp = _ipAddrMgr.acquireGuestIpAddress(network, nic.getRequestedIPv4()); if (guestIp == null) { throw new InsufficientVirtualNetworkCapacityException("Unable to acquire Guest IP" + " address for network " + network, DataCenter.class, dc.getId()); } } - nic.setIp4Address(guestIp); - nic.setNetmask(NetUtils.cidr2Netmask(network.getCidr())); + nic.setIPv4Address(guestIp); + nic.setIPv4Netmask(NetUtils.cidr2Netmask(network.getCidr())); - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); nic.setFormat(AddressFormat.Ip4); } } - nic.setStrategy(ReservationStrategy.Start); + nic.setReservationStrategy(ReservationStrategy.Start); if (nic.getMacAddress() == null) { nic.setMacAddress(_networkModel.getNextAvailableMacAddressInNetwork(network.getId())); @@ -402,8 +402,8 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur public void updateNicProfile(final NicProfile profile, final Network network) { final DataCenter dc = _dcDao.findById(network.getDataCenterId()); if (profile != null) { - profile.setDns1(dc.getDns1()); - profile.setDns2(dc.getDns2()); + profile.setIPv4Dns1(dc.getDns1()); + profile.setIPv4Dns2(dc.getDns2()); } } diff --git a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java index 49480db6b71..2470ea7c67b 100644 --- a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java @@ -103,10 +103,10 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru { assert trafficType == TrafficType.Management || trafficType == TrafficType.Storage : "Well, I can't take care of this config now can I? " + config; if (nic != null) { - if (nic.getRequestedIpv4() != null) { + if (nic.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + nic); } - nic.setStrategy(nic.getIp4Address() != null ? ReservationStrategy.Create : ReservationStrategy.Start); + nic.setReservationStrategy(nic.getIPv4Address() != null ? ReservationStrategy.Create : ReservationStrategy.Start); } else { nic = new NicProfile(ReservationStrategy.Start, null, null, null, null); } @@ -124,12 +124,12 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru { throw new InsufficientAddressCapacityException("Unable to get a management ip address", Pod.class, pod.getId()); } - nic.setIp4Address(ip.first()); + nic.setIPv4Address(ip.first()); nic.setMacAddress(NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ip.second()))); - nic.setGateway(pod.getGateway()); + nic.setIPv4Gateway(pod.getGateway()); nic.setFormat(AddressFormat.Ip4); String netmask = NetUtils.getCidrNetmask(pod.getCidrSize()); - nic.setNetmask(netmask); + nic.setIPv4Netmask(netmask); nic.setBroadcastType(BroadcastDomainType.Native); nic.setBroadcastUri(null); nic.setIsolationUri(null); diff --git a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java index e9bde69dd5d..340c8b12524 100644 --- a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java @@ -141,12 +141,12 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { @Override public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address()); + s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address()); } - PrivateIpVO ip = _privateIpDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + PrivateIpVO ip = _privateIpDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null) { - _privateIpDao.releaseIpAddress(nic.getIp4Address(), nic.getNetworkId()); + _privateIpDao.releaseIpAddress(nic.getIPv4Address(), nic.getNetworkId()); } nic.deallocate(); } @@ -173,26 +173,26 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { getIp(nic, dc, network); - if (nic.getIp4Address() == null) { - nic.setStrategy(ReservationStrategy.Start); + if (nic.getIPv4Address() == null) { + nic.setReservationStrategy(ReservationStrategy.Start); } else { - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } return nic; } protected void getIp(NicProfile nic, DataCenter dc, Network network) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { PrivateIpVO ipVO = _privateIpDao.allocateIpAddress(network.getDataCenterId(), network.getId(), null); String vlanTag = BroadcastDomainType.getValue(network.getBroadcastUri()); String netmask = NetUtils.getCidrNetmask(network.getCidr()); PrivateIpAddress ip = new PrivateIpAddress(ipVO, vlanTag, network.getGateway(), netmask, NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress()))); - nic.setIp4Address(ip.getIpAddress()); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Address(ip.getIpAddress()); + nic.setIPv4Gateway(ip.getGateway()); + nic.setIPv4Netmask(ip.getNetmask()); nic.setIsolationUri(IsolationType.Vlan.toUri(ip.getBroadcastUri())); nic.setBroadcastUri(IsolationType.Vlan.toUri(ip.getBroadcastUri())); nic.setBroadcastType(BroadcastDomainType.Vlan); @@ -201,25 +201,25 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { nic.setMacAddress(ip.getMacAddress()); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } @Override public void updateNicProfile(NicProfile profile, Network network) { DataCenter dc = _entityMgr.findById(DataCenter.class, network.getDataCenterId()); if (profile != null) { - profile.setDns1(dc.getDns1()); - profile.setDns2(dc.getDns2()); + profile.setIPv4Dns1(dc.getDns1()); + profile.setIPv4Dns2(dc.getDns2()); } } @Override public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { getIp(nic, _entityMgr.findById(DataCenter.class, network.getDataCenterId()), network); - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } } diff --git a/server/src/com/cloud/network/guru/PublicNetworkGuru.java b/server/src/com/cloud/network/guru/PublicNetworkGuru.java index b1c226bb9d9..9f855ea116d 100644 --- a/server/src/com/cloud/network/guru/PublicNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PublicNetworkGuru.java @@ -19,9 +19,8 @@ package com.cloud.network.guru; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; - import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; import com.cloud.dc.DataCenter; import com.cloud.dc.Vlan.VlanType; @@ -117,11 +116,11 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { PublicIp ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), null, vm.getOwner(), VlanType.VirtualNetwork, null, null, false); - nic.setIp4Address(ip.getAddress().toString()); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Address(ip.getAddress().toString()); + nic.setIPv4Gateway(ip.getGateway()); + nic.setIPv4Netmask(ip.getNetmask()); if (network.getBroadcastDomainType() == BroadcastDomainType.Vxlan) { nic.setIsolationUri(BroadcastDomainType.Vxlan.toUri(ip.getVlanTag())); nic.setBroadcastUri(BroadcastDomainType.Vxlan.toUri(ip.getVlanTag())); @@ -136,16 +135,16 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { nic.setMacAddress(ip.getMacAddress()); } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); + nic.setIPv4Dns1(dc.getDns1()); + nic.setIPv4Dns2(dc.getDns2()); } @Override public void updateNicProfile(NicProfile profile, Network network) { DataCenter dc = _dcDao.findById(network.getDataCenterId()); if (profile != null) { - profile.setDns1(dc.getDns1()); - profile.setDns2(dc.getDns2()); + profile.setIPv4Dns1(dc.getDns1()); + profile.setIPv4Dns2(dc.getDns2()); } } @@ -155,7 +154,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { DataCenter dc = _dcDao.findById(network.getDataCenterId()); - if (nic != null && nic.getRequestedIpv4() != null) { + if (nic != null && nic.getRequestedIPv4() != null) { throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + nic); } @@ -165,12 +164,12 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { getIp(nic, dc, vm, network); - if (nic.getIp4Address() == null) { - nic.setStrategy(ReservationStrategy.Start); + if (nic.getIPv4Address() == null) { + nic.setReservationStrategy(ReservationStrategy.Start); } else if (vm.getVirtualMachine().getType() == VirtualMachine.Type.DomainRouter) { - nic.setStrategy(ReservationStrategy.Managed); + nic.setReservationStrategy(ReservationStrategy.Managed); } else { - nic.setStrategy(ReservationStrategy.Create); + nic.setReservationStrategy(ReservationStrategy.Create); } return nic; @@ -179,7 +178,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { @Override public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { getIp(nic, dest.getDataCenter(), vm, network); } } @@ -199,10 +198,10 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { @DB public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) { if (s_logger.isDebugEnabled()) { - s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIp4Address()); + s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address()); } - final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIp4Address()); + final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address()); if (ip != null && nic.getReservationStrategy() != ReservationStrategy.Managed) { Transaction.execute(new TransactionCallbackNoReturn() { @Override diff --git a/server/src/com/cloud/network/guru/StorageNetworkGuru.java b/server/src/com/cloud/network/guru/StorageNetworkGuru.java index 9df7a1b56f1..bf21cd77160 100644 --- a/server/src/com/cloud/network/guru/StorageNetworkGuru.java +++ b/server/src/com/cloud/network/guru/StorageNetworkGuru.java @@ -132,12 +132,12 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu } vlan = ip.getVlan(); - nic.setIp4Address(ip.getIpAddress()); + nic.setIPv4Address(ip.getIpAddress()); nic.setMacAddress(NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ip.getMac()))); nic.setFormat(AddressFormat.Ip4); - nic.setNetmask(ip.getNetmask()); + nic.setIPv4Netmask(ip.getNetmask()); nic.setBroadcastType(BroadcastDomainType.Storage); - nic.setGateway(ip.getGateway()); + nic.setIPv4Gateway(ip.getGateway()); if (vlan != null) { nic.setBroadcastUri(BroadcastDomainType.Storage.toUri(vlan)); } else { @@ -154,8 +154,8 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu return super.release(nic, vm, reservationId); } - _sNwMgr.releaseIpAddress(nic.getIp4Address()); - s_logger.debug("Release an storage ip " + nic.getIp4Address()); + _sNwMgr.releaseIpAddress(nic.getIPv4Address()); + s_logger.debug("Release an storage ip " + nic.getIPv4Address()); nic.deallocate(); return true; } diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java index d7a85b6ff4f..c03af2d3fad 100644 --- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java +++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java @@ -30,11 +30,6 @@ import java.util.Set; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; - -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.command.user.loadbalancer.CreateLBHealthCheckPolicyCmd; import org.apache.cloudstack.api.command.user.loadbalancer.CreateLBStickinessPolicyCmd; @@ -50,6 +45,7 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO; import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao; +import org.apache.log4j.Logger; import com.cloud.agent.api.to.LoadBalancerTO; import com.cloud.configuration.ConfigurationManager; @@ -169,6 +165,8 @@ import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.dao.NicDao; import com.cloud.vm.dao.NicSecondaryIpDao; import com.cloud.vm.dao.UserVmDao; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; @Local(value = {LoadBalancingRulesManager.class, LoadBalancingRulesService.class}) public class LoadBalancingRulesManagerImpl extends ManagerBase implements LoadBalancingRulesManager, LoadBalancingRulesService { @@ -693,6 +691,7 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements if (backupState.equals(FirewallRule.State.Active)) applyLoadBalancerConfig(cmd.getLbRuleId()); } catch (ResourceUnavailableException e1) { + s_logger.info("[ignored] applying load balancer config.", e1); } finally { loadBalancer.setState(backupState); _lbDao.persist(loadBalancer); @@ -897,7 +896,7 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) { UserVm vm = _vmDao.findById(lbVmMap.getInstanceId()); Nic nic = _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(ulb.getNetworkId(), vm.getId()); - String dstIp = lbVmMap.getInstanceIp() == null ? nic.getIp4Address(): lbVmMap.getInstanceIp(); + String dstIp = lbVmMap.getInstanceIp() == null ? nic.getIPv4Address(): lbVmMap.getInstanceIp(); for (int i = 0; i < lbto.getDestinations().length; i++) { LoadBalancerTO.DestinationTO des = lbto.getDestinations()[i]; @@ -1030,7 +1029,7 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements throw ex; } - String priIp = nicInSameNetwork.getIp4Address(); + String priIp = nicInSameNetwork.getIPv4Address(); if (existingVmIdIps.containsKey(instanceId)) { // now check for ip address @@ -2055,7 +2054,7 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) { UserVm vm = _vmDao.findById(lbVmMap.getInstanceId()); Nic nic = _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(lb.getNetworkId(), vm.getId()); - dstIp = lbVmMap.getInstanceIp() == null ? nic.getIp4Address(): lbVmMap.getInstanceIp(); + dstIp = lbVmMap.getInstanceIp() == null ? nic.getIPv4Address(): lbVmMap.getInstanceIp(); LbDestination lbDst = new LbDestination(lb.getDefaultPortStart(), lb.getDefaultPortEnd(), dstIp, lbVmMap.isRevoke()); dstList.add(lbDst); } @@ -2464,7 +2463,7 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) { UserVm vm = _vmDao.findById(lbVmMap.getInstanceId()); Nic nic = _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(lb.getNetworkId(), vm.getId()); - Ip ip = new Ip(nic.getIp4Address()); + Ip ip = new Ip(nic.getIPv4Address()); dstList.put(ip, vm); } return dstList; diff --git a/server/src/com/cloud/network/router/CommandSetupHelper.java b/server/src/com/cloud/network/router/CommandSetupHelper.java index 2b701d9f702..f701218f2ac 100644 --- a/server/src/com/cloud/network/router/CommandSetupHelper.java +++ b/server/src/com/cloud/network/router/CommandSetupHelper.java @@ -191,7 +191,7 @@ public class CommandSetupHelper { final String zoneName = _dcDao.findById(router.getDataCenterId()).getName(); cmds.addCommand( "vmdata", - generateVmDataCommand(router, nic.getIp4Address(), vm.getUserData(), serviceOffering, zoneName, nic.getIp4Address(), vm.getHostName(), vm.getInstanceName(), + generateVmDataCommand(router, nic.getIPv4Address(), vm.getUserData(), serviceOffering, zoneName, nic.getIPv4Address(), vm.getHostName(), vm.getInstanceName(), vm.getId(), vm.getUuid(), publicKey, nic.getNetworkId())); } @@ -217,10 +217,10 @@ public class CommandSetupHelper { } public void createDhcpEntryCommand(final VirtualRouter router, final UserVm vm, final NicVO nic, final Commands cmds) { - final DhcpEntryCommand dhcpCommand = new DhcpEntryCommand(nic.getMacAddress(), nic.getIp4Address(), vm.getHostName(), nic.getIp6Address(), + final DhcpEntryCommand dhcpCommand = new DhcpEntryCommand(nic.getMacAddress(), nic.getIPv4Address(), vm.getHostName(), nic.getIPv6Address(), _networkModel.getExecuteInSeqNtwkElmtCmd()); - String gatewayIp = nic.getGateway(); + String gatewayIp = nic.getIPv4Gateway(); if (!nic.isDefaultNic()) { final GuestOSVO guestOS = _guestOSDao.findById(vm.getGuestOSId()); if (guestOS == null || !guestOS.getDisplayName().toLowerCase().contains("windows")) { @@ -231,11 +231,11 @@ public class CommandSetupHelper { final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId()); dhcpCommand.setDefaultRouter(gatewayIp); - dhcpCommand.setIp6Gateway(nic.getIp6Gateway()); + dhcpCommand.setIp6Gateway(nic.getIPv6Gateway()); String ipaddress = null; final NicVO domrDefaultNic = findDefaultDnsIp(vm.getId()); if (domrDefaultNic != null) { - ipaddress = domrDefaultNic.getIp4Address(); + ipaddress = domrDefaultNic.getIPv4Address(); } dhcpCommand.setDefaultDns(ipaddress); dhcpCommand.setDuid(NetUtils.getDuidLL(nic.getMacAddress())); @@ -268,13 +268,13 @@ public class CommandSetupHelper { final List ipList = new ArrayList(); final NicVO router_guest_nic = _nicDao.findByNtwkIdAndInstanceId(network.getId(), router.getId()); - final String cidr = NetUtils.getCidrFromGatewayAndNetmask(router_guest_nic.getGateway(), router_guest_nic.getNetmask()); + final String cidr = NetUtils.getCidrFromGatewayAndNetmask(router_guest_nic.getIPv4Gateway(), router_guest_nic.getIPv4Netmask()); final String[] cidrPair = cidr.split("\\/"); final String cidrAddress = cidrPair[0]; final long cidrSize = Long.parseLong(cidrPair[1]); final String startIpOfSubnet = NetUtils.getIpRangeStartIpFromCidr(cidrAddress, cidrSize); - ipList.add(new DhcpTO(router_guest_nic.getIp4Address(), router_guest_nic.getGateway(), router_guest_nic.getNetmask(), startIpOfSubnet)); + ipList.add(new DhcpTO(router_guest_nic.getIPv4Address(), router_guest_nic.getIPv4Gateway(), router_guest_nic.getIPv4Netmask(), startIpOfSubnet)); for (final NicIpAliasVO ipAliasVO : ipAliasVOList) { final DhcpTO DhcpTO = new DhcpTO(ipAliasVO.getIp4Address(), ipAliasVO.getGateway(), ipAliasVO.getNetmask(), ipAliasVO.getStartIpOfSubnet()); if (s_logger.isTraceEnabled()) { @@ -523,7 +523,7 @@ public class CommandSetupHelper { // password should be set only on default network element if (password != null && nic.isDefaultNic()) { - final SavePasswordCommand cmd = new SavePasswordCommand(password, nic.getIp4Address(), profile.getVirtualMachine().getHostName(), + final SavePasswordCommand cmd = new SavePasswordCommand(password, nic.getIPv4Address(), profile.getVirtualMachine().getHostName(), _networkModel.getExecuteInSeqNtwkElmtCmd()); cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _routerControlHelper.getRouterControlIp(router.getId())); cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, _routerControlHelper.getRouterIpInNetwork(nic.getNetworkId(), router.getId())); @@ -921,8 +921,8 @@ public class CommandSetupHelper { final boolean setupDns = dnsProvided || dhcpProvided; if (setupDns) { - defaultDns1 = guestNic.getDns1(); - defaultDns2 = guestNic.getDns2(); + defaultDns1 = guestNic.getIPv4Dns1(); + defaultDns2 = guestNic.getIPv4Dns2(); } final Nic nic = _nicDao.findByNtwkIdAndInstanceId(network.getId(), router.getId()); @@ -934,7 +934,7 @@ public class CommandSetupHelper { final SetupGuestNetworkCommand setupCmd = new SetupGuestNetworkCommand(dhcpRange, networkDomain, router.getIsRedundantRouter(), defaultDns1, defaultDns2, add, _itMgr.toNicTO(nicProfile, router.getHypervisorType())); - final String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIp4Address()) | ~NetUtils.ip2Long(guestNic.getNetmask())); + final String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIPv4Address()) | ~NetUtils.ip2Long(guestNic.getIPv4Netmask())); setupCmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _routerControlHelper.getRouterControlIp(router.getId())); setupCmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, _routerControlHelper.getRouterIpInNetwork(network.getId(), router.getId())); @@ -1022,7 +1022,7 @@ public class CommandSetupHelper { // find domR's nic in the network NicVO domrDefaultNic; if (isZoneBasic) { - domrDefaultNic = _nicDao.findByNetworkIdTypeAndGateway(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter, defaultNic.getGateway()); + domrDefaultNic = _nicDao.findByNetworkIdTypeAndGateway(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter, defaultNic.getIPv4Gateway()); } else { domrDefaultNic = _nicDao.findByNetworkIdAndType(defaultNic.getNetworkId(), VirtualMachine.Type.DomainRouter); } @@ -1033,8 +1033,8 @@ public class CommandSetupHelper { String dhcpRange = null; // setup dhcp range if (dc.getNetworkType() == NetworkType.Basic) { - final long cidrSize = NetUtils.getCidrSize(guestNic.getNetmask()); - final String cidr = NetUtils.getCidrSubNet(guestNic.getGateway(), cidrSize); + final long cidrSize = NetUtils.getCidrSize(guestNic.getIPv4Netmask()); + final String cidr = NetUtils.getCidrSubNet(guestNic.getIPv4Gateway(), cidrSize); if (cidr != null) { dhcpRange = NetUtils.getIpRangeStartIpFromCidr(cidr, cidrSize); } diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java index 92187e483d9..01c48918c97 100644 --- a/server/src/com/cloud/network/router/NetworkHelperImpl.java +++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java @@ -109,7 +109,7 @@ public class NetworkHelperImpl implements NetworkHelper { @Inject protected NicDao _nicDao; @Inject - private NetworkDao _networkDao; + protected NetworkDao _networkDao; @Inject protected DomainRouterDao _routerDao; @Inject @@ -137,8 +137,6 @@ public class NetworkHelperImpl implements NetworkHelper { @Inject private UserIpv6AddressDao _ipv6Dao; @Inject - private RouterControlHelper _routerControlHelper; - @Inject protected NetworkOrchestrationService _networkMgr; @Inject private UserDao _userDao; @@ -610,18 +608,22 @@ public class NetworkHelperImpl implements NetworkHelper { throw new CloudRuntimeException(errMsg); } - @Override - public LinkedHashMap> configureDefaultNics(final RouterDeploymentDefinition routerDeploymentDefinition) throws ConcurrentOperationException, InsufficientAddressCapacityException { + protected LinkedHashMap> configureControlNic(final RouterDeploymentDefinition routerDeploymentDefinition) { + final LinkedHashMap> controlConfig = new LinkedHashMap>(3); - final LinkedHashMap> networks = configureGuestNic(routerDeploymentDefinition); - - // 2) Control network s_logger.debug("Adding nic for Virtual Router in Control network "); final List offerings = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemControlNetwork); final NetworkOffering controlOffering = offerings.get(0); - final Network controlConfig = _networkMgr.setupNetwork(s_systemAccount, controlOffering, routerDeploymentDefinition.getPlan(), null, null, false).get(0); - networks.put(controlConfig, new ArrayList()); - // 3) Public network + final Network controlNic = _networkMgr.setupNetwork(s_systemAccount, controlOffering, routerDeploymentDefinition.getPlan(), null, null, false).get(0); + + controlConfig.put(controlNic, new ArrayList()); + + return controlConfig; + } + + protected LinkedHashMap> configurePublicNic(final RouterDeploymentDefinition routerDeploymentDefinition, final boolean hasGuestNic) { + final LinkedHashMap> publicConfig = new LinkedHashMap>(3); + if (routerDeploymentDefinition.isPublicNetwork()) { s_logger.debug("Adding nic for Virtual Router in Public network "); // if source nat service is supported by the network, get the source @@ -629,9 +631,9 @@ public class NetworkHelperImpl implements NetworkHelper { final NicProfile defaultNic = new NicProfile(); defaultNic.setDefaultNic(true); final PublicIp sourceNatIp = routerDeploymentDefinition.getSourceNatIP(); - defaultNic.setIp4Address(sourceNatIp.getAddress().addr()); - defaultNic.setGateway(sourceNatIp.getGateway()); - defaultNic.setNetmask(sourceNatIp.getNetmask()); + defaultNic.setIPv4Address(sourceNatIp.getAddress().addr()); + defaultNic.setIPv4Gateway(sourceNatIp.getGateway()); + defaultNic.setIPv4Netmask(sourceNatIp.getNetmask()); defaultNic.setMacAddress(sourceNatIp.getMacAddress()); // get broadcast from public network final Network pubNet = _networkDao.findById(sourceNatIp.getNetworkId()); @@ -644,13 +646,15 @@ public class NetworkHelperImpl implements NetworkHelper { defaultNic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(sourceNatIp.getVlanTag())); defaultNic.setIsolationUri(IsolationType.Vlan.toUri(sourceNatIp.getVlanTag())); } - //If guest nic has already been addedd we will have 2 devices in the list. - if (networks.size() > 1) { + + //If guest nic has already been added we will have 2 devices in the list. + if (hasGuestNic) { defaultNic.setDeviceId(2); } + final NetworkOffering publicOffering = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemPublicNetwork).get(0); final List publicNetworks = _networkMgr.setupNetwork(s_systemAccount, publicOffering, routerDeploymentDefinition.getPlan(), null, null, false); - final String publicIp = defaultNic.getIp4Address(); + final String publicIp = defaultNic.getIPv4Address(); // We want to use the identical MAC address for RvR on public // interface if possible final NicVO peerNic = _nicDao.findByIp4AddressAndNetworkId(publicIp, publicNetworks.get(0).getId()); @@ -658,9 +662,29 @@ public class NetworkHelperImpl implements NetworkHelper { s_logger.info("Use same MAC as previous RvR, the MAC is " + peerNic.getMacAddress()); defaultNic.setMacAddress(peerNic.getMacAddress()); } - networks.put(publicNetworks.get(0), new ArrayList(Arrays.asList(defaultNic))); + publicConfig.put(publicNetworks.get(0), new ArrayList(Arrays.asList(defaultNic))); } + return publicConfig; + } + + @Override + public LinkedHashMap> configureDefaultNics(final RouterDeploymentDefinition routerDeploymentDefinition) throws ConcurrentOperationException, InsufficientAddressCapacityException { + + final LinkedHashMap> networks = new LinkedHashMap>(3); + + // 1) Guest Network + final LinkedHashMap> guestNic = configureGuestNic(routerDeploymentDefinition); + networks.putAll(guestNic); + + // 2) Control network + final LinkedHashMap> controlNic = configureControlNic(routerDeploymentDefinition); + networks.putAll(controlNic); + + // 3) Public network + final LinkedHashMap> publicNic = configurePublicNic(routerDeploymentDefinition, networks.size() > 1); + networks.putAll(publicNic); + return networks; } @@ -679,10 +703,10 @@ public class NetworkHelperImpl implements NetworkHelper { if (!routerDeploymentDefinition.isPublicNetwork()) { final Nic placeholder = _networkModel.getPlaceholderNicForRouter(guestNetwork, routerDeploymentDefinition.getPodId()); if (guestNetwork.getCidr() != null) { - if (placeholder != null && placeholder.getIp4Address() != null) { - s_logger.debug("Requesting ipv4 address " + placeholder.getIp4Address() + " stored in placeholder nic for the network " + if (placeholder != null && placeholder.getIPv4Address() != null) { + s_logger.debug("Requesting ipv4 address " + placeholder.getIPv4Address() + " stored in placeholder nic for the network " + guestNetwork); - defaultNetworkStartIp = placeholder.getIp4Address(); + defaultNetworkStartIp = placeholder.getIPv4Address(); } else { final String startIp = _networkModel.getStartIpAddress(guestNetwork.getId()); if (startIp != null @@ -696,10 +720,10 @@ public class NetworkHelperImpl implements NetworkHelper { } if (guestNetwork.getIp6Cidr() != null) { - if (placeholder != null && placeholder.getIp6Address() != null) { - s_logger.debug("Requesting ipv6 address " + placeholder.getIp6Address() + " stored in placeholder nic for the network " + if (placeholder != null && placeholder.getIPv6Address() != null) { + s_logger.debug("Requesting ipv6 address " + placeholder.getIPv6Address() + " stored in placeholder nic for the network " + guestNetwork); - defaultNetworkStartIpv6 = placeholder.getIp6Address(); + defaultNetworkStartIpv6 = placeholder.getIPv6Address(); } else { final String startIpv6 = _networkModel.getStartIpv6Address(guestNetwork.getId()); if (startIpv6 != null && _ipv6Dao.findByNetworkIdAndIp(guestNetwork.getId(), startIpv6) == null) { @@ -715,16 +739,16 @@ public class NetworkHelperImpl implements NetworkHelper { final NicProfile gatewayNic = new NicProfile(defaultNetworkStartIp, defaultNetworkStartIpv6); if (routerDeploymentDefinition.isPublicNetwork()) { if (routerDeploymentDefinition.isRedundant()) { - gatewayNic.setIp4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); + gatewayNic.setIPv4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); } else { - gatewayNic.setIp4Address(guestNetwork.getGateway()); + gatewayNic.setIPv4Address(guestNetwork.getGateway()); } gatewayNic.setBroadcastUri(guestNetwork.getBroadcastUri()); gatewayNic.setBroadcastType(guestNetwork.getBroadcastDomainType()); gatewayNic.setIsolationUri(guestNetwork.getBroadcastUri()); gatewayNic.setMode(guestNetwork.getMode()); final String gatewayCidr = guestNetwork.getCidr(); - gatewayNic.setNetmask(NetUtils.getCidrNetmask(gatewayCidr)); + gatewayNic.setIPv4Netmask(NetUtils.getCidrNetmask(gatewayCidr)); } else { gatewayNic.setDefaultNic(true); } diff --git a/server/src/com/cloud/network/router/NicProfileHelperImpl.java b/server/src/com/cloud/network/router/NicProfileHelperImpl.java index aaa1f27c18b..09e52119dc4 100644 --- a/server/src/com/cloud/network/router/NicProfileHelperImpl.java +++ b/server/src/com/cloud/network/router/NicProfileHelperImpl.java @@ -81,9 +81,9 @@ public class NicProfileHelperImpl implements NicProfileHelper { NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress()))); final URI netUri = BroadcastDomainType.fromString(ip.getBroadcastUri()); - privateNicProfile.setIp4Address(ip.getIpAddress()); - privateNicProfile.setGateway(ip.getGateway()); - privateNicProfile.setNetmask(ip.getNetmask()); + privateNicProfile.setIPv4Address(ip.getIpAddress()); + privateNicProfile.setIPv4Gateway(ip.getGateway()); + privateNicProfile.setIPv4Netmask(ip.getNetmask()); privateNicProfile.setIsolationUri(netUri); privateNicProfile.setBroadcastUri(netUri); // can we solve this in setBroadcastUri()??? @@ -102,9 +102,9 @@ public class NicProfileHelperImpl implements NicProfileHelper { final NicProfile guestNic = new NicProfile(); if (vpcRouterDeploymentDefinition.isRedundant()) { - guestNic.setIp4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); + guestNic.setIPv4Address(_ipAddrMgr.acquireGuestIpAddress(guestNetwork, null)); } else { - guestNic.setIp4Address(guestNetwork.getGateway()); + guestNic.setIPv4Address(guestNetwork.getGateway()); } guestNic.setBroadcastUri(guestNetwork.getBroadcastUri()); @@ -112,7 +112,7 @@ public class NicProfileHelperImpl implements NicProfileHelper { guestNic.setIsolationUri(guestNetwork.getBroadcastUri()); guestNic.setMode(guestNetwork.getMode()); final String gatewayCidr = guestNetwork.getCidr(); - guestNic.setNetmask(NetUtils.getCidrNetmask(gatewayCidr)); + guestNic.setIPv4Netmask(NetUtils.getCidrNetmask(gatewayCidr)); return guestNic; } diff --git a/server/src/com/cloud/network/router/RouterControlHelper.java b/server/src/com/cloud/network/router/RouterControlHelper.java index 68fd6e333ad..570843de49b 100644 --- a/server/src/com/cloud/network/router/RouterControlHelper.java +++ b/server/src/com/cloud/network/router/RouterControlHelper.java @@ -49,7 +49,7 @@ public class RouterControlHelper { for (final NicVO n : nics) { final NetworkVO nc = networkDao.findById(n.getNetworkId()); if (nc != null && nc.getTrafficType() == TrafficType.Control) { - routerControlIpAddress = n.getIp4Address(); + routerControlIpAddress = n.getIPv4Address(); // router will have only one control ip break; } diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java index 20ee2a17898..a291b3590b2 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java @@ -44,7 +44,6 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA static final String RouterTemplateOvm3CK = "router.template.ovm3"; static final String SetServiceMonitorCK = "network.router.EnableServiceMonitoring"; static final String RouterAlertsCheckIntervalCK = "router.alerts.check.interval"; - static final String RouterReprovisionOnOutOfBandMigrationCK = "router.reboot.when.outofband.migrated"; static final ConfigKey RouterTemplateXen = new ConfigKey(String.class, RouterTemplateXenCK, "Advanced", "SystemVM Template (XenServer)", "Name of the default router template on Xenserver.", true, ConfigKey.Scope.Zone, null); @@ -68,8 +67,6 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA "If true, router minimum required version is checked before sending command", false); static final ConfigKey UseExternalDnsServers = new ConfigKey(Boolean.class, "use.external.dns", "Advanced", "false", "Bypass internal dns, use external dns1 and dns2", true, ConfigKey.Scope.Zone, null); - static final ConfigKey RouterReprovisionOnOutOfBandMigration = new ConfigKey(Boolean.class, RouterReprovisionOnOutOfBandMigrationCK, "Advanced", "false", - "Reboot routers when they are migrated out of band in order to reprovision", true, ConfigKey.Scope.Zone, null); public static final int DEFAULT_ROUTER_VM_RAMSIZE = 256; // 256M public static final int DEFAULT_ROUTER_CPU_MHZ = 500; // 500 MHz diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 8dab44d1c4e..c32aeba1a35 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -405,7 +405,6 @@ Configurable, StateListener { ScheduledExecutorService _checkExecutor; ScheduledExecutorService _networkStatsUpdateExecutor; ExecutorService _rvrStatusUpdateExecutor; - ExecutorService _rebootRouterExecutor; BlockingQueue _vrUpdateQueue = null; @@ -572,7 +571,6 @@ Configurable, StateListener { _executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("RouterMonitor")); _checkExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("RouterStatusMonitor")); _networkStatsUpdateExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("NetworkStatsUpdater")); - _rebootRouterExecutor = Executors.newCachedThreadPool(new NamedThreadFactory("RebootRouterTask")); VirtualMachine.State.getStateMachine().registerListener(this); @@ -769,10 +767,10 @@ Configurable, StateListener { } if (forVpc && network.getTrafficType() == TrafficType.Public || !forVpc && network.getTrafficType() == TrafficType.Guest && network.getGuestType() == Network.GuestType.Isolated) { - final NetworkUsageCommand usageCmd = new NetworkUsageCommand(privateIP, router.getHostName(), forVpc, routerNic.getIp4Address()); + final NetworkUsageCommand usageCmd = new NetworkUsageCommand(privateIP, router.getHostName(), forVpc, routerNic.getIPv4Address()); final String routerType = router.getType().toString(); final UserStatisticsVO previousStats = _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), network.getId(), - forVpc ? routerNic.getIp4Address() : null, router.getId(), routerType); + forVpc ? routerNic.getIPv4Address() : null, router.getId(), routerType); NetworkUsageAnswer answer = null; try { answer = (NetworkUsageAnswer) _agentMgr.easySend(router.getHostId(), usageCmd); @@ -797,7 +795,7 @@ Configurable, StateListener { @Override public void doInTransactionWithoutResult(final TransactionStatus status) { final UserStatisticsVO stats = _userStatsDao.lock(router.getAccountId(), router.getDataCenterId(), network.getId(), - forVpc ? routerNic.getIp4Address() : null, router.getId(), routerType); + forVpc ? routerNic.getIPv4Address() : null, router.getId(), routerType); if (stats == null) { s_logger.warn("unable to find stats for account: " + router.getAccountId()); return; @@ -1376,28 +1374,28 @@ Configurable, StateListener { for (final NicProfile nic : profile.getNics()) { final int deviceId = nic.getDeviceId(); boolean ipv4 = false, ipv6 = false; - if (nic.getIp4Address() != null) { + if (nic.getIPv4Address() != null) { ipv4 = true; - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); } - if (nic.getIp6Address() != null) { + if (nic.getIPv6Address() != null) { ipv6 = true; - buf.append(" eth").append(deviceId).append("ip6=").append(nic.getIp6Address()); - buf.append(" eth").append(deviceId).append("ip6prelen=").append(NetUtils.getIp6CidrSize(nic.getIp6Cidr())); + buf.append(" eth").append(deviceId).append("ip6=").append(nic.getIPv6Address()); + buf.append(" eth").append(deviceId).append("ip6prelen=").append(NetUtils.getIp6CidrSize(nic.getIPv6Cidr())); } if (nic.isDefaultNic()) { if (ipv4) { - buf.append(" gateway=").append(nic.getGateway()); + buf.append(" gateway=").append(nic.getIPv4Gateway()); } if (ipv6) { - buf.append(" ip6gateway=").append(nic.getIp6Gateway()); + buf.append(" ip6gateway=").append(nic.getIPv6Gateway()); } - defaultDns1 = nic.getDns1(); - defaultDns2 = nic.getDns2(); - defaultIp6Dns1 = nic.getIp6Dns1(); - defaultIp6Dns2 = nic.getIp6Dns2(); + defaultDns1 = nic.getIPv4Dns1(); + defaultDns2 = nic.getIPv4Dns2(); + defaultIp6Dns1 = nic.getIPv6Dns1(); + defaultIp6Dns2 = nic.getIPv6Dns2(); } if (nic.getTrafficType() == TrafficType.Management) { @@ -1546,9 +1544,9 @@ Configurable, StateListener { buf.append(createRedundantRouterArgs(guestNic, router)); final Network net = _networkModel.getNetwork(guestNic.getNetworkId()); buf.append(" guestgw=").append(net.getGateway()); - final String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIp4Address()) | ~NetUtils.ip2Long(guestNic.getNetmask())); + final String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIPv4Address()) | ~NetUtils.ip2Long(guestNic.getIPv4Netmask())); buf.append(" guestbrd=").append(brd); - buf.append(" guestcidrsize=").append(NetUtils.getCidrSize(guestNic.getNetmask())); + buf.append(" guestcidrsize=").append(NetUtils.getCidrSize(guestNic.getIPv4Netmask())); final int advertInt = NumbersUtil.parseInt(_configDao.getValue(Config.RedundantRouterVrrpInterval.key()), 1); buf.append(" advert_int=").append(advertInt); @@ -1565,8 +1563,8 @@ Configurable, StateListener { // setup dhcp range if (dc.getNetworkType() == NetworkType.Basic) { if (guestNic.isDefaultNic()) { - cidrSize = NetUtils.getCidrSize(guestNic.getNetmask()); - final String cidr = NetUtils.getCidrSubNet(guestNic.getGateway(), cidrSize); + cidrSize = NetUtils.getCidrSize(guestNic.getIPv4Netmask()); + final String cidr = NetUtils.getCidrSubNet(guestNic.getIPv4Gateway(), cidrSize); if (cidr != null) { dhcpRange = NetUtils.getIpRangeStartIpFromCidr(cidr, cidrSize); } @@ -1653,11 +1651,11 @@ Configurable, StateListener { final List nics = profile.getNics(); for (final NicProfile nic : nics) { if (nic.getTrafficType() == TrafficType.Public) { - router.setPublicIpAddress(nic.getIp4Address()); - router.setPublicNetmask(nic.getNetmask()); + router.setPublicIpAddress(nic.getIPv4Address()); + router.setPublicNetmask(nic.getIPv4Netmask()); router.setPublicMacAddress(nic.getMacAddress()); } else if (nic.getTrafficType() == TrafficType.Control) { - router.setPrivateIpAddress(nic.getIp4Address()); + router.setPrivateIpAddress(nic.getIPv4Address()); router.setPrivateMacAddress(nic.getMacAddress()); } } @@ -1697,7 +1695,7 @@ Configurable, StateListener { final List routerGuestNtwkIds = _routerDao.getRouterNetworks(router.getId()); for (final Long guestNetworkId : routerGuestNtwkIds) { - final AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start, router.getInstanceName(), controlNic.getIp4Address(), _routerControlHelper.getRouterIpInNetwork( + final AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start, router.getInstanceName(), controlNic.getIPv4Address(), _routerControlHelper.getRouterIpInNetwork( guestNetworkId, router.getId())); cmds.addCommand(startCmd); @@ -1721,7 +1719,7 @@ Configurable, StateListener { finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNetworkId); - final AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish, router.getInstanceName(), controlNic.getIp4Address(), _routerControlHelper.getRouterIpInNetwork( + final AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish, router.getInstanceName(), controlNic.getIPv4Address(), _routerControlHelper.getRouterIpInNetwork( guestNetworkId, router.getId())); cmds.addCommand(finishCmd); } @@ -1772,7 +1770,7 @@ Configurable, StateListener { throw new CloudRuntimeException("VirtualMachine " + profile.getInstanceName() + " doesn't have a control interface"); } final SetMonitorServiceCommand command = new SetMonitorServiceCommand(servicesTO); - command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address()); + command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIPv4Address()); command.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, _routerControlHelper.getRouterIpInNetwork(networkId, router.getId())); command.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName()); @@ -1790,13 +1788,13 @@ Configurable, StateListener { // TODO this is a ugly to test hypervisor type here // for basic network mode, we will use the guest NIC for control NIC for (final NicProfile nic : profile.getNics()) { - if (nic.getTrafficType() == TrafficType.Guest && nic.getIp4Address() != null) { + if (nic.getTrafficType() == TrafficType.Guest && nic.getIPv4Address() != null) { controlNic = nic; } } } else { for (final NicProfile nic : profile.getNics()) { - if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) { + if (nic.getTrafficType() == TrafficType.Control && nic.getIPv4Address() != null) { controlNic = nic; } } @@ -1806,18 +1804,18 @@ Configurable, StateListener { protected void finalizeSshAndVersionAndNetworkUsageOnStart(final Commands cmds, final VirtualMachineProfile profile, final DomainRouterVO router, final NicProfile controlNic) { final DomainRouterVO vr = _routerDao.findById(profile.getId()); - cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922)); + cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922)); // Update router template/scripts version final GetDomRVersionCmd command = new GetDomRVersionCmd(); - command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address()); + command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIPv4Address()); command.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName()); cmds.addCommand("getDomRVersion", command); // Network usage command to create iptables rules final boolean forVpc = vr.getVpcId() != null; if (!forVpc) { - cmds.addCommand("networkUsage", new NetworkUsageCommand(controlNic.getIp4Address(), router.getHostName(), "create", forVpc)); + cmds.addCommand("networkUsage", new NetworkUsageCommand(controlNic.getIPv4Address(), router.getHostName(), "create", forVpc)); } } @@ -2429,10 +2427,10 @@ Configurable, StateListener { // VR if (forVpc && network.getTrafficType() == TrafficType.Public || !forVpc && network.getTrafficType() == TrafficType.Guest && network.getGuestType() == Network.GuestType.Isolated) { - final NetworkUsageCommand usageCmd = new NetworkUsageCommand(privateIP, router.getHostName(), forVpc, routerNic.getIp4Address()); + final NetworkUsageCommand usageCmd = new NetworkUsageCommand(privateIP, router.getHostName(), forVpc, routerNic.getIPv4Address()); final String routerType = router.getType().toString(); final UserStatisticsVO previousStats = _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), network.getId(), - forVpc ? routerNic.getIp4Address() : null, router.getId(), routerType); + forVpc ? routerNic.getIPv4Address() : null, router.getId(), routerType); NetworkUsageAnswer answer = null; try { answer = (NetworkUsageAnswer) _agentMgr.easySend(router.getHostId(), usageCmd); @@ -2458,7 +2456,7 @@ Configurable, StateListener { @Override public void doInTransactionWithoutResult(final TransactionStatus status) { final UserStatisticsVO stats = _userStatsDao.lock(router.getAccountId(), router.getDataCenterId(), network.getId(), - forVpc ? routerNic.getIp4Address() : null, router.getId(), routerType); + forVpc ? routerNic.getIPv4Address() : null, router.getId(), routerType); if (stats == null) { s_logger.warn("unable to find stats for account: " + router.getAccountId()); return; @@ -2604,7 +2602,7 @@ Configurable, StateListener { @Override public ConfigKey[] getConfigKeys() { - return new ConfigKey[] { UseExternalDnsServers, routerVersionCheckEnabled, SetServiceMonitor, RouterAlertsCheckInterval, RouterReprovisionOnOutOfBandMigration }; + return new ConfigKey[] { UseExternalDnsServers, routerVersionCheckEnabled, SetServiceMonitor, RouterAlertsCheckInterval }; } @Override @@ -2615,30 +2613,20 @@ Configurable, StateListener { @Override public boolean postStateTransitionEvent(final StateMachine2.Transition transition, final VirtualMachine vo, final boolean status, final Object opaque) { - final State oldState = transition.getCurrentState(); final State newState = transition.getToState(); final VirtualMachine.Event event = transition.getEvent(); - boolean reprovision_out_of_band = RouterReprovisionOnOutOfBandMigration.value(); - if ( - (vo.getType() == VirtualMachine.Type.DomainRouter) && - ((oldState == State.Stopped) || (reprovision_out_of_band && isOutOfBandMigrated(opaque))) && - (event == VirtualMachine.Event.FollowAgentPowerOnReport) && - (newState == State.Running)) { - s_logger.info("Schedule a router reboot task as router " + vo.getId() + " is powered-on out-of-band. we need to reboot to refresh network rules"); - _rebootRouterExecutor.execute(new RebootTask(vo.getId())); - } else { - if (isOutOfBandMigrated(opaque)) { - final String title = "Router has been migrated out of band: " + vo.getInstanceName(); - final String context = - "An out of band migration of router " + vo.getInstanceName() + "(" + vo.getUuid() + ") was detected. No automated action was performed."; - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, vo.getDataCenterId(), vo.getPodIdToDeployIn(), title, context); - } + if (vo.getType() == VirtualMachine.Type.DomainRouter && + event == VirtualMachine.Event.FollowAgentPowerOnReport && + newState == State.Running && + isOutOfBandMigrated(opaque)) { + s_logger.debug("Virtual router " + vo.getInstanceName() + " is powered-on out-of-band"); } return true; } private boolean isOutOfBandMigrated(final Object opaque) { + // opaque -> if (opaque != null && opaque instanceof Pair) { final Pair pair = (Pair)opaque; final Object first = pair.first(); diff --git a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java index 3d7ed5f637d..2b008bd28aa 100644 --- a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java +++ b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java @@ -32,6 +32,7 @@ import org.cloud.network.router.deployment.RouterDeploymentDefinition; import com.cloud.dc.dao.VlanDao; import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.network.IpAddress; @@ -121,9 +122,9 @@ public class VpcNetworkHelperImpl extends NetworkHelperImpl { s_logger.debug("Allocating nic for router in vlan " + publicIp.getVlanTag()); final NicProfile publicNic = new NicProfile(); publicNic.setDefaultNic(false); - publicNic.setIp4Address(publicIp.getAddress().addr()); - publicNic.setGateway(publicIp.getGateway()); - publicNic.setNetmask(publicIp.getNetmask()); + publicNic.setIPv4Address(publicIp.getAddress().addr()); + publicNic.setIPv4Gateway(publicIp.getGateway()); + publicNic.setIPv4Netmask(publicIp.getNetmask()); publicNic.setMacAddress(publicIp.getMacAddress()); publicNic.setBroadcastType(BroadcastDomainType.Vlan); publicNic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(publicIp.getVlanTag())); @@ -153,4 +154,24 @@ public class VpcNetworkHelperImpl extends NetworkHelperImpl { _itMgr.allocate(router.getInstanceName(), template, routerOffering, networks, vpcRouterDeploymentDefinition.getPlan(), hType); } + + @Override + public LinkedHashMap> configureDefaultNics(final RouterDeploymentDefinition routerDeploymentDefinition) throws ConcurrentOperationException, InsufficientAddressCapacityException { + + final LinkedHashMap> networks = new LinkedHashMap>(3); + + // 1) Control network + final LinkedHashMap> controlNic = configureControlNic(routerDeploymentDefinition); + networks.putAll(controlNic); + + // 2) Public network + final LinkedHashMap> publicNic = configurePublicNic(routerDeploymentDefinition, false); + networks.putAll(publicNic); + + // 3) Guest Network + final LinkedHashMap> guestNic = configureGuestNic(routerDeploymentDefinition); + networks.putAll(guestNic); + + return networks; + } } \ No newline at end of file diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java index f10e5a1112e..a13ff218d46 100644 --- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java @@ -246,8 +246,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian if (nic.getTrafficType() == TrafficType.Public || nic.getTrafficType() == TrafficType.Guest) { // save dns information if (nic.getTrafficType() == TrafficType.Public) { - defaultDns1 = nic.getDns1(); - defaultDns2 = nic.getDns2(); + defaultDns1 = nic.getIPv4Dns1(); + defaultDns2 = nic.getIPv4Dns2(); } s_logger.debug("Removing nic " + nic + " of type " + nic.getTrafficType() + " from the nics passed on vm start. " + "The nic will be plugged later"); it.remove(); @@ -316,7 +316,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian for (final Pair nicNtwk : publicNics) { final Nic publicNic = nicNtwk.first(); final Network publicNtwk = nicNtwk.second(); - final IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(publicNtwk.getId(), publicNic.getIp4Address()); + final IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(publicNtwk.getId(), publicNic.getIPv4Address()); if (userIp.isSourceNat()) { final PublicIp publicIp = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId())); @@ -324,8 +324,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian if (domainRouterVO.getPublicIpAddress() == null) { final DomainRouterVO routerVO = _routerDao.findById(domainRouterVO.getId()); - routerVO.setPublicIpAddress(publicNic.getIp4Address()); - routerVO.setPublicNetmask(publicNic.getNetmask()); + routerVO.setPublicIpAddress(publicNic.getIPv4Address()); + routerVO.setPublicNetmask(publicNic.getIPv4Netmask()); routerVO.setPublicMacAddress(publicNic.getMacAddress()); _routerDao.update(routerVO.getId(), routerVO); } @@ -334,12 +334,12 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian domainRouterVO.getInstanceName(), domainRouterVO.getType()); cmds.addCommand(plugNicCmd); final VpcVO vpc = _vpcDao.findById(domainRouterVO.getVpcId()); - final NetworkUsageCommand netUsageCmd = new NetworkUsageCommand(domainRouterVO.getPrivateIpAddress(), domainRouterVO.getInstanceName(), true, publicNic.getIp4Address(), vpc.getCidr()); + final NetworkUsageCommand netUsageCmd = new NetworkUsageCommand(domainRouterVO.getPrivateIpAddress(), domainRouterVO.getInstanceName(), true, publicNic.getIPv4Address(), vpc.getCidr()); usageCmds.add(netUsageCmd); - UserStatisticsVO stats = _userStatsDao.findBy(domainRouterVO.getAccountId(), domainRouterVO.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), domainRouterVO.getId(), + UserStatisticsVO stats = _userStatsDao.findBy(domainRouterVO.getAccountId(), domainRouterVO.getDataCenterId(), publicNtwk.getId(), publicNic.getIPv4Address(), domainRouterVO.getId(), domainRouterVO.getType().toString()); if (stats == null) { - stats = new UserStatisticsVO(domainRouterVO.getAccountId(), domainRouterVO.getDataCenterId(), publicNic.getIp4Address(), domainRouterVO.getId(), domainRouterVO.getType().toString(), + stats = new UserStatisticsVO(domainRouterVO.getAccountId(), domainRouterVO.getDataCenterId(), publicNic.getIPv4Address(), domainRouterVO.getId(), domainRouterVO.getType().toString(), publicNtwk.getId()); _userStatsDao.persist(stats); } @@ -365,7 +365,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian } else { // set private network - final PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(guestNic.getNetworkId(), guestNic.getIp4Address()); + final PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(guestNic.getNetworkId(), guestNic.getIPv4Address()); final Network network = _networkDao.findById(guestNic.getNetworkId()); BroadcastDomainType.getValue(network.getBroadcastUri()); final String netmask = NetUtils.getCidrNetmask(network.getCidr()); @@ -433,7 +433,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian for (final Pair nicNtwk : guestNics) { final Nic guestNic = nicNtwk.first(); - final AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start, domainRouterVO.getInstanceName(), controlNic.getIp4Address(), _routerControlHelper.getRouterIpInNetwork( + final AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start, domainRouterVO.getInstanceName(), controlNic.getIPv4Address(), _routerControlHelper.getRouterIpInNetwork( guestNic.getNetworkId(), domainRouterVO.getId())); cmds.addCommand(startCmd); if (reprogramGuestNtwks) { @@ -442,7 +442,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian } finalizeUserDataAndDhcpOnStart(cmds, domainRouterVO, provider, guestNic.getNetworkId()); - final AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish, domainRouterVO.getInstanceName(), controlNic.getIp4Address(), _routerControlHelper.getRouterIpInNetwork( + final AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish, domainRouterVO.getInstanceName(), controlNic.getIPv4Address(), _routerControlHelper.getRouterIpInNetwork( guestNic.getNetworkId(), domainRouterVO.getId())); cmds.addCommand(finishCmd); } @@ -499,7 +499,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian protected boolean setupVpcPrivateNetwork(final VirtualRouter router, final boolean add, final NicProfile privateNic) throws ResourceUnavailableException { if (router.getState() == State.Running) { - final PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(privateNic.getNetworkId(), privateNic.getIp4Address()); + final PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(privateNic.getNetworkId(), privateNic.getIPv4Address()); final Network network = _networkDao.findById(privateNic.getNetworkId()); final String netmask = NetUtils.getCidrNetmask(network.getCidr()); final PrivateIpAddress ip = new PrivateIpAddress(ipVO, network.getBroadcastUri().toString(), network.getGateway(), netmask, privateNic.getMacAddress()); @@ -657,7 +657,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian final PublicIpAddress nicToUnplug = nicsToUnplug.get(ip.getVlanTag()); if (nicToUnplug != null) { final NicVO nicVO = _nicDao.findByIp4AddressAndNetworkIdAndInstanceId(publicNtwkId, router.getId(), nicToUnplug.getAddress().addr()); - nicVO.setIp4Address(ip.getAddress().addr()); + nicVO.setIPv4Address(ip.getAddress().addr()); _nicDao.update(nicVO.getId(), nicVO); s_logger.debug("Updated the nic " + nicVO + " with the new ip address " + ip.getAddress().addr()); nicsToUnplug.remove(ip.getVlanTag()); diff --git a/server/src/com/cloud/network/rules/DhcpPvlanRules.java b/server/src/com/cloud/network/rules/DhcpPvlanRules.java index c326aa87ec0..eb98dceb772 100644 --- a/server/src/com/cloud/network/rules/DhcpPvlanRules.java +++ b/server/src/com/cloud/network/rules/DhcpPvlanRules.java @@ -56,7 +56,7 @@ public class DhcpPvlanRules extends RuleApplier { NetworkModel networkModel = visitor.getVirtualNetworkApplianceFactory().getNetworkModel(); final String networkTag = networkModel.getNetworkTag(_router.getHypervisorType(), network); - _setupCommand = PvlanSetupCommand.createDhcpSetup(op, _nic.getBroadCastUri(), networkTag, _router.getInstanceName(), _nic.getMacAddress(), _nic.getIp4Address()); + _setupCommand = PvlanSetupCommand.createDhcpSetup(op, _nic.getBroadCastUri(), networkTag, _router.getInstanceName(), _nic.getMacAddress(), _nic.getIPv4Address()); return visitor.visit(this); } diff --git a/server/src/com/cloud/network/rules/DhcpSubNetRules.java b/server/src/com/cloud/network/rules/DhcpSubNetRules.java index ac694790b08..a70aa810887 100644 --- a/server/src/com/cloud/network/rules/DhcpSubNetRules.java +++ b/server/src/com/cloud/network/rules/DhcpSubNetRules.java @@ -92,13 +92,13 @@ public class DhcpSubNetRules extends RuleApplier { // create one. // This should happen only in case of Basic and Advanced SG enabled // networks. - if (!NetUtils.sameSubnet(domrGuestNic.getIp4Address(), _nic.getIp4Address(), _nic.getNetmask())) { + if (!NetUtils.sameSubnet(domrGuestNic.getIPv4Address(), _nic.getIPv4Address(), _nic.getIPv4Netmask())) { final NicIpAliasDao nicIpAliasDao = visitor.getVirtualNetworkApplianceFactory().getNicIpAliasDao(); final List aliasIps = nicIpAliasDao.listByNetworkIdAndState(domrGuestNic.getNetworkId(), NicIpAlias.state.active); boolean ipInVmsubnet = false; for (final NicIpAliasVO alias : aliasIps) { // check if any of the alias ips belongs to the Vm's subnet. - if (NetUtils.sameSubnet(alias.getIp4Address(), _nic.getIp4Address(), _nic.getNetmask())) { + if (NetUtils.sameSubnet(alias.getIp4Address(), _nic.getIPv4Address(), _nic.getIPv4Netmask())) { ipInVmsubnet = true; break; } @@ -115,7 +115,7 @@ public class DhcpSubNetRules extends RuleApplier { final Account caller = CallContext.current().getCallingAccount(); VlanDao vlanDao = visitor.getVirtualNetworkApplianceFactory().getVlanDao(); - final List vlanList = vlanDao.listVlansByNetworkIdAndGateway(_network.getId(), _nic.getGateway()); + final List vlanList = vlanDao.listVlansByNetworkIdAndGateway(_network.getId(), _nic.getIPv4Gateway()); final List vlanDbIdList = new ArrayList(); for (final VlanVO vlan : vlanList) { vlanDbIdList.add(vlan.getId()); @@ -138,7 +138,7 @@ public class DhcpSubNetRules extends RuleApplier { } // this means we did not create an IP alias on the router. _nicAlias = new NicIpAliasVO(domrGuestNic.getId(), _routerAliasIp, _router.getId(), CallContext.current().getCallingAccountId(), _network.getDomainId(), - _nic.getNetworkId(), _nic.getGateway(), _nic.getNetmask()); + _nic.getNetworkId(), _nic.getIPv4Gateway(), _nic.getIPv4Netmask()); _nicAlias.setAliasCount(routerPublicIP.getIpMacAddress()); nicIpAliasDao.persist(_nicAlias); diff --git a/server/src/com/cloud/network/rules/NicPlugInOutRules.java b/server/src/com/cloud/network/rules/NicPlugInOutRules.java index 121be9083a3..40cf72c77aa 100644 --- a/server/src/com/cloud/network/rules/NicPlugInOutRules.java +++ b/server/src/com/cloud/network/rules/NicPlugInOutRules.java @@ -100,9 +100,9 @@ public class NicPlugInOutRules extends RuleApplier { if (ip.isSourceNat()) { defaultNic.setDefaultNic(true); } - defaultNic.setIp4Address(ip.getAddress().addr()); - defaultNic.setGateway(ip.getGateway()); - defaultNic.setNetmask(ip.getNetmask()); + defaultNic.setIPv4Address(ip.getAddress().addr()); + defaultNic.setIPv4Gateway(ip.getGateway()); + defaultNic.setIPv4Netmask(ip.getNetmask()); defaultNic.setMacAddress(ip.getMacAddress()); defaultNic.setBroadcastType(BroadcastDomainType.Vlan); defaultNic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(ip.getVlanTag())); @@ -125,14 +125,14 @@ public class NicPlugInOutRules extends RuleApplier { } // Create network usage commands. Send commands to router after // IPAssoc - NetworkUsageCommand netUsageCmd = new NetworkUsageCommand(_router.getPrivateIpAddress(), _router.getInstanceName(), true, defaultNic.getIp4Address(), vpc.getCidr()); + NetworkUsageCommand netUsageCmd = new NetworkUsageCommand(_router.getPrivateIpAddress(), _router.getInstanceName(), true, defaultNic.getIPv4Address(), vpc.getCidr()); _netUsageCommands.addCommand(netUsageCmd); UserStatisticsDao userStatsDao = visitor.getVirtualNetworkApplianceFactory().getUserStatsDao(); - UserStatisticsVO stats = userStatsDao.findBy(_router.getAccountId(), _router.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), _router.getId(), + UserStatisticsVO stats = userStatsDao.findBy(_router.getAccountId(), _router.getDataCenterId(), publicNtwk.getId(), publicNic.getIPv4Address(), _router.getId(), _router.getType().toString()); if (stats == null) { - stats = new UserStatisticsVO(_router.getAccountId(), _router.getDataCenterId(), publicNic.getIp4Address(), _router.getId(), _router.getType().toString(), + stats = new UserStatisticsVO(_router.getAccountId(), _router.getDataCenterId(), publicNic.getIPv4Address(), _router.getId(), _router.getType().toString(), publicNtwk.getId()); userStatsDao.persist(stats); } @@ -201,7 +201,7 @@ public class NicPlugInOutRules extends RuleApplier { final PublicIpAddress nicToUnplug = nicsToUnplug.get(ip.getVlanTag()); if (nicToUnplug != null) { NicVO nicVO = nicDao.findByIp4AddressAndNetworkIdAndInstanceId(publicNtwkId, _router.getId(), nicToUnplug.getAddress().addr()); - nicVO.setIp4Address(ip.getAddress().addr()); + nicVO.setIPv4Address(ip.getAddress().addr()); nicDao.update(nicVO.getId(), nicVO); s_logger.debug("Updated the nic " + nicVO + " with the new ip address " + ip.getAddress().addr()); nicsToUnplug.remove(ip.getVlanTag()); diff --git a/server/src/com/cloud/network/rules/PrivateGatewayRules.java b/server/src/com/cloud/network/rules/PrivateGatewayRules.java index 476a6174208..17d90ead9e5 100644 --- a/server/src/com/cloud/network/rules/PrivateGatewayRules.java +++ b/server/src/com/cloud/network/rules/PrivateGatewayRules.java @@ -101,7 +101,7 @@ public class PrivateGatewayRules extends RuleApplier { } public PrivateIpVO retrivePrivateIP(final NetworkTopologyVisitor visitor) { - PrivateIpVO ipVO = visitor.getVirtualNetworkApplianceFactory().getPrivateIpDao().findByIpAndSourceNetworkId(_nicProfile.getNetworkId(), _nicProfile.getIp4Address()); + PrivateIpVO ipVO = visitor.getVirtualNetworkApplianceFactory().getPrivateIpDao().findByIpAndSourceNetworkId(_nicProfile.getNetworkId(), _nicProfile.getIPv4Address()); return ipVO; } diff --git a/server/src/com/cloud/network/rules/RulesManagerImpl.java b/server/src/com/cloud/network/rules/RulesManagerImpl.java index 1ec531a3506..3e2b15af22e 100644 --- a/server/src/com/cloud/network/rules/RulesManagerImpl.java +++ b/server/src/com/cloud/network/rules/RulesManagerImpl.java @@ -25,11 +25,10 @@ import java.util.Set; import javax.ejb.Local; import javax.inject.Inject; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.command.user.firewall.ListPortForwardingRulesCmd; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.log4j.Logger; import com.cloud.configuration.ConfigurationManager; import com.cloud.domain.dao.DomainDao; @@ -275,10 +274,10 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules // Verify that vm has nic in the network Ip dstIp = rule.getDestinationIpAddress(); guestNic = _networkModel.getNicInNetwork(vmId, networkId); - if (guestNic == null || guestNic.getIp4Address() == null) { + if (guestNic == null || guestNic.getIPv4Address() == null) { throw new InvalidParameterValueException("Vm doesn't belong to network associated with ipAddress"); } else { - dstIp = new Ip(guestNic.getIp4Address()); + dstIp = new Ip(guestNic.getIPv4Address()); } if (vmIp != null) { @@ -482,7 +481,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules if (guestNic == null) { throw new InvalidParameterValueException("Vm doesn't belong to the network with specified id"); } - dstIp = guestNic.getIp4Address(); + dstIp = guestNic.getIPv4Address(); if (!_networkModel.areServicesSupportedInNetwork(network.getId(), Service.StaticNat)) { throw new InvalidParameterValueException("Unable to create static nat rule; StaticNat service is not " + "supported in network with specified id"); @@ -1479,7 +1478,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules s_logger.debug("Checking if PF/StaticNat/LoadBalancer rules are configured for nic " + nic.getId()); List result = new ArrayList(); // add PF rules - result.addAll(_portForwardingDao.listByNetworkAndDestIpAddr(nic.getIp4Address(), nic.getNetworkId())); + result.addAll(_portForwardingDao.listByNetworkAndDestIpAddr(nic.getIPv4Address(), nic.getNetworkId())); if(result.size() > 0) { s_logger.debug("Found " + result.size() + " portforwarding rule configured for the nic in the network " + nic.getNetworkId()); } @@ -1493,7 +1492,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules } List staticNatIps = _ipAddressDao.listStaticNatPublicIps(nic.getNetworkId()); for (IpAddress ip : staticNatIps) { - if (ip.getVmIp() != null && ip.getVmIp().equals(nic.getIp4Address())) { + if (ip.getVmIp() != null && ip.getVmIp().equals(nic.getIPv4Address())) { VMInstanceVO vm = _vmInstanceDao.findById(nic.getInstanceId()); // generate a static Nat rule on the fly because staticNATrule does not persist into db anymore // FIX ME @@ -1544,10 +1543,10 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules if (virtualMachineId != null) { // Verify that vm has nic in the network Nic guestNic = _networkModel.getNicInNetwork(virtualMachineId, rule.getNetworkId()); - if (guestNic == null || guestNic.getIp4Address() == null) { + if (guestNic == null || guestNic.getIPv4Address() == null) { throw new InvalidParameterValueException("Vm doesn't belong to network associated with ipAddress"); } else { - dstIp = new Ip(guestNic.getIp4Address()); + dstIp = new Ip(guestNic.getIPv4Address()); } if (vmGuestIp != null) { diff --git a/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java b/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java index 174106d6e87..097118dd45c 100644 --- a/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java +++ b/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java @@ -40,10 +40,6 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.utils.fsm.StateMachine2; -import org.apache.commons.codec.digest.DigestUtils; -import org.apache.log4j.Logger; - import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd; import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd; @@ -56,6 +52,8 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.utils.identity.ManagementServerNode; +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.NetworkRulesSystemVmCommand; @@ -107,6 +105,7 @@ import com.cloud.utils.db.TransactionCallbackWithException; import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.fsm.StateListener; +import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.net.NetUtils; import com.cloud.vm.Nic; import com.cloud.vm.NicProfile; @@ -200,10 +199,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro try { work(); } catch (Throwable th) { - try { s_logger.error("Problem with SG work", th); - } catch (Throwable th2) { - } } } } @@ -216,10 +212,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro cleanupUnfinishedWork(); //processScheduledWork(); } catch (Throwable th) { - try { - s_logger.error("Problem with SG Cleanup", th); - } catch (Throwable th2) { - } + s_logger.error("Problem with SG Cleanup", th); } } } @@ -357,7 +350,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro for (SecurityGroupVMMapVO ngmapVO : allowedInstances) { Nic defaultNic = _networkModel.getDefaultNic(ngmapVO.getInstanceId()); if (defaultNic != null) { - String cidr = defaultNic.getIp4Address(); + String cidr = defaultNic.getIPv4Address(); cidr = cidr + "/32"; cidrs.add(cidr); } diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index 288eeebc6c6..5ff548c7f3e 100644 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -43,7 +43,6 @@ import javax.crypto.SecretKey; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.utils.nio.Link; import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; @@ -118,6 +117,7 @@ import com.cloud.utils.db.TransactionLegacy; import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.net.NetUtils; +import com.cloud.utils.nio.Link; import com.cloud.utils.script.Script; public class ConfigurationServerImpl extends ManagerBase implements ConfigurationServer { @@ -650,11 +650,11 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } else { // !keystoreFile.exists() and dbExisted // Export keystore to local file byte[] storeBytes = Base64.decodeBase64(dbString); - try { - String tmpKeystorePath = "/tmp/tmpkey"; - FileOutputStream fo = new FileOutputStream(tmpKeystorePath); + String tmpKeystorePath = "/tmp/tmpkey"; + try ( + FileOutputStream fo = new FileOutputStream(tmpKeystorePath); + ) { fo.write(storeBytes); - fo.close(); Script script = new Script(true, "cp", 5000, null); script.add("-f"); script.add(tmpKeystorePath); @@ -757,6 +757,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio try (DataInputStream dis = new DataInputStream(new FileInputStream(privkeyfile))) { dis.readFully(arr1); } catch (EOFException e) { + s_logger.info("[ignored] eof reached"); } catch (Exception e) { s_logger.error("Cannot read the private key file", e); throw new CloudRuntimeException("Cannot read the private key file"); @@ -766,6 +767,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio try (DataInputStream dis = new DataInputStream(new FileInputStream(pubkeyfile))) { dis.readFully(arr2); } catch (EOFException e) { + s_logger.info("[ignored] eof reached"); } catch (Exception e) { s_logger.warn("Cannot read the public key file", e); throw new CloudRuntimeException("Cannot read the public key file"); @@ -902,7 +904,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } else { command = new Script("/bin/bash", s_logger); } - if (this.isOnWindows()) { + if (isOnWindows()) { scriptPath = scriptPath.replaceAll("\\\\" ,"/" ); systemVmIsoPath = systemVmIsoPath.replaceAll("\\\\" ,"/" ); publicKeyPath = publicKeyPath.replaceAll("\\\\" ,"/" ); diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 781c915b123..84830182e35 100644 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -16,9 +16,7 @@ // under the License. package com.cloud.server; -import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; -import java.net.URLDecoder; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; @@ -527,6 +525,7 @@ import com.cloud.alert.AlertManager; import com.cloud.alert.AlertVO; import com.cloud.alert.dao.AlertDao; import com.cloud.api.ApiDBUtils; +import com.cloud.api.query.QueryManagerImpl; import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityVO; import com.cloud.capacity.dao.CapacityDao; @@ -3380,6 +3379,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe final Integer apiLimitInterval = Integer.valueOf(_configDao.getValue(Config.ApiLimitInterval.key())); final Integer apiLimitMax = Integer.valueOf(_configDao.getValue(Config.ApiLimitMax.key())); + final boolean allowUserViewDestroyedVM = (QueryManagerImpl.AllowUserViewDestroyedVM.valueIn(caller.getId()) | _accountService.isAdmin(caller.getId())); + final boolean allowUserExpungeRecoverVM = (UserVmManager.AllowUserExpungeRecoverVm.valueIn(caller.getId()) | _accountService.isAdmin(caller.getId())); + // check if region-wide secondary storage is used boolean regionSecondaryEnabled = false; final List imgStores = _imgStoreDao.findRegionImageStores(); @@ -3397,6 +3399,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe capabilities.put("customDiskOffMaxSize", diskOffMaxSize); capabilities.put("regionSecondaryEnabled", regionSecondaryEnabled); capabilities.put("KVMSnapshotEnabled", KVMSnapshotEnabled); + capabilities.put("allowUserViewDestroyedVM", allowUserViewDestroyedVM); + capabilities.put("allowUserExpungeRecoverVM", allowUserExpungeRecoverVM); if (apiLimitEnabled) { capabilities.put("apiLimitInterval", apiLimitInterval); capabilities.put("apiLimitMax", apiLimitMax); @@ -3625,11 +3629,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe final String name = cmd.getName(); String key = cmd.getPublicKey(); - try { - key = URLDecoder.decode(key, "UTF-8"); - } catch (final UnsupportedEncodingException e) { - s_logger.warn("key decoding tried invain: " + e.getLocalizedMessage()); - } + final String publicKey = getPublicKeyFromKeyKeyMaterial(key); final String fingerprint = getFingerprint(publicKey); @@ -3642,9 +3642,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe * @throws InvalidParameterValueException */ private void checkForKeyByPublicKey(final RegisterSSHKeyPairCmd cmd, final Account owner) throws InvalidParameterValueException { - final SSHKeyPairVO existingPair = _sshKeyPairDao.findByPublicKey(owner.getAccountId(), owner.getDomainId(), cmd.getPublicKey()); + final SSHKeyPairVO existingPair = _sshKeyPairDao.findByPublicKey(owner.getAccountId(), owner.getDomainId(), getPublicKeyFromKeyKeyMaterial(cmd.getPublicKey())); if (existingPair != null) { - throw new InvalidParameterValueException("A key pair with name '" + cmd.getPublicKey() + "' already exists for this account."); + throw new InvalidParameterValueException("A key pair with key '" + cmd.getPublicKey() + "' already exists for this account."); } } @@ -3674,7 +3674,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe * @return * @throws InvalidParameterValueException */ - private String getPublicKeyFromKeyKeyMaterial(final String key) throws InvalidParameterValueException { + protected String getPublicKeyFromKeyKeyMaterial(final String key) throws InvalidParameterValueException { final String publicKey = SSHKeysHelper.getPublicKeyFromKeyMaterial(key); if (publicKey == null) { diff --git a/server/src/com/cloud/servlet/ConsoleProxyServlet.java b/server/src/com/cloud/servlet/ConsoleProxyServlet.java index 3389d92752f..cc788c7b118 100644 --- a/server/src/com/cloud/servlet/ConsoleProxyServlet.java +++ b/server/src/com/cloud/servlet/ConsoleProxyServlet.java @@ -228,12 +228,14 @@ public class ConsoleProxyServlet extends HttpServlet { try { w = Integer.parseInt(value); } catch (NumberFormatException e) { + s_logger.info("[ignored] not a number: " + value); } value = req.getParameter("h"); try { h = Integer.parseInt(value); } catch (NumberFormatException e) { + s_logger.info("[ignored] not a number: " + value); } try { diff --git a/server/src/com/cloud/storage/StorageManager.java b/server/src/com/cloud/storage/StorageManager.java index eebbf7fa123..5487e2ec17f 100644 --- a/server/src/com/cloud/storage/StorageManager.java +++ b/server/src/com/cloud/storage/StorageManager.java @@ -29,6 +29,7 @@ import com.cloud.agent.api.StoragePoolInfo; import com.cloud.agent.manager.Commands; import com.cloud.capacity.CapacityVO; import com.cloud.exception.ConnectionException; +import com.cloud.exception.StorageConflictException; import com.cloud.exception.StorageUnavailableException; import com.cloud.host.Host; import com.cloud.hypervisor.Hypervisor.HypervisorType; @@ -99,7 +100,7 @@ public interface StorageManager extends StorageService { boolean registerHostListener(String providerUuid, HypervisorHostListener listener); - void connectHostToSharedPool(long hostId, long poolId) throws StorageUnavailableException; + void connectHostToSharedPool(long hostId, long poolId) throws StorageUnavailableException, StorageConflictException; void createCapacityEntry(long poolId); diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 2c70b170dc3..ba39e1f0fa8 100644 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -129,6 +129,7 @@ import com.cloud.exception.OperationTimedoutException; import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; +import com.cloud.exception.StorageConflictException; import com.cloud.exception.StorageUnavailableException; import com.cloud.host.Host; import com.cloud.host.HostVO; @@ -943,7 +944,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C } @Override - public void connectHostToSharedPool(long hostId, long poolId) throws StorageUnavailableException { + public void connectHostToSharedPool(long hostId, long poolId) throws StorageUnavailableException, StorageConflictException { StoragePool pool = (StoragePool)_dataStoreMgr.getDataStore(poolId, DataStoreRole.Primary); assert (pool.isShared()) : "Now, did you actually read the name of this method?"; s_logger.debug("Adding pool " + pool.getName() + " to host " + hostId); diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index 577c8f678a6..d4e8c99fdca 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -2469,6 +2469,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic _volsDao.update(volumeToAttach.getId(), volumeToAttach); } } else { + deviceId = getDeviceId(vm.getId(), deviceId); + _volsDao.attachVolume(volumeToAttach.getId(), vm.getId(), deviceId); } diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index baa048821c8..e8b9a0e0cd7 100644 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -134,59 +134,59 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDao; public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, SnapshotApiService { private static final Logger s_logger = Logger.getLogger(SnapshotManagerImpl.class); @Inject - private VMTemplateDao _templateDao; + VMTemplateDao _templateDao; @Inject - private UserVmDao _vmDao; + UserVmDao _vmDao; @Inject - private VolumeDao _volsDao; + VolumeDao _volsDao; @Inject - private AccountDao _accountDao; + AccountDao _accountDao; @Inject - private SnapshotDao _snapshotDao; + SnapshotDao _snapshotDao; @Inject - private SnapshotDataStoreDao _snapshotStoreDao; + SnapshotDataStoreDao _snapshotStoreDao; @Inject - private PrimaryDataStoreDao _storagePoolDao; + PrimaryDataStoreDao _storagePoolDao; @Inject - private final SnapshotPolicyDao _snapshotPolicyDao = null; + SnapshotPolicyDao _snapshotPolicyDao = null; @Inject - private SnapshotScheduleDao _snapshotScheduleDao; + SnapshotScheduleDao _snapshotScheduleDao; @Inject - private DomainDao _domainDao; + DomainDao _domainDao; @Inject - private StorageManager _storageMgr; + StorageManager _storageMgr; @Inject - private SnapshotScheduler _snapSchedMgr; + SnapshotScheduler _snapSchedMgr; @Inject - private AccountManager _accountMgr; + AccountManager _accountMgr; @Inject - private AlertManager _alertMgr; + AlertManager _alertMgr; @Inject - private ClusterDao _clusterDao; + ClusterDao _clusterDao; @Inject - private ResourceLimitService _resourceLimitMgr; + ResourceLimitService _resourceLimitMgr; @Inject - private DomainManager _domainMgr; + DomainManager _domainMgr; @Inject - private ResourceTagDao _resourceTagDao; + ResourceTagDao _resourceTagDao; @Inject - private ConfigurationDao _configDao; + ConfigurationDao _configDao; @Inject - private VMSnapshotDao _vmSnapshotDao; + VMSnapshotDao _vmSnapshotDao; @Inject - private DataStoreManager dataStoreMgr; + DataStoreManager dataStoreMgr; @Inject - private SnapshotService snapshotSrv; + SnapshotService snapshotSrv; @Inject - private VolumeDataFactory volFactory; + VolumeDataFactory volFactory; @Inject - private SnapshotDataFactory snapshotFactory; + SnapshotDataFactory snapshotFactory; @Inject - private EndPointSelector _epSelector; + EndPointSelector _epSelector; @Inject - private ResourceManager _resourceMgr; + ResourceManager _resourceMgr; @Inject - private StorageStrategyFactory _storageStrategyFactory; + StorageStrategyFactory _storageStrategyFactory; private int _totalRetries; private int _pauseInterval; @@ -221,6 +221,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, try { Thread.sleep(_pauseInterval * 1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while retry cmd."); } s_logger.debug("Retrying..."); @@ -245,13 +246,17 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, } @Override - public boolean revertSnapshot(Long snapshotId) { - Snapshot snapshot = _snapshotDao.findById(snapshotId); + public Snapshot revertSnapshot(Long snapshotId) { + SnapshotVO snapshot = _snapshotDao.findById(snapshotId); if (snapshot == null) { throw new InvalidParameterValueException("No such snapshot"); } - Volume volume = _volsDao.findById(snapshot.getVolumeId()); + VolumeVO volume = _volsDao.findById(snapshot.getVolumeId()); + if (volume.getState() != Volume.State.Ready) { + throw new InvalidParameterValueException("The volume is not in Ready state."); + } + Long instanceId = volume.getInstanceId(); // If this volume is attached to an VM, then the VM needs to be in the stopped state @@ -263,14 +268,28 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, } } + SnapshotInfo snapshotInfo = snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Image); + if (snapshotInfo == null) { + throw new CloudRuntimeException("snapshot:" + snapshotId + " not exist in data store"); + } + SnapshotStrategy snapshotStrategy = _storageStrategyFactory.getSnapshotStrategy(snapshot, SnapshotOperation.REVERT); if (snapshotStrategy == null) { s_logger.error("Unable to find snaphot strategy to handle snapshot with id '" + snapshotId + "'"); - return false; + return null; } - return snapshotStrategy.revertSnapshot(snapshotId); + boolean result = snapshotStrategy.revertSnapshot(snapshotInfo); + if (result) { + // update volume size and primary storage count + _resourceLimitMgr.decrementResourceCount(snapshot.getAccountId(), ResourceType.primary_storage, + new Long(volume.getSize() - snapshot.getSize())); + volume.setSize(snapshot.getSize()); + _volsDao.update(volume.getId(), volume); + return snapshotInfo; + } + return null; } @Override diff --git a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java index 2fedeefd352..4ce2bba498e 100644 --- a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java @@ -254,7 +254,8 @@ public class SnapshotSchedulerImpl extends ManagerBase implements SnapshotSchedu if (s_logger.isDebugEnabled()) { final Date scheduledTimestamp = snapshotToBeExecuted.getScheduledTimestamp(); displayTime = DateUtil.displayDateInTimezone(DateUtil.GMT_TIMEZONE, scheduledTimestamp); - s_logger.debug("Scheduling 1 snapshot for volume " + volumeId + " for schedule id: " + snapshotToBeExecuted.getId() + " at " + displayTime); + s_logger.debug("Scheduling 1 snapshot for volume id " + volumeId + " (volume name:" + + volume.getName() + ") for schedule id: " + snapshotToBeExecuted.getId() + " at " + displayTime); } tmpSnapshotScheduleVO = _snapshotScheduleDao.acquireInLockTable(snapshotScheId); diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java index e9581e2427d..391134099e0 100644 --- a/server/src/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/com/cloud/template/TemplateManagerImpl.java @@ -269,10 +269,10 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, MessageBus _messageBus; private boolean _disableExtraction = false; - private ExecutorService _preloadExecutor; - private List _adapters; + ExecutorService _preloadExecutor; + @Inject private StorageCacheManager cacheMgr; @Inject @@ -436,7 +436,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, } @Override - public VirtualMachineTemplate prepareTemplate(long templateId, long zoneId) { + public VirtualMachineTemplate prepareTemplate(long templateId, long zoneId, Long storageId) { VMTemplateVO vmTemplate = _tmpltDao.findById(templateId); if (vmTemplate == null) { @@ -445,7 +445,19 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, _accountMgr.checkAccess(CallContext.current().getCallingAccount(), AccessType.OperateEntry, true, vmTemplate); - prepareTemplateInAllStoragePools(vmTemplate, zoneId); + if (storageId != null) { + StoragePoolVO pool = _poolDao.findById(storageId); + if (pool != null) { + if (pool.getStatus() == StoragePoolStatus.Up && pool.getDataCenterId() == zoneId) { + prepareTemplateInOneStoragePool(vmTemplate, pool); + } else { + s_logger.warn("Skip loading template " + vmTemplate.getId() + " into primary storage " + pool.getId() + " as either the pool zone " + + pool.getDataCenterId() + " is different from the requested zone " + zoneId + " or the pool is currently not available."); + } + } + } else { + prepareTemplateInAllStoragePools(vmTemplate, zoneId); + } return vmTemplate; } @@ -556,28 +568,32 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, } } + private void prepareTemplateInOneStoragePool(final VMTemplateVO template, final StoragePoolVO pool) { + s_logger.info("Schedule to preload template " + template.getId() + " into primary storage " + pool.getId()); + _preloadExecutor.execute(new ManagedContextRunnable() { + @Override + protected void runInContext() { + try { + reallyRun(); + } catch (Throwable e) { + s_logger.warn("Unexpected exception ", e); + } + } + + private void reallyRun() { + s_logger.info("Start to preload template " + template.getId() + " into primary storage " + pool.getId()); + StoragePool pol = (StoragePool)_dataStoreMgr.getPrimaryDataStore(pool.getId()); + prepareTemplateForCreate(template, pol); + s_logger.info("End of preloading template " + template.getId() + " into primary storage " + pool.getId()); + } + }); + } + public void prepareTemplateInAllStoragePools(final VMTemplateVO template, long zoneId) { List pools = _poolDao.listByStatus(StoragePoolStatus.Up); for (final StoragePoolVO pool : pools) { if (pool.getDataCenterId() == zoneId) { - s_logger.info("Schedule to preload template " + template.getId() + " into primary storage " + pool.getId()); - _preloadExecutor.execute(new ManagedContextRunnable() { - @Override - protected void runInContext() { - try { - reallyRun(); - } catch (Throwable e) { - s_logger.warn("Unexpected exception ", e); - } - } - - private void reallyRun() { - s_logger.info("Start to preload template " + template.getId() + " into primary storage " + pool.getId()); - StoragePool pol = (StoragePool)_dataStoreMgr.getPrimaryDataStore(pool.getId()); - prepareTemplateForCreate(template, pol); - s_logger.info("End of preloading template " + template.getId() + " into primary storage " + pool.getId()); - } - }); + prepareTemplateInOneStoragePool(template, pool); } else { s_logger.info("Skip loading template " + template.getId() + " into primary storage " + pool.getId() + " as pool zone " + pool.getDataCenterId() + " is different from the requested zone " + zoneId); @@ -1324,6 +1340,11 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, throw new InvalidParameterValueException("Update template permissions is an invalid operation on template " + template.getName()); } + //Only admin or owner of the template should be able to change its permissions + if (caller.getId() != ownerId && !isAdmin) { + throw new InvalidParameterValueException("Unable to grant permission to account " + caller.getAccountName() + " as it is neither admin nor owner or the template"); + } + VMTemplateVO updatedTemplate = _tmpltDao.createForUpdate(); if (isPublic != null) { diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index 2d07e841601..edc8ad87b78 100644 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -2145,14 +2145,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M s_logger.debug("Attempting to log in user: " + username + " in domain " + domainId); } UserAccount userAccount = _userAccountDao.getUserAccount(username, domainId); - if (userAccount == null) { - s_logger.warn("Unable to find an user with username " + username + " in domain " + domainId); - return null; - } boolean authenticated = false; HashSet actionsOnFailedAuthenticaion = new HashSet(); - User.Source userSource = userAccount.getSource(); + User.Source userSource = userAccount != null ? userAccount.getSource(): User.Source.UNKNOWN; for (UserAuthenticator authenticator : _userAuthenticators) { if(userSource != User.Source.UNKNOWN) { if(!authenticator.getName().equalsIgnoreCase(userSource.name())){ @@ -2177,6 +2173,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M if (domain != null) { domainName = domain.getName(); } + userAccount = _userAccountDao.getUserAccount(username, domainId); if (!userAccount.getState().equalsIgnoreCase(Account.State.enabled.toString()) || !userAccount.getAccountState().equalsIgnoreCase(Account.State.enabled.toString())) { @@ -2196,6 +2193,11 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M s_logger.debug("Unable to authenticate user with username " + username + " in domain " + domainId); } + if (userAccount == null) { + s_logger.warn("Unable to find an user with username " + username + " in domain " + domainId); + return null; + } + if (userAccount.getState().equalsIgnoreCase(Account.State.enabled.toString())) { if (!isInternalAccount(userAccount.getId())) { // Internal accounts are not disabled diff --git a/server/src/com/cloud/vm/SystemVmLoadScanner.java b/server/src/com/cloud/vm/SystemVmLoadScanner.java index 97f9dcdaab4..c1a875871f0 100644 --- a/server/src/com/cloud/vm/SystemVmLoadScanner.java +++ b/server/src/com/cloud/vm/SystemVmLoadScanner.java @@ -61,6 +61,7 @@ public class SystemVmLoadScanner { try { _capacityScanScheduler.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while stopping systemvm load scanner."); } _capacityScanLock.releaseRef(); diff --git a/server/src/com/cloud/vm/UserVmManager.java b/server/src/com/cloud/vm/UserVmManager.java index 324547f47ea..5d9a6614f2c 100644 --- a/server/src/com/cloud/vm/UserVmManager.java +++ b/server/src/com/cloud/vm/UserVmManager.java @@ -42,8 +42,11 @@ import com.cloud.utils.Pair; */ public interface UserVmManager extends UserVmService { static final String EnableDynamicallyScaleVmCK = "enable.dynamic.scale.vm"; + static final String AllowUserExpungeRecoverVmCK ="allow.user.expunge.recover.vm"; static final ConfigKey EnableDynamicallyScaleVm = new ConfigKey("Advanced", Boolean.class, EnableDynamicallyScaleVmCK, "false", "Enables/Disables dynamically scaling a vm", true, ConfigKey.Scope.Zone); + static final ConfigKey AllowUserExpungeRecoverVm = new ConfigKey("Advanced", Boolean.class, AllowUserExpungeRecoverVmCK, "false", + "Determines whether users can expunge or recover their vm", true, ConfigKey.Scope.Account); static final int MAX_USER_DATA_LENGTH_BYTES = 2048; diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index b9c5350f236..ee87ab49623 100644 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -28,20 +28,15 @@ import java.util.Map.Entry; import java.util.Set; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.event.ActionEvent; -import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; -import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.affinity.AffinityGroupService; @@ -91,16 +86,20 @@ import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.commons.codec.binary.Base64; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; import com.cloud.agent.api.Command; import com.cloud.agent.api.GetVmDiskStatsAnswer; import com.cloud.agent.api.GetVmDiskStatsCommand; +import com.cloud.agent.api.GetVmIpAddressCommand; import com.cloud.agent.api.GetVmStatsAnswer; import com.cloud.agent.api.GetVmStatsCommand; import com.cloud.agent.api.PvlanSetupCommand; -import com.cloud.agent.api.GetVmIpAddressCommand; import com.cloud.agent.api.StartAnswer; import com.cloud.agent.api.VmDiskStatsEntry; import com.cloud.agent.api.VmStatsEntry; @@ -132,11 +131,12 @@ import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.deploy.DeploymentPlanningManager; import com.cloud.deploy.PlannerHostReservationVO; import com.cloud.deploy.dao.PlannerHostReservationDao; -import com.cloud.domain.DomainVO; import com.cloud.domain.Domain; +import com.cloud.domain.DomainVO; import com.cloud.domain.dao.DomainDao; -import com.cloud.event.EventTypes; +import com.cloud.event.ActionEvent; import com.cloud.event.ActionEventUtils; +import com.cloud.event.EventTypes; import com.cloud.event.UsageEventUtils; import com.cloud.event.UsageEventVO; import com.cloud.event.dao.UsageEventDao; @@ -618,7 +618,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (NetUtils.isValidIp(vmIp)) { // set this vm ip addr in vm nic. if (nic != null) { - nic.setIp4Address(vmIp); + nic.setIPv4Address(vmIp); _nicDao.update(nicId, nic); s_logger.debug("Vm "+ vmId +" IP "+vmIp +" got retrieved successfully"); vmIdCountMap.remove(nicId); @@ -631,8 +631,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } else { //previously vm has ip and nic table has ip address. After vm restart or stop/start //if vm doesnot get the ip then set the ip in nic table to null - if (nic.getIp4Address() != null) { - nic.setIp4Address(null); + if (nic.getIPv4Address() != null) { + nic.setIPv4Address(null); _nicDao.update(nicId, nic); } if (answer.getDetails() != null) { @@ -1500,7 +1500,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir Account caller = CallContext.current().getCallingAccount(); VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); - if (vmInstance.getHypervisorType() != HypervisorType.XenServer && vmInstance.getHypervisorType() != HypervisorType.VMware) { + if (vmInstance.getHypervisorType() != HypervisorType.XenServer && vmInstance.getHypervisorType() != HypervisorType.VMware && vmInstance.getHypervisorType() != HypervisorType.Simulator) { s_logger.info("Scaling the VM dynamically is not supported for VMs running on Hypervisor "+vmInstance.getHypervisorType()); throw new InvalidParameterValueException("Scaling the VM dynamically is not supported for VMs running on Hypervisor "+vmInstance.getHypervisorType()); } @@ -1705,6 +1705,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir final Long vmId = cmd.getId(); Account caller = CallContext.current().getCallingAccount(); + final Long userId = caller.getAccountId(); // Verify input parameters final UserVmVO vm = _vmDao.findById(vmId); @@ -1713,8 +1714,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw new InvalidParameterValueException("unable to find a virtual machine with id " + vmId); } - // check permissions - _accountMgr.checkAccess(caller, null, true, vm); + // When trying to expunge, permission is denied when the caller is not an admin and the AllowUserExpungeRecoverVm is false for the caller. + if (!_accountMgr.isAdmin(userId) && !AllowUserExpungeRecoverVm.valueIn(userId)) { + throw new PermissionDeniedException("Recovering a vm can only be done by an Admin. Or when the allow.user.expunge.recover.vm key is set."); + } if (vm.getRemoved() != null) { if (s_logger.isDebugEnabled()) { @@ -1865,7 +1868,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir for (NicVO nic : nics) { - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { long nicId = nic.getId(); long vmId = nic.getInstanceId(); VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); @@ -2144,7 +2147,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir String userData = cmd.getUserData(); Boolean isDynamicallyScalable = cmd.isDynamicallyScalable(); String hostName = cmd.getHostName(); - Map details = cmd.getDetails(); + Map details = cmd.getDetails(); Account caller = CallContext.current().getCallingAccount(); // Input validation and permission checks @@ -2185,7 +2188,13 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } if (details != null && !details.isEmpty()) { - vmInstance.setDetails(details); + _vmDao.loadDetails(vmInstance); + + for(Map.Entry entry : details.entrySet()) { + if(entry instanceof Map.Entry) { + vmInstance.setDetail(entry.getKey(), entry.getValue()); + } + } _vmDao.saveDetails(vmInstance); } @@ -2404,8 +2413,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir long vmId = cmd.getId(); boolean expunge = cmd.getExpunge(); - if (!_accountMgr.isAdmin(ctx.getCallingAccount().getId()) && expunge) { - throw new PermissionDeniedException("Parameter " + ApiConstants.EXPUNGE + " can be passed by Admin only"); + // When trying to expunge, permission is denied when the caller is not an admin and the AllowUserExpungeRecoverVm is false for the caller. + if (expunge && !_accountMgr.isAdmin(ctx.getCallingAccount().getId()) && !AllowUserExpungeRecoverVm.valueIn(cmd.getEntityOwnerId())) { + throw new PermissionDeniedException("Parameter " + ApiConstants.EXPUNGE + " can be passed by Admin only. Or when the allow.user.expunge.recover.vm key is set."); } UserVm destroyedVm = destroyVm(vmId); @@ -3568,7 +3578,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir for (NicVO nic : nics) { NetworkVO network = _networkDao.findById(nic.getNetworkId()); if (network.getTrafficType() == TrafficType.Guest || network.getTrafficType() == TrafficType.Public) { - userVm.setPrivateIpAddress(nic.getIp4Address()); + userVm.setPrivateIpAddress(nic.getIPv4Address()); userVm.setPrivateMacAddress(nic.getMacAddress()); _vmDao.update(userVm.getId(), userVm); } @@ -3625,7 +3635,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_ASSIGN, vm.getAccountId(), vm.getDataCenterId(), vm.getId(), Long.toString(nic.getId()), network.getNetworkOfferingId(), null, isDefault, VirtualMachine.class.getName(), vm.getUuid(), vm.isDisplay()); if (network.getTrafficType() == TrafficType.Guest) { - originalIp = nic.getIp4Address(); + originalIp = nic.getIPv4Address(); guestNic = nic; guestNetwork = network; // In vmware, we will be effecting pvlan settings in portgroups in StartCommand. @@ -3642,13 +3652,13 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir boolean ipChanged = false; if (originalIp != null && !originalIp.equalsIgnoreCase(returnedIp)) { if (returnedIp != null && guestNic != null) { - guestNic.setIp4Address(returnedIp); + guestNic.setIPv4Address(returnedIp); ipChanged = true; } } if (returnedIp != null && !returnedIp.equalsIgnoreCase(originalIp)) { if (guestNic != null) { - guestNic.setIp4Address(returnedIp); + guestNic.setIPv4Address(returnedIp); ipChanged = true; } } @@ -3658,7 +3668,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir // dc.getDhcpProvider().equalsIgnoreCase(Provider.ExternalDhcpServer.getName()) if (_ntwkSrvcDao.canProviderSupportServiceInNetwork(guestNetwork.getId(), Service.Dhcp, Provider.ExternalDhcpServer)) { _nicDao.update(guestNic.getId(), guestNic); - userVm.setPrivateIpAddress(guestNic.getIp4Address()); + userVm.setPrivateIpAddress(guestNic.getIPv4Address()); _vmDao.update(userVm.getId(), userVm); s_logger.info("Detected that ip changed in the answer, updated nic in the db with new ip " + returnedIp); @@ -4072,7 +4082,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw ex; } - _accountMgr.checkAccess(caller, null, true, vm); + // When trying to expunge, permission is denied when the caller is not an admin and the AllowUserExpungeRecoverVm is false for the caller. + if (!_accountMgr.isAdmin(userId) && !AllowUserExpungeRecoverVm.valueIn(userId)) { + throw new PermissionDeniedException("Expunging a vm can only be done by an Admin. Or when the allow.user.expunge.recover.vm key is set."); + } boolean status; @@ -5292,7 +5305,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Override public ConfigKey[] getConfigKeys() { - return new ConfigKey[] {EnableDynamicallyScaleVm, VmIpFetchWaitInterval, VmIpFetchTrialMax, VmIpFetchThreadPoolMax}; + return new ConfigKey[] {EnableDynamicallyScaleVm, AllowUserExpungeRecoverVm, VmIpFetchWaitInterval, VmIpFetchTrialMax, VmIpFetchThreadPoolMax}; } @Override diff --git a/server/src/org/apache/cloudstack/region/RegionsApiUtil.java b/server/src/org/apache/cloudstack/region/RegionsApiUtil.java index 92c5ed4e17e..7fbcfa0795e 100644 --- a/server/src/org/apache/cloudstack/region/RegionsApiUtil.java +++ b/server/src/org/apache/cloudstack/region/RegionsApiUtil.java @@ -186,8 +186,12 @@ public class RegionsApiUtil { XStream xstream = new XStream(new DomDriver()); xstream.alias("useraccount", UserAccountVO.class); xstream.aliasField("id", UserAccountVO.class, "uuid"); - ObjectInputStream in = xstream.createObjectInputStream(is); - return (UserAccountVO)in.readObject(); + try(ObjectInputStream in = xstream.createObjectInputStream(is);) { + return (UserAccountVO)in.readObject(); + } catch (IOException e) { + s_logger.error(e.getMessage()); + return null; + } } else { return null; } @@ -304,4 +308,4 @@ public class RegionsApiUtil { } } -} \ No newline at end of file +} diff --git a/server/test/com/cloud/api/query/dao/SecurityGroupJoinDaoImplTest.java b/server/test/com/cloud/api/query/dao/SecurityGroupJoinDaoImplTest.java new file mode 100644 index 00000000000..112504d623c --- /dev/null +++ b/server/test/com/cloud/api/query/dao/SecurityGroupJoinDaoImplTest.java @@ -0,0 +1,205 @@ +// 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.api.query.dao; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.apache.cloudstack.api.response.SecurityGroupResponse; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.mockito.runners.MockitoJUnitRunner; + +import com.cloud.api.query.vo.ResourceTagJoinVO; +import com.cloud.api.query.vo.SecurityGroupJoinVO; +import com.cloud.network.security.SecurityGroupVMMapVO; +import com.cloud.network.security.dao.SecurityGroupVMMapDao; +import com.cloud.server.ResourceTag.ResourceObjectType; +import com.cloud.user.Account; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; + +import junit.framework.TestCase; + +@RunWith(MockitoJUnitRunner.class) +public class SecurityGroupJoinDaoImplTest extends TestCase { + + // Mock private variables. + @Mock (name = "_resourceTagJoinDao") + private ResourceTagJoinDao _resourceTagJoinDao; + @Mock (name = "_securityGroupVMMapDao") + private SecurityGroupVMMapDao _securityGroupVMMapDao; + @Mock (name = "_userVmDao") + private UserVmDao _userVmDao; + + // Inject mocks in class to be tested. + @InjectMocks + private SecurityGroupJoinDaoImpl _securityGroupJoinDaoImpl; + + // Mock a caller and a SecurityGroupJoinVO + @Mock + private Account caller; + @Mock + private SecurityGroupJoinVO vsg; + + // Mock securitygroups + @Mock + private SecurityGroupVMMapVO securityGroupVMMapVOone; + @Mock + private SecurityGroupVMMapVO securityGroupVMMapVOtwo; + + // Mock 2 UserVmVOs + @Mock + private UserVmVO userVmVOone; + @Mock + private UserVmVO userVmVOtwo; + + // Random generated UUIDs + private final String uuidOne = "463e022a-249d-4212-bdf4-726bc9047aa7"; + private final String uuidTwo = "d8714c5f-766f-4b14-bdf4-17571042b9c5"; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + + // Security group without vms associated. + List securityGroupVmMap_empty = new ArrayList(); + + // Security group with one vm associated. + List securityGroupVmMap_one = new ArrayList(); + securityGroupVmMap_one.add(securityGroupVMMapVOone); + + // Security group with two or many vms associated + List securityGroupVmMap_two = new ArrayList(); + securityGroupVmMap_two.add(securityGroupVMMapVOone); + securityGroupVmMap_two.add(securityGroupVMMapVOtwo); + + // Mock the resource tags to return an empty list. + when(_resourceTagJoinDao.listBy(anyString(), any(ResourceObjectType.class))).thenReturn(new ArrayList()); + + // Mock the listBySecurityGroup method to return a specified list when being called. + when(_securityGroupVMMapDao.listBySecurityGroup(1L)).thenReturn(securityGroupVmMap_empty); + when(_securityGroupVMMapDao.listBySecurityGroup(2L)).thenReturn(securityGroupVmMap_one); + when(_securityGroupVMMapDao.listBySecurityGroup(3L)).thenReturn(securityGroupVmMap_two); + + // Mock the securityGroupVMMapVOs to return a specified instance id. + when(securityGroupVMMapVOone.getInstanceId()).thenReturn(1L); + when(securityGroupVMMapVOtwo.getInstanceId()).thenReturn(2L); + + // Mock _userVmDao to return a non null instance of UserVmVO. + when(_userVmDao.findById(1L)).thenReturn(userVmVOone); + when(_userVmDao.findById(2L)).thenReturn(userVmVOtwo); + + // Mock _userVmDao to return a non null instance of UserVmVO. + when(userVmVOone.getUuid()).thenReturn(uuidOne); + when(userVmVOtwo.getUuid()).thenReturn(uuidTwo); + } + + @Test + public void virtualMachineCountEmptyTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(1L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field virtualMachineCount = securityGroupResponse.getClass().getDeclaredField("virtualMachineCount"); + virtualMachineCount.setAccessible(true); + assertEquals(0, ((Integer)virtualMachineCount.get(securityGroupResponse)).intValue()); + } + + @Test + public void virtualMachineCountOneTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(2L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field virtualMachineCount = securityGroupResponse.getClass().getDeclaredField("virtualMachineCount"); + virtualMachineCount.setAccessible(true); + assertEquals(1, ((Integer)virtualMachineCount.get(securityGroupResponse)).intValue()); + } + + @Test + public void virtualMachineCountTwoTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(3L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field virtualMachineCount = securityGroupResponse.getClass().getDeclaredField("virtualMachineCount"); + virtualMachineCount.setAccessible(true); + assertEquals(2, ((Integer)virtualMachineCount.get(securityGroupResponse)).intValue()); + } + + @Test + public void virtualMachineIDsEmptyTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(1L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field fieldVirtualMachineIds = securityGroupResponse.getClass().getDeclaredField("virtualMachineIds"); + fieldVirtualMachineIds.setAccessible(true); + + Set virtualMachineIds = (Set)fieldVirtualMachineIds.get(securityGroupResponse); + + assertEquals(0, virtualMachineIds.size()); + } + + @Test + public void virtualMachineIDsOneTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(2L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field fieldVirtualMachineIds = securityGroupResponse.getClass().getDeclaredField("virtualMachineIds"); + fieldVirtualMachineIds.setAccessible(true); + + Set virtualMachineIds = (Set)fieldVirtualMachineIds.get(securityGroupResponse); + + assertEquals(1, virtualMachineIds.size()); + assertTrue(virtualMachineIds.contains(uuidOne)); + } + + @Test + public void virtualMachineIDsTwoTest() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { + + when(vsg.getId()).thenReturn(3L); + + SecurityGroupResponse securityGroupResponse = _securityGroupJoinDaoImpl.newSecurityGroupResponse(vsg, caller); + + Field fieldVirtualMachineIds = securityGroupResponse.getClass().getDeclaredField("virtualMachineIds"); + fieldVirtualMachineIds.setAccessible(true); + + Set virtualMachineIds = (Set)fieldVirtualMachineIds.get(securityGroupResponse); + + assertEquals(2, virtualMachineIds.size()); + assertTrue(virtualMachineIds.contains(uuidOne)); + assertTrue(virtualMachineIds.contains(uuidTwo)); + } +} \ No newline at end of file diff --git a/server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java b/server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java index e7bb8a5e681..3102c9ac697 100644 --- a/server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java +++ b/server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java @@ -16,8 +16,17 @@ // under the License. package com.cloud.ha; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.lang.reflect.Array; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import javax.inject.Inject; @@ -25,6 +34,7 @@ import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationSer import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContext; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -38,9 +48,12 @@ import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.HostPodDao; +import com.cloud.ha.HighAvailabilityManager.Step; +import com.cloud.ha.HighAvailabilityManager.WorkType; import com.cloud.ha.dao.HighAvailabilityDao; import com.cloud.host.Host; import com.cloud.host.HostVO; +import com.cloud.host.Status; import com.cloud.host.dao.HostDao; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.resource.ResourceManager; @@ -51,6 +64,7 @@ import com.cloud.storage.dao.GuestOSCategoryDao; import com.cloud.storage.dao.GuestOSDao; import com.cloud.user.AccountManager; import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineManager; import com.cloud.vm.dao.VMInstanceDao; @@ -68,13 +82,10 @@ public class HighAvailabilityManagerImplTest { HostPodDao _podDao; @Mock ClusterDetailsDao _clusterDetailsDao; - @Mock ServiceOfferingDao _serviceOfferingDao; - @Mock ManagedContext _managedContext; - @Mock AgentManager _agentMgr; @Mock @@ -97,34 +108,141 @@ public class HighAvailabilityManagerImplTest { ConfigurationDao _configDao; @Mock VolumeOrchestrationService volumeMgr; - @Mock HostVO hostVO; HighAvailabilityManagerImpl highAvailabilityManager; + HighAvailabilityManagerImpl highAvailabilityManagerSpy; + static Method processWorkMethod = null; + + @BeforeClass + public static void initOnce() { + try { + processWorkMethod = HighAvailabilityManagerImpl.class.getDeclaredMethod("processWork", HaWorkVO.class); + processWorkMethod.setAccessible(true); + } catch (NoSuchMethodException e) { + } + } @Before public void setup() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { highAvailabilityManager = new HighAvailabilityManagerImpl(); - for (Field injectField : HighAvailabilityManagerImpl.class - .getDeclaredFields()) { + for (Field injectField : HighAvailabilityManagerImpl.class.getDeclaredFields()) { if (injectField.isAnnotationPresent(Inject.class)) { injectField.setAccessible(true); - injectField.set(highAvailabilityManager, this.getClass() - .getDeclaredField(injectField.getName()).get(this)); + injectField.set(highAvailabilityManager, this.getClass().getDeclaredField(injectField.getName()).get(this)); + } else if (injectField.getName().equals("_workers")) { + injectField.setAccessible(true); + for (Class clz : HighAvailabilityManagerImpl.class.getDeclaredClasses()) { + if (clz.getName().equals("com.cloud.ha.HighAvailabilityManagerImpl$WorkerThread")) { + Object obj = Array.newInstance(clz, 0); + injectField.set(highAvailabilityManager, obj); + } + } + } else if (injectField.getName().equals("_maxRetries")) { + injectField.setAccessible(true); + injectField.set(highAvailabilityManager, 5); } } + highAvailabilityManagerSpy = Mockito.spy(highAvailabilityManager); } @Test public void scheduleRestartForVmsOnHost() { Mockito.when(hostVO.getType()).thenReturn(Host.Type.Routing); Mockito.when(hostVO.getHypervisorType()).thenReturn(HypervisorType.KVM); - Mockito.when(_instanceDao.listByHostId(42l)).thenReturn( - Arrays.asList(Mockito.mock(VMInstanceVO.class))); + Mockito.when(_instanceDao.listByHostId(42l)).thenReturn(Arrays.asList(Mockito.mock(VMInstanceVO.class))); Mockito.when(_podDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(HostPodVO.class)); Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(DataCenterVO.class)); + highAvailabilityManager.scheduleRestartForVmsOnHost(hostVO, true); } + + @Test + public void scheduleRestartForVmsOnHostNotSupported() { + Mockito.when(hostVO.getType()).thenReturn(Host.Type.Routing); + Mockito.when(hostVO.getHypervisorType()).thenReturn(HypervisorType.VMware); + + highAvailabilityManager.scheduleRestartForVmsOnHost(hostVO, true); + } + + @Test + public void scheduleRestartForVmsOnHostNonEmptyVMList() { + Mockito.when(hostVO.getId()).thenReturn(1l); + Mockito.when(hostVO.getType()).thenReturn(Host.Type.Routing); + Mockito.when(hostVO.getHypervisorType()).thenReturn(HypervisorType.XenServer); + List vms = new ArrayList(); + VMInstanceVO vm1 = Mockito.mock(VMInstanceVO.class); + Mockito.when(vm1.getHostId()).thenReturn(1l); + Mockito.when(vm1.getInstanceName()).thenReturn("i-2-3-VM"); + Mockito.when(vm1.getType()).thenReturn(VirtualMachine.Type.User); + Mockito.when(vm1.isHaEnabled()).thenReturn(true); + vms.add(vm1); + VMInstanceVO vm2 = Mockito.mock(VMInstanceVO.class); + Mockito.when(vm2.getHostId()).thenReturn(1l); + Mockito.when(vm2.getInstanceName()).thenReturn("r-2-VM"); + Mockito.when(vm2.getType()).thenReturn(VirtualMachine.Type.DomainRouter); + Mockito.when(vm2.isHaEnabled()).thenReturn(true); + vms.add(vm2); + Mockito.when(_instanceDao.listByHostId(Mockito.anyLong())).thenReturn(vms); + Mockito.when(_instanceDao.findByUuid(vm1.getUuid())).thenReturn(vm1); + Mockito.when(_instanceDao.findByUuid(vm2.getUuid())).thenReturn(vm2); + Mockito.when(_podDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(HostPodVO.class)); + Mockito.when(_dcDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(DataCenterVO.class)); + Mockito.when(_haDao.findPreviousHA(Mockito.anyLong())).thenReturn(Arrays.asList(Mockito.mock(HaWorkVO.class))); + Mockito.when(_haDao.persist((HaWorkVO)Mockito.anyObject())).thenReturn(Mockito.mock(HaWorkVO.class)); + + highAvailabilityManager.scheduleRestartForVmsOnHost(hostVO, true); + } + + @Test + public void investigateHostStatusSuccess() { + Mockito.when(_hostDao.findById(Mockito.anyLong())).thenReturn(hostVO); + // Set the list of investigators, CheckOnAgentInvestigator suffices for now + Investigator investigator = Mockito.mock(CheckOnAgentInvestigator.class); + List investigators = new ArrayList(); + investigators.add(investigator); + highAvailabilityManager.setInvestigators(investigators); + // Mock isAgentAlive to return host status as Down + Mockito.when(investigator.isAgentAlive(hostVO)).thenReturn(Status.Down); + + assertTrue(highAvailabilityManager.investigate(1l) == Status.Down); + } + + @Test + public void investigateHostStatusFailure() { + Mockito.when(_hostDao.findById(Mockito.anyLong())).thenReturn(hostVO); + // Set the list of investigators, CheckOnAgentInvestigator suffices for now + // Also no need to mock isAgentAlive() as actual implementation returns null + Investigator investigator = Mockito.mock(CheckOnAgentInvestigator.class); + List investigators = new ArrayList(); + investigators.add(investigator); + highAvailabilityManager.setInvestigators(investigators); + + assertNull(highAvailabilityManager.investigate(1l)); + } + + private void processWorkWithRetryCount(int count, Step expectedStep) { + assertNotNull(processWorkMethod); + HaWorkVO work = new HaWorkVO(1l, VirtualMachine.Type.User, WorkType.Migration, Step.Scheduled, 1l, VirtualMachine.State.Running, count, 12345678l); + Mockito.doReturn(12345678l).when(highAvailabilityManagerSpy).migrate(work); + try { + processWorkMethod.invoke(highAvailabilityManagerSpy, work); + } catch (IllegalAccessException e) { + } catch (IllegalArgumentException e) { + } catch (InvocationTargetException e) { + } + assertTrue(work.getStep() == expectedStep); + } + + @Test + public void processWorkWithRetryCountExceeded() { + processWorkWithRetryCount(5, Step.Done); // max retry count is 5 + } + + @Test + public void processWorkWithRetryCountNotExceeded() { + processWorkWithRetryCount(3, Step.Scheduled); + } } diff --git a/server/test/com/cloud/ha/KVMFencerTest.java b/server/test/com/cloud/ha/KVMFencerTest.java index cdd13b6b606..da120af5edb 100644 --- a/server/test/com/cloud/ha/KVMFencerTest.java +++ b/server/test/com/cloud/ha/KVMFencerTest.java @@ -31,6 +31,7 @@ import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.cloud.agent.AgentManager; +import com.cloud.alert.AlertManager; import com.cloud.agent.api.FenceAnswer; import com.cloud.agent.api.FenceCommand; import com.cloud.exception.AgentUnavailableException; @@ -50,6 +51,8 @@ public class KVMFencerTest { @Mock AgentManager agentManager; @Mock + AlertManager alertMgr; + @Mock ResourceManager resourceManager; KVMFencer fencer; @@ -58,6 +61,7 @@ public class KVMFencerTest { public void setup() { fencer = new KVMFencer(); fencer._agentMgr = agentManager; + fencer._alertMgr = alertMgr; fencer._hostDao = hostDao; fencer._resourceMgr = resourceManager; } @@ -67,6 +71,8 @@ public class KVMFencerTest { HostVO host = Mockito.mock(HostVO.class); Mockito.when(host.getClusterId()).thenReturn(1l); Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); Mockito.when(host.getStatus()).thenReturn(Status.Up); Mockito.when(host.getId()).thenReturn(1l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); @@ -80,6 +86,8 @@ public class KVMFencerTest { HostVO host = Mockito.mock(HostVO.class); Mockito.when(host.getClusterId()).thenReturn(1l); Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); Mockito.when(host.getStatus()).thenReturn(Status.Down); Mockito.when(host.getId()).thenReturn(1l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); @@ -94,12 +102,16 @@ public class KVMFencerTest { Mockito.when(host.getClusterId()).thenReturn(1l); Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(host.getStatus()).thenReturn(Status.Up); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(1l); HostVO secondHost = Mockito.mock(HostVO.class); Mockito.when(secondHost.getClusterId()).thenReturn(1l); Mockito.when(secondHost.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(secondHost.getStatus()).thenReturn(Status.Up); + Mockito.when(secondHost.getDataCenterId()).thenReturn(1l); + Mockito.when(secondHost.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(2l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); @@ -118,12 +130,16 @@ public class KVMFencerTest { Mockito.when(host.getClusterId()).thenReturn(1l); Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(host.getStatus()).thenReturn(Status.Up); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(1l); HostVO secondHost = Mockito.mock(HostVO.class); Mockito.when(secondHost.getClusterId()).thenReturn(1l); Mockito.when(secondHost.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(secondHost.getStatus()).thenReturn(Status.Up); + Mockito.when(secondHost.getDataCenterId()).thenReturn(1l); + Mockito.when(secondHost.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(2l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); @@ -141,12 +157,16 @@ public class KVMFencerTest { Mockito.when(host.getClusterId()).thenReturn(1l); Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(host.getStatus()).thenReturn(Status.Up); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(1l); HostVO secondHost = Mockito.mock(HostVO.class); Mockito.when(secondHost.getClusterId()).thenReturn(1l); Mockito.when(secondHost.getHypervisorType()).thenReturn(HypervisorType.KVM); Mockito.when(secondHost.getStatus()).thenReturn(Status.Up); + Mockito.when(secondHost.getDataCenterId()).thenReturn(1l); + Mockito.when(secondHost.getPodId()).thenReturn(1l); Mockito.when(host.getId()).thenReturn(2l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); @@ -165,6 +185,8 @@ public class KVMFencerTest { Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.Any); Mockito.when(host.getStatus()).thenReturn(Status.Down); Mockito.when(host.getId()).thenReturn(1l); + Mockito.when(host.getDataCenterId()).thenReturn(1l); + Mockito.when(host.getPodId()).thenReturn(1l); VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class); Mockito.when(resourceManager.listAllHostsInCluster(1l)).thenReturn(Collections.singletonList(host)); diff --git a/server/test/com/cloud/network/router/RouterControlHelperTest.java b/server/test/com/cloud/network/router/RouterControlHelperTest.java index 4117ce02d79..41f4c27f22b 100644 --- a/server/test/com/cloud/network/router/RouterControlHelperTest.java +++ b/server/test/com/cloud/network/router/RouterControlHelperTest.java @@ -68,9 +68,9 @@ public class RouterControlHelperTest { NicVO nic3 = mock(NicVO.class); when(nic1.getNetworkId()).thenReturn(NW_ID_1); when(nic2.getNetworkId()).thenReturn(NW_ID_2); - when(nic2.getIp4Address()).thenReturn(IP4_ADDRES1); + when(nic2.getIPv4Address()).thenReturn(IP4_ADDRES1); when(nic3.getNetworkId()).thenReturn(NW_ID_3); - when(nic3.getIp4Address()).thenReturn(IP4_ADDRES2); + when(nic3.getIPv4Address()).thenReturn(IP4_ADDRES2); nics.add(nic1); nics.add(nic2); nics.add(nic3); @@ -99,7 +99,7 @@ public class RouterControlHelperTest { List nics = new ArrayList<>(); NicVO nic1 = mock(NicVO.class); when(nic1.getNetworkId()).thenReturn(NW_ID_1); - when(nic1.getIp4Address()).thenReturn(null); + when(nic1.getIPv4Address()).thenReturn(null); nics.add(nic1); when(this.nicDao.listByVmId(ROUTER_ID)).thenReturn(nics); diff --git a/server/test/com/cloud/server/ManagementServerImplTest.java b/server/test/com/cloud/server/ManagementServerImplTest.java index 1e530e63725..ffaff8f68aa 100644 --- a/server/test/com/cloud/server/ManagementServerImplTest.java +++ b/server/test/com/cloud/server/ManagementServerImplTest.java @@ -16,6 +16,7 @@ // under the License. package com.cloud.server; +import com.cloud.user.SSHKeyPair; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -23,6 +24,10 @@ import org.mockito.Mockito; import org.mockito.Spy; import org.mockito.runners.MockitoJUnitRunner; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; +import static org.mockito.Mockito.any; + import org.apache.cloudstack.api.command.user.ssh.RegisterSSHKeyPairCmd; import com.cloud.exception.InvalidParameterValueException; @@ -35,33 +40,71 @@ public class ManagementServerImplTest { @Mock RegisterSSHKeyPairCmd regCmd; + @Mock SSHKeyPairVO existingPair; + @Mock Account account; + @Mock SSHKeyPairDao sshKeyPairDao; ManagementServerImpl ms = new ManagementServerImpl(); + + @Mock + SSHKeyPair sshKeyPair; + @Spy ManagementServerImpl spy; @Test(expected = InvalidParameterValueException.class) - public void testExistingPairRegistration() { + public void testDuplicateRegistraitons(){ String accountName = "account"; - String publicKeyString = "very public"; - // setup owner with domainid + String publicKeyString = "ssh-rsa very public"; + String publicKeyMaterial = spy.getPublicKeyFromKeyKeyMaterial(publicKeyString); + Mockito.doReturn(account).when(spy).getCaller(); Mockito.doReturn(account).when(spy).getOwner(regCmd); - // mock _sshKeyPairDao.findByName to return null + Mockito.doNothing().when(spy).checkForKeyByName(regCmd, account); - // mock _sshKeyPairDao.findByPublicKey to return a known object Mockito.doReturn(accountName).when(regCmd).getAccountName(); + Mockito.doReturn(publicKeyString).when(regCmd).getPublicKey(); Mockito.doReturn("name").when(regCmd).getName(); + spy._sshKeyPairDao = sshKeyPairDao; Mockito.doReturn(1L).when(account).getAccountId(); Mockito.doReturn(1L).when(account).getDomainId(); - Mockito.doReturn(existingPair).when(sshKeyPairDao).findByPublicKey(1L, 1L, publicKeyString); + Mockito.doReturn(Mockito.mock(SSHKeyPairVO.class)).when(sshKeyPairDao).persist(any(SSHKeyPairVO.class)); + + when(sshKeyPairDao.findByName(1L, 1L, "name")).thenReturn(null).thenReturn(null); + when(sshKeyPairDao.findByPublicKey(1L, 1L, publicKeyMaterial)).thenReturn(null).thenReturn(existingPair); + + spy.registerSSHKeyPair(regCmd); spy.registerSSHKeyPair(regCmd); } + @Test + public void testSuccess(){ + String accountName = "account"; + String publicKeyString = "ssh-rsa very public"; + String publicKeyMaterial = spy.getPublicKeyFromKeyKeyMaterial(publicKeyString); + + Mockito.doReturn(1L).when(account).getAccountId(); + Mockito.doReturn(1L).when(account).getAccountId(); + spy._sshKeyPairDao = sshKeyPairDao; + + + //Mocking the DAO object functions - NO object found in DB + Mockito.doReturn(Mockito.mock(SSHKeyPairVO.class)).when(sshKeyPairDao).findByPublicKey(1L, 1L,publicKeyMaterial); + Mockito.doReturn(Mockito.mock(SSHKeyPairVO.class)).when(sshKeyPairDao).findByName(1L, 1L, accountName); + Mockito.doReturn(Mockito.mock(SSHKeyPairVO.class)).when(sshKeyPairDao).persist(any(SSHKeyPairVO.class)); + + //Mocking the User Params + Mockito.doReturn(accountName).when(regCmd).getName(); + Mockito.doReturn(publicKeyString).when(regCmd).getPublicKey(); + Mockito.doReturn(account).when(spy).getOwner(regCmd); + + spy.registerSSHKeyPair(regCmd); + Mockito.verify(spy, Mockito.times(3)).getPublicKeyFromKeyKeyMaterial(anyString()); + } } diff --git a/server/test/com/cloud/storage/VolumeApiServiceImplTest.java b/server/test/com/cloud/storage/VolumeApiServiceImplTest.java index 789730b4407..0e46142fe2c 100644 --- a/server/test/com/cloud/storage/VolumeApiServiceImplTest.java +++ b/server/test/com/cloud/storage/VolumeApiServiceImplTest.java @@ -17,6 +17,7 @@ package com.cloud.storage; import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyLong; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.when; @@ -41,8 +42,10 @@ import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd; import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; import org.apache.cloudstack.framework.jobs.AsyncJobExecutionContext; import org.apache.cloudstack.framework.jobs.AsyncJobManager; import org.apache.cloudstack.framework.jobs.dao.AsyncJobJoinMapDao; @@ -51,6 +54,7 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.dao.VolumeDao; import com.cloud.user.Account; @@ -87,6 +91,12 @@ public class VolumeApiServiceImplTest { @Mock VMInstanceDao _vmInstanceDao; + @Mock + VolumeInfo volumeInfoMock; + @Mock + SnapshotInfo snapshotInfoMock; + @Mock + VolumeService volService; DetachVolumeCmd detachCmd = new DetachVolumeCmd(); Class _detachCmdClass = detachCmd.getClass(); @@ -103,6 +113,7 @@ public class VolumeApiServiceImplTest { _svc._vmInstanceDao = _vmInstanceDao; _svc._jobMgr = _jobMgr; _svc.volFactory = _volFactory; + _svc.volService = volService; // mock caller context AccountVO account = new AccountVO("admin", 1L, "networkDomain", Account.ACCOUNT_TYPE_NORMAL, "uuid"); @@ -327,6 +338,23 @@ public class VolumeApiServiceImplTest { _svc.attachVolumeToVM(2L, 6L, 0L); } + // volume not Ready + @Test(expected = InvalidParameterValueException.class) + public void testTakeSnapshotF1() throws ResourceAllocationException { + when(_volFactory.getVolume(anyLong())).thenReturn(volumeInfoMock); + when(volumeInfoMock.getState()).thenReturn(Volume.State.Allocated); + _svc.takeSnapshot(5L, Snapshot.MANUAL_POLICY_ID, 3L, null, false); + } + + @Test + public void testTakeSnapshotF2() throws ResourceAllocationException { + when(_volFactory.getVolume(anyLong())).thenReturn(volumeInfoMock); + when(volumeInfoMock.getState()).thenReturn(Volume.State.Ready); + when(volumeInfoMock.getInstanceId()).thenReturn(null); + when (volService.takeSnapshot(Mockito.any(VolumeInfo.class))).thenReturn(snapshotInfoMock); + _svc.takeSnapshot(5L, Snapshot.MANUAL_POLICY_ID, 3L, null, false); + } + @After public void tearDown() { CallContext.unregister(); diff --git a/server/test/com/cloud/storage/snapshot/SnapshotManagerTest.java b/server/test/com/cloud/storage/snapshot/SnapshotManagerTest.java new file mode 100644 index 00000000000..4fb5964a76a --- /dev/null +++ b/server/test/com/cloud/storage/snapshot/SnapshotManagerTest.java @@ -0,0 +1,282 @@ +// 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.storage.snapshot; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyLong; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.List; +import java.util.UUID; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotStrategy; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotStrategy.SnapshotOperation; +import org.apache.cloudstack.engine.subsystem.api.storage.StorageStrategyFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.mockito.Spy; + +import com.cloud.configuration.Resource.ResourceType; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.resource.ResourceManager; +import com.cloud.storage.DataStoreRole; +import com.cloud.storage.ScopeType; +import com.cloud.storage.Snapshot; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.Volume; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.user.Account; +import com.cloud.user.AccountManager; +import com.cloud.user.AccountVO; +import com.cloud.user.ResourceLimitService; +import com.cloud.user.User; +import com.cloud.user.UserVO; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.VirtualMachine.State; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.snapshot.VMSnapshot; +import com.cloud.vm.snapshot.VMSnapshotVO; +import com.cloud.vm.snapshot.dao.VMSnapshotDao; + +public class SnapshotManagerTest { + @Spy + SnapshotManagerImpl _snapshotMgr = new SnapshotManagerImpl(); + @Mock + SnapshotDao _snapshotDao; + @Mock + VolumeDao _volumeDao; + @Mock + UserVmDao _vmDao; + @Mock + PrimaryDataStoreDao _storagePoolDao; + @Mock + VMSnapshotDao _vmSnapshotDao; + @Mock + Account account; + @Mock + UserVmVO vmMock; + @Mock + VolumeVO volumeMock; + @Mock + VolumeInfo volumeInfoMock; + @Mock + VolumeDataFactory volumeFactory; + @Mock + SnapshotVO snapshotMock; + @Mock + SnapshotInfo snapshotInfoMock; + @Mock + SnapshotDataFactory snapshotFactory; + @Mock + StorageStrategyFactory _storageStrategyFactory; + @Mock + SnapshotStrategy snapshotStrategy; + @Mock + AccountManager _accountMgr; + @Mock + ResourceLimitService _resourceLimitMgr; + @Mock + StoragePoolVO poolMock; + @Mock + ResourceManager _resourceMgr; + @Mock + DataStore storeMock; + + private static final long TEST_SNAPSHOT_ID = 3L; + private static final long TEST_VOLUME_ID = 4L; + private static final long TEST_VM_ID = 5L; + private static final long TEST_STORAGE_POOL_ID = 6L; + + @Before + public void setup() throws ResourceAllocationException { + MockitoAnnotations.initMocks(this); + _snapshotMgr._snapshotDao = _snapshotDao; + _snapshotMgr._volsDao = _volumeDao; + _snapshotMgr._vmDao = _vmDao; + _snapshotMgr.volFactory = volumeFactory; + _snapshotMgr.snapshotFactory = snapshotFactory; + _snapshotMgr._storageStrategyFactory = _storageStrategyFactory; + _snapshotMgr._accountMgr = _accountMgr; + _snapshotMgr._resourceLimitMgr = _resourceLimitMgr; + _snapshotMgr._storagePoolDao = _storagePoolDao; + _snapshotMgr._resourceMgr = _resourceMgr; + _snapshotMgr._vmSnapshotDao = _vmSnapshotDao; + + when(_snapshotDao.findById(anyLong())).thenReturn(snapshotMock); + when(snapshotMock.getVolumeId()).thenReturn(TEST_VOLUME_ID); + when(snapshotMock.isRecursive()).thenReturn(false); + + when(_volumeDao.findById(anyLong())).thenReturn(volumeMock); + when(volumeMock.getState()).thenReturn(Volume.State.Ready); + when(volumeFactory.getVolume(anyLong())).thenReturn(volumeInfoMock); + when(volumeInfoMock.getDataStore()).thenReturn(storeMock); + when(storeMock.getId()).thenReturn(TEST_STORAGE_POOL_ID); + + when(snapshotFactory.getSnapshot(anyLong(), Mockito.any(DataStoreRole.class))).thenReturn(snapshotInfoMock); + when(_storageStrategyFactory.getSnapshotStrategy(Mockito.any(SnapshotVO.class), Mockito.eq(SnapshotOperation.REVERT))).thenReturn(snapshotStrategy); + when(_storageStrategyFactory.getSnapshotStrategy(Mockito.any(SnapshotVO.class), Mockito.eq(SnapshotOperation.DELETE))).thenReturn(snapshotStrategy); + + doNothing().when(_accountMgr).checkAccess(any(Account.class), any(AccessType.class), any(Boolean.class), any(ControlledEntity.class)); + doNothing().when(_snapshotMgr._resourceLimitMgr).checkResourceLimit(any(Account.class), any(ResourceType.class)); + doNothing().when(_snapshotMgr._resourceLimitMgr).checkResourceLimit(any(Account.class), any(ResourceType.class), anyLong()); + doNothing().when(_snapshotMgr._resourceLimitMgr).decrementResourceCount(anyLong(), any(ResourceType.class), anyLong()); + doNothing().when(_snapshotMgr._resourceLimitMgr).incrementResourceCount(anyLong(), any(ResourceType.class)); + doNothing().when(_snapshotMgr._resourceLimitMgr).incrementResourceCount(anyLong(), any(ResourceType.class), anyLong()); + + Account account = new AccountVO("testaccount", 1L, "networkdomain", (short)0, "uuid"); + UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString(), User.Source.UNKNOWN); + CallContext.register(user, account); + when(_accountMgr.getAccount(anyLong())).thenReturn(account); + + when(_storagePoolDao.findById(anyLong())).thenReturn(poolMock); + when(poolMock.getScope()).thenReturn(ScopeType.ZONE); + when(poolMock.getHypervisor()).thenReturn(HypervisorType.KVM); + when(_resourceMgr.listAllUpAndEnabledHostsInOneZoneByHypervisor(any(HypervisorType.class), anyLong())).thenReturn(null); + } + + @After + public void tearDown() { + CallContext.unregister(); + } + + // vm is destroyed + @Test(expected = CloudRuntimeException.class) + public void testAllocSnapshotF1() throws ResourceAllocationException { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getState()).thenReturn(State.Destroyed); + _snapshotMgr.allocSnapshot(TEST_VOLUME_ID, Snapshot.MANUAL_POLICY_ID, null); + } + + // active snapshots + @SuppressWarnings("unchecked") + @Test(expected = InvalidParameterValueException.class) + public void testAllocSnapshotF2() throws ResourceAllocationException { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getId()).thenReturn(TEST_VM_ID); + when(vmMock.getState()).thenReturn(State.Stopped); + when(vmMock.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(volumeInfoMock.getInstanceId()).thenReturn(TEST_VM_ID); + List mockList = mock(List.class); + when(mockList.size()).thenReturn(1); + when(_snapshotDao.listByInstanceId(TEST_VM_ID, Snapshot.State.Creating, Snapshot.State.CreatedOnPrimary, Snapshot.State.BackingUp)).thenReturn(mockList); + _snapshotMgr.allocSnapshot(TEST_VOLUME_ID, Snapshot.MANUAL_POLICY_ID, null); + } + + // active vm snapshots + @SuppressWarnings("unchecked") + @Test(expected = CloudRuntimeException.class) + public void testAllocSnapshotF3() throws ResourceAllocationException { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getId()).thenReturn(TEST_VM_ID); + when(vmMock.getState()).thenReturn(State.Stopped); + when(vmMock.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(volumeInfoMock.getInstanceId()).thenReturn(TEST_VM_ID); + List mockList = mock(List.class); + when(mockList.size()).thenReturn(0); + when(_snapshotDao.listByInstanceId(TEST_VM_ID, Snapshot.State.Creating, Snapshot.State.CreatedOnPrimary, Snapshot.State.BackingUp)).thenReturn(mockList); + List mockList2 = mock(List.class); + when(mockList2.size()).thenReturn(1); + when(_vmSnapshotDao.listByInstanceId(TEST_VM_ID, VMSnapshot.State.Creating, VMSnapshot.State.Reverting, VMSnapshot.State.Expunging)).thenReturn(mockList2); + _snapshotMgr.allocSnapshot(TEST_VOLUME_ID, Snapshot.MANUAL_POLICY_ID, null); + } + + // successful test + @SuppressWarnings("unchecked") + @Test + public void testAllocSnapshotF4() throws ResourceAllocationException { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getId()).thenReturn(TEST_VM_ID); + when(vmMock.getState()).thenReturn(State.Stopped); + when(vmMock.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(volumeInfoMock.getInstanceId()).thenReturn(TEST_VM_ID); + List mockList = mock(List.class); + when(mockList.size()).thenReturn(0); + when(_snapshotDao.listByInstanceId(TEST_VM_ID, Snapshot.State.Creating, Snapshot.State.CreatedOnPrimary, Snapshot.State.BackingUp)).thenReturn(mockList); + List mockList2 = mock(List.class); + when(mockList2.size()).thenReturn(0); + when(_vmSnapshotDao.listByInstanceId(TEST_VM_ID, VMSnapshot.State.Creating, VMSnapshot.State.Reverting, VMSnapshot.State.Expunging)).thenReturn(mockList2); + when(_snapshotDao.persist(any(SnapshotVO.class))).thenReturn(snapshotMock); + _snapshotMgr.allocSnapshot(TEST_VOLUME_ID, Snapshot.MANUAL_POLICY_ID, null); + } + + @Test + public void testDeleteSnapshotF1() { + when(snapshotStrategy.deleteSnapshot(TEST_SNAPSHOT_ID)).thenReturn(true); + when(snapshotMock.getState()).thenReturn(Snapshot.State.Destroyed); + when(snapshotMock.getAccountId()).thenReturn(2L); + when(snapshotMock.getDataCenterId()).thenReturn(2L); + boolean result =_snapshotMgr.deleteSnapshot(TEST_SNAPSHOT_ID); + Assert.assertTrue(result); + } + + // vm state not stopped + @Test(expected = InvalidParameterValueException.class) + public void testRevertSnapshotF1() { + when(volumeMock.getInstanceId()).thenReturn(TEST_VM_ID); + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getState()).thenReturn(State.Running); + _snapshotMgr.revertSnapshot(TEST_SNAPSHOT_ID); + } + + // vm on Xenserver, return null + @Test + public void testRevertSnapshotF2() { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getState()).thenReturn(State.Stopped); + when(vmMock.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.XenServer); + when(volumeMock.getFormat()).thenReturn(ImageFormat.VHD); + Snapshot snapshot = _snapshotMgr.revertSnapshot(TEST_SNAPSHOT_ID); + Assert.assertNull(snapshot); + } + + // vm on KVM, successful + @Test + public void testRevertSnapshotF3() { + when(_vmDao.findById(anyLong())).thenReturn(vmMock); + when(vmMock.getState()).thenReturn(State.Stopped); + when(vmMock.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(volumeMock.getFormat()).thenReturn(ImageFormat.QCOW2); + when (snapshotStrategy.revertSnapshot(Mockito.any(SnapshotInfo.class))).thenReturn(true); + when(_volumeDao.update(anyLong(), any(VolumeVO.class))).thenReturn(true); + Snapshot snapshot = _snapshotMgr.revertSnapshot(TEST_SNAPSHOT_ID); + Assert.assertNotNull(snapshot); + } +} diff --git a/server/test/com/cloud/template/TemplateManagerImplTest.java b/server/test/com/cloud/template/TemplateManagerImplTest.java index bcbc3234746..ed4ec520a98 100644 --- a/server/test/com/cloud/template/TemplateManagerImplTest.java +++ b/server/test/com/cloud/template/TemplateManagerImplTest.java @@ -18,20 +18,532 @@ package com.cloud.template; -import org.junit.Test; +import com.cloud.agent.AgentManager; +import com.cloud.api.query.dao.UserVmJoinDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.domain.dao.DomainDao; +import com.cloud.event.dao.UsageEventDao; import com.cloud.exception.InvalidParameterValueException; +import com.cloud.host.Status; +import com.cloud.host.dao.HostDao; +import com.cloud.projects.ProjectManager; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolStatus; +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.VMTemplateStorageResourceAssoc; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.GuestOSDao; +import com.cloud.storage.dao.LaunchPermissionDao; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplatePoolDao; +import com.cloud.storage.dao.VMTemplateZoneDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.user.Account; +import com.cloud.user.AccountManager; +import com.cloud.user.AccountVO; +import com.cloud.user.ResourceLimitService; +import com.cloud.user.User; +import com.cloud.user.UserVO; +import com.cloud.user.dao.AccountDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.dao.VMInstanceDao; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.StorageCacheManager; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.framework.messagebus.MessageBus; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.cloudstack.test.utils.SpringUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mockito; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.type.classreading.MetadataReader; +import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.core.type.filter.TypeFilter; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; +import javax.inject.Inject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.anyBoolean; +import static org.mockito.Matchers.anyLong; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(loader = AnnotationConfigContextLoader.class) public class TemplateManagerImplTest { - TemplateManagerImpl tmgr = new TemplateManagerImpl(); + @Inject + TemplateManagerImpl templateManager = new TemplateManagerImpl(); + + @Inject + DataStoreManager dataStoreManager; + + @Inject + VMTemplateDao vmTemplateDao; + + @Inject + VMTemplatePoolDao vmTemplatePoolDao; + + @Inject + TemplateDataStoreDao templateDataStoreDao; + + @Inject + StoragePoolHostDao storagePoolHostDao; + + @Inject + PrimaryDataStoreDao primaryDataStoreDao; + + public class CustomThreadPoolExecutor extends ThreadPoolExecutor { + AtomicInteger ai = new AtomicInteger(0); + public CustomThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, + BlockingQueue workQueue, ThreadFactory threadFactory) { + super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory); + } + + @Override + protected void beforeExecute(Thread t, Runnable r) { + ai.addAndGet(1); + } + + public int getCount() { + try { + // Wait for some time to give before execute to run. Otherwise the tests that + // assert and check that template seeding has been scheduled may fail. If tests + // are seen to fail, consider increasing the sleep time. + Thread.sleep(1000); + return ai.get(); + } catch (Exception e) { + return -1; + } + } + } + + @Before + public void setUp() { + ComponentContext.initComponentsLifeCycle(); + AccountVO account = new AccountVO("admin", 1L, "networkDomain", Account.ACCOUNT_TYPE_NORMAL, "uuid"); + UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString(), User.Source.UNKNOWN); + CallContext.register(user, account); + } + + @After + public void tearDown() { + CallContext.unregister(); + } @Test(expected = InvalidParameterValueException.class) public void testVerifyTemplateIdOfSystemTemplate() { - tmgr.verifyTemplateId(1L); + templateManager.verifyTemplateId(1L); } public void testVerifyTemplateIdOfNonSystemTemplate() { - tmgr.verifyTemplateId(1L); + templateManager.verifyTemplateId(1L); + } + + @Test + public void testPrepareTemplateIsSeeded() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + when(mockTemplate.getId()).thenReturn(202l); + + StoragePoolVO mockPool = mock(StoragePoolVO.class); + when(mockPool.getId()).thenReturn(2l); + + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + when(mockPrimaryDataStore.getId()).thenReturn(2l); + + VMTemplateStoragePoolVO mockTemplateStore = mock(VMTemplateStoragePoolVO.class); + when(mockTemplateStore.getDownloadState()).thenReturn(VMTemplateStorageResourceAssoc.Status.DOWNLOADED); + + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(mockTemplateStore); + + doNothing().when(mockTemplateStore).setMarkedForGC(anyBoolean()); + + VMTemplateStoragePoolVO returnObject = templateManager.prepareTemplateForCreate(mockTemplate, (StoragePool) mockPrimaryDataStore); + assertTrue("Test template is already seeded", returnObject == mockTemplateStore); + } + + @Test + public void testPrepareTemplateNotDownloaded() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + when(mockTemplate.getId()).thenReturn(202l); + + StoragePoolVO mockPool = mock(StoragePoolVO.class); + when(mockPool.getId()).thenReturn(2l); + + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + when(mockPrimaryDataStore.getId()).thenReturn(2l); + when(mockPrimaryDataStore.getDataCenterId()).thenReturn(1l); + + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(null); + when(templateDataStoreDao.findByTemplateZoneDownloadStatus(202l, 1l, VMTemplateStorageResourceAssoc.Status.DOWNLOADED)).thenReturn(null); + + VMTemplateStoragePoolVO returnObject = templateManager.prepareTemplateForCreate(mockTemplate, (StoragePool) mockPrimaryDataStore); + assertTrue("Test template is not ready", returnObject == null); + } + + @Test(expected = CloudRuntimeException.class) + public void testPrepareTemplateNoHostConnectedToPool() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + when(mockTemplate.getId()).thenReturn(202l); + + StoragePoolVO mockPool = mock(StoragePoolVO.class); + when(mockPool.getId()).thenReturn(2l); + + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + when(mockPrimaryDataStore.getId()).thenReturn(2l); + when(mockPrimaryDataStore.getDataCenterId()).thenReturn(1l); + + TemplateDataStoreVO mockTemplateDataStore = mock(TemplateDataStoreVO.class); + + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(null); + when(templateDataStoreDao.findByTemplateZoneDownloadStatus(202l, 1l, VMTemplateStorageResourceAssoc.Status.DOWNLOADED)).thenReturn(mockTemplateDataStore); + when(storagePoolHostDao.listByHostStatus(2l, Status.Up)).thenReturn(null); + + templateManager.prepareTemplateForCreate(mockTemplate, (StoragePool) mockPrimaryDataStore); + } + + @Test(expected = InvalidParameterValueException.class) + public void testPrepareTemplateInvalidTemplate() { + when(vmTemplateDao.findById(anyLong())).thenReturn(null); + templateManager.prepareTemplate(202, 1, null); + } + + @Test + public void testTemplateScheduledForDownloadInOnePool() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + StoragePoolVO mockPool = mock(StoragePoolVO.class); + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + VMTemplateStoragePoolVO mockTemplateStore = mock(VMTemplateStoragePoolVO.class); + + when(mockPrimaryDataStore.getId()).thenReturn(2l); + when(mockPool.getId()).thenReturn(2l); + when(mockPool.getStatus()).thenReturn(StoragePoolStatus.Up); + when(mockPool.getDataCenterId()).thenReturn(1l); + when(mockTemplate.getId()).thenReturn(202l); + when(mockTemplateStore.getDownloadState()).thenReturn(VMTemplateStorageResourceAssoc.Status.DOWNLOADED); + when(vmTemplateDao.findById(anyLong())).thenReturn(mockTemplate); + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(mockTemplateStore); + when(primaryDataStoreDao.findById(anyLong())).thenReturn(mockPool); + + doNothing().when(mockTemplateStore).setMarkedForGC(anyBoolean()); + + ExecutorService preloadExecutor = new CustomThreadPoolExecutor(8, 8, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), + new NamedThreadFactory("Template-Preloader")); + templateManager._preloadExecutor = preloadExecutor; + + templateManager.prepareTemplate(202, 1, 2l); + assertTrue("Test template is scheduled for seeding to on pool", ((CustomThreadPoolExecutor)preloadExecutor).getCount() == 1); + } + + @Test + public void testTemplateScheduledForDownloadInDisabledPool() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + StoragePoolVO mockPool = mock(StoragePoolVO.class); + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + VMTemplateStoragePoolVO mockTemplateStore = mock(VMTemplateStoragePoolVO.class); + + when(mockPrimaryDataStore.getId()).thenReturn(2l); + when(mockPool.getId()).thenReturn(2l); + when(mockPool.getStatus()).thenReturn(StoragePoolStatus.Disabled); + when(mockPool.getDataCenterId()).thenReturn(1l); + when(mockTemplate.getId()).thenReturn(202l); + when(mockTemplateStore.getDownloadState()).thenReturn(VMTemplateStorageResourceAssoc.Status.DOWNLOADED); + when(vmTemplateDao.findById(anyLong())).thenReturn(mockTemplate); + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(mockTemplateStore); + when(primaryDataStoreDao.findById(anyLong())).thenReturn(mockPool); + + doNothing().when(mockTemplateStore).setMarkedForGC(anyBoolean()); + + ExecutorService preloadExecutor = new CustomThreadPoolExecutor(8, 8, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), + new NamedThreadFactory("Template-Preloader")); + templateManager._preloadExecutor = preloadExecutor; + + templateManager.prepareTemplate(202, 1, 2l); + assertTrue("Test template is not scheduled for seeding on disabled pool", ((CustomThreadPoolExecutor)preloadExecutor).getCount() == 0); + } + + @Test + public void testTemplateScheduledForDownloadInMultiplePool() { + VMTemplateVO mockTemplate = mock(VMTemplateVO.class); + PrimaryDataStore mockPrimaryDataStore = mock(PrimaryDataStore.class); + VMTemplateStoragePoolVO mockTemplateStore = mock(VMTemplateStoragePoolVO.class); + List pools = new ArrayList(); + + StoragePoolVO mockPool1 = mock(StoragePoolVO.class); + when(mockPool1.getId()).thenReturn(2l); + when(mockPool1.getStatus()).thenReturn(StoragePoolStatus.Up); + when(mockPool1.getDataCenterId()).thenReturn(1l); + StoragePoolVO mockPool2 = mock(StoragePoolVO.class); + when(mockPool2.getId()).thenReturn(3l); + when(mockPool2.getStatus()).thenReturn(StoragePoolStatus.Up); + when(mockPool2.getDataCenterId()).thenReturn(1l); + StoragePoolVO mockPool3 = mock(StoragePoolVO.class); + when(mockPool3.getId()).thenReturn(4l); + when(mockPool3.getStatus()).thenReturn(StoragePoolStatus.Up); + when(mockPool3.getDataCenterId()).thenReturn(2l); + pools.add(mockPool1); + pools.add(mockPool2); + pools.add(mockPool3); + + when(mockPrimaryDataStore.getId()).thenReturn(2l); + when(mockTemplate.getId()).thenReturn(202l); + when(mockTemplateStore.getDownloadState()).thenReturn(VMTemplateStorageResourceAssoc.Status.DOWNLOADED); + when(vmTemplateDao.findById(anyLong())).thenReturn(mockTemplate); + when(dataStoreManager.getPrimaryDataStore(anyLong())).thenReturn(mockPrimaryDataStore); + when(vmTemplateDao.findById(anyLong(), anyBoolean())).thenReturn(mockTemplate); + when(vmTemplatePoolDao.findByPoolTemplate(anyLong(), anyLong())).thenReturn(mockTemplateStore); + when(primaryDataStoreDao.findById(2l)).thenReturn(mockPool1); + when(primaryDataStoreDao.findById(3l)).thenReturn(mockPool2); + when(primaryDataStoreDao.findById(4l)).thenReturn(mockPool3); + when(primaryDataStoreDao.listByStatus(StoragePoolStatus.Up)).thenReturn(pools); + + doNothing().when(mockTemplateStore).setMarkedForGC(anyBoolean()); + + ExecutorService preloadExecutor = new CustomThreadPoolExecutor(8, 8, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), + new NamedThreadFactory("Template-Preloader")); + templateManager._preloadExecutor = preloadExecutor; + + templateManager.prepareTemplate(202, 1, null); + assertTrue("Test template is scheduled for seeding to on pool", ((CustomThreadPoolExecutor) preloadExecutor).getCount() == 2); + } + + @Configuration + @ComponentScan(basePackageClasses = {TemplateManagerImpl.class}, + includeFilters = {@ComponentScan.Filter(value = TestConfiguration.Library.class, type = FilterType.CUSTOM)}, + useDefaultFilters = false) + public static class TestConfiguration extends SpringUtils.CloudStackTestConfiguration { + + @Bean + public DataStoreManager dataStoreManager() { + return Mockito.mock(DataStoreManager.class); + } + + @Bean + public VMTemplateDao vmTemplateDao() { + return Mockito.mock(VMTemplateDao.class); + } + + @Bean + public VMTemplatePoolDao vmTemplatePoolDao() { + return Mockito.mock(VMTemplatePoolDao.class); + } + + @Bean + public TemplateDataStoreDao templateDataStoreDao() { + return Mockito.mock(TemplateDataStoreDao.class); + } + + @Bean + public VMTemplateZoneDao vmTemplateZoneDao() { + return Mockito.mock(VMTemplateZoneDao.class); + } + + @Bean + public VMInstanceDao vmInstanceDao() { + return Mockito.mock(VMInstanceDao.class); + } + + @Bean + public PrimaryDataStoreDao primaryDataStoreDao() { + return Mockito.mock(PrimaryDataStoreDao.class); + } + + @Bean + public StoragePoolHostDao storagePoolHostDao() { + return Mockito.mock(StoragePoolHostDao.class); + } + + @Bean + public AccountDao accountDao() { + return Mockito.mock(AccountDao.class); + } + + @Bean + public AgentManager agentMgr() { + return Mockito.mock(AgentManager.class); + } + + @Bean + public AccountManager accountManager() { + return Mockito.mock(AccountManager.class); + } + + @Bean + public HostDao hostDao() { + return Mockito.mock(HostDao.class); + } + + @Bean + public DataCenterDao dcDao() { + return Mockito.mock(DataCenterDao.class); + } + + @Bean + public UserVmDao userVmDao() { + return Mockito.mock(UserVmDao.class); + } + + @Bean + public VolumeDao volumeDao() { + return Mockito.mock(VolumeDao.class); + } + + @Bean + public SnapshotDao snapshotDao() { + return Mockito.mock(SnapshotDao.class); + } + + @Bean + public ConfigurationDao configDao() { + return Mockito.mock(ConfigurationDao.class); + } + + @Bean + public DomainDao domainDao() { + return Mockito.mock(DomainDao.class); + } + + @Bean + public GuestOSDao guestOSDao() { + return Mockito.mock(GuestOSDao.class); + } + + @Bean + public StorageManager storageManager() { + return Mockito.mock(StorageManager.class); + } + + @Bean + public UsageEventDao usageEventDao() { + return Mockito.mock(UsageEventDao.class); + } + + @Bean + public ResourceLimitService resourceLimitMgr() { + return Mockito.mock(ResourceLimitService.class); + } + + @Bean + public LaunchPermissionDao launchPermissionDao() { + return Mockito.mock(LaunchPermissionDao.class); + } + + @Bean + public ProjectManager projectMgr() { + return Mockito.mock(ProjectManager.class); + } + + @Bean + public VolumeDataFactory volFactory() { + return Mockito.mock(VolumeDataFactory.class); + } + + @Bean + public TemplateDataFactory tmplFactory() { + return Mockito.mock(TemplateDataFactory.class); + } + + @Bean + public SnapshotDataFactory snapshotFactory() { + return Mockito.mock(SnapshotDataFactory.class); + } + + @Bean + public TemplateService tmpltSvr() { + return Mockito.mock(TemplateService.class); + } + + @Bean + public VolumeOrchestrationService volumeMgr() { + return Mockito.mock(VolumeOrchestrationService.class); + } + + @Bean + public EndPointSelector epSelector() { + return Mockito.mock(EndPointSelector.class); + } + + @Bean + public UserVmJoinDao userVmJoinDao() { + return Mockito.mock(UserVmJoinDao.class); + } + + @Bean + public SnapshotDataStoreDao snapshotStoreDao() { + return Mockito.mock(SnapshotDataStoreDao.class); + } + + @Bean + public MessageBus messageBus() { + return Mockito.mock(MessageBus.class); + } + + @Bean + public StorageCacheManager cacheMgr() { + return Mockito.mock(StorageCacheManager.class); + } + + @Bean + public TemplateAdapter templateAdapter() { + return Mockito.mock(TemplateAdapter.class); + } + + public static class Library implements TypeFilter { + @Override + public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException { + ComponentScan cs = TestConfiguration.class.getAnnotation(ComponentScan.class); + return SpringUtils.includedInBasePackageClasses(mdr.getClassMetadata().getClassName(), cs); + } + } } } diff --git a/server/test/com/cloud/user/AccountManagerImplTest.java b/server/test/com/cloud/user/AccountManagerImplTest.java index f70aa39a345..a895ec27d77 100644 --- a/server/test/com/cloud/user/AccountManagerImplTest.java +++ b/server/test/com/cloud/user/AccountManagerImplTest.java @@ -17,11 +17,15 @@ package com.cloud.user; import java.lang.reflect.Field; +import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Arrays; import java.util.ArrayList; import javax.inject.Inject; +import com.cloud.server.auth.UserAuthenticator; +import com.cloud.utils.Pair; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -88,6 +92,7 @@ import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.InstanceGroupDao; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; +import org.springframework.test.util.ReflectionTestUtils; @RunWith(MockitoJUnitRunner.class) public class AccountManagerImplTest { @@ -197,6 +202,9 @@ public class AccountManagerImplTest { @Mock SecurityChecker securityChecker; + @Mock + private UserAuthenticator userAuthenticator; + @Before public void setup() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { @@ -213,6 +221,7 @@ public class AccountManagerImplTest { } } } + ReflectionTestUtils.setField(accountManager, "_userAuthenticators", Arrays.asList(userAuthenticator)); accountManager.setSecurityCheckers(Arrays.asList(securityChecker)); CallContext.register(callingUser, callingAccount); } @@ -312,4 +321,38 @@ public class AccountManagerImplTest { Mockito.verify(_accountDao, Mockito.atLeastOnce()).markForCleanup( Mockito.eq(42l)); } + + + @Test + public void testAuthenticateUser() throws UnknownHostException { + Pair successAuthenticationPair = new Pair<>(true, null); + Pair failureAuthenticationPair = new Pair<>(false, + UserAuthenticator.ActionOnFailedAuthentication.INCREMENT_INCORRECT_LOGIN_ATTEMPT_COUNT); + + UserAccountVO userAccountVO = new UserAccountVO(); + userAccountVO.setSource(User.Source.UNKNOWN); + userAccountVO.setState(Account.State.disabled.toString()); + Mockito.when(_userAccountDao.getUserAccount("test", 1L)).thenReturn(userAccountVO); + Mockito.when(userAuthenticator.authenticate("test", "fail", 1L, null)).thenReturn(failureAuthenticationPair); + Mockito.when(userAuthenticator.authenticate("test", null, 1L, null)).thenReturn(successAuthenticationPair); + Mockito.when(userAuthenticator.authenticate("test", "", 1L, null)).thenReturn(successAuthenticationPair); + + //Test for incorrect password. authentication should fail + UserAccount userAccount = accountManager.authenticateUser("test", "fail", 1L, InetAddress.getByName("127.0.0.1"), null); + Assert.assertNull(userAccount); + + //Test for null password. authentication should fail + userAccount = accountManager.authenticateUser("test", null, 1L, InetAddress.getByName("127.0.0.1"), null); + Assert.assertNull(userAccount); + + //Test for empty password. authentication should fail + userAccount = accountManager.authenticateUser("test", "", 1L, InetAddress.getByName("127.0.0.1"), null); + Assert.assertNull(userAccount); + + //Verifying that the authentication method is only called when password is specified + Mockito.verify(userAuthenticator, Mockito.times(1)).authenticate("test", "fail", 1L, null); + Mockito.verify(userAuthenticator, Mockito.never()).authenticate("test", null, 1L, null); + Mockito.verify(userAuthenticator, Mockito.never()).authenticate("test", "", 1L, null); + + } } diff --git a/server/test/com/cloud/vpc/VpcApiUnitTest.java b/server/test/com/cloud/vpc/VpcApiUnitTest.java index f4056358d4e..7043f2265d3 100644 --- a/server/test/com/cloud/vpc/VpcApiUnitTest.java +++ b/server/test/com/cloud/vpc/VpcApiUnitTest.java @@ -41,6 +41,7 @@ import com.cloud.utils.component.ComponentContext; public class VpcApiUnitTest extends TestCase { @Inject VpcManagerImpl _vpcService = null; + VpcVO _vo = new VpcVO(1, "new vpc", "new vpc", 1, 1, 1, "0.0.0.0/0", "vpc domain", false, false, false); @Override @Before @@ -81,93 +82,68 @@ public class VpcApiUnitTest extends TestCase { } } + //1) correct network offering @Test public void validateNtwkOffForVpc() { //validate network offering - //1) correct network offering - VpcVO vo = new VpcVO(1, "new vpc", "new vpc", 1, 1, 1, "0.0.0.0/0", "vpc domain", false, false, false); boolean result = false; try { - _vpcService.validateNtwkOffForNtwkInVpc(2L, 1, "0.0.0.0", "111-", vo, "10.1.1.1", new AccountVO(), null); + _vpcService.validateNtwkOffForNtwkInVpc(2L, 1, "0.0.0.0", "111-", _vo, "10.1.1.1", new AccountVO(), null); result = true; - } catch (Exception ex) { } finally { assertTrue("Validate network offering: Test passed: the offering is valid for vpc creation", result); } - //2) invalid offering - source nat is not included - result = false; + } + + //2) invalid offering - source nat is not included + @Test(expected=InvalidParameterValueException.class) + public void validateNtwkOffForVpcInvalidMissingSourceNat() { + boolean result = false; try { - _vpcService.validateNtwkOffForNtwkInVpc(2L, 2, "0.0.0.0", "111-", vo, "10.1.1.1", new AccountVO(), null); + _vpcService.validateNtwkOffForNtwkInVpc(2L, 2, "0.0.0.0", "111-", _vo, "10.1.1.1", new AccountVO(), null); result = true; - } catch (InvalidParameterValueException ex) { } finally { assertFalse("Validate network offering: TEST FAILED, can't use network offering without SourceNat service", result); } - //3) invalid offering - conserve mode is off - result = false; + } + + //3) invalid offering - conserve mode is off + @Test(expected=InvalidParameterValueException.class) + public void validateNtwkOffForVpcInvalidNoConserveMode() { + boolean result = false; try { - _vpcService.validateNtwkOffForNtwkInVpc(2L, 3, "0.0.0.0", "111-", vo, "10.1.1.1", new AccountVO(), null); + _vpcService.validateNtwkOffForNtwkInVpc(2L, 3, "0.0.0.0", "111-", _vo, "10.1.1.1", new AccountVO(), null); result = true; - } catch (InvalidParameterValueException ex) { } finally { assertFalse("Validate network offering: TEST FAILED, can't use network offering without conserve mode = true", result); } - //4) invalid offering - guest type shared - result = false; + } + + //4) invalid offering - guest type shared + @Test(expected=InvalidParameterValueException.class) + public void validateNtwkOffForVpcInvalidTypeIsGuest() { + boolean result = false; try { - _vpcService.validateNtwkOffForNtwkInVpc(2L, 4, "0.0.0.0", "111-", vo, "10.1.1.1", new AccountVO(), null); + _vpcService.validateNtwkOffForNtwkInVpc(2L, 4, "0.0.0.0", "111-", _vo, "10.1.1.1", new AccountVO(), null); result = true; - } catch (InvalidParameterValueException ex) { } finally { assertFalse("Validate network offering: TEST FAILED, can't use network offering with guest type = Shared", result); } - //5) Invalid offering - no redundant router support - result = false; + } + + //5) Invalid offering - no redundant router support + @Test(expected=InvalidParameterValueException.class) + public void validateNtwkOffForVpcInvalidNoRVRSupport() { + boolean result = false; try { - _vpcService.validateNtwkOffForNtwkInVpc(2L, 5, "0.0.0.0", "111-", vo, "10.1.1.1", new AccountVO(), null); + _vpcService.validateNtwkOffForNtwkInVpc(2L, 5, "0.0.0.0", "111-", _vo, "10.1.1.1", new AccountVO(), null); result = true; - } catch (InvalidParameterValueException ex) { } finally { assertFalse("TEST FAILED, can't use network offering with guest type = Shared", result); } } - -// public void destroyVpc() { -// boolean result = false; -// try { -// result = _vpcService.destroyVpc(vo, new AccountVO(), 1L); -// } catch (Exception ex) { -// s_logger.debug(ex); -// } finally { -// assertTrue("Failed to destroy VPC", result); -// } -// } -// -// public void deleteVpc() { -// //delete existing offering -// boolean result = false; -// try { -// List svcs = new ArrayList(); -// svcs.add(Service.SourceNat.getName()); -// result = _vpcService.deleteVpc(1); -// } catch (Exception ex) { -// } finally { -// assertTrue("Delete vpc: TEST FAILED, vpc failed to delete" + result, result); -// } -// -// //delete non-existing offering -// result = false; -// try { -// List svcs = new ArrayList(); -// svcs.add(Service.SourceNat.getName()); -// result = _vpcService.deleteVpc(100); -// } catch (Exception ex) { -// } finally { -// assertFalse("Delete vpc: TEST FAILED, true is returned when try to delete non existing vpc" + result, result); -// } -// } } diff --git a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java index 466adb52e09..5d2eb4c4970 100644 --- a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java +++ b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java @@ -125,15 +125,12 @@ public class CreateNetworkOfferingTest extends TestCase { assertNotNull("Shared network offering with specifyVlan=true failed to create ", off); } - @Test + @Test(expected=InvalidParameterValueException.class) public void createSharedNtwkOffWithNoVlan() { - try { - NetworkOfferingVO off = + NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, false, Availability.Optional, 200, null, false, Network.GuestType.Shared, false, null, false, null, true, false, null, false, null, true); - assertNull("Shared network offering with specifyVlan=false was created", off); - } catch (InvalidParameterValueException ex) { - } + assertNull("Shared network offering with specifyVlan=false was created", off); } @Test @@ -145,15 +142,12 @@ public class CreateNetworkOfferingTest extends TestCase { assertNotNull("Shared network offering with specifyIpRanges=true failed to create ", off); } - @Test + @Test(expected=InvalidParameterValueException.class) public void createSharedNtwkOffWithoutSpecifyIpRanges() { - try { - NetworkOfferingVO off = + NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, true, Availability.Optional, 200, null, false, Network.GuestType.Shared, - false, null, false, null, false, false, null, false, null, true); - assertNull("Shared network offering with specifyIpRanges=false was created", off); - } catch (InvalidParameterValueException ex) { - } + false, null, false, null, false, false, null, false, null, true); + assertNull("Shared network offering with specifyIpRanges=false was created", off); } //Test Isolated network offerings @@ -183,19 +177,16 @@ public class CreateNetworkOfferingTest extends TestCase { } - @Test + @Test(expected=InvalidParameterValueException.class) public void createIsolatedNtwkOffWithSpecifyIpRangesAndSourceNat() { - try { - Map> serviceProviderMap = new HashMap>(); - Set vrProvider = new HashSet(); - vrProvider.add(Provider.VirtualRouter); - serviceProviderMap.put(Network.Service.SourceNat, vrProvider); - NetworkOfferingVO off = + Map> serviceProviderMap = new HashMap>(); + Set vrProvider = new HashSet(); + vrProvider.add(Provider.VirtualRouter); + serviceProviderMap.put(Network.Service.SourceNat, vrProvider); + NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, false, Availability.Optional, 200, serviceProviderMap, false, - Network.GuestType.Isolated, false, null, false, null, true, false, null, false, null, true); - assertNull("Isolated network offering with specifyIpRanges=true and source nat service enabled, was created", off); - } catch (InvalidParameterValueException ex) { - } + Network.GuestType.Isolated, false, null, false, null, true, false, null, false, null, true); + assertNull("Isolated network offering with specifyIpRanges=true and source nat service enabled, was created", off); } @Test diff --git a/services/console-proxy-rdp/rdpconsole/README.txt b/services/console-proxy-rdp/rdpconsole/README.txt index 546746c22fa..aa4d9488d5e 100755 --- a/services/console-proxy-rdp/rdpconsole/README.txt +++ b/services/console-proxy-rdp/rdpconsole/README.txt @@ -22,7 +22,7 @@ Usage: Common options: --help|-h Show this help text. --debug-link|-DL Print debugging messages when packets are trasnferred via links. - --debug-element|-DE Print debugging messages when packets are received or sended by elements. + --debug-element|-DE Print debugging messages when packets are received or sent by elements. --debug-pipeline|-DP Print debugging messages in pipelines. --host|-n|--host-name VALUE Name or IP address of host to connect to. Required. --width|-W VALUE Width of canvas. Default value is "1024". diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/common/BufferedImagePixelsAdapter.java b/services/console-proxy-rdp/rdpconsole/src/main/java/common/BufferedImagePixelsAdapter.java index 396bdd47b4c..336ff4435d0 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/common/BufferedImagePixelsAdapter.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/common/BufferedImagePixelsAdapter.java @@ -21,12 +21,15 @@ import java.awt.image.DataBuffer; import java.awt.image.DataBufferInt; import java.util.Arrays; +import org.apache.log4j.Logger; + import streamer.BaseElement; import streamer.ByteBuffer; import streamer.Element; import streamer.Link; public class BufferedImagePixelsAdapter extends BaseElement { + private static final Logger s_logger = Logger.getLogger(BufferedImagePixelsAdapter.class); public static final String TARGET_X = "x"; public static final String TARGET_Y = "y"; @@ -55,7 +58,7 @@ public class BufferedImagePixelsAdapter extends BaseElement { @Override public void handleData(ByteBuffer buf, Link link) { if (verbose) - System.out.println("[" + this + "] INFO: Data received: " + buf + "."); + s_logger.debug("[" + this + "] INFO: Data received: " + buf + "."); int x = (Integer)buf.getMetadata(TARGET_X); int y = (Integer)buf.getMetadata(TARGET_Y); @@ -100,6 +103,7 @@ public class BufferedImagePixelsAdapter extends BaseElement { try { System.arraycopy(intArray, srcLine * rectWidth, imageBuffer, x + dstLine * imageWidth, rectWidth); } catch (IndexOutOfBoundsException e) { + s_logger.info("[ignored] copy error",e); } } break; @@ -141,7 +145,7 @@ public class BufferedImagePixelsAdapter extends BaseElement { String actualData = Arrays.toString(((DataBufferInt)canvas.getOfflineImage().getRaster().getDataBuffer()).getData()); String expectedData = Arrays.toString(pixelsLE); if (!actualData.equals(expectedData)) - System.err.println("Actual image: " + actualData + "\nExpected image: " + expectedData + "."); + s_logger.error("Actual image: " + actualData + "\nExpected image: " + expectedData + "."); } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/common/Client.java b/services/console-proxy-rdp/rdpconsole/src/main/java/common/Client.java index f21d7e35b5a..eb345a2230d 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/common/Client.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/common/Client.java @@ -66,7 +66,7 @@ public class Client { { name = "--debug-element"; alias = "-DE"; - description = "Print debugging messages when packets are received or sended by elements."; + description = "Print debugging messages when packets are received or sent by elements."; } }; private final Option debugPipeline = new Option() { diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/InputStreamSource.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/InputStreamSource.java index 0c8c97df690..958e5e0f016 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/InputStreamSource.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/InputStreamSource.java @@ -20,12 +20,15 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import org.apache.log4j.Logger; + import streamer.debug.FakeSink; /** * Source element, which reads data from InputStream. */ public class InputStreamSource extends BaseElement { + private static final Logger s_logger = Logger.getLogger(InputStreamSource.class); protected InputStream is; protected SocketWrapperImpl socketWrapper; @@ -148,10 +151,14 @@ public class InputStreamSource extends BaseElement { try { is.close(); } catch (IOException e) { + s_logger.info("[ignored]" + + "io error on input stream: " + e.getLocalizedMessage()); } try { sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT); } catch (Exception e) { + s_logger.info("[ignored]" + + "error sending an event to all pods: " + e.getLocalizedMessage()); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/OutputStreamSink.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/OutputStreamSink.java index e66899df8fc..27ef614440f 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/OutputStreamSink.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/OutputStreamSink.java @@ -20,9 +20,12 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; +import org.apache.log4j.Logger; + import streamer.debug.FakeSource; public class OutputStreamSink extends BaseElement { + private static final Logger s_logger = Logger.getLogger(OutputStreamSink.class); protected OutputStream os; protected SocketWrapperImpl socketWrapper; @@ -110,10 +113,14 @@ public class OutputStreamSink extends BaseElement { try { os.close(); } catch (IOException e) { + s_logger.info("[ignored]" + + "io error on output: " + e.getLocalizedMessage()); } try { sendEventToAllPads(Event.STREAM_CLOSE, Direction.IN); } catch (Exception e) { + s_logger.info("[ignored]" + + "error sending output close event: " + e.getLocalizedMessage()); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java index 4713173bd2e..3e05d45f1ad 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java @@ -16,18 +16,9 @@ // under the License. package streamer; -import org.apache.cloudstack.utils.security.SSLUtils; -import org.apache.cloudstack.utils.security.SecureSSLSocketFactory; -import streamer.debug.MockServer; -import streamer.debug.MockServer.Packet; -import streamer.ssl.SSLState; -import streamer.ssl.TrustAllX509TrustManager; +import static streamer.debug.MockServer.Packet.PacketType.CLIENT; +import static streamer.debug.MockServer.Packet.PacketType.SERVER; -import javax.net.SocketFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -35,10 +26,24 @@ import java.net.InetSocketAddress; import java.net.Socket; import java.util.HashMap; -import static streamer.debug.MockServer.Packet.PacketType.CLIENT; -import static streamer.debug.MockServer.Packet.PacketType.SERVER; +import javax.net.SocketFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; + +import org.apache.log4j.Logger; + +import org.apache.cloudstack.utils.security.SSLUtils; +import org.apache.cloudstack.utils.security.SecureSSLSocketFactory; + +import streamer.debug.MockServer; +import streamer.debug.MockServer.Packet; +import streamer.ssl.SSLState; +import streamer.ssl.TrustAllX509TrustManager; public class SocketWrapperImpl extends PipelineImpl implements SocketWrapper { + private static final Logger s_logger = Logger.getLogger(SocketWrapperImpl.class); protected InputStreamSource source; protected OutputStreamSink sink; @@ -172,19 +177,27 @@ public class SocketWrapperImpl extends PipelineImpl implements SocketWrapper { try { handleEvent(Event.STREAM_CLOSE, Direction.IN); } catch (Exception e) { + s_logger.info("[ignored]" + + "error sending input close event: " + e.getLocalizedMessage()); } try { handleEvent(Event.STREAM_CLOSE, Direction.OUT); } catch (Exception e) { + s_logger.info("[ignored]" + + "error sending output close event: " + e.getLocalizedMessage()); } try { if (sslSocket != null) sslSocket.close(); } catch (Exception e) { + s_logger.info("[ignored]" + + "error closing ssl socket: " + e.getLocalizedMessage()); } try { socket.close(); } catch (Exception e) { + s_logger.info("[ignored]" + + "error closing socket: " + e.getLocalizedMessage()); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SyncLink.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SyncLink.java index 493964a26c1..77810f4d6e1 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SyncLink.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SyncLink.java @@ -16,11 +16,14 @@ // under the License. package streamer; +import org.apache.log4j.Logger; + /** * Link to transfer data in bounds of single thread (synchronized transfer). * Must not be used to send data to elements served in different threads. */ public class SyncLink implements Link { + private static final Logger s_logger = Logger.getLogger(SyncLink.class); /** * When null packet is pulled from source element, then make slight delay to @@ -112,7 +115,7 @@ public class SyncLink implements Link { @Override public void pushBack(ByteBuffer buf) { if (verbose) - System.out.println("[" + this + "] INFO: Buffer pushed back: " + buf + "."); + s_logger.debug("[" + this + "] INFO: Buffer pushed back: " + buf + "."); if (cacheBuffer != null) { ByteBuffer tmp = cacheBuffer.join(buf); @@ -151,7 +154,7 @@ public class SyncLink implements Link { throw new RuntimeException("[" + this + "] ERROR: link is not in push mode."); if (verbose) - System.out.println("[" + this + "] INFO: Incoming buffer: " + buf + "."); + s_logger.debug("[" + this + "] INFO: Incoming buffer: " + buf + "."); if (buf == null && cacheBuffer == null) return; @@ -172,7 +175,7 @@ public class SyncLink implements Link { while (cacheBuffer != null) { if (paused || hold) { if (verbose) - System.out.println("[" + this + "] INFO: Transfer is paused. Data in cache buffer: " + cacheBuffer + "."); + s_logger.debug("[" + this + "] INFO: Transfer is paused. Data in cache buffer: " + cacheBuffer + "."); // Wait until rest of packet will be read return; @@ -180,7 +183,7 @@ public class SyncLink implements Link { if (expectedPacketSize > 0 && cacheBuffer.length < expectedPacketSize) { if (verbose) - System.out.println("[" + this + "] INFO: Transfer is suspended because available data is less than expected packet size. Expected packet size: " + s_logger.debug("[" + this + "] INFO: Transfer is suspended because available data is less than expected packet size. Expected packet size: " + expectedPacketSize + ", data in cache buffer: " + cacheBuffer + "."); // Wait until rest of packet will be read @@ -207,7 +210,7 @@ public class SyncLink implements Link { public void sendEvent(Event event, Direction direction) { if (verbose) - System.out.println("[" + this + "] INFO: Event " + event + " is received."); + s_logger.debug("[" + this + "] INFO: Event " + event + " is received."); // Shutdown main loop (if any) when STREAM_CLOSE event is received. switch (event) { @@ -254,13 +257,14 @@ public class SyncLink implements Link { if (paused) { if (verbose) - System.out.println("[" + this + "] INFO: Cannot pull, link is paused."); + s_logger.debug("[" + this + "] INFO: Cannot pull, link is paused."); // Make slight delay in such case, to avoid consuming 100% of CPU if (block) { try { Thread.sleep(100); } catch (InterruptedException e) { + s_logger.info("[ignored] interupted during pull", e); } } @@ -271,7 +275,7 @@ public class SyncLink implements Link { // then return it instead of asking for more data from source if (cacheBuffer != null && (expectedPacketSize == 0 || (expectedPacketSize > 0 && cacheBuffer.length >= expectedPacketSize))) { if (verbose) - System.out.println("[" + this + "] INFO: Data pulled from cache buffer: " + cacheBuffer + "."); + s_logger.debug("[" + this + "] INFO: Data pulled from cache buffer: " + cacheBuffer + "."); ByteBuffer tmp = cacheBuffer; cacheBuffer = null; @@ -290,7 +294,7 @@ public class SyncLink implements Link { // Can return something only when data was stored in buffer if (cacheBuffer != null && (expectedPacketSize == 0 || (expectedPacketSize > 0 && cacheBuffer.length >= expectedPacketSize))) { if (verbose) - System.out.println("[" + this + "] INFO: Data pulled from source: " + cacheBuffer + "."); + s_logger.debug("[" + this + "] INFO: Data pulled from source: " + cacheBuffer + "."); ByteBuffer tmp = cacheBuffer; cacheBuffer = null; @@ -366,7 +370,7 @@ public class SyncLink implements Link { sendEvent(Event.LINK_SWITCH_TO_PULL_MODE, Direction.IN); if (verbose) - System.out.println("[" + this + "] INFO: Starting pull loop."); + s_logger.debug("[" + this + "] INFO: Starting pull loop."); // Pull source in loop while (!shutdown) { @@ -382,7 +386,7 @@ public class SyncLink implements Link { } if (verbose) - System.out.println("[" + this + "] INFO: Pull loop finished."); + s_logger.debug("[" + this + "] INFO: Pull loop finished."); } @@ -397,7 +401,7 @@ public class SyncLink implements Link { @Override public void setPullMode() { if (verbose) - System.out.println("[" + this + "] INFO: Switching to PULL mode."); + s_logger.debug("[" + this + "] INFO: Switching to PULL mode."); pullMode = true; } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSink.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSink.java index edfe8dbc752..204ebb620e2 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSink.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSink.java @@ -16,6 +16,7 @@ // under the License. package streamer.apr; +import org.apache.log4j.Logger; import org.apache.tomcat.jni.Socket; import streamer.BaseElement; @@ -26,6 +27,7 @@ import streamer.Event; import streamer.Link; public class AprSocketSink extends BaseElement { + private static final Logger s_logger = Logger.getLogger(AprSocketSink.class); protected AprSocketWrapperImpl socketWrapper; protected Long socket; @@ -117,6 +119,8 @@ public class AprSocketSink extends BaseElement { try { sendEventToAllPads(Event.STREAM_CLOSE, Direction.IN); } catch (Exception e) { + s_logger.info("[ignored]" + + "failing sending sink event to all pads: " + e.getLocalizedMessage()); } socketWrapper.shutdown(); } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSource.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSource.java index 5d3d65bdc0c..32345769aa6 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSource.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSource.java @@ -16,6 +16,7 @@ // under the License. package streamer.apr; +import org.apache.log4j.Logger; import org.apache.tomcat.jni.Socket; import streamer.BaseElement; @@ -29,6 +30,7 @@ import streamer.Link; * Source element, which reads data from InputStream. */ public class AprSocketSource extends BaseElement { + private static final Logger s_logger = Logger.getLogger(AprSocketSource.class); protected AprSocketWrapperImpl socketWrapper; protected Long socket; @@ -162,6 +164,8 @@ public class AprSocketSource extends BaseElement { try { sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT); } catch (Exception e) { + s_logger.info("[ignored]" + + "failing sending source event to all pads: " + e.getLocalizedMessage()); } socketWrapper.shutdown(); } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketWrapperImpl.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketWrapperImpl.java index 2ee426b89c3..e8741400ced 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketWrapperImpl.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketWrapperImpl.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.net.InetSocketAddress; import java.util.HashMap; +import org.apache.log4j.Logger; import org.apache.tomcat.jni.Address; import org.apache.tomcat.jni.Error; import org.apache.tomcat.jni.Library; @@ -46,6 +47,7 @@ import streamer.ssl.SSLState; import sun.security.x509.X509CertImpl; public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper { + private static final Logger s_logger = Logger.getLogger(AprSocketWrapperImpl.class); static { try { @@ -198,10 +200,14 @@ public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper try { handleEvent(Event.STREAM_CLOSE, Direction.IN); } catch (Exception e) { + s_logger.info("[ignored]" + + "handling stream close event failed on input: " + e.getLocalizedMessage()); } try { handleEvent(Event.STREAM_CLOSE, Direction.OUT); } catch (Exception e) { + s_logger.info("[ignored]" + + "handling event close event failed on output: " + e.getLocalizedMessage()); } } @@ -216,6 +222,8 @@ public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper // Socket.shutdown(socket, Socket.APR_SHUTDOWN_READWRITE); Pool.destroy(pool); } catch (Exception e) { + s_logger.info("[ignored]" + + "failure during network cleanup: " + e.getLocalizedMessage()); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/bco/BcoSocketWrapperImpl.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/bco/BcoSocketWrapperImpl.java index 67e2dbd019e..eb5d7d00d3a 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/bco/BcoSocketWrapperImpl.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/bco/BcoSocketWrapperImpl.java @@ -22,6 +22,7 @@ import java.io.OutputStream; import java.security.SecureRandom; import java.security.Security; +import org.apache.log4j.Logger; import org.bouncycastle.asn1.x509.X509CertificateStructure; import org.bouncycastle.crypto.tls.CertificateVerifyer; import org.bouncycastle.crypto.tls.TlsProtocolHandler; @@ -34,6 +35,7 @@ import streamer.ssl.SSLState; @SuppressWarnings("deprecation") public class BcoSocketWrapperImpl extends SocketWrapperImpl { + private static final Logger s_logger = Logger.getLogger(BcoSocketWrapperImpl.class); static { Security.addProvider(new BouncyCastleProvider()); @@ -95,19 +97,27 @@ public class BcoSocketWrapperImpl extends SocketWrapperImpl { try { handleEvent(Event.STREAM_CLOSE, Direction.IN); } catch (Exception e) { + s_logger.info("[ignored]" + + "failure handling close event for bso input stream: " + e.getLocalizedMessage()); } try { handleEvent(Event.STREAM_CLOSE, Direction.OUT); } catch (Exception e) { + s_logger.info("[ignored]" + + "failure handling close event for bso output stream: " + e.getLocalizedMessage()); } try { if (bcoSslSocket != null) bcoSslSocket.close(); } catch (Exception e) { + s_logger.info("[ignored]" + + "failure handling close event for bso socket: " + e.getLocalizedMessage()); } try { socket.close(); } catch (Exception e) { + s_logger.info("[ignored]" + + "failure handling close event for socket: " + e.getLocalizedMessage()); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/FakeSource.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/FakeSource.java index 7f0c554cab0..41d6485be72 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/FakeSource.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/FakeSource.java @@ -16,6 +16,8 @@ // under the License. package streamer.debug; +import org.apache.log4j.Logger; + import streamer.BaseElement; import streamer.ByteBuffer; import streamer.Direction; @@ -25,6 +27,7 @@ import streamer.Link; import streamer.SyncLink; public class FakeSource extends BaseElement { + private static final Logger s_logger = Logger.getLogger(FakeSource.class); /** * Delay for null packets in poll method when blocking is requested, in @@ -66,6 +69,7 @@ public class FakeSource extends BaseElement { try { Thread.sleep(delay); } catch (InterruptedException e) { + s_logger.info("[ignored] interupted while creating latency", e); } } diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/MockServer.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/MockServer.java index 6b6acab6068..384ff5ee8b5 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/MockServer.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/debug/MockServer.java @@ -27,11 +27,14 @@ import java.util.Arrays; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; +import org.apache.log4j.Logger; + public class MockServer implements Runnable { + private static final Logger s_logger = Logger.getLogger(MockServer.class); private boolean shutdown = false; private ServerSocket serverSocket; - private Packet[] packets; + private final Packet[] packets; private Throwable exception; private boolean shutdowned; @@ -131,14 +134,20 @@ public class MockServer implements Runnable { try { is.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "in stream close failed: " + e.getLocalizedMessage()); } try { os.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "out stream close failed: " + e.getLocalizedMessage()); } try { serverSocket.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "server socket close failed: " + e.getLocalizedMessage()); } } } catch (Throwable e) { diff --git a/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java b/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java index 34e37c9b5dd..3462618fed9 100644 --- a/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java +++ b/services/console-proxy-rdp/rdpconsole/src/test/java/rdpclient/MockServerTest.java @@ -161,7 +161,8 @@ public class MockServerTest extends TestCase { final SSLSocketFactory sslSocketFactory = (SSLSocketFactory)SSLSocketFactory.getDefault(); SSLSocket sslSocket = (SSLSocket)sslSocketFactory.createSocket(socket, address.getHostName(), address.getPort(), true); - sslSocket.setEnabledCipherSuites(sslSocket.getSupportedCipherSuites()); + //sslSocket.setEnabledCipherSuites(sslSocket.getSupportedCipherSuites()); + sslSocket.setEnabledCipherSuites(new String[] { "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA" }); sslSocket.startHandshake(); InputStream is = sslSocket.getInputStream(); diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyAjaxHandler.java b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyAjaxHandler.java index fa0bd06c09e..f586c9361f1 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyAjaxHandler.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyAjaxHandler.java @@ -16,6 +16,8 @@ // under the License. package com.cloud.consoleproxy; +import static com.cloud.utils.AutoCloseableUtil.closeAutoCloseable; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -201,10 +203,7 @@ public class ConsoleProxyAjaxHandler implements HttpHandler { s_logger.warn("Exception while reading request body: ", e); } finally { if (closeStreamAfterRead) { - try { - is.close(); - } catch (IOException e) { - } + closeAutoCloseable(is, "error closing stream after read"); } } return sb.toString(); diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyClientBase.java b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyClientBase.java index 6568f4df0b5..100e00c5284 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyClientBase.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyClientBase.java @@ -230,6 +230,7 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons try { Thread.sleep(100); } catch (InterruptedException e) { + s_logger.debug("[ignored] Console proxy was interupted while waiting for viewer to become ready."); } } return false; @@ -260,18 +261,6 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons if (s_logger.isTraceEnabled()) s_logger.trace("Ajax client start, frame buffer w: " + width + ", " + height); - /* - int retry = 0; - tracker.initCoverageTest(); - while(!tracker.hasFullCoverage() && retry < 10) { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - retry++; - } - */ - List tiles = tracker.scan(true); String imgUrl = prepareAjaxImage(tiles, true); String updateUrl = prepareAjaxSession(true); @@ -353,6 +342,7 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons try { tileDirtyEvent.wait(3000); } catch (InterruptedException e) { + s_logger.debug("[ignored] Console proxy ajax update was interupted while waiting for viewer to become ready."); } } } diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyGCThread.java b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyGCThread.java index 7b22d4b74de..2e987d707e5 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyGCThread.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyGCThread.java @@ -33,7 +33,7 @@ public class ConsoleProxyGCThread extends Thread { private final static int MAX_SESSION_IDLE_SECONDS = 180; - private Hashtable connMap; + private final Hashtable connMap; private long lastLogScan = 0; public ConsoleProxyGCThread(Hashtable connMap) { @@ -54,6 +54,8 @@ public class ConsoleProxyGCThread extends Thread { try { file.delete(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "failed to delete file: " + e.getLocalizedMessage()); } } } @@ -109,6 +111,7 @@ public class ConsoleProxyGCThread extends Thread { try { Thread.sleep(5000); } catch (InterruptedException ex) { + s_logger.debug("[ignored] Console proxy was interupted during GC."); } } } diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/RdpBufferedImageCanvas.java b/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/RdpBufferedImageCanvas.java index 4214574a7e5..386a198dcb6 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/RdpBufferedImageCanvas.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/RdpBufferedImageCanvas.java @@ -25,6 +25,7 @@ import java.util.List; import com.cloud.consoleproxy.ConsoleProxyRdpClient; import com.cloud.consoleproxy.util.ImageHelper; +import com.cloud.consoleproxy.util.Logger; import com.cloud.consoleproxy.util.TileInfo; import com.cloud.consoleproxy.vnc.FrameBufferCanvas; @@ -35,6 +36,7 @@ public class RdpBufferedImageCanvas extends BufferedImageCanvas implements Frame * */ private static final long serialVersionUID = 1L; + private static final Logger s_logger = Logger.getLogger(RdpBufferedImageCanvas.class); private final ConsoleProxyRdpClient _rdpClient; @@ -66,6 +68,7 @@ public class RdpBufferedImageCanvas extends BufferedImageCanvas implements Frame try { imgBits = ImageHelper.jpegFromImage(bufferedImage); } catch (IOException e) { + s_logger.info("[ignored] read error on image", e); } return imgBits; @@ -91,6 +94,7 @@ public class RdpBufferedImageCanvas extends BufferedImageCanvas implements Frame try { imgBits = ImageHelper.jpegFromImage(bufferedImage); } catch (IOException e) { + s_logger.info("[ignored] read error on image tiles", e); } return imgBits; } diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/BufferedImageCanvas.java b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/BufferedImageCanvas.java index f2fb4bb6b69..e19a351bcd3 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/BufferedImageCanvas.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/BufferedImageCanvas.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.util.List; import com.cloud.consoleproxy.util.ImageHelper; +import com.cloud.consoleproxy.util.Logger; import com.cloud.consoleproxy.util.TileInfo; /** @@ -35,6 +36,7 @@ import com.cloud.consoleproxy.util.TileInfo; */ public class BufferedImageCanvas extends Canvas implements FrameBufferCanvas { private static final long serialVersionUID = 1L; + private static final Logger s_logger = Logger.getLogger(BufferedImageCanvas.class); // Offline screen buffer private BufferedImage offlineImage; @@ -42,7 +44,7 @@ public class BufferedImageCanvas extends Canvas implements FrameBufferCanvas { // Cached Graphics2D object for offline screen buffer private Graphics2D graphics; - private PaintNotificationListener listener; + private final PaintNotificationListener listener; public BufferedImageCanvas(PaintNotificationListener listener, int width, int height) { super(); @@ -59,7 +61,7 @@ public class BufferedImageCanvas extends Canvas implements FrameBufferCanvas { } public void setCanvasSize(int width, int height) { - this.offlineImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + offlineImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); graphics = offlineImage.createGraphics(); setSize(offlineImage.getWidth(), offlineImage.getHeight()); @@ -121,6 +123,7 @@ public class BufferedImageCanvas extends Canvas implements FrameBufferCanvas { try { imgBits = ImageHelper.jpegFromImage(bufferedImage); } catch (IOException e) { + s_logger.info("[ignored] read error on image", e); } return imgBits; } @@ -144,6 +147,7 @@ public class BufferedImageCanvas extends Canvas implements FrameBufferCanvas { try { imgBits = ImageHelper.jpegFromImage(bufferedImage); } catch (IOException e) { + s_logger.info("[ignored] read error on image tiles", e); } return imgBits; } diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncClient.java b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncClient.java index f470855bf41..e8b53a29b7b 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncClient.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncClient.java @@ -45,7 +45,7 @@ public class VncClient { private DataInputStream is; private DataOutputStream os; - private VncScreenDescription screen = new VncScreenDescription(); + private final VncScreenDescription screen = new VncScreenDescription(); private VncClientPacketSender sender; private VncServerPacketReceiver receiver; @@ -86,7 +86,7 @@ public class VncClient { } public VncClient(ConsoleProxyClientListener clientListener) { - this.noUI = true; + noUI = true; this.clientListener = clientListener; } @@ -108,6 +108,8 @@ public class VncClient { try { is.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "failed to close resource for input: " + e.getLocalizedMessage()); } } @@ -115,6 +117,8 @@ public class VncClient { try { os.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "failed to get close resource for output: " + e.getLocalizedMessage()); } } @@ -122,6 +126,8 @@ public class VncClient { try { socket.close(); } catch (Throwable e) { + s_logger.info("[ignored]" + + "failed to get close resource for socket: " + e.getLocalizedMessage()); } } } @@ -139,14 +145,14 @@ public class VncClient { } RawHTTP tunnel = new RawHTTP("CONNECT", host, port, path, session, useSSL); - this.socket = tunnel.connect(); + socket = tunnel.connect(); doConnect(sid); } public void connectTo(String host, int port, String password) throws UnknownHostException, IOException { // Connect to server s_logger.info("Connecting to VNC server " + host + ":" + port + "..."); - this.socket = new Socket(host, port); + socket = new Socket(host, port); doConnect(password); } @@ -187,7 +193,7 @@ public class VncClient { frame.setVisible(false); frame.dispose(); } - this.shutdown(); + shutdown(); } } diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/packet/server/RawRect.java b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/packet/server/RawRect.java index 81424fe3c50..37f0f9e0577 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/packet/server/RawRect.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/packet/server/RawRect.java @@ -23,9 +23,11 @@ import java.awt.image.DataBufferInt; import java.io.DataInputStream; import java.io.IOException; +import com.cloud.consoleproxy.util.Logger; import com.cloud.consoleproxy.vnc.VncScreenDescription; public class RawRect extends AbstractRect { + private static final Logger s_logger = Logger.getLogger(RawRect.class); private final int[] buf; public RawRect(VncScreenDescription screen, int x, int y, int width, int height, DataInputStream is) throws IOException { @@ -50,26 +52,27 @@ public class RawRect extends AbstractRect { switch (dataBuf.getDataType()) { - case DataBuffer.TYPE_INT: { - // We chose RGB888 model, so Raster will use DataBufferInt type - DataBufferInt dataBuffer = (DataBufferInt)dataBuf; + case DataBuffer.TYPE_INT: { + // We chose RGB888 model, so Raster will use DataBufferInt type + DataBufferInt dataBuffer = (DataBufferInt)dataBuf; - int imageWidth = image.getWidth(); - int imageHeight = image.getHeight(); + int imageWidth = image.getWidth(); + int imageHeight = image.getHeight(); - // Paint rectangle directly on buffer, line by line - int[] imageBuffer = dataBuffer.getData(); - for (int srcLine = 0, dstLine = y; srcLine < height && dstLine < imageHeight; srcLine++, dstLine++) { - try { - System.arraycopy(buf, srcLine * width, imageBuffer, x + dstLine * imageWidth, width); - } catch (IndexOutOfBoundsException e) { - } + // Paint rectangle directly on buffer, line by line + int[] imageBuffer = dataBuffer.getData(); + for (int srcLine = 0, dstLine = y; srcLine < height && dstLine < imageHeight; srcLine++, dstLine++) { + try { + System.arraycopy(buf, srcLine * width, imageBuffer, x + dstLine * imageWidth, width); + } catch (IndexOutOfBoundsException e) { + s_logger.info("[ignored] buffer overflow!?!", e); } - break; } + break; + } - default: - throw new RuntimeException("Unsupported data buffer in buffered image: expected data buffer of type int (DataBufferInt). Actual data buffer type: " + + default: + throw new RuntimeException("Unsupported data buffer in buffered image: expected data buffer of type int (DataBufferInt). Actual data buffer type: " + dataBuf.getClass().getSimpleName()); } } diff --git a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java index 75245101098..dd81809081a 100644 --- a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java +++ b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java @@ -101,6 +101,7 @@ import com.cloud.resource.ServerResource; import com.cloud.resource.UnableDeleteHostException; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.storage.Storage; import com.cloud.storage.UploadVO; import com.cloud.storage.VMTemplateVO; import com.cloud.storage.dao.SnapshotDao; @@ -111,7 +112,6 @@ import com.cloud.storage.secondary.SecStorageVmAlertEventArgs; import com.cloud.storage.secondary.SecondaryStorageListener; import com.cloud.storage.secondary.SecondaryStorageVmAllocator; import com.cloud.storage.secondary.SecondaryStorageVmManager; -import com.cloud.storage.Storage; import com.cloud.storage.template.TemplateConstants; import com.cloud.template.TemplateManager; import com.cloud.user.Account; @@ -1086,16 +1086,16 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : profile.getNics()) { int deviceId = nic.getDeviceId(); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { buf.append(" eth").append(deviceId).append("mask=").append("0.0.0.0"); buf.append(" eth").append(deviceId).append("ip=").append("0.0.0.0"); } else { - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); } if (nic.isDefaultNic()) { - buf.append(" gateway=").append(nic.getGateway()); + buf.append(" gateway=").append(nic.getIPv4Gateway()); } if (nic.getTrafficType() == TrafficType.Management) { String mgmt_cidr = _configDao.getValue(Config.ManagementNetwork.key()); @@ -1107,9 +1107,9 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar } else if (nic.getTrafficType() == TrafficType.Public) { buf.append(" public.network.device=").append("eth").append(deviceId); } else if (nic.getTrafficType() == TrafficType.Storage) { - buf.append(" storageip=").append(nic.getIp4Address()); - buf.append(" storagenetmask=").append(nic.getNetmask()); - buf.append(" storagegateway=").append(nic.getGateway()); + buf.append(" storageip=").append(nic.getIPv4Address()); + buf.append(" storagenetmask=").append(nic.getIPv4Netmask()); + buf.append(" storagegateway=").append(nic.getIPv4Gateway()); } } @@ -1147,11 +1147,11 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : nics) { if ((nic.getTrafficType() == TrafficType.Public && dc.getNetworkType() == NetworkType.Advanced) || (nic.getTrafficType() == TrafficType.Guest && (dc.getNetworkType() == NetworkType.Basic || dc.isSecurityGroupEnabled()))) { - secVm.setPublicIpAddress(nic.getIp4Address()); - secVm.setPublicNetmask(nic.getNetmask()); + secVm.setPublicIpAddress(nic.getIPv4Address()); + secVm.setPublicNetmask(nic.getIPv4Netmask()); secVm.setPublicMacAddress(nic.getMacAddress()); } else if (nic.getTrafficType() == TrafficType.Management) { - secVm.setPrivateIpAddress(nic.getIp4Address()); + secVm.setPrivateIpAddress(nic.getIPv4Address()); secVm.setPrivateMacAddress(nic.getMacAddress()); } } @@ -1167,7 +1167,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : profile.getNics()) { if (nic.getTrafficType() == TrafficType.Management) { managementNic = nic; - } else if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) { + } else if (nic.getTrafficType() == TrafficType.Control && nic.getIPv4Address() != null) { controlNic = nic; } } @@ -1185,7 +1185,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar controlNic = managementNic; } - CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922); + CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922); cmds.addCommand("checkSsh", check); return true; diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java index a529b879ff1..be5969104fd 100644 --- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java +++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java @@ -860,10 +860,12 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S return file.length(); } - processor.configure("template processor", new HashMap()); + Map params = new HashMap(); + params.put(StorageLayer.InstanceConfigKey, _storage); + processor.configure("template processor", params); return processor.getVirtualSize(file); } catch (Exception e) { - s_logger.warn("Failed to get virtual size, returning file size instead:", e); + s_logger.warn("Failed to get virtual size of file " + file.getPath() + ", returning file size instead: ", e); return file.length(); } diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java b/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java index 25c08871823..2e4bb740865 100644 --- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java +++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java @@ -41,13 +41,12 @@ import java.util.concurrent.Executors; import javax.ejb.Local; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.storage.command.DownloadCommand; import org.apache.cloudstack.storage.command.DownloadCommand.ResourceType; import org.apache.cloudstack.storage.command.DownloadProgressCommand; import org.apache.cloudstack.storage.command.DownloadProgressCommand.RequestType; import org.apache.cloudstack.storage.resource.SecondaryStorageResource; +import org.apache.log4j.Logger; import com.cloud.agent.api.storage.DownloadAnswer; import com.cloud.agent.api.storage.Proxy; @@ -67,9 +66,9 @@ import com.cloud.storage.template.Processor; import com.cloud.storage.template.Processor.FormatInfo; import com.cloud.storage.template.QCOW2Processor; import com.cloud.storage.template.RawImageProcessor; -import com.cloud.storage.template.TARProcessor; import com.cloud.storage.template.S3TemplateDownloader; import com.cloud.storage.template.ScpTemplateDownloader; +import com.cloud.storage.template.TARProcessor; import com.cloud.storage.template.TemplateConstants; import com.cloud.storage.template.TemplateDownloader; import com.cloud.storage.template.TemplateDownloader.DownloadCompleteCallback; @@ -83,6 +82,7 @@ import com.cloud.utils.component.ManagerBase; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.OutputInterpreter; import com.cloud.utils.script.Script; +import com.cloud.utils.storage.QCOW2Utils; @Local(value = DownloadManager.class) public class DownloadManagerImpl extends ManagerBase implements DownloadManager { @@ -129,10 +129,10 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager this.tmpltName = tmpltName; this.format = format; this.hvm = hvm; - description = descr; - checksum = cksum; + this.description = descr; + this.checksum = cksum; this.installPathPrefix = installPathPrefix; - templatesize = 0; + this.templatesize = 0; this.id = id; this.resourceType = resourceType; } @@ -276,11 +276,27 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager threadPool.execute(td); break; case DOWNLOAD_FINISHED: - if (!(td instanceof S3TemplateDownloader)) { - // we currently only create template.properties for NFS by - // running some post download script + if(td instanceof S3TemplateDownloader) { + // For S3 and Swift, which are considered "remote", + // as in the file cannot be accessed locally, + // we run the postRemoteDownload() method. td.setDownloadError("Download success, starting install "); - String result = postDownload(jobId); + String result = postRemoteDownload(jobId); + if (result != null) { + s_logger.error("Failed post download install: " + result); + td.setStatus(Status.UNRECOVERABLE_ERROR); + td.setDownloadError("Failed post download install: " + result); + ((S3TemplateDownloader) td).cleanupAfterError(); + } else { + td.setStatus(Status.POST_DOWNLOAD_FINISHED); + td.setDownloadError("Install completed successfully at " + new SimpleDateFormat().format(new Date())); + } + } + else { + // For other TemplateDownloaders where files are locally available, + // we run the postLocalDownload() method. + td.setDownloadError("Download success, starting install "); + String result = postLocalDownload(jobId); if (result != null) { s_logger.error("Failed post download script: " + result); td.setStatus(Status.UNRECOVERABLE_ERROR); @@ -289,17 +305,6 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager td.setStatus(Status.POST_DOWNLOAD_FINISHED); td.setDownloadError("Install completed successfully at " + new SimpleDateFormat().format(new Date())); } - } else { - // for s3 and swift, we skip post download step and just set - // status to trigger callback. - td.setStatus(Status.POST_DOWNLOAD_FINISHED); - // set template size for S3 - S3TemplateDownloader std = (S3TemplateDownloader)td; - long size = std.totalBytes; - DownloadJob dnld = jobs.get(jobId); - dnld.setTemplatesize(size); - dnld.setTemplatePhysicalSize(size); - dnld.setTmpltPath(std.getDownloadLocalPath()); // update template path to include file name. } dj.cleanup(); break; @@ -339,12 +344,48 @@ public class DownloadManagerImpl extends ManagerBase implements DownloadManager } /** - * Post download activity (install and cleanup). Executed in context of + * Post remote download activity (install and cleanup). Executed in context of the downloader thread. + */ + private String postRemoteDownload(String jobId) { + String result = null; + DownloadJob dnld = jobs.get(jobId); + S3TemplateDownloader td = (S3TemplateDownloader)dnld.getTemplateDownloader(); + + if (td.getFileExtension().equalsIgnoreCase("QCOW2")) { + // The QCOW2 is the only format with a header, + // and as such can be easily read. + + try { + InputStream inputStream = td.getS3ObjectInputStream(); + + dnld.setTemplatesize(QCOW2Utils.getVirtualSize(inputStream)); + + inputStream.close(); + } + catch (IOException e) { + result = "Couldn't read QCOW2 virtual size. Error: " + e.getMessage(); + } + + } + else { + // For the other formats, both the virtual + // and actual file size are set the same. + dnld.setTemplatesize(td.getTotalBytes()); + } + + dnld.setTemplatePhysicalSize(td.getTotalBytes()); + dnld.setTmpltPath(td.getDownloadLocalPath()); + + return result; + } + + /** + * Post local download activity (install and cleanup). Executed in context of * downloader thread * * @throws IOException */ - private String postDownload(String jobId) { + private String postLocalDownload(String jobId) { DownloadJob dnld = jobs.get(jobId); TemplateDownloader td = dnld.getTemplateDownloader(); String resourcePath = dnld.getInstallPathPrefix(); // path with mount diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql index 3f2ad023d26..0a96ea0ad9b 100644 --- a/setup/db/db/schema-421to430.sql +++ b/setup/db/db/schema-421to430.sql @@ -111,8 +111,7 @@ CREATE TABLE `cloud`.`async_job_join_map` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; #realhostip changes, before changing table and adding default value -UPDATE `cloud`.`configuration` SET value = CONCAT("*.",(SELECT `temptable`.`value` FROM (SELECT * FROM `cloud`.`configuration` WHERE `name`="consoleproxy.url.domain") AS `temptable` WHERE `temptable`.`name`="consoleproxy.url.domain")) WHERE `name`="consoleproxy.url.domain"; -UPDATE `cloud`.`configuration` SET `value` = CONCAT("*.",(SELECT `temptable`.`value` FROM (SELECT * FROM `cloud`.`configuration` WHERE `name`="secstorage.ssl.cert.domain") AS `temptable` WHERE `temptable`.`name`="secstorage.ssl.cert.domain")) WHERE `name`="secstorage.ssl.cert.domain"; +UPDATE `cloud`.`configuration` SET value=CONCAT("*.",value) WHERE `name`="consoleproxy.url.domain" OR `name`="secstorage.ssl.cert.domain"; ALTER TABLE `cloud`.`configuration` ADD COLUMN `default_value` VARCHAR(4095) COMMENT 'Default value for a configuration parameter'; ALTER TABLE `cloud`.`configuration` ADD COLUMN `updated` datetime COMMENT 'Time this was updated by the server. null means this row is obsolete.'; diff --git a/setup/db/db/schema-451to452.sql b/setup/db/db/schema-451to452.sql index 5c89008a83e..d0aeabf3d1b 100644 --- a/setup/db/db/schema-451to452.sql +++ b/setup/db/db/schema-451to452.sql @@ -33,3 +33,7 @@ CREATE TABLE `cloud`.`saml_token` ( PRIMARY KEY (`id`), CONSTRAINT `fk_saml_token__domain_id` FOREIGN KEY(`domain_id`) REFERENCES `domain`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +SET foreign_key_checks = 0; +ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned UNIQUE NOT NULL; +SET foreign_key_checks = 1; diff --git a/setup/db/db/schema-452to460-cleanup.sql b/setup/db/db/schema-452to460-cleanup.sql index 4bbaa95afc5..db5ce1197ac 100644 --- a/setup/db/db/schema-452to460-cleanup.sql +++ b/setup/db/db/schema-452to460-cleanup.sql @@ -16,5 +16,8 @@ -- under the License. -- --- Schema cleanup from 4.5.1 to 4.6.0 +-- Schema cleanup from 4.5.2 to 4.6.0 -- + +DELETE FROM `cloud`.`configuration` where name='router.reboot.when.outofband.migrated'; + diff --git a/setup/db/db/schema-452to460.sql b/setup/db/db/schema-452to460.sql index 0abd4f80408..5887e538904 100644 --- a/setup/db/db/schema-452to460.sql +++ b/setup/db/db/schema-452to460.sql @@ -354,6 +354,10 @@ CREATE VIEW `cloud`.`user_vm_view` AS left join `cloud`.`user_vm_details` `custom_ram_size` ON (((`custom_ram_size`.`vm_id` = `cloud`.`vm_instance`.`id`) and (`custom_ram_size`.`name` = 'memory'))); +---Additional checks to ensure duplicate keys are not registered and remove the previously stored duplicate keys. +DELETE `s1` FROM `ssh_keypairs` `s1`, `ssh_keypairs` `s2` WHERE `s1`.`id` > `s2`.`id` AND `s1`.`public_key` = `s2`.`public_key` AND `s1`.`account_id` = `s2`.`account_id`; +ALTER TABLE `ssh_keypairs` ADD UNIQUE `unique_index`(`fingerprint`,`account_id`); + -- ovm3 stuff INSERT INTO `cloud`.`guest_os_hypervisor` (hypervisor_type, guest_os_name, guest_os_id) VALUES ("Ovm3", 'Sun Solaris 10(32-bit)', 79); INSERT INTO `cloud`.`guest_os_hypervisor` (hypervisor_type, guest_os_name, guest_os_id) VALUES ("Ovm3", 'Sun Solaris 10(64-bit)', 80); @@ -398,3 +402,14 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` ( CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `cloud`.`ldap_trust_map` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `domain_id` bigint unsigned NOT NULL, + `type` varchar(10) NOT NULL, + `name` varchar(255) NOT NULL, + `account_type` int(1) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_ldap_trust_map__domain_id` (`domain_id`), + CONSTRAINT `fk_ldap_trust_map__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg index 53a8221b834..8109bb1d897 100644 --- a/setup/dev/advanced.cfg +++ b/setup/dev/advanced.cfg @@ -211,6 +211,10 @@ { "name": "direct.agent.load.size", "value": "1000" + }, + { + "name": "enable.dynamic.scale.vm", + "value": "true" } ], "mgtSvr": [ diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 711d575f908..934ba9caf7b 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -1339,6 +1339,10 @@ start() { dhcpsrvr) [ "$NAME" == "" ] && NAME=dhcpsrvr setup_dhcpsrvr + if [ -x /opt/cloud/bin/update_config.py ] + then + /opt/cloud/bin/update_config.py cmd_line.json + fi ;; secstorage) [ "$NAME" == "" ] && NAME=secstorage diff --git a/systemvm/patches/debian/config/etc/iptables/iptables-router b/systemvm/patches/debian/config/etc/iptables/iptables-router index 0f82d20cd2a..b49b6b2f244 100644 --- a/systemvm/patches/debian/config/etc/iptables/iptables-router +++ b/systemvm/patches/debian/config/etc/iptables/iptables-router @@ -36,7 +36,7 @@ COMMIT -A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT --A INPUT -i eth1 -p tcp -m tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth1 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 80 -j ACCEPT -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT diff --git a/systemvm/patches/debian/config/etc/iptables/iptables-vpcrouter b/systemvm/patches/debian/config/etc/iptables/iptables-vpcrouter index 18a3510f120..1c40493917b 100644 --- a/systemvm/patches/debian/config/etc/iptables/iptables-vpcrouter +++ b/systemvm/patches/debian/config/etc/iptables/iptables-vpcrouter @@ -28,7 +28,7 @@ COMMIT -A INPUT -d 225.0.0.50/32 -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT --A INPUT -i eth0 -p tcp -m tcp -m state --state NEW --dport 3922 -j ACCEPT +-A INPUT -i eth0 -p tcp -m tcp -m state --state NEW,ESTABLISHED --dport 3922 -j ACCEPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT COMMIT diff --git a/systemvm/patches/debian/config/opt/cloud/bin/configure.py b/systemvm/patches/debian/config/opt/cloud/bin/configure.py index 2e8be9af453..49dbb9c5ac4 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/configure.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/configure.py @@ -28,6 +28,7 @@ import re import time import shutil import os.path +import os from fcntl import flock, LOCK_EX, LOCK_UN from cs.CsDatabag import CsDataBag, CsCmdLine @@ -425,10 +426,10 @@ class CsSite2SiteVpn(CsDataBag): CsHelper.execute("ipsec auto --rereadall") def configure_iptables(self, dev, obj): - self.fw.append(["", "front", "-A INPUT -i %s -p udp -m udp --dport 500 -j ACCEPT" % dev]) - self.fw.append(["", "front", "-A INPUT -i %s -p udp -m udp --dport 4500 -j ACCEPT" % dev]) - self.fw.append(["", "front", "-A INPUT -i %s -p esp -j ACCEPT" % dev]) - self.fw.append(["nat", "front", "-A POSTROUTING -t nat -o %s-m mark --set-xmark 0x525/0xffffffff -j ACCEPT" % dev]) + self.fw.append(["", "front", "-A INPUT -i %s -p udp -m udp --dport 500 -s %s -d %s -j ACCEPT" % (dev, obj['peer_gateway_ip'], obj['local_public_ip'])]) + self.fw.append(["", "front", "-A INPUT -i %s -p udp -m udp --dport 4500 -s %s -d %s -j ACCEPT" % (dev, obj['peer_gateway_ip'], obj['local_public_ip'])]) + self.fw.append(["", "front", "-A INPUT -i %s -p esp -s %s -d %s -j ACCEPT" % (dev, obj['peer_gateway_ip'], obj['local_public_ip'])]) + self.fw.append(["nat", "front", "-A POSTROUTING -t nat -o %s -m mark --mark 0x525 -j ACCEPT" % dev]) for net in obj['peer_guest_cidr_list'].lstrip().rstrip().split(','): self.fw.append(["mangle", "front", "-A FORWARD -s %s -d %s -j MARK --set-xmark 0x525/0xffffffff" % (obj['local_guest_cidr'], net)]) @@ -453,17 +454,17 @@ class CsSite2SiteVpn(CsDataBag): file.addeq(" leftsubnet=%s" % obj['local_guest_cidr']) file.addeq(" leftnexthop=%s" % obj['local_public_gateway']) file.addeq(" right=%s" % rightpeer) - file.addeq(" rightsubnets=%s" % peerlist) + file.addeq(" rightsubnets={%s}" % peerlist) file.addeq(" type=tunnel") file.addeq(" authby=secret") file.addeq(" keyexchange=ike") file.addeq(" ike=%s" % obj['ike_policy']) file.addeq(" ikelifetime=%s" % self.convert_sec_to_h(obj['ike_lifetime'])) - file.addeq(" esp=%s" % self.convert_sec_to_h(obj['esp_lifetime'])) + file.addeq(" esp=%s" % obj['esp_policy']) file.addeq(" salifetime=%s" % self.convert_sec_to_h(obj['esp_lifetime'])) file.addeq(" pfs=%s" % CsHelper.bool_to_yn(obj['dpd'])) file.addeq(" keyingtries=2") - file.addeq(" auto=add") + file.addeq(" auto=start") if obj['dpd']: file.addeq(" dpddelay=30") file.addeq(" dpdtimeout=120") @@ -484,6 +485,170 @@ class CsSite2SiteVpn(CsDataBag): hrs = int(val) / 3600 return "%sh" % hrs +class CsVpnUser(CsDataBag): + PPP_CHAP='/etc/ppp/chap-secrets' + + def process(self): + for user in self.dbag: + if user == 'id': + continue + + userconfig=self.dbag[user] + if userconfig['add']: + self.add_l2tp_ipsec_user(user, userconfig) + else: + self.del_l2tp_ipsec_user(user, userconfig) + + def add_l2tp_ipsec_user(self, user, obj): + userfound = False + password = obj['password'] + + userSearchEntry = "%s \* %s \*"%(user,password) + userAddEntry = "%s * %s *" %(user,password) + logging.debug("Adding vpn user %s" %userSearchEntry) + + file = CsFile(self.PPP_CHAP) + userfound = file.searchString(userSearchEntry, '#') + if not userfound: + logging.debug("User is not there already, so adding user ") + self.del_l2tp_ipsec_user(user, obj) + file.add(userAddEntry) + file.commit() + + + def del_l2tp_ipsec_user(self, user, obj): + userfound = False + password = obj['password'] + userentry = "%s \* %s \*"%(user,password) + + logging.debug("Deleting the user %s " % user) + file = CsFile(self.PPP_CHAP) + file.deleteLine(userentry) + file.commit() + + if not os.path.exists('/var/run/pppd2.tdb'): + return + + logging.debug("kiing the PPPD process for the user %s " % user) + + fileContents = CsHelper.execute("tdbdump /var/run/pppd2.tdb") + print fileContents + + for line in fileContents: + if user in line: + contentlist = line.split(';') + for str in contentlist: + print 'in del_l2tp str = '+ str + pppd = str.split('=')[0] + if pppd == 'PPPD_PID': + pid = str.split('=')[1] + if pid: + logging.debug("killing process %s" %pid) + CsHelper.execute('kill -9 %s' % pid) + + + +class CsRemoteAccessVpn(CsDataBag): + VPNCONFDIR = "/etc/ipsec.d" + + def process(self): + self.confips = [] + + logging.debug(self.dbag) + for public_ip in self.dbag: + if public_ip == "id": + continue + vpnconfig=self.dbag[public_ip] + + #Enable remote access vpn + if vpnconfig['create']: + logging.debug("Enabling remote access vpn on "+ public_ip) + self.configure_l2tpIpsec(public_ip, self.dbag[public_ip]) + logging.debug("Remote accessvpn data bag %s", self.dbag) + self.remoteaccessvpn_iptables(public_ip, self.dbag[public_ip]) + + CsHelper.execute("ipsec auto --rereadall") + CsHelper.execute("service xl2tpd stop") + CsHelper.execute("service xl2tpd start") + CsHelper.execute("ipsec auto --rereadsecrets") + CsHelper.execute("ipsec auto --replace L2TP-PSK") + else: + logging.debug("Disabling remote access vpn .....") + #disable remote access vpn + CsHelper.execute("ipsec auto --down L2TP-PSK") + CsHelper.execute("service xl2tpd stop") + + + def configure_l2tpIpsec(self, left, obj): + vpnconffile="%s/l2tp.conf" % (self.VPNCONFDIR) + vpnsecretfilte="%s/ipsec.any.secrets" % (self.VPNCONFDIR) + xl2tpdconffile="/etc/xl2tpd/xl2tpd.conf" + xl2tpoptionsfile='/etc/ppp/options.xl2tpd' + + file = CsFile(vpnconffile) + localip=obj['local_ip'] + localcidr=obj['local_cidr'] + publicIface=obj['public_interface'] + iprange=obj['ip_range'] + psk=obj['preshared_key'] + + #left + file.addeq(" left=%s" % left) + file.commit() + + + secret = CsFile(vpnsecretfilte) + secret.addeq(": PSK \"%s\"" %psk) + secret.commit() + + xl2tpdconf = CsFile(xl2tpdconffile) + xl2tpdconf.addeq("ip range = %s" %iprange) + xl2tpdconf.addeq("local ip = %s" %localip) + xl2tpdconf.commit() + + xl2tpoptions=CsFile(xl2tpoptionsfile) + xl2tpoptions.search("ms-dns ", "ms-dns %s" %localip) + xl2tpoptions.commit() + + def remoteaccessvpn_iptables(self, publicip, obj): + publicdev=obj['public_interface'] + localcidr=obj['local_cidr'] + local_ip=obj['local_ip'] + + + self.fw.append(["", "", "-A INPUT -i %s --dst %s -p udp -m udp --dport 500 -j ACCEPT" % (publicdev, publicip)]) + self.fw.append(["", "", "-A INPUT -i %s --dst %s -p udp -m udp --dport 4500 -j ACCEPT" % (publicdev, publicip)]) + self.fw.append(["", "", "-A INPUT -i %s --dst %s -p udp -m udp --dport 1701 -j ACCEPT" % (publicdev, publicip)]) + self.fw.append(["", "", "-A INPUT -i %s -p ah -j ACCEPT" % publicdev]) + self.fw.append(["", "", "-A INPUT -i %s -p esp -j ACCEPT" % publicdev]) + + if self.config.is_vpc(): + self.fw.append(["", ""," -N VPN_FORWARD"]) + self.fw.append(["", "","-I FORWARD -i ppp+ -j VPN_FORWARD"]) + self.fw.append(["", "","-I FORWARD -o ppp+ -j VPN_FORWARD"]) + self.fw.append(["", "","-I FORWARD -o ppp+ -j VPN_FORWARD"]) + self.fw.append(["", "","-A VPN_FORWARD -s %s -j RETURN" %localcidr]) + self.fw.append(["", "","-A VPN_FORWARD -i ppp+ -d %s -j RETURN" %localcidr]) + self.fw.append(["", "","-A VPN_FORWARD -i ppp+ -o ppp+ -j RETURN"]) + else: + self.fw.append(["", "","-A FORWARD -i ppp+ -o ppp+ -j ACCEPT"]) + self.fw.append(["", "","-A FORWARD -s %s -o ppp+ -j ACCEPT" % localcidr]) + self.fw.append(["", "","-A FORWARD -i ppp+ -d %s -j ACCEPT" % localcidr]) + + + self.fw.append(["", "","-A INPUT -i ppp+ -m udp -p udp --dport 53 -j ACCEPT"]) + self.fw.append(["", "","-A INPUT -i ppp+ -m tcp -p tcp --dport 53 -j ACCEPT"]) + self.fw.append(["nat", "","-I PREROUTING -i ppp+ -m tcp --dport 53 -j DNAT --to-destination %s" % local_ip]) + + if self.config.is_vpc(): + return + + self.fw.append(["mangle", "","-N VPN_%s " %publicip]) + self.fw.append(["mangle", "","-A VPN_%s -j RETURN " % publicip]) + self.fw.append(["mangle", "","-I VPN_%s -p ah -j ACCEPT " % publicip]) + self.fw.append(["mangle", "","-I VPN_%s -p esp -j ACCEPT " % publicip]) + self.fw.append(["mangle", "","-I PREROUTING -d %s -j VPN_%s " % (publicip, publicip)]) + class CsForwardingRules(CsDataBag): @@ -585,7 +750,7 @@ class CsForwardingRules(CsDataBag): rule['protocol'], self.portsToString(rule['public_ports'], ':'), ) - fw7 = "-A FORWARD -i %s -o %s -p %s -m %s --dport %s -m state --state NEW -j ACCEPT" % \ + fw7 = "-A FORWARD -i %s -o %s -p %s -m %s --dport %s -m state --state NEW,ESTABLISHED -j ACCEPT" % \ ( self.getDeviceByIp(rule['public_ip']), self.getDeviceByIp(rule['internal_ip']), @@ -599,7 +764,7 @@ class CsForwardingRules(CsDataBag): self.fw.append(["nat", "", fw4]) self.fw.append(["nat", "", fw5]) self.fw.append(["nat", "", fw6]) - self.fw.append(["", "", fw7]) + self.fw.append(["filter", "", fw7]) def forward_vpc(self, rule): fw_prerout_rule = "-A PREROUTING -d %s/32 -i %s" % (rule["public_ip"], self.getDeviceByIp(rule['public_ip'])) @@ -672,18 +837,20 @@ def main(argv): fwd = CsForwardingRules("forwardingrules", config) fwd.process() - nf = CsNetfilters() - nf.compare(config.get_fw()) - red = CsRedundant(config) red.set() - nf = CsNetfilters() - nf.compare(config.get_fw()) - vpns = CsSite2SiteVpn("site2sitevpn", config) vpns.process() + #remote access vpn + rvpn = CsRemoteAccessVpn("remoteaccessvpn", config) + rvpn.process() + + #remote access vpn users + vpnuser = CsVpnUser("vpnuserlist", config) + vpnuser.process() + dhcp = CsDhcp("dhcpentry", config) dhcp.process() @@ -693,6 +860,9 @@ def main(argv): mon = CsMonitor("monitorservice", config) mon.process() + nf = CsNetfilters() + nf.compare(config.get_fw()) + # Save iptables configuration - will be loaded on reboot by the iptables-restore that is configured on /etc/rc.local CsHelper.save_iptables("iptables-save", "/etc/iptables/router_rules.v4") CsHelper.save_iptables("ip6tables-save", "/etc/iptables/router_rules.v6") diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py index 62a4a8a9eb3..e97abacb912 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py @@ -95,26 +95,73 @@ class CsAddress(CsDataBag): return ip return None + def check_if_link_exists(self,dev): + cmd="ip link show dev %s"%dev + result=CsHelper.execute(cmd) + if(len(result)!=0): + return True + else: + return False + + def check_if_link_up(self,dev): + cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev + result=CsHelper.execute(cmd) + if(result[0].lower()=="up"): + return True + else: + return False + + def process(self): + route = CsRoute() + for dev in self.dbag: if dev == "id": continue ip = CsIP(dev, self.config) + for address in self.dbag[dev]: - if not address["nw_type"] == "control": - CsRoute(dev).add(address) + if(address["nw_type"]!="public"): + continue + + #check if link is up + if (not self.check_if_link_exists(dev)): + logging.info("link %s does not exist, so not processing"%dev) + continue + if not self.check_if_link_up(dev): + cmd="ip link set %s up"%dev + CsHelper.execute(cmd) + + network = str(address["network"]) + ip.setAddress(address) + if ip.configured(): - logging.info("Address %s on device %s already configured", ip.ip(), dev) + logging.info( + "Address %s on device %s already configured", ip.ip(), dev) + ip.post_configure() + else: - logging.info("Address %s on device %s not configured", ip.ip(), dev) + logging.info( + "Address %s on device %s not configured", ip.ip(), dev) if CsDevice(dev, self.config).waitfordevice(): ip.configure() + route.add_route(dev, network) + + # once we start processing public ip's we need to verify there + # is a default route and add if needed + if not route.defaultroute_exists(): + cmdline=self.config.get_cmdline_instance() + if(cmdline.get_gateway()): + route.add_defaultroute(cmdline.get_gateway()) + class CsInterface: + """ Hold one single ip """ + def __init__(self, o, config): self.address = o self.config = config @@ -189,7 +236,9 @@ class CsInterface: class CsDevice: + """ Configure Network Devices """ + def __init__(self, dev, config): self.devlist = [] self.dev = dev @@ -229,7 +278,8 @@ class CsDevice: time.sleep(1) count += 1 self.buildlist() - logging.error("Device %s cannot be configured - device was not found", self.dev) + logging.error( + "Device %s cannot be configured - device was not found", self.dev) return False def list(self): @@ -255,7 +305,8 @@ class CsIP: return self.address def configure(self): - logging.info("Configuring address %s on device %s", self.ip(), self.dev) + logging.info( + "Configuring address %s on device %s", self.ip(), self.dev) cmd = "ip addr add dev %s %s brd +" % (self.dev, self.ip()) subprocess.call(cmd, shell=True) self.post_configure() @@ -263,8 +314,8 @@ class CsIP: def post_configure(self): """ The steps that must be done after a device is configured """ if not self.get_type() in ["control"]: - route = CsRoute(self.dev) - route.routeTable() + route = CsRoute() + route.add_table(self.dev) CsRule(self.dev).addMark() self.check_is_up() self.set_mark() @@ -272,6 +323,10 @@ class CsIP: CsRpsrfs(self.dev).enable() self.post_config_change("add") + '''For isolated/redundant and dhcpsrvr routers, call this method after the post_config is complete ''' + if not self.config.is_vpc(): + self.setup_router_control() + def check_is_up(self): """ Ensure device is up """ cmd = "ip link show %s | grep 'state DOWN'" % self.getDevice() @@ -288,7 +343,7 @@ class CsIP: def set_mark(self): cmd = "-A PREROUTING -i %s -m state --state NEW -j CONNMARK --set-xmark %s/0xffffffff" % \ - (self.getDevice(), self.dnum) + (self.getDevice(), self.dnum) self.fw.append(["mangle", "", cmd]) def get_type(self): @@ -309,6 +364,19 @@ class CsIP: return self.address['public_ip'] return "unknown" + def setup_router_control(self): + if self.config.is_vpc(): + return + + self.fw.append( + ["filter", "", "-A FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT"]) + self.fw.append( + ["filter", "", "-A INPUT -i eth1 -p tcp -m tcp --dport 3922 -m state --state NEW,ESTABLISHED -j ACCEPT"]) + + self.fw.append(["filter", "", "-P INPUT DROP"]) + self.fw.append(["filter", "", "-P FORWARD DROP"]) + + def fw_router(self): if self.config.is_vpc(): return @@ -340,33 +408,41 @@ class CsIP: self.fw.append(["mangle", "", "-A PREROUTING -i %s -m state --state NEW " % self.dev + "-j CONNMARK --set-xmark %s/0xffffffff" % self.dnum]) - self.fw.append(["mangle", "", "-A FIREWALL_%s -j DROP" % self.address['public_ip']]) + self.fw.append( + ["mangle", "", "-A FIREWALL_%s -j DROP" % self.address['public_ip']]) self.fw.append(["filter", "", "-A INPUT -d 224.0.0.18/32 -j ACCEPT"]) self.fw.append(["filter", "", "-A INPUT -d 225.0.0.50/32 -j ACCEPT"]) self.fw.append(["filter", "", "-A INPUT -i %s -m state --state RELATED,ESTABLISHED -j ACCEPT" % - self.dev]) + self.dev]) self.fw.append(["filter", "", "-A INPUT -p icmp -j ACCEPT"]) self.fw.append(["filter", "", "-A INPUT -i lo -j ACCEPT"]) if self.get_type() in ["guest"]: - self.fw.append(["filter", "", "-A INPUT -i %s -p udp -m udp --dport 67 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p udp -m udp --dport 53 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 53 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A FORWARD -i %s -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A FORWARD -i %s -o %s -m state --state NEW -j ACCEPT" % (self.dev, self.dev)]) - self.fw.append(["filter", "", "-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT"]) - self.fw.append(["filter", "", "-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT"]) - self.fw.append(["filter", "", "-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND"]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p udp -m udp --dport 67 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p udp -m udp --dport 53 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 53 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A FORWARD -i %s -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A FORWARD -i %s -o %s -m state --state NEW -j ACCEPT" % (self.dev, self.dev)]) + self.fw.append( + ["filter", "", "-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT"]) + self.fw.append( + ["filter", "", "-A FORWARD -i eth0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT"]) + self.fw.append( + ["filter", "", "-A FORWARD -i eth0 -o eth2 -j FW_OUTBOUND"]) self.fw.append(["mangle", "", "-A PREROUTING -i %s -m state --state NEW " % self.dev + "-j CONNMARK --set-xmark %s/0xffffffff" % self.dnum]) - if self.get_type() in ["control"]: - self.fw.append(["filter", "", "-A FW_OUTBOUND -m state --state RELATED,ESTABLISHED -j ACCEPT"]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 3922 -m state --state NEW -j ACCEPT" % self.dev]) self.fw.append(['', 'front', '-A FORWARD -j NETWORK_STATS']) self.fw.append(['', 'front', '-A INPUT -j NETWORK_STATS']) self.fw.append(['', 'front', '-A OUTPUT -j NETWORK_STATS']) @@ -374,7 +450,7 @@ class CsIP: self.fw.append(['', '', '-A NETWORK_STATS -i eth2 -o eth0']) self.fw.append(['', '', '-A NETWORK_STATS -o eth2 ! -i eth0 -p tcp']) self.fw.append(['', '', '-A NETWORK_STATS -i eth2 ! -o eth0 -p tcp']) - + def fw_vpcrouter(self): if not self.config.is_vpc(): return @@ -382,37 +458,55 @@ class CsIP: "-m state --state RELATED,ESTABLISHED " + "-j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff"]) if self.get_type() in ["guest"]: - self.fw.append(["filter", "", "-A FORWARD -d %s -o %s -j ACL_INBOUND_%s" % (self.address['network'], self.dev, self.dev)]) - self.fw.append(["filter", "front", "-A ACL_INBOUND_%s -d 224.0.0.18/32 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "front", "-A ACL_INBOUND_%s -d 225.0.0.50/32 -j ACCEPT" % self.dev]) - self.fw.append(["mangle", "front", "-A ACL_OUTBOUND_%s -d 225.0.0.50/32 -j ACCEPT" % self.dev]) - self.fw.append(["mangle", "front", "-A ACL_OUTBOUND_%s -d 224.0.0.18/32 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p udp -m udp --dport 67 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p udp -m udp --dport 53 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 53 -j ACCEPT" % self.dev]) + self.fw.append(["filter", "", "-A FORWARD -d %s -o %s -j ACL_INBOUND_%s" % + (self.address['network'], self.dev, self.dev)]) + self.fw.append( + ["filter", "front", "-A ACL_INBOUND_%s -d 224.0.0.18/32 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "front", "-A ACL_INBOUND_%s -d 225.0.0.50/32 -j ACCEPT" % self.dev]) + self.fw.append( + ["mangle", "front", "-A ACL_OUTBOUND_%s -d 225.0.0.50/32 -j ACCEPT" % self.dev]) + self.fw.append( + ["mangle", "front", "-A ACL_OUTBOUND_%s -d 224.0.0.18/32 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p udp -m udp --dport 67 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p udp -m udp --dport 53 -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 53 -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" % self.dev]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" % self.dev]) + self.fw.append( + ["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT" % self.dev]) self.fw.append(["mangle", "", "-A PREROUTING -m state --state NEW -i %s -s %s ! -d %s/32 -j ACL_OUTBOUND_%s" % - (self.dev, self.address['network'], self.address['gateway'], self.dev) + (self.dev, self.address[ + 'network'], self.address['gateway'], self.dev) ]) - self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -s %s" % ("eth1", "eth1", self.address['network'])]) - self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -d %s" % ("eth1", "eth1", self.address['network'])]) + self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -s %s" % + ("eth1", "eth1", self.address['network'])]) + self.fw.append(["", "front", "-A NETWORK_STATS_%s -o %s -d %s" % + ("eth1", "eth1", self.address['network'])]) self.fw.append(["nat", "front", "-A POSTROUTING -s %s -o %s -j SNAT --to-source %s" % - (self.address['network'], self.dev, - self.address['public_ip']) + (self.address['network'], self.dev, + self.address['public_ip']) ]) if self.get_type() in ["public"]: self.fw.append(["", "front", - "-A FORWARD -o %s -d %s -j ACL_INBOUND_%s" % (self.dev, self.address['network'], self.dev) + "-A FORWARD -o %s -d %s -j ACL_INBOUND_%s" % ( + self.dev, self.address['network'], self.dev) ]) - self.fw.append(["mangle", "", "-A FORWARD -j VPN_STATS_%s" % self.dev]) - self.fw.append(["mangle", "", "-A VPN_STATS_%s -o %s -m mark --mark 0x525/0xffffffff" % (self.dev, self.dev)]) - self.fw.append(["mangle", "", "-A VPN_STATS_%s -i %s -m mark --mark 0x524/0xffffffff" % (self.dev, self.dev)]) - self.fw.append(["", "front", "-A FORWARD -j NETWORK_STATS_%s" % self.dev]) + self.fw.append( + ["mangle", "", "-A FORWARD -j VPN_STATS_%s" % self.dev]) + self.fw.append( + ["mangle", "", "-A VPN_STATS_%s -o %s -m mark --mark 0x525/0xffffffff" % (self.dev, self.dev)]) + self.fw.append( + ["mangle", "", "-A VPN_STATS_%s -i %s -m mark --mark 0x524/0xffffffff" % (self.dev, self.dev)]) + self.fw.append( + ["", "front", "-A FORWARD -j NETWORK_STATS_%s" % self.dev]) self.fw.append(["", "front", "-A FORWARD -j NETWORK_STATS"]) self.fw.append(["", "front", "-A INPUT -j NETWORK_STATS"]) @@ -422,19 +516,30 @@ class CsIP: self.fw.append(["", "", "-A NETWORK_STATS -i eth2 -o eth0 -p tcp"]) self.fw.append(["", "", "-A NETWORK_STATS ! -i eth0 -o eth2 -p tcp"]) self.fw.append(["", "", "-A NETWORK_STATS -i eth2 ! -o eth0 -p tcp"]) + + self.fw.append(["filter", "", "-A INPUT -i eth0 -p tcp -m tcp --dport 3922 -m state --state NEW,ESTABLISHED -j ACCEPT"]) + + self.fw.append(["filter", "", "-P INPUT DROP"]) + self.fw.append(["filter", "", "-P FORWARD DROP"]) def post_config_change(self, method): - route = CsRoute(self.dev) - route.routeTable() - route.add(self.address, method) + route = CsRoute() + if method == "add": + route.add_table(self.dev) + route.add_route(self.dev, str(self.address["network"])) + elif method == "delete": + logging.warn("delete route not implemented") + self.fw_router() self.fw_vpcrouter() + # On deletion nw_type will no longer be known if self.get_type() in ["guest"] and self.config.is_vpc(): CsDevice(self.dev, self.config).configure_rp() - logging.error("Not able to setup sourcenat for a regular router yet") + logging.error( + "Not able to setup sourcenat for a regular router yet") dns = CsDnsmasq(self) dns.add_firewall_rules() app = CsApache(self) @@ -447,8 +552,10 @@ class CsIP: if self.get_type() == "public" and self.config.is_vpc(): if self.address["source_nat"]: vpccidr = self.config.cmdline().get_vpccidr() - self.fw.append(["filter", "", "-A FORWARD -s %s ! -d %s -j ACCEPT" % (vpccidr, vpccidr)]) - self.fw.append(["nat", "", "-A POSTROUTING -j SNAT -o %s --to-source %s" % (self.dev, self.address['public_ip'])]) + self.fw.append( + ["filter", "", "-A FORWARD -s %s ! -d %s -j ACCEPT" % (vpccidr, vpccidr)]) + self.fw.append( + ["nat", "", "-A POSTROUTING -j SNAT -o %s --to-source %s" % (self.dev, self.address['public_ip'])]) def list(self): self.iplist = {} @@ -486,20 +593,23 @@ class CsIP: return ip in self.address.values() def arpPing(self): - cmd = "arping -c 1 -I %s -A -U -s %s %s" % (self.dev, self.address['public_ip'], self.address['public_ip']) + cmd = "arping -c 1 -I %s -A -U -s %s %s" % ( + self.dev, self.address['public_ip'], self.address['public_ip']) CsHelper.execute(cmd) # Delete any ips that are configured but not in the bag def compare(self, bag): if len(self.iplist) > 0 and (self.dev not in bag.keys() or len(bag[self.dev]) == 0): # Remove all IPs on this device - logging.info("Will remove all configured addresses on device %s", self.dev) + logging.info( + "Will remove all configured addresses on device %s", self.dev) self.delete("all") app = CsApache(self) app.remove() # This condition should not really happen but did :) - # It means an apache file got orphaned after a guest network address was deleted + # It means an apache file got orphaned after a guest network address + # was deleted if len(self.iplist) == 0 and (self.dev not in bag.keys() or len(bag[self.dev]) == 0): app = CsApache(self) app.remove() @@ -542,6 +652,7 @@ class CsIP: class CsRpsrfs: + """ Configure rpsrfs if there is more than one cpu """ def __init__(self, dev): @@ -556,7 +667,8 @@ class CsRpsrfs: val = format((1 << cpus) - 1, "x") filename = "/sys/class/net/%s/queues/rx-0/rps_cpus" % (self.dev) CsHelper.updatefile(filename, val, "w+") - CsHelper.updatefile("/proc/sys/net/core/rps_sock_flow_entries", "256", "w+") + CsHelper.updatefile( + "/proc/sys/net/core/rps_sock_flow_entries", "256", "w+") filename = "/sys/class/net/%s/queues/rx-0/rps_flow_cnt" % (self.dev) CsHelper.updatefile(filename, "256", "w+") logging.debug("rpsfr is configured for %s cpus" % (cpus)) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py index 2a37b0a858f..84e31a762bf 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDatabag.py @@ -97,6 +97,12 @@ class CsCmdLine(CsDataBag): else: return "unknown" + def get_eth2_ip(self): + if "eth2ip" in self.idata(): + return self.idata()['eth2ip'] + else: + return "unknown" + def is_master(self): if not self.is_redundant(): return False @@ -130,7 +136,14 @@ class CsCmdLine(CsDataBag): This is slightly difficult to happen, but if it does, destroy the router with the password generated with the code below and restart the VPC with out the clean up option. ''' - passwd = "%s-%s" % (self.get_vpccidr, self.get_router_id()) + if(self.get_type()=='router'): + passwd="%s-%s" % (self.get_eth2_ip(), self.get_router_id()) + else: + passwd = "%s-%s" % (self.get_vpccidr(), self.get_router_id()) md5 = hashlib.md5() md5.update(passwd) return md5.hexdigest() + def get_gateway(self): + if "gateway" in self.idata(): + return self.idata()['gateway'] + return False diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsFile.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsFile.py index 28d441363ba..319b48e2f06 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsFile.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsFile.py @@ -114,7 +114,10 @@ class CsFile: def search(self, search, replace): found = False - logging.debug("Searching for %s and replacing with %s" % (search, replace)) + replace_filtered = replace + if re.search("PSK \"", replace): + replace_filtered = re.sub(r'".*"', '"****"', replace) + logging.debug("Searching for %s and replacing with %s" % (search, replace_filtered)) for index, line in enumerate(self.new_config): if line.lstrip().startswith("#"): continue @@ -127,5 +130,34 @@ class CsFile: return True return False + + def searchString(self, search, ignoreLinesStartWith): + found = False + logging.debug("Searching for %s string " % search) + + for index, line in enumerate(self.new_config): + print ' line = ' +line + if line.lstrip().startswith(ignoreLinesStartWith): + continue + if re.search(search, line): + found = True + break + + return found + + + def deleteLine(self, search): + found = False + logging.debug("Searching for %s to remove the line " % search) + temp_config = [] + for index, line in enumerate(self.new_config): + if line.lstrip().startswith("#"): + continue + if not re.search(search, line): + temp_config.append(line) + + self.new_config = list(temp_config) + + def compare(self, o): return (isinstance(o, self.__class__) and set(self.config) == set(o.new_config)) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py index 3b2488b4d56..6706d4f7f68 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsHelper.py @@ -157,7 +157,7 @@ def get_hostname(): def execute(command): """ Execute command """ - logging.debug("Executing %s" % command) + logging.debug("Executing: %s" % command) p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) result = p.communicate()[0] return result.splitlines() @@ -178,7 +178,7 @@ def save_iptables(command, iptables_file): def execute2(command): """ Execute command """ - logging.debug("Executing %s" % command) + logging.debug("Executing: %s" % command) p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) p.wait() return p @@ -219,3 +219,14 @@ def copy_if_needed(src, dest): logging.Error("Could not copy %s to %s" % (src, dest)) else: logging.info("Copied %s to %s" % (src, dest)) + +def copy(src, dest): + """ + copy source to destination. + """ + try: + shutil.copy2(src, dest) + except IOError: + logging.Error("Could not copy %s to %s" % (src, dest)) + else: + logging.info("Copied %s to %s" % (src, dest)) \ No newline at end of file diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py index c106983644f..f71efc7fd3f 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py @@ -94,12 +94,17 @@ class CsRedundant(object): d = s if s.endswith(".templ"): d = s.replace(".templ", "") - CsHelper.copy_if_needed("%s/%s" % (self.CS_TEMPLATES_DIR, s), "%s/%s" % (self.CS_ROUTER_DIR, d)) - CsHelper.copy_if_needed("%s/%s" % (self.CS_TEMPLATES_DIR, "keepalived.conf.templ"), self.KEEPALIVED_CONF) - CsHelper.copy_if_needed("%s/%s" % (self.CS_TEMPLATES_DIR, "conntrackd.conf.templ"), self.CONNTRACKD_CONF) - CsHelper.copy_if_needed("%s/%s" % (self.CS_TEMPLATES_DIR, "checkrouter.sh.templ"), "/opt/cloud/bin/checkrouter.sh") + CsHelper.copy_if_needed( + "%s/%s" % (self.CS_TEMPLATES_DIR, s), "%s/%s" % (self.CS_ROUTER_DIR, d)) + CsHelper.copy( + "%s/%s" % (self.CS_TEMPLATES_DIR, "keepalived.conf.templ"), self.KEEPALIVED_CONF) + CsHelper.copy_if_needed( + "%s/%s" % (self.CS_TEMPLATES_DIR, "conntrackd.conf.templ"), self.CONNTRACKD_CONF) + CsHelper.copy_if_needed( + "%s/%s" % (self.CS_TEMPLATES_DIR, "checkrouter.sh.templ"), "/opt/cloud/bin/checkrouter.sh") - CsHelper.execute('sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived') + CsHelper.execute( + 'sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived') # checkrouter.sh configuration check_router = CsFile("/opt/cloud/bin/checkrouter.sh") check_router.greplace("[RROUTER_LOG]", self.RROUTER_LOG) @@ -107,12 +112,17 @@ class CsRedundant(object): # keepalived configuration keepalived_conf = CsFile(self.KEEPALIVED_CONF) - keepalived_conf.search(" router_id ", " router_id %s" % self.cl.get_name()) - keepalived_conf.search(" interface ", " interface %s" % guest.get_device()) - keepalived_conf.search(" virtual_router_id ", " virtual_router_id %s" % self.cl.get_router_id()) + keepalived_conf.search( + " router_id ", " router_id %s" % self.cl.get_name()) + keepalived_conf.search( + " interface ", " interface %s" % guest.get_device()) + keepalived_conf.search( + " virtual_router_id ", " virtual_router_id %s" % self.cl.get_router_id()) keepalived_conf.greplace("[RROUTER_BIN_PATH]", self.CS_ROUTER_DIR) - keepalived_conf.section("authentication {", "}", [" auth_type AH \n", " auth_pass %s\n" % self.cl.get_router_password()]) - keepalived_conf.section("virtual_ipaddress {", "}", self._collect_ips()) + keepalived_conf.section("authentication {", "}", [ + " auth_type AH \n", " auth_pass %s\n" % self.cl.get_router_password()]) + keepalived_conf.section( + "virtual_ipaddress {", "}", self._collect_ips()) keepalived_conf.commit() # conntrackd configuration @@ -135,22 +145,27 @@ class CsRedundant(object): # Configure heartbeat cron job - runs every 30 seconds heartbeat_cron = CsFile("/etc/cron.d/heartbeat") heartbeat_cron.add("SHELL=/bin/bash", 0) - heartbeat_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) - heartbeat_cron.add("* * * * * root $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1) - heartbeat_cron.add("* * * * * root sleep 30; $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1) + heartbeat_cron.add( + "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) + heartbeat_cron.add( + "* * * * * root $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1) + heartbeat_cron.add( + "* * * * * root sleep 30; $SHELL %s/check_heartbeat.sh 2>&1 > /dev/null" % self.CS_ROUTER_DIR, -1) heartbeat_cron.commit() # Configure KeepaliveD cron job - runs at every reboot keepalived_cron = CsFile("/etc/cron.d/keepalived") keepalived_cron.add("SHELL=/bin/bash", 0) - keepalived_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) + keepalived_cron.add( + "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) keepalived_cron.add("@reboot root service keepalived start", -1) keepalived_cron.commit() # Configure ConntrackD cron job - runs at every reboot conntrackd_cron = CsFile("/etc/cron.d/conntrackd") conntrackd_cron.add("SHELL=/bin/bash", 0) - conntrackd_cron.add("PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) + conntrackd_cron.add( + "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin", 1) conntrackd_cron.add("@reboot root service conntrackd start", -1) conntrackd_cron.commit() @@ -188,7 +203,7 @@ class CsRedundant(object): if not self.cl.is_redundant(): logging.error("Set fault called on non-redundant router") return - + self.set_lock() logging.info("Router switched to fault mode") ads = [o for o in self.address.get_ips() if o.is_public()] @@ -221,7 +236,7 @@ class CsRedundant(object): if dev == o.get_device(): continue logging.info("Bringing public interface %s down" % o.get_device()) - cmd2 = "ip link set %s up" % o.get_device() + cmd2 = "ip link set %s down" % o.get_device() CsHelper.execute(cmd2) dev = o.get_device() cmd = "%s -C %s" % (self.CONNTRACKD_BIN, self.CONNTRACKD_CONF) @@ -246,18 +261,9 @@ class CsRedundant(object): self.set_lock() logging.debug("Setting router to master") - ads = [o for o in self.address.get_ips() if o.is_public()] - dev = '' - for o in ads: - if dev == o.get_device(): - continue - cmd2 = "ip link set %s up" % o.get_device() - if CsDevice(o.get_device(), self.config).waitfordevice(): - CsHelper.execute(cmd2) - dev = o.get_device() - logging.info("Bringing public interface %s up" % o.get_device()) - else: - logging.error("Device %s was not ready could not bring it up" % o.get_device()) + self.address.process() + logging.info("added default routes") + # ip route add default via $gw table Table_$dev proto static cmd = "%s -C %s" % (self.CONNTRACKD_BIN, self.CONNTRACKD_CONF) CsHelper.execute("%s -c" % cmd) @@ -282,7 +288,8 @@ class CsRedundant(object): """ lines = [] lines.append("\t\t\tIPv4_address %s\n" % "127.0.0.1") - lines.append("\t\t\tIPv4_address %s\n" % self.address.get_control_if().get_ip()) + lines.append("\t\t\tIPv4_address %s\n" % + self.address.get_control_if().get_ip()) # FIXME - Do we need to also add any internal network gateways? return lines @@ -299,7 +306,11 @@ class CsRedundant(object): lines = [] for o in self.address.get_ips(): if o.needs_vrrp(): - str = " %s brd %s dev %s\n" % (o.get_gateway_cidr(), o.get_broadcast(), o.get_device()) + cmdline=self.config.get_cmdline_instance() + if(cmdline.get_type()=='router'): + str = " %s brd %s dev %s\n" % (cmdline.get_guest_gw(), o.get_broadcast(), o.get_device()) + else: + str = " %s brd %s dev %s\n" % (o.get_ip(), o.get_broadcast(), o.get_device()) lines.append(str) self.check_is_up(o.get_device()) return lines diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRoute.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRoute.py index 6fb6e1c6749..fd2d98987cc 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRoute.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRoute.py @@ -20,30 +20,39 @@ import logging class CsRoute: + """ Manage routes """ - def __init__(self, dev): - self.dev = dev - self.tableNo = dev[3:] - self.table = "Table_%s" % (dev) + def __init__(self): + self.table_prefix = "Table_" - def routeTable(self): - str = "%s %s" % (self.tableNo, self.table) + def get_tablename(self, name): + return self.table_prefix + name + + def add_table(self, devicename): + tablenumber = devicename[3:] + tablename = self.get_tablename(devicename) + str = "%s %s" % (tablenumber, tablename) filename = "/etc/iproute2/rt_tables" + logging.info( + "Adding route table: " + str + " to " + filename + " if not present ") CsHelper.addifmissing(filename, str) - def flush(self): - CsHelper.execute("ip route flush table %s" % (self.table)) + def flush_table(self, tablename): + CsHelper.execute("ip route flush table %s" % (tablename)) CsHelper.execute("ip route flush cache") - def add(self, address, method="add"): - # ip route show dev eth1 table Table_eth1 10.0.2.0/24 - if(method == "add"): - cmd = "dev %s table %s %s" % (self.dev, self.table, address['network']) - self.set_route(cmd, method) + def add_route(self, dev, address): + """ Wrapper method that adds table name and device to route statement """ + # ip route add dev eth1 table Table_eth1 10.0.2.0/24 + table = self.get_tablename(dev) + logging.info("Adding route: dev " + dev + " table: " + + table + " network: " + address + " if not present") + cmd = "dev %s table %s %s" % (dev, table, address) + self.set_route(cmd) def set_route(self, cmd, method="add"): - """ Add a route is it is not already defined """ + """ Add a route if it is not already defined """ found = False for i in CsHelper.execute("ip route show " + cmd): found = True @@ -56,3 +65,30 @@ class CsRoute: else: return CsHelper.execute(cmd) + + def add_defaultroute(self, gateway): + """ Add a default route + :param str gateway + :return: bool + """ + if gateway is not None: + cmd = "default via " + gateway + logging.info("Adding default route") + self.set_route(cmd) + return True + else: + return False + + def defaultroute_exists(self): + """ Return True if a default route is present + :return: bool + """ + logging.info("Checking if default ipv4 route is present") + route_found = CsHelper.execute("ip -4 route list 0/0") + + if len(route_found) > 0: + logging.info("Default route found: " + route_found[0]) + return True + else: + logging.warn("No default route found!") + return False diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_remoteaccessvpn.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_remoteaccessvpn.py new file mode 100755 index 00000000000..4ae79c172f9 --- /dev/null +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_remoteaccessvpn.py @@ -0,0 +1,28 @@ +# -- coding: 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. +from pprint import pprint + + +def merge(dbag, vpn): + key = vpn['vpn_server_ip'] + op = vpn['create'] + if key in dbag.keys() and not op: + del(dbag[key]) + else: + dbag[key] = vpn + return dbag diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_vpnusers.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_vpnusers.py new file mode 100755 index 00000000000..316fabc07d3 --- /dev/null +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_vpnusers.py @@ -0,0 +1,48 @@ +# -- coding: 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. +from pprint import pprint + +import copy + + +def merge(dbag, data): + dbagc = copy.deepcopy(dbag) + + print dbag + print data + if "vpn_users" not in data: + return dbagc + + # remove previously deleted user from the dict + for user in dbagc.keys(): + if user == 'id': + continue + userrec = dbagc[user] + add = userrec['add'] + if not add: + del(dbagc[user]) + + for user in data['vpn_users']: + username=user['user'] + add=user['add'] + if username not in dbagc.keys(): + dbagc[username] = user + elif username in dbagc.keys() and not add: + dbagc[username] = user + + return dbagc diff --git a/systemvm/patches/debian/config/opt/cloud/bin/master.py b/systemvm/patches/debian/config/opt/cloud/bin/master.py index 41d90f06ce3..41386f71264 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/master.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/master.py @@ -53,4 +53,4 @@ if options.backup: red.set_backup() if options.fault: - red.set_fault() \ No newline at end of file + red.set_fault() diff --git a/systemvm/patches/debian/config/opt/cloud/bin/merge.py b/systemvm/patches/debian/config/opt/cloud/bin/merge.py index 4999757fce5..cc14d6aca8d 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/merge.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/merge.py @@ -32,6 +32,8 @@ import cs_vmdata import cs_dhcp import cs_forwardingrules import cs_site2sitevpn +import cs_remoteaccessvpn +import cs_vpnusers from pprint import pprint @@ -66,6 +68,7 @@ class DataBag: logging.error("Could not write data bag %s", self.key) else: logging.debug("Writing data bag type %s", self.key) + logging.debug(dbag) jsono = json.dumps(dbag, indent=4, sort_keys=True) handle.write(jsono) @@ -119,6 +122,10 @@ class updateDataBag: dbag = self.processForwardingRules(self.db.getDataBag()) elif self.qFile.type == 'site2sitevpn': dbag = self.process_site2sitevpn(self.db.getDataBag()) + elif self.qFile.type == 'remoteaccessvpn': + dbag = self.process_remoteaccessvpn(self.db.getDataBag()) + elif self.qFile.type == 'vpnuserlist': + dbag = self.process_vpnusers(self.db.getDataBag()) else: logging.error("Error I do not know what to do with file of type %s", self.qFile.type) return @@ -147,6 +154,12 @@ class updateDataBag: def process_site2sitevpn(self, dbag): return cs_site2sitevpn.merge(dbag, self.qFile.data) + def process_remoteaccessvpn(self, dbag): + return cs_remoteaccessvpn.merge(dbag, self.qFile.data) + + def process_vpnusers(self, dbag): + return cs_vpnusers.merge(dbag, self.qFile.data) + def process_network_acl(self, dbag): return cs_network_acl.merge(dbag, self.qFile.data) @@ -182,6 +195,9 @@ class updateDataBag: self.processCLItem('2', "public") elif (self.qFile.data['cmd_line']['type'] == "vpcrouter"): self.processCLItem('0', "control") + elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"): + self.processCLItem('0', "guest") + self.processCLItem('1', "control") return cs_cmdline.merge(dbag, self.qFile.data) def processCLItem(self, num, nw_type): diff --git a/systemvm/patches/debian/config/opt/cloud/bin/update_config.py b/systemvm/patches/debian/config/opt/cloud/bin/update_config.py index 77557f9b0e2..35a5cde363c 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/update_config.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/update_config.py @@ -26,7 +26,7 @@ import os.path import configure import json -logging.basicConfig(filename='/var/log/cloud.log', level=logging.DEBUG, format='%(asctime)s %(message)s') +logging.basicConfig(filename='/var/log/cloud.log', level=logging.DEBUG, format='%(asctime)s %(filename)s %(funcName)s:%(lineno)d %(message)s') # first commandline argument should be the file to process if (len(sys.argv) != 2): diff --git a/systemvm/test/python/TestCsRoute.py b/systemvm/test/python/TestCsRoute.py index dc464d5fefd..6035258aa73 100644 --- a/systemvm/test/python/TestCsRoute.py +++ b/systemvm/test/python/TestCsRoute.py @@ -26,8 +26,21 @@ class TestCsRoute(unittest.TestCase): merge.DataBag.DPATH = "." def test_init(self): - csroute = CsRoute(["one", "two", "three", "four"]) - self.assertTrue(csroute is not None) + csroute = CsRoute() + self.assertIsInstance(csroute, CsRoute) + + def test_defaultroute_exists(self): + csroute = CsRoute() + self.assertFalse(csroute.defaultroute_exists()) + + def test_add_defaultroute(self): + csroute = CsRoute() + self.assertTrue(csroute.add_defaultroute("192.168.1.1")) + + def test_get_tablename(self): + csroute = CsRoute() + name = "eth1" + self.assertEqual("Table_eth1", csroute.get_tablename(name)) if __name__ == '__main__': unittest.main() diff --git a/test/integration/component/maint/test_bugs.py b/test/integration/component/maint/test_bugs.py index 6652b04e3be..ab3f7e797a5 100644 --- a/test/integration/component/maint/test_bugs.py +++ b/test/integration/component/maint/test_bugs.py @@ -68,7 +68,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase): # Creating Disk offering, Service Offering and Account cls.service_offering = ServiceOffering.create( cls.apiClient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create( cls.api_client, diff --git a/test/integration/component/maint/test_escalation_templates.py b/test/integration/component/maint/test_escalation_templates.py new file mode 100644 index 00000000000..61ca0df6fbb --- /dev/null +++ b/test/integration/component/maint/test_escalation_templates.py @@ -0,0 +1,407 @@ +# 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. + +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.lib.base import (Account, + Domain, Template, Configurations,VirtualMachine,Snapshot,ServiceOffering + ) +from marvin.lib.utils import (cleanup_resources, validateList) +from marvin.lib.common import (get_zone, get_template, get_builtin_template_info,update_resource_limit,list_volumes ) +from nose.plugins.attrib import attr +from marvin.codes import PASS +from marvin.sshClient import SshClient +from marvin.cloudstackException import CloudstackAPIException +import time + + +class TestlistTemplates(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + + testClient = super( + TestlistTemplates, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"] + ) + cls.hypervisor = cls.testClient.getHypervisorInfo() + builtin_info = get_builtin_template_info(cls.apiclient, cls.zone.id) + cls.testdata["templates"]["url"] = builtin_info[0] + cls.testdata["templates"]["hypervisor"] = builtin_info[1] + cls.testdata["templates"]["format"] = builtin_info[2] + if cls.zone.localstorageenabled: + cls.storagetype = 'local' + cls.testdata["service_offerings"]["tiny"]["storagetype"] = 'local' + cls.testdata["disk_offering"]["storagetype"] = 'local' + else: + cls.storagetype = 'shared' + cls.testdata["service_offerings"]["tiny"]["storagetype"] = 'shared' + cls.testdata["disk_offering"]["storagetype"] = 'shared' + cls.testdata["virtual_machine"]["hypervisor"] = cls.hypervisor + cls.testdata["virtual_machine"]["zoneid"] = cls.zone.id + cls.testdata["virtual_machine"]["template"] = cls.template.id + cls.testdata["custom_volume"]["zoneid"] = cls.zone.id + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offerings"]["tiny"] + ) + cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__ + cls.cleanup = [] + + # Create 1 domain admin account + + cls.domain = Domain.create( + cls.apiclient, + cls.testdata["domain"]) + + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + admin=True, + domainid=cls.domain.id) + + cls.debug("Created account %s in domain %s" % + (cls.account.name, cls.domain.id)) + + cls.cleanup.append(cls.account) + cls.cleanup.append(cls.domain) + + @classmethod + def tearDownClass(cls): + try: + # Cleanup resources used + cleanup_resources(cls.apiclient, cls.cleanup) + + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + def RestartServers(self): + """ Restart management server and usage server """ + + sshClient = SshClient( + self.mgtSvrDetails["mgtSvrIp"], + 22, + self.mgtSvrDetails["user"], + self.mgtSvrDetails["passwd"] + ) + command = "service cloudstack-management restart" + sshClient.execute(command) + return + + def updateConfigurAndRestart(self,name, value): + Configurations.update(self.apiclient, + name,value ) + self.RestartServers() + time.sleep(self.testdata["sleep"]) + + + @attr(tags=["advanced", "basic"], required_hardware="true") + def test_01_CS40139_listtemplate_with_different_pagesize(self): + """ + @Desc verify list template gives same result with pagesize=500&page=(1,2) and pagesize=1000 when + there are around 1000 templates + @steps: + 1: register around 850 templates + 2. call list template api with pagesize=500&page=1 and then page=2 + 3.call list template api with pagesize=1000 & page=1 + 4. Verify list template returns same list of template in both step 2 and 3 + """ + if self.hypervisor.lower() not in ['xenserver']: + raise unittest.SkipTest("hypervisor in not xenserver") + return + self.updateConfigurAndRestart("default.page.size", "1000") + self.debug("Updating template resource limit for account: %s" % + self.account.name) + # Set usage_template=1000 for Account 1 + update_resource_limit( + self.apiclient, + 4, # Template + account=self.account.name, + domainid=self.domain.id, + max=1000 + ) + + for i in range(0, 850): + template_created = Template.register( + self.apiclient, + self.testdata["templateregister"], + zoneid=self.zone.id, + hypervisor=self.hypervisor, + account=self.account.name, + domainid=self.domain.id + ) + self.assertIsNotNone( + template_created, + "Template creation failed" + ) + listfirst500template = Template.list( + self.apiclient, + templatefilter="executable", + pagesize=500, + page=1, + account=self.account.name, + domainid=self.account.domainid) + status = validateList(listfirst500template) + self.assertEquals( + PASS, + status[0], + "First 500 template list is empty") + listremainingtemplate = Template.list( + self.apiclient, + templatefilter="executable", + pagesize=500, + page=2, + account=self.account.name, + domainid=self.account.domainid) + status = validateList(listremainingtemplate) + self.assertEquals( + PASS, + status[0], + "Next 500 template list is empty") + listalltemplate = Template.list( + self.apiclient, + templatefilter="executable", + pagesize=1000, + page=1, + account=self.account.name, + domainid=self.account.domainid) + status = validateList(listalltemplate) + self.assertEquals( + PASS, + status[0], + "entire template list is empty") + listfirst500template.extend(listremainingtemplate) + for i, j in zip(listalltemplate,listfirst500template): + self.assertNotEqual( + i, + j, + "Check template listed are not same" + ) + return + + + @attr(tags=["advanced", "basic"], required_hardware="true") + def test_02_template_permissions(self): + """ + @Desc: Test to create Public Template by registering or by snapshot and volume when + Global parameter 'allow.public.user.template' is set to False + @steps: + 1.Set Global parameter 'allow.public.user.template' as False. Restart Management server + 2. Create a domain + 3. Create a domain admin and a domain user + 4. Create a vm as domain user + 5. take snapshot of root disk as user vm + 6. try to create public template from snapshot . It should fail + 7. stop the VM + 8. take the public template from volume. it should fail + 9. register a public template as a domain user . it should fail + 10. create a VM as domain admin + 11. create a snapshot of root disk as domain admin + 12 create a public template of the snapshot .it should fail + 13. Register a public template as domain admin. it should fail + 14 Stop the vm as domain admin + 15. Create a template from volume as domain admin . it should fail + + """ + self.updateConfigurAndRestart("allow.public.user.templates", "false") + + user_account = Account.create( + self.apiclient, + self.testdata["account2"], + admin=False, + domainid=self.domain.id + ) + admin_user = self.account.user[0] + self.admin_api_client = self.testClient.getUserApiClient( + admin_user.username, + self.domain.name) + user = user_account.user[0] + self.user_api_client = self.testClient.getUserApiClient( + user.username, + self.domain.name) + + self.testdata["templates"]["ispublic"] = True + # Register new public template as domain user + # Exception should be raised for registering public template + try: + template = Template.register( + self.user_api_client, + self.testdata["templates"], + zoneid=self.zone.id, + account=user_account.name, + domainid=user_account.domainid, + hypervisor=self.hypervisor + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed for user") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + # Register new public template as domain admin + # Exception should be raised for registering public template + try: + template = Template.register( + self.admin_api_client, + self.testdata["templates"], + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid, + hypervisor=self.hypervisor + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed for domain admin") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + + if self.hypervisor.lower() in ['hyperv', 'lxc']: + self.updateConfigurAndRestart("allow.public.user.templates", "true") + return + else: + user_vm_created = VirtualMachine.create( + self.user_api_client, + self.testdata["virtual_machine"], + accountid=user_account.name, + domainid=user_account.domainid, + serviceofferingid=self.service_offering.id, + ) + self.assertIsNotNone(user_vm_created, + "VM creation failed" + ) + # Get the Root disk of VM + volume = list_volumes( + self.user_api_client, + virtualmachineid=user_vm_created.id, + type='ROOT', + listall=True + ) + snapshot_created = Snapshot.create( + self.user_api_client, + volume[0].id, + account=user_account.name, + domainid=user_account.domainid + ) + self.assertIsNotNone( + snapshot_created, + "Snapshot creation failed" + ) + self.debug("Creating a template from snapshot: %s" % snapshot_created.id) + # + # Generate public template from the snapshot + self.testdata["template"]["ispublic"] = True + try: + user_template = Template.create_from_snapshot( + self.user_api_client, + snapshot_created, + self.testdata["template"] + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed from snapshot for domain user") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + + VirtualMachine.stop(user_vm_created, self.user_api_client) + list_stopped_vms_after = VirtualMachine.list( + self.user_api_client, + listall=self.testdata["listall"], + domainid=user_account.domainid, + state="Stopped") + status = validateList(list_stopped_vms_after) + self.assertEquals( + PASS, + status[0], + "Stopped VM is not in Stopped state" + ) + try: + user_template = Template.create( + self.user_api_client, self.testdata["template"], + volume[0].id + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed from volume for domain user") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + + admin_vm_created = VirtualMachine.create( + self.admin_api_client, + self.testdata["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + ) + self.assertIsNotNone( + admin_vm_created, + "VM creation failed" + ) + # Get the Root disk of VM + volume = list_volumes( + self.admin_api_client, + virtualmachineid=admin_vm_created.id, + type='ROOT', + listall=True + ) + snapshot_created = Snapshot.create( + self.admin_api_client, + volume[0].id, + account=self.account.name, + domainid=self.account.domainid + ) + self.assertIsNotNone( + snapshot_created, + "Snapshot creation failed" + ) + self.debug("Creating a template from snapshot: %s" % snapshot_created.id) + # + # Generate public template from the snapshot + try: + admin_template = Template.create_from_snapshot( + self.admin_api_client, + snapshot_created, + self.testdata["template"] + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed from snapshot for domain admin") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + + VirtualMachine.stop(admin_vm_created, self.admin_api_client) + list_stopped_vms_after = VirtualMachine.list( + self.admin_api_client, + listall=self.testdata["listall"], + domainid=self.account.domainid, + state="Stopped") + status = validateList(list_stopped_vms_after) + self.assertEquals( + PASS, + status[0], + "Stopped VM is not in Stopped state" + ) + try: + admin_template = Template.create( + self.admin_api_client, self.testdata["template"], + volume[0].id + ) + self.updateConfigurAndRestart("allow.public.user.templates", "true") + self.fail("Template creation passed from volume for domain admin") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + + self.updateConfigurAndRestart("allow.public.user.templates", "true") + return diff --git a/test/integration/component/maint/test_hypervisor_limit.py b/test/integration/component/maint/test_hypervisor_limit.py new file mode 100644 index 00000000000..d24540a43de --- /dev/null +++ b/test/integration/component/maint/test_hypervisor_limit.py @@ -0,0 +1,225 @@ +# 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. +""" Test cases for Testing Max Hypervisor Limit +""" +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + VirtualMachine, + Host + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_virtual_machines, + list_ssvms, + list_routers + ) + + +from marvin.cloudstackAPI import (updateHypervisorCapabilities, + listHypervisorCapabilities) + +from marvin.codes import PASS + + +class TestMaxHyperviosrLimit(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + + cls.hypervisor = cls.testClient.getHypervisorInfo() + # Get Zone, Domain and templates + + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + try: + cls.skiptest = False + if cls.hypervisor.lower() not in ['xenserver']: + cls.skiptest = True + return + + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + # Create Service offering + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + hosttags="host1" + ) + + cls._cleanup = [ + cls.account, + cls.service_offering, + ] + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + self.cleanup = [] + if self.skiptest: + self.skipTest("This test is to be checked on xenserver \ + only Hence, skip for %s" % self.hypervisor) + + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + + def tearDown(self): + try: + + cmd = updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd() + cmd.id = self.hostCapId + cmd.maxguestslimit = self.originalLimit + self.apiclient.updateHypervisorCapabilities(cmd) + + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "basic"], required_hardware="false") + def test_check_hypervisor_max_limit_effect(self): + """ Test hypervisor max limits effect + + # 1. Read exsiting count of VM's on the host including SSVM and VR + and modify maxguestcount accordingly + # 2. Deploy a VM + # 2. Try to deploy another vm + # 3. Verify that second VM + deployment fails (2 SSVMs 1 VR VM and 1 deployed VM) + """ + + hostList = Host.list( + self.apiclient, + zoneid=self.zone.id, + type="Routing") + event_validation_result = validateList(hostList) + self.assertEqual( + event_validation_result[0], + PASS, + "host list validation failed due to %s" % + event_validation_result[2]) + + self.host = Host(hostList[0]) + Host.update(self.apiclient, id=self.host.id, hosttags="host1") + + # Step 1 + # List VM's , SSVM's and VR on selected host + listVm = list_virtual_machines(self.apiclient, + hostid=self.host.id) + + listssvm = list_ssvms(self.apiclient, + hostid=self.host.id) + + listvr = list_routers(self.apiclient, + hostid=self.host.id) + + newValue = 1 + if listVm is not None: + newValue = len(listVm) + newValue + + if listssvm is not None: + newValue = len(listssvm) + newValue + + if listvr is not None: + newValue = len(listvr) + newValue + + qresultset = self.dbclient.execute( + "select hypervisor_version from host where uuid='%s'" % + self.host.id) + + event_validation_result = validateList(qresultset) + self.assertEqual( + event_validation_result[0], + PASS, + "event list validation failed due to %s" % + event_validation_result[2]) + + cmdList = listHypervisorCapabilities.listHypervisorCapabilitiesCmd() + cmdList.hypervisor = self.hypervisor + config = self.apiclient.listHypervisorCapabilities(cmdList) + + for host in config: + if host.hypervisorversion == qresultset[0][0]: + self.hostCapId = host.id + self.originalLimit = host.maxguestslimit + break + else: + self.skipTest("No hypervisor capabilities found for %s \ + with version %s" % (self.hypervisor, qresultset[0][0])) + + cmdUpdate = updateHypervisorCapabilities.\ + updateHypervisorCapabilitiesCmd() + cmdUpdate.id = self.hostCapId + cmdUpdate.maxguestslimit = newValue + self.apiclient.updateHypervisorCapabilities(cmdUpdate) + + # Step 2 + vm = VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) + + self.cleanup.append(vm) + # Step 3 + with self.assertRaises(Exception): + VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) diff --git a/test/integration/component/maint/test_multiple_ip_ranges.py b/test/integration/component/maint/test_multiple_ip_ranges.py index cd845d29de7..8e63ec4616e 100644 --- a/test/integration/component/maint/test_multiple_ip_ranges.py +++ b/test/integration/component/maint/test_multiple_ip_ranges.py @@ -111,7 +111,7 @@ class TestMultipleIpRanges(cloudstackTestCase): if cls.vr_state is False: cls.vm_res = VirtualMachine.create( cls.api_client, - cls.testdata["server_without_disk"], + cls.testdata["small"], templateid=cls.template.id, accountid=cls.account.name, domainid=cls.testdata["domainid"], @@ -181,7 +181,7 @@ class TestMultipleIpRanges(cloudstackTestCase): try: self.virtual_machine = VirtualMachine.create( self.apiclient, - self.testdata["server_without_disk"], + self.testdata["small"], templateid=self.template.id, accountid=self.account.name, domainid=self.testdata["domainid"], diff --git a/test/integration/component/maint/test_zone_level_local_storage_setting.py b/test/integration/component/maint/test_zone_level_local_storage_setting.py index 466f1f9fd42..6d3ecd875c5 100644 --- a/test/integration/component/maint/test_zone_level_local_storage_setting.py +++ b/test/integration/component/maint/test_zone_level_local_storage_setting.py @@ -107,13 +107,13 @@ def storage_check(self, type, value): def create_system_so(self, offering_type, storage_type): """Create system offerings """ - self.testdata["service_offerings"]["issystem"] = "true" - self.testdata["service_offerings"]["systemvmtype"] = offering_type - self.testdata["service_offerings"]["storagetype"] = storage_type + self.testdata["service_offerings"]["tiny"]["issystem"] = "true" + self.testdata["service_offerings"]["tiny"]["systemvmtype"] = offering_type + self.testdata["service_offerings"]["tiny"]["storagetype"] = storage_type service_offering = ServiceOffering.create( self.apiclient, - self.testdata["service_offerings"] + self.testdata["service_offerings"]["tiny"] ) if service_offering is None: @@ -136,32 +136,32 @@ def create_system_so(self, offering_type, storage_type): self.assertEqual( list_service_response[0].cpunumber, - self.testdata["service_offerings"]["cpunumber"], + self.testdata["service_offerings"]["tiny"]["cpunumber"], "Check server id in createServiceOffering" ) self.assertEqual( list_service_response[0].cpuspeed, - self.testdata["service_offerings"]["cpuspeed"], + self.testdata["service_offerings"]["tiny"]["cpuspeed"], "Check cpuspeed in createServiceOffering" ) self.assertEqual( list_service_response[0].displaytext, - self.testdata["service_offerings"]["displaytext"], + self.testdata["service_offerings"]["tiny"]["displaytext"], "Check server displaytext in createServiceOfferings" ) self.assertEqual( list_service_response[0].memory, - self.testdata["service_offerings"]["memory"], + self.testdata["service_offerings"]["tiny"]["memory"], "Check memory in createServiceOffering" ) self.assertEqual( list_service_response[0].name, - self.testdata["service_offerings"]["name"], + self.testdata["service_offerings"]["tiny"]["name"], "Check name in createServiceOffering" ) self.assertEqual( list_service_response[0].storagetype, - self.testdata["service_offerings"]["storagetype"], + self.testdata["service_offerings"]["tiny"]["storagetype"], "Check storagetype in createServiceOffering" ) self._cleanup.append(service_offering) diff --git a/test/integration/component/maint/testpath_disablestoragepool.py b/test/integration/component/maint/testpath_disablestoragepool.py index 85f56148129..c1bb2040b6f 100644 --- a/test/integration/component/maint/testpath_disablestoragepool.py +++ b/test/integration/component/maint/testpath_disablestoragepool.py @@ -16,7 +16,7 @@ # under the License. """Utilities functions """ -#All tests inherit from cloudstackTestCase +# All tests inherit from cloudstack TestCase from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackTestCase import cloudstackTestCase, unittest @@ -33,58 +33,95 @@ from marvin.lib.base import (Account, Host, Capacities) from marvin.lib.utils import cleanup_resources, validateList -from marvin.lib.common import get_zone, get_domain, list_clusters, get_template, list_volumes, list_virtual_machines +from marvin.lib.common import (get_zone, + get_domain, + list_clusters, + get_template, + list_volumes, + list_virtual_machines) from nose.plugins.attrib import attr from ddt import ddt, data + def verify_vm_state(self, vmid, state): - list_vm = list_virtual_machines(self.userapiclient, account=self.account.name, domainid=self.account.domainid, id=vmid) - self.assertEqual(validateList(list_vm)[0], PASS, 'Check List vm response for vmid: %s' % vmid) - self.assertGreater(len(list_vm), 0, 'Check the list vm response for vm id: %s' % vmid) + list_vm = list_virtual_machines(self.userapiclient, + account=self.account.name, + domainid=self.account.domainid, + id=vmid) + self.assertEqual( + validateList(list_vm)[0], + PASS, + 'Check List vm response for vmid: %s' % + vmid) + self.assertGreater( + len(list_vm), + 0, + 'Check the list vm response for vm id: %s' % + vmid) vm = list_vm[0] - self.assertEqual(vm.id, str(vmid), 'Vm deployed is different from the test') + self.assertEqual( + vm.id, + str(vmid), + 'Vm deployed is different from the test') self.assertEqual(vm.state, state, 'VM is not in %s state' % state) self.debug('VM is in is %s state' % state) - def verify_pool_state(self, poolid, state): - list_storage_pool_response = StoragePool.list(self.userapiclient, id=poolid) - self.assertGreater(len(list_storage_pool_response), 0, 'Check list pool response is greater than 0') - self.assertEqual(list_storage_pool_response[0].state, state, 'Storage pool is not in %s state' % state) - + list_storage_pool_response = StoragePool.list( + self.userapiclient, id=poolid) + self.assertGreater(len(list_storage_pool_response), 0, + 'Check list pool response is greater than 0') + self.assertEqual( + list_storage_pool_response[0].state, + state, + 'Storage pool is not in %s state' % + state) def verify_vm_storage_pool(self, vmid, storageid): - root_volume = Volume.list(self.userapiclient, virtualmachineid=vmid, type='ROOT')[0] + root_volume = Volume.list( + self.userapiclient, + virtualmachineid=vmid, + type='ROOT')[0] list_volume = Volume.list(self.userapiclient, id=root_volume.id) - self.assertEqual(list_volume[0].storageid, storageid, 'check list volume response for Storage id: % s ' % storageid) - + self.assertEqual( + list_volume[0].storageid, + storageid, + 'check list volume response for Storage id: % s ' % + storageid) @ddt class TestPathDisableStorage_Basic(cloudstackTestCase): """ # Tests in this path requires to be run independently - # ( not to be run in parallel with any other tests since it involves disabling/enabling storage pools and may cause unexpected failures in other tests + # ( not to be run in parallel with any other tests since it involves disabling/enabling storage pools \ + and may cause unexpected failures in other tests # The test also requires to have 2 Cluster-wide and 2 zone-wide storage pools available in the setup. # For running the tests on local storage, ensure there are 2 local storage pools set up on each host - - """ + """ @classmethod def setUpClass(cls): - testClient = super(TestPathDisableStorage_Basic, cls).getClsTestClient() + testClient = super( + TestPathDisableStorage_Basic, + cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.testdata = testClient.getParsedTestDataConfig() cls.domain = get_domain(cls.apiclient) cls.zone = get_zone(cls.apiclient) cls.testdata['mode'] = cls.zone.networktype - cls.template = get_template(cls.apiclient, cls.zone.id, cls.testdata['ostype']) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata['ostype']) cls.testdata['template']['ostypeid'] = cls.template.ostypeid if cls.template == FAILED: - cls.fail('get_template() failed to return template with description %s' % cls.testdata['ostype']) + cls.fail( + 'get_template() failed to return template with description %s' + % cls.testdata['ostype']) cls._cleanup = [] cls.disabled_list = [] cls.testdata['template_2']['zoneid'] = cls.zone.id @@ -102,38 +139,32 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): raise e # Create shared storage offerings - cls.service_offering_shared = ServiceOffering.create(cls.apiclient, - cls.testdata['service_offering'] - ) + cls.service_offering_shared = ServiceOffering.create( + cls.apiclient, cls.testdata['service_offering']) cls._cleanup.append(cls.service_offering_shared) - cls.disk_offering_shared = DiskOffering.create(cls.apiclient, - cls.testdata['disk_offering'] - ) - cls.resized_disk_offering = DiskOffering.create(cls.apiclient, - cls.testdata['resized_disk_offering'] - ) + cls.disk_offering_shared = DiskOffering.create( + cls.apiclient, cls.testdata['disk_offering']) + cls.resized_disk_offering = DiskOffering.create( + cls.apiclient, cls.testdata['resized_disk_offering']) cls._cleanup.append(cls.disk_offering_shared) # Create offerings for local storage if local storage is enabled if cls.zone.localstorageenabled: - cls.testdata["service_offerings"]["storagetype"] = 'local' - cls.service_offering_local = ServiceOffering.create(cls.apiclient, - cls.testdata["service_offerings"] - ) + cls.testdata["service_offerings"]["tiny"]["storagetype"] = 'local' + cls.service_offering_local = ServiceOffering.create( + cls.apiclient, cls.testdata["service_offerings"]["tiny"]) cls._cleanup.append(cls.service_offering_local) cls.testdata["disk_offering"]["storagetype"] = 'local' - cls.disk_offering_local = DiskOffering.create(cls.apiclient, - cls.testdata["disk_offering"] - ) + cls.disk_offering_local = DiskOffering.create( + cls.apiclient, cls.testdata["disk_offering"]) cls._cleanup.append(cls.disk_offering_local) cls.testdata["disk_offering"]["storagetype"] = ' ' - cls.testdata["service_offerings"]["storagetype"] = ' ' + cls.testdata["service_offerings"]["tiny"]["storagetype"] = ' ' else: cls.debug("No local storage found") - cls.userapiclient = testClient.getUserApiClient(UserName=cls.account.name, - DomainName=cls.account.domain - ) + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, DomainName=cls.account.domain) response = User.login(cls.userapiclient, username=cls.account.name, password=cls.testdata['account']['password'] @@ -154,9 +185,12 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): def tearDown(self): if self.disabled_list: for poolid in self.disabled_list: - if StoragePool.list(self.userapiclient, id=poolid)[0].state != 'Up': + if StoragePool.list( + self.userapiclient, + id=poolid)[0].state != 'Up': try: - StoragePool.update(self.userapiclient, id=poolid, enabled=True) + StoragePool.update( + self.userapiclient, id=poolid, enabled=True) self.debug('Enabling: % s ' % poolid) except Exception as e: self.fail("Couldn't enable storage % s" % id) @@ -166,12 +200,11 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): except Exception as e: self.fail('Warning: Exception during cleanup : %s' % e) - @data('host', 'CLUSTER', 'ZONE') @attr(tags=['advanced', 'advancedsg', 'basic'], required_hardware='false') def test_01_disable_enable_pool(self, value): """ - + Test Steps: ========= 1. Deploy 2 VMs @@ -190,7 +223,8 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): 14. findStoragePoolsforMigration should not list the disabled pool """ - # Choose appropriate service offering depending on the scope the test is being run on + # Choose appropriate service offering depending on the scope the test + # is being run on self.disabled_list = [] if value == 'CLUSTER': other_scope = 'ZONE' @@ -211,66 +245,84 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): # Keep only one pool active and disable the rest try: - self.list_storage = StoragePool.list(self.userapiclient, scope=value) + self.list_storage = StoragePool.list( + self.userapiclient, scope=value) if self.list_storage: count_st_pools = len(self.list_storage) else: count_st_pools = 0 self.disabled_pool_1 = None if count_st_pools > 1: - self.debug('Found % s storage pools, keeping one and disabling rest' % count_st_pools) + self.debug( + 'Found % s storage pools, keeping one and disabling rest' % + count_st_pools) for pool in self.list_storage[1:]: self.disabled_pool_1 = self.list_storage[1] if pool.state == 'Up': self.debug('Trying to disable storage %s' % pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: raise e elif count_st_pools == 1: - self.debug('Only one % s wide storage found - will not be able to complete all tests' % value) + self.debug( + 'Only one % s wide storage found - will not be able to complete all tests' % + value) else: self.skipTest('No % s storage pools found' % value) except Exception as e: raise e - # Disable the other scope shared storage pools while we are testing on one - applicable for only shared storage + # Disable the other scope shared storage pools while we are testing on + # one - applicable for only shared storage if value != 'host': try: - self.list_storage = StoragePool.list(self.userapiclient, scope=other_scope) + self.list_storage = StoragePool.list( + self.userapiclient, scope=other_scope) if self.list_storage: for pool in self.list_storage: if pool.state == 'Up': - self.debug('Trying to disable storage % s' % pool.id) + self.debug( + 'Trying to disable storage % s' % + pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: - self.fail("Couldn't disable storage % s" % pool.id) + self.fail( + "Couldn't disable storage % s" % pool.id) else: self.debug('No % s wide storage pools found' % other_scope) except Exception as e: raise e # Step 1: Deploy 2 VMs - self.virtual_machine_1 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_1 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_1.id, 'Running') - self.virtual_machine_2 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_2 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_2.id, 'Running') # Step 2: Keep one VM in stopped state while other keeps running @@ -281,12 +333,19 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): except Exception as e: self.fail('Step 2: Failed to stop VM: %s' % e) - # Step 3: Disable the Storage Pool, verify VMs are in same state as before - self.storage_pools_list = StoragePool.list(self.userapiclient, scope=value, state='Up') + # Step 3: Disable the Storage Pool, verify VMs are in same state as + # before + self.storage_pools_list = StoragePool.list( + self.userapiclient, scope=value, state='Up') self.storage_pool_1 = self.storage_pools_list[0] try: - self.debug('Step 3: Disabling Storage Pool: %s' % self.storage_pool_1.id) - StoragePool.update(self.userapiclient, id=self.storage_pool_1.id, enabled=False) + self.debug( + 'Step 3: Disabling Storage Pool: %s' % + self.storage_pool_1.id) + StoragePool.update( + self.userapiclient, + id=self.storage_pool_1.id, + enabled=False) except Exception as e: self.debug("Step 3: Couldn't disable pool %s" % e) @@ -295,7 +354,8 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): verify_vm_state(self, self.virtual_machine_2.id, 'Stopped') # Step 4: Deploying new VM on disabled pool should fail - self.debug('Step 4: Trying to deploy VM on disabled storage - should fail') + self.debug( + 'Step 4: Trying to deploy VM on disabled storage - should fail') with self.assertRaises(Exception): VirtualMachine.create(self.userapiclient, self.testdata['small'], @@ -309,7 +369,10 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): try: self.virtual_machine_2.start(self.userapiclient) verify_vm_state(self, self.virtual_machine_2.id, 'Running') - verify_vm_storage_pool(self, self.virtual_machine_2.id, self.storage_pool_1.id) + verify_vm_storage_pool( + self, + self.virtual_machine_2.id, + self.storage_pool_1.id) except Exception as e: self.fail('Step 5: Failed to start VM: %s' % e) @@ -320,20 +383,26 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): # Step 7: Enable Storage pool try: - self.debug('Step 7: Enabling Storage Pool: %s' % self.storage_pool_1.id) - StoragePool.update(self.userapiclient, id=self.storage_pool_1.id, enabled=True) + self.debug( + 'Step 7: Enabling Storage Pool: %s' % + self.storage_pool_1.id) + StoragePool.update( + self.userapiclient, + id=self.storage_pool_1.id, + enabled=True) except Exception as e: self.debug("Step 7: Couldn't enable pool %s" % e) verify_pool_state(self, self.storage_pool_1.id, 'Up') # Step 8: Deploy a VM on the pool - self.virtual_machine_3 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_3 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_3.id, 'Running') if self.hypervisor.lower() == 'lxc': @@ -344,25 +413,39 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): services=self.testdata['volume'], diskofferingid=self.disk_offering.id, zoneid=self.zone.id) - list_volume = Volume.list(self.userapiclient, id=self.volume.id, accountid=self.account.name, domainid=self.account.domainid) - self.assertEqual(validateList(list_volume)[0], - PASS, - 'Step 9: Check List volume response for volume %s' % self.volume.id) - self.assertEqual(list_volume[0].id, - self.volume.id, - 'Step 9: check list volume response for volume id: %s' % self.volume.id) - self.debug('Step 9: volume id %s got created successfully' % list_volume[0].id) + list_volume = Volume.list( + self.userapiclient, + id=self.volume.id, + accountid=self.account.name, + domainid=self.account.domainid) + self.assertEqual( + validateList(list_volume)[0], + PASS, + 'Step 9: Check List volume response for volume %s' % + self.volume.id) + self.assertEqual( + list_volume[0].id, + self.volume.id, + 'Step 9: check list volume response for volume id: %s' % + self.volume.id) + self.debug( + 'Step 9: volume id %s got created successfully' % + list_volume[0].id) self.virtual_machine_3.attach_volume(self.userapiclient, self.volume) list_volume = Volume.list(self.userapiclient, id=self.volume.id) - self.assertEqual(list_volume[0].virtualmachineid, - self.virtual_machine_3.id, - 'Step 9: Check if volume state (attached) is reflected') - self.debug('Step 9: volume id:%s successfully attached to vm id%s' % (self.volume.id, self.virtual_machine_3.id)) + self.assertEqual( + list_volume[0].virtualmachineid, + self.virtual_machine_3.id, + 'Step 9: Check if volume state (attached) is reflected') + self.debug( + 'Step 9: volume id:%s successfully attached to vm id%s' % + (self.volume.id, self.virtual_machine_3.id)) if self.disabled_pool_1: newpoolid = self.disabled_pool_1.id else: - self.skipTest('Step 9: Could not find a second storage pool to complete the remaining tests') + self.skipTest( + 'Step 9: Could not find a second storage pool to complete the remaining tests') # Step 10: Disable storage pool SP1 again and enable new pool try: @@ -371,52 +454,77 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): self.fail('Step 10: Enable storage pool %s' % e, 'failed') verify_pool_state(self, newpoolid, 'Up') try: - self.debug('Step 10: Disabling Storage Pool: %s' % self.storage_pool_1.id) - StoragePool.update(self.userapiclient, id=self.storage_pool_1.id, enabled=False) + self.debug( + 'Step 10: Disabling Storage Pool: %s' % + self.storage_pool_1.id) + StoragePool.update( + self.userapiclient, + id=self.storage_pool_1.id, + enabled=False) self.disabled_list.append(self.storage_pool_1.id) - self.debug('Step 10: Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Step 10: Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: self.debug("Step 10: Couldn't disable pool %s" % e) verify_pool_state(self, self.storage_pool_1.id, 'Disabled') # Step 11: Deploy new VM, VM5 - should succeed - self.virtual_machine_4 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_4 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_4.id, 'Running') # Step 12: Stop VM1 which is running from disabled pool self.virtual_machine_1.stop(self.userapiclient) verify_vm_state(self, self.virtual_machine_1.id, 'Stopped') - # Step 13: Migrate ROOT volume of VM1 to another enabled storage pool - should succeed + # Step 13: Migrate ROOT volume of VM1 to another enabled storage pool - + # should succeed if value != 'host': - root_volume = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='ROOT') + root_volume = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='ROOT') try: - Volume.migrate(self.userapiclient, volumeid=root_volume[0].id, storageid=newpoolid) + Volume.migrate( + self.userapiclient, + volumeid=root_volume[0].id, + storageid=newpoolid) except Exception as e: raise e - list_volume = list_volumes(self.userapiclient, id=root_volume[0].id) - self.assertEqual(isinstance(list_volume, list), True, 'Step 13: Check list volumes response for valid list') + list_volume = list_volumes( + self.userapiclient, id=root_volume[0].id) + self.assertEqual( + isinstance( + list_volume, + list), + True, + 'Step 13: Check list volumes response for valid list') - # Step 14: findStoragePoolsforMigration should not list the disabled pool + # Step 14: findStoragePoolsforMigration should not list the disabled + # pool if value != 'host': - pools_for_migration = StoragePool.listForMigration(self.userapiclient, id=root_volume[0].id) - self.debug('Step 14: List of pools suitable for migration: % s ' % pools_for_migration) + pools_for_migration = StoragePool.listForMigration( + self.userapiclient, id=root_volume[0].id) + self.debug( + 'Step 14: List of pools suitable for migration: % s ' % + pools_for_migration) if pools_for_migration: if self.storage_pool_1 in pools_for_migration: - self.fail('Step 14: Storage pool % s is supposed to be disabled and not suitable for migration, \ - but found in the list of pools suitable for migration' % self.storage_pool_1.id) - + self.fail( + 'Step 14: Storage pool % s is supposed to be disabled and not suitable for migration, \ + but found in the list of pools suitable for migration' % + self.storage_pool_1.id) @data('host', 'CLUSTER', 'ZONE') @attr(tags=['advanced', 'advancedsg', 'basic'], required_hardware='false') def test_02_vm_operations_on_disabled_pool(self, value): - """ Test Steps: ========= @@ -439,7 +547,8 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): """ - # Choose appropriate service offering depending on the scope the test is being run on + # Choose appropriate service offering depending on the scope the test + # is being run on self.disabled_list = [] if value == 'CLUSTER': other_scope = 'ZONE' @@ -463,58 +572,75 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): # Keep one storage pool active and disable the rest try: - self.list_storage = StoragePool.list(self.userapiclient, scope=value) + self.list_storage = StoragePool.list( + self.userapiclient, scope=value) if self.list_storage: count_st_pools = len(self.list_storage) else: count_st_pools = 0 self.disabled_pool_1 = None if count_st_pools > 1: - self.debug('Found % s storage pools, keeping one and disabling rest' % count_st_pools) + self.debug( + 'Found % s storage pools, keeping one and disabling rest' % + count_st_pools) for pool in self.list_storage[1:]: self.disabled_pool_1 = self.list_storage[1] if pool.state == 'Up': self.debug('Trying to disable storage %s' % pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: raise e elif count_st_pools == 1: - self.debug('Only one % s wide storage found - will not be able to complete all tests' % value) + self.debug( + 'Only one % s wide storage found - will not be able to complete all tests' % + value) else: self.skipTest('No % s wide storage pools found' % value) except Exception as e: raise e - # Disable the other scope storage pools while we are testing on one scope - applicable for only shared storage + # Disable the other scope storage pools while we are testing on one + # scope - applicable for only shared storage if value != 'host': try: - self.list_storage = StoragePool.list(self.userapiclient, scope=other_scope) + self.list_storage = StoragePool.list( + self.userapiclient, scope=other_scope) if self.list_storage: for pool in self.list_storage: if pool.state == 'Up': - self.debug('Trying to disable storage % s' % pool.id) + self.debug( + 'Trying to disable storage % s' % + pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: - self.fail("Couldn't disable storage % s" % pool.id) + self.fail( + "Couldn't disable storage % s" % pool.id) else: self.debug('No % s wide storage pools found' % other_scope) except Exception as e: raise e # Step 1: Deploy a VM and attach data disk to one VM - self.virtual_machine_1 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_1 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_1.id, 'Running') self.volume_1 = Volume.create(self.userapiclient, @@ -523,19 +649,29 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): zoneid=self.zone.id) self.virtual_machine_1.attach_volume(self.userapiclient, self.volume_1) list_volume = Volume.list(self.userapiclient, id=self.volume_1.id) - self.assertEqual(list_volume[0].virtualmachineid, - self.virtual_machine_1.id, '' - 'Check if volume state (attached) is reflected') - self.debug('Step 1: volume id:%s successfully attached to vm id%s' % (self.volume_1.id, self.virtual_machine_1.id)) + self.assertEqual( + list_volume[0].virtualmachineid, + self.virtual_machine_1.id, + '' + 'Check if volume state (attached) is reflected') + self.debug( + 'Step 1: volume id:%s successfully attached to vm id%s' % + (self.volume_1.id, self.virtual_machine_1.id)) # Step 2: Disable the storage pool - self.storage_pools_list = StoragePool.list(self.userapiclient, scope=value, state='Up') + self.storage_pools_list = StoragePool.list( + self.userapiclient, scope=value, state='Up') self.storage_pool_1 = self.storage_pools_list[0] try: - self.debug('Step 2: Disabling Storage Pool: %s' % self.storage_pool_1.id) - StoragePool.update(self.userapiclient, id=self.storage_pool_1.id, enabled=False) + self.debug( + 'Step 2: Disabling Storage Pool: %s' % + self.storage_pool_1.id) + StoragePool.update( + self.userapiclient, + id=self.storage_pool_1.id, + enabled=False) self.disabled_list.append(self.storage_pool_1.id) except Exception as e: self.debug("Step 2: Couldn't disable pool %s" % e) @@ -543,7 +679,10 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): verify_vm_state(self, self.virtual_machine_1.id, 'Running') # Step 3: Create Template from root volume of the VM - root_volume_1 = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='ROOT')[0] + root_volume_1 = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='ROOT')[0] self.virtual_machine_1.stop(self.userapiclient) try: template_2 = Template.create(self.userapiclient, @@ -553,7 +692,10 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): domainid=self.account.domainid) self.cleanup.append(template_2) self.debug('Step 3: Created template with ID: %s' % template_2.id) - list_template = Template.list(self.userapiclient, templatefilter='self', id=template_2.id) + list_template = Template.list( + self.userapiclient, + templatefilter='self', + id=template_2.id) except Exception as e: self.fail('Step 3: Template from volume failed') @@ -562,62 +704,88 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): services=self.testdata['volume'], diskofferingid=self.disk_offering.id, zoneid=self.zone.id) - self.debug('Step 4: Trying to attach new volume to VM on disabled storage - should fail') + self.debug( + 'Step 4: Trying to attach new volume to VM on disabled storage - should fail') with self.assertRaises(Exception): - self.virtual_machine_1.attach_volume(self.userapiclient, self.volume_2) + self.virtual_machine_1.attach_volume( + self.userapiclient, self.volume_2) # Step 5: Resize DATA disk to a higher value for attached disk try: - self.volume_1.resize(self.userapiclient, diskofferingid=self.resized_disk_offering.id) - list_volume_1 = Volume.list(self.userapiclient, id=self.volume_1.id) - self.assertEqual(list_volume_1[0].diskofferingid, - self.resized_disk_offering.id, - 'check list volume response for volume id: %s' % self.volume_1.id) - self.debug('Step 5: volume id %s got resized successfully' % list_volume_1[0].id) + self.volume_1.resize(self.userapiclient, + diskofferingid=self.resized_disk_offering.id) + list_volume_1 = Volume.list( + self.userapiclient, id=self.volume_1.id) + self.assertEqual( + list_volume_1[0].diskofferingid, + self.resized_disk_offering.id, + 'check list volume response for volume id: %s' % + self.volume_1.id) + self.debug( + 'Step 5: volume id %s got resized successfully' % + list_volume_1[0].id) except Exception as e: self.fail('Step 5: Volume resize on disabled pool failed: % s' % e) # Step 6: Take VM Snapshot if self.hypervisor.lower() not in ('kvm', 'hyperv', 'lxc'): try: - self.debug("Step 6: Taking VM Snapshot for vm id % s" % self.virtual_machine_1.id) + self.debug( + "Step 6: Taking VM Snapshot for vm id % s" % + self.virtual_machine_1.id) vm_snapshot = VmSnapshot.create(self.userapiclient, self.virtual_machine_1.id, 'false', 'TestSnapshot', 'Display Text') - self.assertEqual(vm_snapshot.state, 'Ready', 'Check VM snapshot is ready') + self.assertEqual( + vm_snapshot.state, + 'Ready', + 'Check VM snapshot is ready') except Exception as e: - self.fail('Step 6: VM Snapshot on disabled pool failed: % s' % e) - + self.fail( + 'Step 6: VM Snapshot on disabled pool failed: % s' % + e) + if vm_snapshot: - self.debug('Step 6: Deleting Vm Snapshot') - VmSnapshot.deleteVMSnapshot(self.userapiclient, vm_snapshot.id) + self.debug('Step 6: Deleting Vm Snapshot') + VmSnapshot.deleteVMSnapshot(self.userapiclient, vm_snapshot.id) # Step 7: Destroy VM and immediately restore the VM - self.debug("Step 7: Deleting and restoring the VM, should continue to run from same storage pool") + self.debug( + "Step 7: Deleting and restoring the VM, should continue to run from same storage pool") self.virtual_machine_1.delete(self.userapiclient, expunge=False) self.virtual_machine_1.recover(self.userapiclient) verify_vm_state(self, self.virtual_machine_1.id, 'Stopped') self.virtual_machine_1.start(self.userapiclient) verify_vm_state(self, self.virtual_machine_1.id, 'Running') - verify_vm_storage_pool(self, self.virtual_machine_1.id, self.storage_pool_1.id) + verify_vm_storage_pool( + self, + self.virtual_machine_1.id, + self.storage_pool_1.id) # Step 8: Enable new pool if self.disabled_pool_1: try: newpoolid = self.disabled_pool_1.id - StoragePool.update(self.userapiclient, id=newpoolid, enabled=True) + StoragePool.update( + self.userapiclient, id=newpoolid, enabled=True) self.debug("Step 8: Enabling new pool % s " % newpoolid) if newpoolid in self.disabled_list: self.disabled_list.remove(newpoolid) except Exception as e: self.fail('Step 8: Enable storage pool %s' % e, 'failed') else: - self.debug('Step 8: Could not find a second storage pool, so enabling the first storage pool and running the tests') + self.debug( + 'Step 8: Could not find a second storage pool, so enabling the first storage pool and running the tests') try: - self.debug('Step 8: Enabling Storage Pool: %s' % self.storage_pool_1.id) - StoragePool.update(self.userapiclient, id=self.storage_pool_1.id, enabled=True) + self.debug( + 'Step 8: Enabling Storage Pool: %s' % + self.storage_pool_1.id) + StoragePool.update( + self.userapiclient, + id=self.storage_pool_1.id, + enabled=True) if self.storage_pool_1.id in self.disabled_list: self.disabled_list.remove(self.storage_pool_1.id) newpoolid = self.storage_pool_1.id @@ -629,31 +797,46 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): if value != 'host': self.debug("Step 9: Re-installing VM 1") - vm_restore = self.virtual_machine_1.restore(self.userapiclient, templateid=self.template.id) + vm_restore = self.virtual_machine_1.restore( + self.userapiclient, templateid=self.template.id) verify_vm_storage_pool(self, self.virtual_machine_1.id, newpoolid) # Step 10 : Re-install VM with different template self.debug("Step 10: re-installing VM with different template") - vm_restore = self.virtual_machine_1.restore(self.userapiclient, templateid=template_2.id) + vm_restore = self.virtual_machine_1.restore( + self.userapiclient, templateid=template_2.id) verify_vm_storage_pool(self, self.virtual_machine_1.id, newpoolid) # Step 11: Repeat tests with enabled pool. Start with attach VM if value != 'host': self.debug("Step 11: Attach volume to VM") - self.virtual_machine_1.attach_volume(self.userapiclient, self.volume_2) - list_volume_2 = Volume.list(self.userapiclient, id=self.volume_2.id) + self.virtual_machine_1.attach_volume( + self.userapiclient, self.volume_2) + list_volume_2 = Volume.list( + self.userapiclient, id=self.volume_2.id) self.assertEqual(list_volume_2[0].virtualmachineid, self.virtual_machine_1.id, - 'Check if volume state (attached) is reflected') - self.debug('Step 11: volume id:% s successfully attached to vm id % s' % (self.volume_2.id, self.virtual_machine_1.id)) + 'Check if volume state (attached) is reflected') + self.debug( + 'Step 11: volume id:% s successfully attached to vm id % s' % + (self.volume_2.id, self.virtual_machine_1.id)) # Step 12: Re-size Volume to higher disk offering try: self.virtual_machine_1.stop(self.userapiclient) - self.volume_2.resize(self.userapiclient, diskofferingid=self.resized_disk_offering.id) - list_volume_2 = Volume.list(self.userapiclient, id=self.volume_2.id) - self.assertEqual(list_volume_2[0].diskofferingid, self.resized_disk_offering.id, 'check list volume response for volume id: %s' % self.volume_2.id) - self.debug('Step 12: volume id %s got resized successfully' % list_volume_2[0].id) + self.volume_2.resize( + self.userapiclient, + diskofferingid=self.resized_disk_offering.id) + list_volume_2 = Volume.list( + self.userapiclient, id=self.volume_2.id) + self.assertEqual( + list_volume_2[0].diskofferingid, + self.resized_disk_offering.id, + 'check list volume response for volume id: %s' % + self.volume_2.id) + self.debug( + 'Step 12: volume id %s got resized successfully' % + list_volume_2[0].id) except Exception as e: self.fail('Step 12: Failed to resize volume % s ' % e) self.virtual_machine_1.start(self.userapiclient) @@ -665,10 +848,19 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): # Step 14: Take Snapshot of VM if self.hypervisor.lower() not in ('kvm', 'hyperv', 'lxc'): try: - vm_snapshot = VmSnapshot.create(self.userapiclient, self.virtual_machine_1.id, 'false', 'TestSnapshot2', 'Display Text') - self.assertEqual(vm_snapshot.state, 'Ready', 'Check the snapshot of vm is ready!') + vm_snapshot = VmSnapshot.create( + self.userapiclient, + self.virtual_machine_1.id, + 'false', + 'TestSnapshot2', + 'Display Text') + self.assertEqual( + vm_snapshot.state, + 'Ready', + 'Check the snapshot of vm is ready!') except Exception as e: - self.fail('Step 14: Snapshot failed post enabling new storage pool') + self.fail( + 'Step 14: Snapshot failed post enabling new storage pool') # Step 15: Delete and recover VM self.debug("Step 15: Deleting and recovering VM") @@ -682,25 +874,33 @@ class TestPathDisableStorage_Basic(cloudstackTestCase): @ddt class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): """ - # Tests in this path requires to be run independently (not to be run in parallel with any other tests since it involves disabling/enabling storage pools and may cause unexpected failures in other tests + # Tests in this path requires to be run independently + # Not to be run in parallel with any other tests since it involves disabling/enabling storage pools \ + and may cause unexpected failures in other tests # The test also requires to have 2 Cluster-wide and 2 zone-wide storage pools available in the setup. # For running the tests on local storage, ensure there are 2 local storage pools set up on each host or different hosts """ - @classmethod def setUpClass(cls): - testClient = super(TestPathDisableStorage_Maint_Tags, cls).getClsTestClient() + testClient = super( + TestPathDisableStorage_Maint_Tags, + cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.testdata = testClient.getParsedTestDataConfig() cls.domain = get_domain(cls.apiclient) cls.zone = get_zone(cls.apiclient) cls.testdata['mode'] = cls.zone.networktype - cls.template = get_template(cls.apiclient, cls.zone.id, cls.testdata['ostype']) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata['ostype']) cls.testdata['template']['ostypeid'] = cls.template.ostypeid if cls.template == FAILED: - cls.fail('get_template() failed to return template with description %s' % cls.testdata['ostype']) + cls.fail( + 'get_template() failed to return template with description %s' % + cls.testdata['ostype']) cls._cleanup = [] cls.disabled_list = [] cls.maint_list = [] @@ -714,40 +914,36 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): cls.debug('Creating account') cls._cleanup.append(cls.account) - # Create shared storage offerings - cls.service_offering_shared = ServiceOffering.create(cls.apiclient, - cls.testdata['service_offering'] - ) + cls.service_offering_shared = ServiceOffering.create( + cls.apiclient, cls.testdata['service_offering']) cls._cleanup.append(cls.service_offering_shared) - cls.disk_offering_shared = DiskOffering.create(cls.apiclient, - cls.testdata['disk_offering'] - ) - cls.resized_disk_offering = DiskOffering.create(cls.apiclient, - cls.testdata['resized_disk_offering'] - ) + cls.disk_offering_shared = DiskOffering.create( + cls.apiclient, cls.testdata['disk_offering']) + cls.resized_disk_offering = DiskOffering.create( + cls.apiclient, cls.testdata['resized_disk_offering']) cls._cleanup.append(cls.disk_offering_shared) # Create offerings for local storage if local storage is enabled if cls.zone.localstorageenabled: - cls.testdata["service_offerings"]["storagetype"] = 'local' + cls.testdata["service_offerings"][ + "tiny"]["storagetype"] = 'local' cls.debug("Creating local storage offering") - cls.service_offering_local = ServiceOffering.create(cls.apiclient, - cls.testdata["service_offerings"] - ) + cls.service_offering_local = ServiceOffering.create( + cls.apiclient, cls.testdata["service_offerings"]["tiny"]) cls._cleanup.append(cls.service_offering_local) cls.testdata["disk_offering"]["storagetype"] = 'local' cls.debug("Creating local storage disk offering") - cls.disk_offering_local = DiskOffering.create(cls.apiclient, - cls.testdata["disk_offering"] - ) + cls.disk_offering_local = DiskOffering.create( + cls.apiclient, cls.testdata["disk_offering"]) cls._cleanup.append(cls.disk_offering_local) cls.testdata["disk_offering"]["storagetype"] = ' ' - cls.testdata["service_offerings"]["storagetype"] = ' ' + cls.testdata["service_offerings"]["tiny"]["storagetype"] = ' ' else: cls.debug("No local storage found") - cls.userapiclient = testClient.getUserApiClient(UserName=cls.account.name, DomainName=cls.account.domain) + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, DomainName=cls.account.domain) response = User.login(cls.userapiclient, username=cls.account.name, password=cls.testdata['account']['password']) @@ -772,7 +968,8 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): for poolid in self.disabled_list: if StoragePool.list(self.userapiclient, id=poolid)[0].state == 'Disabled': try: - StoragePool.update(self.userapiclient, id=poolid, enabled=True) + StoragePool.update( + self.userapiclient, id=poolid, enabled=True) self.debug('Enabling: % s ' % poolid) except Exception as e: self.fail("Couldn't enable storage % s" % id) @@ -781,22 +978,26 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): for poolid in self.maint_list: if StoragePool.list(self.userapiclient, id=poolid)[0].state == 'Maintenance': try: - StoragePool.cancelMaintenance(self.userapiclient, id=poolid) - self.debug('Cancelled Maintenance mode for % s' % poolid) + StoragePool.cancelMaintenance( + self.userapiclient, id=poolid) + self.debug( + 'Cancelled Maintenance mode for % s' % + poolid) except Exception as e: - self.fail("Couldn't cancel Maintenance mode for storage % s " % poolid) + self.fail( + "Couldn't cancel Maintenance mode for storage % s " % + poolid) try: cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.fail('Warning: Exception during cleanup : %s' % e) - - @data('host','CLUSTER', 'ZONE') + @data('host', 'CLUSTER', 'ZONE') @attr(tags=['advanced', 'advancedsg', 'basic'], required_hardware='false') def test_01_maint_capacity_tags(self, value): """ - + Test Steps: ======== @@ -818,7 +1019,8 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): """ - # Choose appropriate service offering depending on the scope the test is being run on + # Choose appropriate service offering depending on the scope the test + # is being run on self.disabled_list = [] if value == 'CLUSTER': other_scope = 'ZONE' @@ -837,62 +1039,82 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): else: self.skipTest("Local storage not enabled") - # Keep 2 storage pools active and disable the rest. If only one storage pool is present, then skip the test + # Keep 2 storage pools active and disable the rest. If only one storage + # pool is present, then skip the test try: - self.list_storage = StoragePool.list(self.userapiclient, scope=value) + self.list_storage = StoragePool.list( + self.userapiclient, scope=value) count_st_pools = len(self.list_storage) if count_st_pools <= 1: - raise unittest.SkipTest('Found 1 or less storage pools in % s wide scope- cannot proceed' % value) + raise unittest.SkipTest( + 'Found 1 or less storage pools in % s wide scope- cannot proceed' % + value) elif count_st_pools > 2: for pool in self.list_storage[2:]: if pool.state == 'Up': self.debug('Trying to disable storage %s' % pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: raise e elif count_st_pools == 2: for pool in self.list_storage: if pool.state != 'Up': - raise unittest.SkipTest('Found storage pool % s not in Up State.. cannot proceed' % pool.id) + raise unittest.SkipTest( + 'Found storage pool % s not in Up State.. cannot proceed' % + pool.id) except Exception as e: raise e - - # Disable the other scope shared storage pools while we are testing on one - applicable for only shared storage + # Disable the other scope shared storage pools while we are testing on + # one - applicable for only shared storage if value != 'host': try: - self.list_storage = StoragePool.list(self.userapiclient, scope=other_scope) + self.list_storage = StoragePool.list( + self.userapiclient, scope=other_scope) if self.list_storage: for pool in self.list_storage: if pool.state == 'Up': - self.debug('Trying to disable storage % s' % pool.id) + self.debug( + 'Trying to disable storage % s' % + pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: - self.fail("Couldn't disable storage % s" % pool.id) + self.fail( + "Couldn't disable storage % s" % pool.id) else: self.debug('No % s wide storage pools found' % other_scope) except Exception as e: raise e self.debug("Step 1: Deploy VM") - self.virtual_machine_1 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_1 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_1.id, 'Running') # Step 2: Add storage to Maintenance mode self.debug("Step 2: Adding storage to maintenance mode ") - root_volume = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='ROOT')[0] + root_volume = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='ROOT')[0] list_volume = Volume.list(self.userapiclient, id=root_volume.id) storage_id = list_volume[0].storageid try: @@ -900,29 +1122,44 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): self.debug('Step 2: Added % s to Maintenance mode') self.maint_list.append(storage_id) except Exception as e: - self.fail('Step 2: Failed to add Storage pool % s to Maintenance mode' % storage_id) + self.fail( + 'Step 2: Failed to add Storage pool % s to Maintenance mode' % + storage_id) verify_vm_state(self, self.virtual_machine_1.id, 'Stopped') - #Step 3: Cancel maintenance mode + # Step 3: Cancel maintenance mode try: StoragePool.cancelMaintenance(self.userapiclient, id=storage_id) - self.debug('Step 3: Cancelled Maintenance mode for % s' % storage_id) + self.debug( + 'Step 3: Cancelled Maintenance mode for % s' % + storage_id) self.maint_list.remove(storage_id) except Exception as e: - self.fail("Step 3: Couldn't cancel Maintenance mode for storage % s " % storage_id) + self.fail( + "Step 3: Couldn't cancel Maintenance mode for storage % s " % + storage_id) - # Step 4: Start the VM after disabling pool and verify it's running from same pool + # Step 4: Start the VM after disabling pool and verify it's running + # from same pool try: self.debug("Step 4: Starting VM after disabling pool") - self.list_storage = StoragePool.list(self.userapiclient, id=storage_id) + self.list_storage = StoragePool.list( + self.userapiclient, id=storage_id) if self.list_storage[0].state == 'Up': - StoragePool.update(self.userapiclient, id=storage_id, enabled=False) + StoragePool.update( + self.userapiclient, + id=storage_id, + enabled=False) self.debug("Step 4: Disabled pool % s" % storage_id) self.disabled_list.append(storage_id) except Exception as e: raise e - list_vm = list_virtual_machines(self.userapiclient, account=self.account.name, domainid=self.account.domainid, id=self.virtual_machine_1.id) + list_vm = list_virtual_machines( + self.userapiclient, + account=self.account.name, + domainid=self.account.domainid, + id=self.virtual_machine_1.id) vm = list_vm[0] if vm.state != 'Running': self.virtual_machine_1.start(self.userapiclient) @@ -930,49 +1167,64 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): verify_vm_storage_pool(self, self.virtual_machine_1.id, storage_id) # Step 5: Perform some VM operations - reboot - self.debug("Step 5: Performing reboot of VM % s" % self.virtual_machine_1.id) + self.debug( + "Step 5: Performing reboot of VM % s" % + self.virtual_machine_1.id) self.virtual_machine_1.reboot(self.userapiclient) verify_vm_storage_pool(self, self.virtual_machine_1.id, storage_id) # Step 6: Add tags to the storage pool self.debug("Step 6: Adding tags to storage pool") - StoragePool.update(self.userapiclient, id=storage_id, tags='disable_prov') + StoragePool.update( + self.userapiclient, + id=storage_id, + tags='disable_prov') # Step 7: Add tagged service offering - self.testdata['service_offerings']['tags'] = 'disable_prov' - self.testdata["service_offerings"]["storagetype"] = 'local' - self.tagged_so = ServiceOffering.create(self.userapiclient, self.testdata['service_offerings']) - self.testdata['service_offerings']['tags'] = ' ' - self.testdata["service_offerings"]["storagetype"] = ' ' + self.testdata['service_offerings']['tiny']['tags'] = 'disable_prov' + self.testdata["service_offerings"]["tiny"]["storagetype"] = 'local' + self.tagged_so = ServiceOffering.create( + self.userapiclient, self.testdata['service_offerings']) + self.testdata['service_offerings']['tiny']['tags'] = ' ' + self.testdata["service_offerings"]["tiny"]["storagetype"] = ' ' self.cleanup.append(self.tagged_so) # Step 8: Enable the pool try: self.debug("Step 8: Enabling pool") - self.list_storage = StoragePool.list(self.userapiclient, id=storage_id) + self.list_storage = StoragePool.list( + self.userapiclient, id=storage_id) if self.list_storage[0].state == 'Disabled': - StoragePool.update(self.userapiclient, id=storage_id, enabled=True) + StoragePool.update( + self.userapiclient, + id=storage_id, + enabled=True) self.disabled_list.remove(storage_id) except Exception as e: raise e # Step 9: Deploy VM using the tagged offering self.debug("Step 9: Deploying VM using tagged offering") - self.virtual_machine_2 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.tagged_so.id, - zoneid=self.zone.id) + self.virtual_machine_2 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.tagged_so.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_2.id, 'Running') verify_vm_storage_pool(self, self.virtual_machine_2.id, storage_id) # Step 10: Disable storage Pool try: - self.list_storage = StoragePool.list(self.userapiclient, id=storage_id) + self.list_storage = StoragePool.list( + self.userapiclient, id=storage_id) if self.list_storage[0].state == 'Up': - StoragePool.update(self.userapiclient, id=storage_id, enabled=False) + StoragePool.update( + self.userapiclient, + id=storage_id, + enabled=False) if storage_id not in self.disabled_list: self.disabled_list.append(storage_id) except Exception as e: @@ -985,35 +1237,46 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase): # Step 11: View current capacity of storage pool self.debug("Step 11: Getting current capacity...") - list_capacity_allocated = Capacities.list(self.userapiclient, fetchlatest='true', type=capacity_type) + list_capacity_allocated = Capacities.list( + self.userapiclient, fetchlatest='true', type=capacity_type) capacity_1 = list_capacity_allocated[0].capacityused self.debug("Capacity 1: % s" % capacity_1) - # Step 12: Delete VM and check capacity is recalculated in disabled pool + # Step 12: Delete VM and check capacity is recalculated in disabled + # pool self.debug("Step 12: Deleting Vm and re-calculating capacity") self.virtual_machine_2.delete(self.userapiclient) - list_capacity_allocated = Capacities.list(self.userapiclient, fetchlatest='true', type=capacity_type) + list_capacity_allocated = Capacities.list( + self.userapiclient, fetchlatest='true', type=capacity_type) capacity_2 = list_capacity_allocated[0].capacityused self.debug("Capacity 2: % s" % capacity_2) - self.assertGreater(capacity_1, - capacity_2, - 'Step 12: Capacity Used should be greater after VM delete although Storage is not enabled') + self.assertGreater( + capacity_1, + capacity_2, + 'Step 12: Capacity Used should be greater after VM delete although Storage is not enabled') # Step 13: Deploy new VM with tagged offering again - should fail with self.assertRaises(Exception): - self.virtual_machine_3 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.tagged_so.id, - zoneid=self.zone.id) + self.virtual_machine_3 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.tagged_so.id, + zoneid=self.zone.id) - # Step 14: Capacity should not be altered in disabled pool since deploy VM failed - self.debug("Step 14: Checking capacity is not altered after deploy VM fails") - list_capacity_allocated = Capacities.list(self.userapiclient, fetchlatest='true', type=capacity_type) + # Step 14: Capacity should not be altered in disabled pool since deploy + # VM failed + self.debug( + "Step 14: Checking capacity is not altered after deploy VM fails") + list_capacity_allocated = Capacities.list( + self.userapiclient, fetchlatest='true', type=capacity_type) capacity_3 = list_capacity_allocated[0].capacityused - self.assertEqual(capacity_2, capacity_3, "Step 14: Capacity Used shouldn't be altered since VM deployment failed") + self.assertEqual( + capacity_2, + capacity_3, + "Step 14: Capacity Used shouldn't be altered since VM deployment failed") class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): @@ -1022,22 +1285,28 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): since it involves disabling/enabling storage pools and may cause unexpected failures in other tests # This test atleast 2 Clusters in the set up wiht suitable hosts for migration. # For running the tests on local storage, ensure there are 2 local storage pools set up on each host - - """ + """ @classmethod def setUpClass(cls): - testClient = super(TestPathDisableStorage_Cross_Cluster, cls).getClsTestClient() + testClient = super( + TestPathDisableStorage_Cross_Cluster, + cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.testdata = testClient.getParsedTestDataConfig() cls.domain = get_domain(cls.apiclient) cls.zone = get_zone(cls.apiclient) cls.testdata['mode'] = cls.zone.networktype - cls.template = get_template(cls.apiclient, cls.zone.id, cls.testdata['ostype']) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata['ostype']) cls.testdata['template']['ostypeid'] = cls.template.ostypeid if cls.template == FAILED: - cls.fail('get_template() failed to return template with description %s' % cls.testdata['ostype']) + cls.fail( + 'get_template() failed to return template with description %s' % + cls.testdata['ostype']) cls._cleanup = [] cls.disabled_list = [] @@ -1047,20 +1316,21 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): cls.hypervisor = testClient.getHypervisorInfo() try: - cls.account = Account.create(cls.apiclient, cls.testdata['account'], admin=True) + cls.account = Account.create( + cls.apiclient, cls.testdata['account'], admin=True) cls.debug('Creating account') cls._cleanup.append(cls.account) - cls.service_offering = ServiceOffering.create(cls.apiclient, - cls.testdata['service_offering']) + cls.service_offering = ServiceOffering.create( + cls.apiclient, cls.testdata['service_offering']) cls._cleanup.append(cls.service_offering) - cls.disk_offering = DiskOffering.create(cls.apiclient, - cls.testdata['disk_offering']) - cls.resized_disk_offering = DiskOffering.create(cls.apiclient, - cls.testdata['resized_disk_offering']) + cls.disk_offering = DiskOffering.create( + cls.apiclient, cls.testdata['disk_offering']) + cls.resized_disk_offering = DiskOffering.create( + cls.apiclient, cls.testdata['resized_disk_offering']) cls._cleanup.append(cls.disk_offering) - cls.userapiclient = testClient.getUserApiClient(UserName=cls.account.name, - DomainName=cls.account.domain) + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, DomainName=cls.account.domain) response = User.login(cls.userapiclient, username=cls.account.name, password=cls.testdata['account']['password']) @@ -1069,7 +1339,6 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): cls.tearDownClass() raise e - @classmethod def tearDownClass(cls): try: @@ -1077,7 +1346,6 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): except Exception as e: raise Exception('Warning:Exception during cleanup: %s' % e) - def setUp(self): self.apiclient = self.testClient.getApiClient() self.cleanup = [] @@ -1085,9 +1353,11 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): def tearDown(self): if self.disabled_list: for poolid in self.disabled_list: - if StoragePool.list(self.userapiclient, id=poolid)[0].state == 'Disabled': + if StoragePool.list(self.userapiclient, id=poolid)[ + 0].state == 'Disabled': try: - StoragePool.update(self.userapiclient, id=poolid, enabled=True) + StoragePool.update( + self.userapiclient, id=poolid, enabled=True) self.debug('Enabling: % s ' % poolid) except Exception as e: self.fail("Couldn't enable storage % s" % id) @@ -1126,18 +1396,26 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): for cluster in clusters: try: self.debug('Processing for cluster % s ' % cluster.id) - self.list_storage = StoragePool.list(self.userapiclient, clusterid=cluster.id, scope='CLUSTER') + self.list_storage = StoragePool.list( + self.userapiclient, clusterid=cluster.id, scope='CLUSTER') count_st_pools = len(self.list_storage) if count_st_pools > 1: - self.debug('Found % s storage pools in cluster % s, keeping one and disabling rest' % (count_st_pools, cluster.id)) + self.debug( + 'Found % s storage pools in cluster % s, keeping one and disabling rest' % + (count_st_pools, cluster.id)) for pool in self.list_storage[1:]: self.disabled_pool_1 = self.list_storage[1] if pool.state == 'Up': - self.debug('Trying to disable storage %s' % pool.id) + self.debug( + 'Trying to disable storage %s' % + pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: raise e elif count_st_pools == 1: @@ -1148,15 +1426,19 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): raise e try: - self.list_storage = StoragePool.list(self.userapiclient, scope='ZONE') + self.list_storage = StoragePool.list( + self.userapiclient, scope='ZONE') if self.list_storage: for pool in self.list_storage: if pool.state == 'Up': self.debug('Trying to disable storage % s' % pool.id) try: - StoragePool.update(self.userapiclient, id=pool.id, enabled=False) + StoragePool.update( + self.userapiclient, id=pool.id, enabled=False) self.disabled_list.append(pool.id) - self.debug('Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: self.fail("Couldn't disable storage % s" % pool.id) else: @@ -1165,32 +1447,46 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): raise e # Step 1: Deploy VM in a cluster - self.virtual_machine_1 = VirtualMachine.create(self.userapiclient, - self.testdata['small'], - templateid=self.template.id, - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - zoneid=self.zone.id) + self.virtual_machine_1 = VirtualMachine.create( + self.userapiclient, + self.testdata['small'], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id) verify_vm_state(self, self.virtual_machine_1.id, 'Running') - root_vol = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='ROOT')[0] + root_vol = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='ROOT')[0] storage_1 = root_vol.storageid host_1 = self.virtual_machine_1.hostid - self.debug("Step 1: VM1 is running on % s host and % s storage pool" % (host_1, storage_1)) + self.debug( + "Step 1: VM1 is running on % s host and % s storage pool" % + (host_1, storage_1)) # Step 2: Live Migrate VM to another cluster - hosts_for_migration = Host.listForMigration(self.userapiclient, virtualmachineid=self.virtual_machine_1.id) - self.debug('Step 2: List of hosts suitable for migration: % s ' % hosts_for_migration) + hosts_for_migration = Host.listForMigration( + self.userapiclient, virtualmachineid=self.virtual_machine_1.id) + self.debug( + 'Step 2: List of hosts suitable for migration: % s ' % + hosts_for_migration) host_2 = None for host in hosts_for_migration: - self.debug('Step 2: Host Requires storage motion is % s ' % host.requiresStorageMotion) - if host.requiresStorageMotion == True: + self.debug( + 'Step 2: Host Requires storage motion is % s ' % + host.requiresStorageMotion) + if host.requiresStorageMotion: host_2 = host.id if host_2: - self.debug('Step 2: Migrating VM % s to Host % s' % (self.virtual_machine_1.id, host_2)) - self.virtual_machine_1.migrate_vm_with_volume(self.userapiclient, hostid=host_2) + self.debug( + 'Step 2: Migrating VM % s to Host % s' % + (self.virtual_machine_1.id, host_2)) + self.virtual_machine_1.migrate_vm_with_volume( + self.userapiclient, hostid=host_2) else: self.fail('Step 2: No host found suitable for migration') @@ -1202,42 +1498,62 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): self.virtual_machine_1.attach_volume(self.userapiclient, self.volume_1) list_volume = Volume.list(self.userapiclient, id=self.volume_1.id) + self.assertEqual( + list_volume[0].virtualmachineid, + self.virtual_machine_1.id, + 'Step 3: Check if volume state (attached) is reflected') + self.debug( + 'Step 3: volume id:% s successfully attached to vm id % s' % + (self.volume_1.id, self.virtual_machine_1.id)) - self.assertEqual(list_volume[0].virtualmachineid, - self.virtual_machine_1.id, - 'Step 3: Check if volume state (attached) is reflected') - self.debug('Step 3: volume id:% s successfully attached to vm id % s' % (self.volume_1.id, self.virtual_machine_1.id)) - - root_vol = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='ROOT')[0] + root_vol = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='ROOT')[0] storage_2 = root_vol.storageid - data_vol = Volume.list(self.userapiclient, virtualmachineid=self.virtual_machine_1.id, type='DATA')[0] - self.debug("Step 3: Data Volume is in storage pool: % s" % data_vol.storageid) - self.assertEqual(data_vol.storageid, - root_vol.storageid, - "Step 3: Root and Data disk should be running from 2nd storage pool where the VM was live migrated") + data_vol = Volume.list( + self.userapiclient, + virtualmachineid=self.virtual_machine_1.id, + type='DATA')[0] + self.debug( + "Step 3: Data Volume is in storage pool: % s" % + data_vol.storageid) + self.assertEqual( + data_vol.storageid, + root_vol.storageid, + "Step 3: Root and Data disk should be running from 2nd storage pool where the VM was live migrated") - # Step 4: Disable first Storage Pool and verify it is not listed in hosts suitable for migration + # Step 4: Disable first Storage Pool and verify it is not listed in + # hosts suitable for migration try: StoragePool.update(self.userapiclient, id=storage_1, enabled=False) self.disabled_list.append(storage_1) - self.debug('Step 4: Appended to list of disabled pools. List is now: % s ' % self.disabled_list) + self.debug( + 'Step 4: Appended to list of disabled pools. List is now: % s ' % + self.disabled_list) except Exception as e: self.fail("Step 4: Couldn't disable storage % s" % storage_1) - # Step 5: Disabled pool shouldn't be listed in hostsforMigration since all pools in the cluster are disabled - hosts_for_migration = Host.listForMigration(self.userapiclient, virtualmachineid=self.virtual_machine_1.id) - self.debug("Step 5: List of Hosts For Migration is % s" % hosts_for_migration) + # Step 5: Disabled pool shouldn't be listed in hostsforMigration since + # all pools in the cluster are disabled + hosts_for_migration = Host.listForMigration( + self.userapiclient, virtualmachineid=self.virtual_machine_1.id) + self.debug( + "Step 5: List of Hosts For Migration is % s" % + hosts_for_migration) if hosts_for_migration: for host in hosts_for_migration: if host_1 == host.id: - self.fail("Step 5: All pools in the cluster are disabled, hence host should not be listed for migration") + self.fail( + "Step 5: All pools in the cluster are disabled, hence host should not be listed for migration") # Step 6: Stop VM and Detach Disk self.virtual_machine_1.stop(self.userapiclient) verify_vm_state(self, self.virtual_machine_1.id, 'Stopped') verify_vm_storage_pool(self, self.virtual_machine_1.id, storage_2) self.debug("Step 6: Stopping VM and detaching disk") - self.virtual_machine_1.detach_volume(self.userapiclient, volume=self.volume_1) + self.virtual_machine_1.detach_volume( + self.userapiclient, volume=self.volume_1) # Step 7, 8: Enable Pool for Migrating VM and disable again try: @@ -1247,15 +1563,19 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): except Exception as e: self.fail("Step 7: Couldn't enable storage % s" % storage_1) - self.virtual_machine_1.start(self.userapiclient) verify_vm_state(self, self.virtual_machine_1.id, 'Running') try: - self.debug('Step 8: Migrating VM % s to Host % s' % (self.virtual_machine_1.id, host_1)) - self.virtual_machine_1.migrate_vm_with_volume(self.userapiclient, hostid=host_1) + self.debug( + 'Step 8: Migrating VM % s to Host % s' % + (self.virtual_machine_1.id, host_1)) + self.virtual_machine_1.migrate_vm_with_volume( + self.userapiclient, hostid=host_1) except Exception as e: - self.fail("Step 8: Couldn't live migrate VM to host % s due to % s" % (host_1, e)) + self.fail( + "Step 8: Couldn't live migrate VM to host % s due to % s" % + (host_1, e)) # Step 9: disable pool again try: @@ -1265,16 +1585,19 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): except Exception as e: self.fail("Step 9: Couldn't disable storage % s" % storage_1) - st_list = StoragePool.list(self.userapiclient, id=storage_1) - self.debug("9.5 Status of storage pool 1 % s is % s " % (st_list[0].name, st_list[0].state)) + self.debug( + "9.5 Status of storage pool 1 % s is % s " % + (st_list[0].name, st_list[0].state)) - - # Step 10: Try to attach data disk running from enabled pool with Root running in disabled pool - this should fail + # Step 10: Try to attach data disk running from enabled pool with Root + # running in disabled pool - this should fail with self.assertRaises(Exception): - self.virtual_machine_1.attach_volume(self.userapiclient, self.volume_1) - self.debug("Step 10: Trying to attach volume % s" % self.volume_1.id) - + self.virtual_machine_1.attach_volume( + self.userapiclient, self.volume_1) + self.debug( + "Step 10: Trying to attach volume % s" % + self.volume_1.id) # Step 11: Enable the pool and try to attach again - this should pass try: @@ -1289,8 +1612,10 @@ class TestPathDisableStorage_Cross_Cluster(cloudstackTestCase): self.debug("Step 12: Trying to attach volume") list_volume = Volume.list(self.userapiclient, id=self.volume_1.id) - self.assertEqual(list_volume[0].virtualmachineid, - self.virtual_machine_1.id, - 'Step 12: Check if volume state (attached) is reflected') - self.debug('Step 12: volume id:%s successfully attached to vm id%s' % (self.volume_1.id, self.virtual_machine_1.id)) - + self.assertEqual( + list_volume[0].virtualmachineid, + self.virtual_machine_1.id, + 'Step 12: Check if volume state (attached) is reflected') + self.debug( + 'Step 12: volume id:%s successfully attached to vm id%s' % + (self.volume_1.id, self.virtual_machine_1.id)) diff --git a/test/integration/component/test_add_remove_network.py b/test/integration/component/test_add_remove_network.py index fb805305fa9..55d0b0ed976 100644 --- a/test/integration/component/test_add_remove_network.py +++ b/test/integration/component/test_add_remove_network.py @@ -37,7 +37,10 @@ from marvin.lib.base import ( NetworkOffering, Network, VpcOffering, - VPC + VPC, + PublicIPAddress, + FireWallRule, + NATRule ) from marvin.lib.common import (get_domain, get_zone, @@ -46,7 +49,8 @@ from marvin.lib.common import (get_domain, list_events, list_zones, get_free_vlan, - update_resource_limit + update_resource_limit, + list_nat_rules ) from marvin.lib.utils import (validateList, @@ -167,6 +171,11 @@ class Services: "displaytext": "TestVPC add remove network", "cidr": '10.0.0.1/24' }, + "natrule": { + "privateport": 22, + "publicport": 22, + "protocol": "TCP" + }, } @ddt @@ -811,7 +820,7 @@ class TestRemoveNetworkFromVirtualMachine(cloudstackTestCase): self.assertTrue(len(self.nics) == 1, "nics list should contain the nic of added isolated network,\ the number of nics for the network should be 1, instead they are %s" % len(self.nics)) - return + return self.nics @attr(tags = ["advanced", "dvs"]) def test_07_remove_nic_running_vm(self): @@ -909,6 +918,109 @@ class TestRemoveNetworkFromVirtualMachine(cloudstackTestCase): self.debug("Operation failed with exception: %s" % e.exception) return + @attr(tags = ["advanced"], required_hardware="true") + def test_29_remove_nic_CS22503(self): + """Test to verify remove nic from vm if the nic ip is same as another vm ip in another network""" + + # 1. Deploy vm v1 with networks n1 and n2 + # 2. Check the ip address of nic in n2 say ip1 + # 3. Deployed vm v2 in another network say n3 with same IP address as ip1 using + # 'deployVirtualMachine' api with 'ipaddress' as one of the parameters. + # 4. Acquire public IP in n3 network. + # 5. Configure PF on the acquired IP and assign it to vm v2 + # 6. Try to remove nic n2 from v1. Should be successfull + # There was a bug due to both vms has same ip address, so not allowing to remove nic + + vm1 = self.virtual_machine + nic2 = self.addNetworkToVm(self.isolated_network, vm1) + #get the ip address of the nic added in 2nd network + vm1_ip = nic2[0].ipaddress + self.assertIsNotNone(vm1_ip, "New nic did not get the ip address") + #Create network n3 + self.network3 = Network.create( + self.api_client, + self.services["isolated_network"], + self.account.name, + self.account.domainid, + networkofferingid=self.isolated_network_offering.id + ) + self.cleanup.append(self.network3) + self.vm2 = VirtualMachine.create( + self.api_client, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + networkids=[self.network3.id], + ipaddress=vm1_ip, + mode=self.zone.networktype + ) + self.cleanup.append(self.vm2) + vm2 = VirtualMachine.list( + self.api_client, + id=self.vm2.id + ) + self.assertEqual(validateList(vm2)[0], PASS, "list vms returned invalid response") + self.assertIsNotNone(vm2[0].nic[0].ipaddress, "vm2 didn't get the ip address") + self.assertEqual( + vm1_ip, + vm2[0].nic[0].ipaddress, + "vm2 did not get the ip address passed while deploying vm" + ) + ip_address = PublicIPAddress.create( + self.apiclient, + self.account.name, + self.zone.id, + self.account.domainid, + self.services["virtual_machine"], + self.network3.id + ) + self.cleanup.append(ip_address) + self.cleanup = self.cleanup[::-1] + # Open up firewall port for SSH + FireWallRule.create( + self.apiclient, + ipaddressid=ip_address.ipaddress.id, + protocol=self.services["natrule"]["protocol"], + cidrlist=['0.0.0.0/0'], + startport=self.services["natrule"]["publicport"], + endport=self.services["natrule"]["publicport"] + ) + # Create NAT rule + nat_rule = NATRule.create( + self.apiclient, + self.vm2, + self.services["natrule"], + ip_address.ipaddress.id + ) + list_nat_rule_response = list_nat_rules( + self.apiclient, + id=nat_rule.id + ) + self.assertEqual( + validateList(list_nat_rule_response)[0], + PASS, + "Check list response returns a valid list" + ) + self.assertEqual( + list_nat_rule_response[0].id, + nat_rule.id, + "Check Correct Port forwarding Rule is returned" + ) + #Try to remove nic 2 from vm1 + try: + vm1.remove_nic(self.apiclient, self.nics[0].id) + vm1_res = VirtualMachine.list(self.apiclient, id=vm1.id) + self.assertEqual(validateList(vm1_res)[0], PASS, "invalid listvm response") + self.assertEqual( + len(vm1_res[0].nic), + 1, + "VM has more than one nic even after removing the 2nd nic" + ) + except Exception as e: + self.fail("Failed to delete the nic from vm") + return + class TestUpdateVirtualMachineNIC(cloudstackTestCase): @classmethod diff --git a/test/integration/component/test_browse_templates.py b/test/integration/component/test_browse_templates.py index 2cacdb6e678..9366914cfd9 100644 --- a/test/integration/component/test_browse_templates.py +++ b/test/integration/component/test_browse_templates.py @@ -1674,6 +1674,42 @@ class TestBrowseUploadVolume(cloudstackTestCase): return + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") + def test_browser_upload_template_incomplete(self): + """ + Test browser based incomplete template upload, followed by SSVM destroy. Template should go to UploadAbandoned state and get cleaned up. + """ + try: + self.debug("========================= Test browser based incomplete template upload ========================") + + #Only register template, without uploading + cmd = getUploadParamsForTemplate.getUploadParamsForTemplateCmd() + cmd.zoneid = self.zone.id + cmd.format = self.uploadtemplateformat + cmd.name=self.templatename+self.account.name+(random.choice(string.ascii_uppercase)) + cmd.account=self.account.name + cmd.domainid=self.domain.id + cmd.displaytext=cmd.name + cmd.hypervisor=self.templatehypervisor + cmd.ostypeid=self.templateostypeid + template_response=self.apiclient.getUploadParamsForTemplate(cmd) + + #Destroy SSVM, and wait for new one to start + self.destroy_ssvm() + + #Verify that the template is cleaned up as part of sync-up during new SSVM start + list_template_response=Template.list( + self.apiclient, + id=template_response.id, + templatefilter="all", + zoneid=self.zone.id) + self.assertEqual(list_template_response, None, "Template is not cleaned up, some issue with template sync-up") + + except Exception as e: + self.fail("Exceptione occurred : %s" % e) + return + + @classmethod def tearDownClass(self): try: diff --git a/test/integration/component/test_browse_templates2.py b/test/integration/component/test_browse_templates2.py new file mode 100755 index 00000000000..9fdf3f0d5e8 --- /dev/null +++ b/test/integration/component/test_browse_templates2.py @@ -0,0 +1,212 @@ +# 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. + +# Import Local Modules + +import marvin +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackAPI import * +from marvin.lib.utils import * +from marvin.lib.base import * +from marvin.lib.common import * +from marvin.codes import PASS, FAILED, SUCCESS, XEN_SERVER +from marvin.sshClient import SshClient +import requests +requests.packages.urllib3.disable_warnings() +import random +import string +import telnetlib +import os +import urllib +import time +import tempfile +_multiprocess_shared_ = True + + +class TestBrowseUploadTemplate(cloudstackTestCase): + + """ + Tests for browser based upload template feature. Once all issues in test_browse_templates.py are fixed, this should be merged back + """ + @classmethod + def setUpClass(cls): + cls.testClient = super(TestBrowseUploadTemplate, cls).getClsTestClient() + cls.testdata = cls.testClient.getParsedTestDataConfig() + cls.apiclient = cls.testClient.getApiClient() + cls.hypervisor = cls.testClient.getHypervisorInfo() + cls._cleanup = [] + cls.cleanup = [] + + hosts = list_hosts( + cls.apiclient, + type="Routing" + ) + if hosts is None: + cls.SkipTest( + "There are no hypervisor's available. Check list hosts response") + + cls.uploadtemplateformat = "VHD" + cls.templatename = "test" + cls.templatehypervisor = "XenServer" + cls.templateostypeid = 142 + + cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) + cls.domain = get_domain(cls.apiclient) + cls.pod = get_pod(cls.apiclient, cls.zone.id) + + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + + cls._cleanup = [ + cls.account + ] + + def waitForSystemVMAgent(self, vmname): + timeout = self.testdata["timeout"] + + while True: + list_host_response = list_hosts( + self.apiclient, + name=vmname + ) + + if list_host_response and list_host_response[0].state == 'Up': + break + + if timeout == 0: + raise Exception("Timed out waiting for SSVM agent to be Up") + + time.sleep(self.testdata["sleep"]) + timeout = timeout - 1 + + def destroy_ssvm(self): + + list_ssvm_response = list_ssvms( + self.apiclient, + systemvmtype='secondarystoragevm', + state='Running', + zoneid=self.zone.id + ) + self.assertEqual( + isinstance(list_ssvm_response, list), + True, + "Check list response returns a valid list" + ) + ssvm_response = list_ssvm_response[0] + + old_name = ssvm_response.name + + self.debug("Destroying SSVM: %s" % ssvm_response.id) + cmd = destroySystemVm.destroySystemVmCmd() + cmd.id = ssvm_response.id + self.apiclient.destroySystemVm(cmd) + + timeout = self.testdata["timeout"] + while True: + list_ssvm_response = list_ssvms( + self.apiclient, + zoneid=self.zone.id, + systemvmtype='secondarystoragevm' + ) + if isinstance(list_ssvm_response, list): + if list_ssvm_response[0].state == 'Running': + break + if timeout == 0: + raise Exception("List SSVM call failed!") + + time.sleep(self.testdata["sleep"]) + timeout = timeout - 1 + + ssvm_response = list_ssvm_response[0] + + # Verify Name, Public IP, Private IP and Link local IP + # for newly created SSVM + self.assertNotEqual( + ssvm_response.name, + old_name, + "Check SSVM new name with name of destroyed SSVM" + ) + self.assertEqual( + hasattr(ssvm_response, 'privateip'), + True, + "Check whether SSVM has private IP field" + ) + + self.assertEqual( + hasattr(ssvm_response, 'linklocalip'), + True, + "Check whether SSVM has link local IP field" + ) + + self.assertEqual( + hasattr(ssvm_response, 'publicip'), + True, + "Check whether SSVM has public IP field" + ) + + # Wait for the agent to be up + self.waitForSystemVMAgent(ssvm_response.name) + + return + + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") + def test_browser_upload_template_incomplete(self): + """ + Test browser based incomplete template upload, followed by SSVM destroy. Template should go to UploadAbandoned state and get cleaned up. + """ + try: + self.debug("========================= Test browser based incomplete template upload ========================") + + #Only register template, without uploading + cmd = getUploadParamsForTemplate.getUploadParamsForTemplateCmd() + cmd.zoneid = self.zone.id + cmd.format = self.uploadtemplateformat + cmd.name=self.templatename+self.account.name+(random.choice(string.ascii_uppercase)) + cmd.account=self.account.name + cmd.domainid=self.domain.id + cmd.displaytext=cmd.name + cmd.hypervisor=self.templatehypervisor + cmd.ostypeid=self.templateostypeid + template_response=self.apiclient.getUploadParamsForTemplate(cmd) + + #Destroy SSVM, and wait for new one to start + self.destroy_ssvm() + + #Verify that the template is cleaned up as part of sync-up during new SSVM start + list_template_response=Template.list( + self.apiclient, + id=template_response.id, + templatefilter="all", + zoneid=self.zone.id) + self.assertEqual(list_template_response, None, "Template is not cleaned up, some issue with template sync-up") + + except Exception as e: + self.fail("Exception occurred : %s" % e) + return + + @classmethod + def tearDownClass(self): + try: + self.apiclient = super(TestBrowseUploadTemplate, self).getClsTestClient().getApiClient() + cleanup_resources(self.apiclient, self._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return diff --git a/test/integration/component/test_browse_volumes.py b/test/integration/component/test_browse_volumes.py index 4c153517a3f..12aa037d57a 100644 --- a/test/integration/component/test_browse_volumes.py +++ b/test/integration/component/test_browse_volumes.py @@ -2678,6 +2678,34 @@ class TestBrowseUploadVolume(cloudstackTestCase): return + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") + def test_browser_upload_volume_incomplete(self): + """ + Test browser based incomplete volume upload, followed by SSVM destroy. Volume should go to UploadAbandoned/Error state and get cleaned up. + """ + try: + self.debug("========================= Test browser based incomplete volume upload ========================") + + #Only register volume, without uploading + cmd = getUploadParamsForVolume.getUploadParamsForVolumeCmd() + cmd.zoneid = self.zone.id + cmd.format = self.uploadvolumeformat + cmd.name = self.volname + self.account.name + (random.choice(string.ascii_uppercase)) + cmd.account = self.account.name + cmd.domainid = self.domain.id + upload_volume_response = self.apiclient.getUploadParamsForVolume(cmd) + + #Destroy SSVM, and wait for new one to start + self.destroy_ssvm() + + #Verify that the volume is cleaned up as part of sync-up during new SSVM start + self.validate_uploaded_volume(upload_volume_response.id, 'UploadAbandoned') + + except Exception as e: + self.fail("Exceptione occurred : %s" % e) + return + + @classmethod def tearDownClass(self): try: diff --git a/test/integration/component/test_escalation_listTemplateDomainAdmin.py b/test/integration/component/test_escalation_listTemplateDomainAdmin.py index 58e1c3b3385..5c52c062c15 100644 --- a/test/integration/component/test_escalation_listTemplateDomainAdmin.py +++ b/test/integration/component/test_escalation_listTemplateDomainAdmin.py @@ -1,4 +1,3 @@ - # 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 diff --git a/test/integration/component/test_escalations_ipaddresses.py b/test/integration/component/test_escalations_ipaddresses.py index ee940d3f0bd..03e36b96712 100644 --- a/test/integration/component/test_escalations_ipaddresses.py +++ b/test/integration/component/test_escalations_ipaddresses.py @@ -1947,12 +1947,12 @@ class TestIpAddresses(cloudstackTestCase): self.assertEqual( 1, len(list_ipaddresses_after), - "VM Created is not in Runnning state" + "VM Created is not in Running state" ) self.assertEquals( vm_created.id, list_vms_running[0].id, - "VM Created is not in Runnning state" + "VM Created is not in Running state" ) # Listing Virtual Machines in stopped state in above created network list_vms_stopped = VirtualMachine.list( diff --git a/test/integration/component/test_escalations_routers.py b/test/integration/component/test_escalations_routers.py new file mode 100644 index 00000000000..73e4bc75789 --- /dev/null +++ b/test/integration/component/test_escalations_routers.py @@ -0,0 +1,196 @@ +# 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. +""" P1 tests for alert receiving from VR on service failure in VR +""" +# Import Local Modules +# import marvin +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (get_process_status, validateList, + cleanup_resources) +from marvin.lib.base import (Account, + ServiceOffering, + VirtualMachine) +from marvin.lib.common import (list_hosts, + list_routers, + get_zone, + get_domain, + get_template) +from nose.plugins.attrib import attr +from marvin.codes import FAILED +from marvin.codes import PASS + +_multiprocess_shared_ = True + + +class TestVR(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + cls._cleanup = [] + cls.testClient = super( + TestVR, + cls).getClsTestClient() + cls.api_client = cls.testClient.getApiClient() + cls.services = cls.testClient.getParsedTestDataConfig() + + # Get Zone, Domain and templates + cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) + domain = get_domain(cls.api_client) + cls.services['mode'] = cls.zone.networktype + + template = get_template( + cls.api_client, + cls.zone.id, + cls.services["ostype"] + ) + + if template == FAILED: + assert False, "get_template() failed to return template with \ + description %s" % cls.services["ostype"] + # Set Zones and disk offerings ?? + cls.services["small"]["zoneid"] = cls.zone.id + cls.services["small"]["template"] = template.id + + # Create account, service offerings, vm. + cls.account = Account.create( + cls.api_client, + cls.services["account"], + domainid=domain.id + ) + + cls.small_offering = ServiceOffering.create( + cls.api_client, + cls.services["service_offerings"]["small"] + ) + cls._cleanup.append(cls.small_offering) + cls._cleanup.append(cls.account) + return + + @classmethod + def tearDownClass(cls): + cls.api_client = super( + TestVR, + cls).getClsTestClient().getApiClient() + cleanup_resources(cls.api_client, cls._cleanup) + return + + def setUp(self): + self.apiclient = self.testClient.getApiClient() + self.hypervisor = self.testClient.getHypervisorInfo() + self.cleanup = [] + + def tearDown(self): + # Clean up, terminate the created ISOs + cleanup_resources(self.apiclient, self.cleanup) + return + + @attr(tags=["advanced"], required_hardware="true") + def test_01_FTPModulesInVR(self): + """ + @desc: Verify FTP modules are loaded in VR of advance zone + step1 : create a VR in advance zone + step2: Verify FTP modules are there in created VR + """ + if self.zone.networktype == "Basic": + self.skipTest("This test can be run only in advance zone") + + # create a virtual machine + vm = VirtualMachine.create( + self.api_client, + self.services["small"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.small_offering.id, + mode=self.services["mode"] + ) + self.assertIsNotNone(vm, "Failed to deploy virtual machine") + self.cleanup.append(vm) + response = VirtualMachine.list(self.api_client, id=vm.id) + status = validateList(response) + self.assertEqual( + status[0], + PASS, + "list vm response returned invalid list") + list_router_response = list_routers( + self.apiclient, + account=self.account.name, + domainid=self.account.domainid + ) + status = validateList(list_router_response) + self.assertEqual( + status[0], PASS, "Check list response returns a valid list") + router = list_router_response[0] + + self.debug("Router ID: %s, state: %s" % (router.id, router.state)) + + self.assertEqual( + router.state, + 'Running', + "Check list router response for router state" + ) + + if self.hypervisor.lower() in ('vmware', 'hyperv'): + result = get_process_status( + self.apiclient.connection.mgtSvr, + 22, + self.apiclient.connection.user, + self.apiclient.connection.passwd, + router.linklocalip, + "lsmod | grep ftp", + hypervisor=self.hypervisor + ) + else: + try: + hosts = list_hosts( + self.apiclient, + zoneid=router.zoneid, + type='Routing', + state='Up', + id=router.hostid + ) + + self.assertEqual( + isinstance(hosts, list), + True, + "Check list host returns a valid list" + ) + + host = hosts[0] + result = get_process_status( + host.ipaddress, + 22, + self.services["configurableData"]["host"]["username"], + self.services["configurableData"]["host"]["password"], + router.linklocalip, + "lsmod | grep ftp" + ) + + except Exception as e: + raise Exception("Exception raised in getting host\ + credentials: %s " % e) + + res = str(result) + self.debug("lsmod | grep ftp: %s" % res) + if "nf_nat_ftp" in res and "nf_conntrack_ftp" in res: + ismoduleinstalled = True + else: + ismoduleinstalled = False + self.assertEqual( + ismoduleinstalled, + True, + "nf_conntrack_ftp and nf_nat_ftp modules not installed on routers") + return diff --git a/test/integration/component/test_escalations_templates.py b/test/integration/component/test_escalations_templates.py index dbde1fd2838..4cffda3f660 100644 --- a/test/integration/component/test_escalations_templates.py +++ b/test/integration/component/test_escalations_templates.py @@ -23,21 +23,14 @@ from marvin.lib.base import (Account, Zone, Template, Hypervisor, - Domain, - Configurations, - VirtualMachine, - Snapshot, ServiceOffering) from marvin.lib.common import (get_domain, get_zone, get_template, list_os_types, - get_builtin_template_info, - list_volumes) -from marvin.cloudstackException import CloudstackAPIException + get_builtin_template_info) from marvin.codes import PASS from nose.plugins.attrib import attr -from marvin.sshClient import SshClient import time @@ -72,51 +65,12 @@ class TestTemplates(cloudstackTestCase): cls.services["templates"]["url"] = builtin_info[0] cls.services["templates"]["hypervisor"] = builtin_info[1] cls.services["templates"]["format"] = builtin_info[2] - if cls.zone.localstorageenabled: - cls.storagetype = 'local' - cls.services["service_offerings"][ - "tiny"]["storagetype"] = 'local' - cls.services["disk_offering"]["storagetype"] = 'local' - else: - cls.storagetype = 'shared' - cls.services["service_offerings"][ - "tiny"]["storagetype"] = 'shared' - cls.services["disk_offering"]["storagetype"] = 'shared' - cls.services["virtual_machine"]["hypervisor"] = cls.hypervisor - cls.services["virtual_machine"]["zoneid"] = cls.zone.id - cls.services["virtual_machine"]["template"] = cls.template.id - cls.services["custom_volume"]["zoneid"] = cls.zone.id - cls.service_offering = ServiceOffering.create( - cls.api_client, - cls.services["service_offerings"]["tiny"] - ) - cls._cleanup.append(cls.service_offering) + except Exception as e: cls.tearDownClass() raise Exception("Warning: Exception in setup : %s" % e) return - - def RestartServers(self): - """ Restart management server and usage server """ - - sshClient = SshClient( - self.mgtSvrDetails["mgtSvrIp"], - 22, - self.mgtSvrDetails["user"], - self.mgtSvrDetails["passwd"] - ) - command = "service cloudstack-management restart" - sshClient.execute(command) - return - - def updateConfigurAndRestart(self,name, value): - Configurations.update(self.api_client, - name,value ) - self.RestartServers() - time.sleep(self.services["sleep"]) - - def setUp(self): self.apiClient = self.testClient.getApiClient() @@ -969,222 +923,5 @@ class TestTemplates(cloudstackTestCase): del self.services["privatetemplate"]["ostype"] return - @attr(tags=["advanced", "basic"], required_hardware="true") - def test_05_template_permissions(self): - """ - @Desc: Test to create Public Template by registering or by snapshot and volume when - Global parameter 'allow.public.user.template' is set to False - @steps: - 1.Set Global parameter 'allow.public.user.template' as False. Restart Management server - 2. Create a domain - 3. Create a domain admin and a domain user - 4. Create a vm as domain user - 5. take snapshot of root disk as user vm - 6. try to create public template from snapshot . It should fail - 7. stop the VM - 8. take the public template from volume. it should fail - 9. register a public template as a domain user . it should fail - 10. create a VM as domain admin - 11. create a snapshot of root disk as domain admin - 12 create a public template of the snapshot .it should fail - 13. Register a public template as domain admin. it should fail - 14 Stop the vm as domain admin - 15. Create a template from volume as domain admin . it should fail - - """ - self.updateConfigurAndRestart("allow.public.user.templates", "false") - - subdomain = Domain.create( - self.api_client, - self.services["domain"], - ) - - admin_account = Account.create( - self.api_client, - self.services["account"], - admin=True, - domainid=subdomain.id - ) - user_account = Account.create( - self.api_client, - self.services["account2"], - admin=False, - domainid=subdomain.id - ) - admin_user = admin_account.user[0] - self.admin_api_client = self.testClient.getUserApiClient( - admin_user.username, - subdomain.name) - user = user_account.user[0] - self.user_api_client = self.testClient.getUserApiClient( - user.username, - subdomain.name) - - self.services["templates"]["ispublic"] = True - # Register new public template as domain user - # Exception should be raised for registering public template - try: - template = Template.register( - self.user_api_client, - self.services["templates"], - zoneid=self.zone.id, - account=user_account.name, - domainid=user_account.domainid, - hypervisor=self.hypervisor - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed for user") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - # Register new public template as domain admin - # Exception should be raised for registering public template - try: - template = Template.register( - self.admin_api_client, - self.services["templates"], - zoneid=self.zone.id, - account=admin_account.name, - domainid=admin_account.domainid, - hypervisor=self.hypervisor - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed for domain admin") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - - if self.hypervisor.lower() in ['hyperv', 'lxc']: - self.updateConfigurAndRestart("allow.public.user.templates", "true") - return - else: - user_vm_created = VirtualMachine.create( - self.user_api_client, - self.services["virtual_machine"], - accountid=user_account.name, - domainid=user_account.domainid, - serviceofferingid=self.service_offering.id, - ) - self.assertIsNotNone(user_vm_created, - "VM creation failed" - ) - # Get the Root disk of VM - volume = list_volumes( - self.user_api_client, - virtualmachineid=user_vm_created.id, - type='ROOT', - listall=True - ) - snapshot_created = Snapshot.create( - self.user_api_client, - volume[0].id, - account=user_account.name, - domainid=user_account.domainid - ) - self.assertIsNotNone( - snapshot_created, - "Snapshot creation failed" - ) - self.debug("Creating a template from snapshot: %s" % snapshot_created.id) - # - # Generate public template from the snapshot - self.services["template"]["ispublic"] = True - try: - user_template = Template.create_from_snapshot( - self.user_api_client, - snapshot_created, - self.services["template"] - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed from snapshot for domain user") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - - VirtualMachine.stop(user_vm_created, self.user_api_client) - list_stopped_vms_after = VirtualMachine.list( - self.user_api_client, - listall=self.services["listall"], - domainid=user_account.domainid, - state="Stopped") - status = validateList(list_stopped_vms_after) - self.assertEquals( - PASS, - status[0], - "Stopped VM is not in Stopped state" - ) - try: - user_template = Template.create( - self.user_api_client, self.services["template"], - volume[0].id - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed from volume for domain user") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - - admin_vm_created = VirtualMachine.create( - self.admin_api_client, - self.services["virtual_machine"], - accountid=admin_account.name, - domainid=admin_account.domainid, - serviceofferingid=self.service_offering.id, - ) - self.assertIsNotNone( - admin_vm_created, - "VM creation failed" - ) - # Get the Root disk of VM - volume = list_volumes( - self.admin_api_client, - virtualmachineid=admin_vm_created.id, - type='ROOT', - listall=True - ) - snapshot_created = Snapshot.create( - self.admin_api_client, - volume[0].id, - account=admin_account.name, - domainid=admin_account.domainid - ) - self.assertIsNotNone( - snapshot_created, - "Snapshot creation failed" - ) - self.debug("Creating a template from snapshot: %s" % snapshot_created.id) - # - # Generate public template from the snapshot - try: - admin_template = Template.create_from_snapshot( - self.admin_api_client, - snapshot_created, - self.services["template"] - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed from snapshot for domain admin") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - - VirtualMachine.stop(admin_vm_created, self.admin_api_client) - list_stopped_vms_after = VirtualMachine.list( - self.admin_api_client, - listall=self.services["listall"], - domainid=admin_account.domainid, - state="Stopped") - status = validateList(list_stopped_vms_after) - self.assertEquals( - PASS, - status[0], - "Stopped VM is not in Stopped state" - ) - try: - admin_template = Template.create( - self.admin_api_client, self.services["template"], - volume[0].id - ) - self.updateConfigurAndRestart("allow.public.user.templates", "true") - self.fail("Template creation passed from volume for domain admin") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) - - self.updateConfigurAndRestart("allow.public.user.templates", "true") - return diff --git a/test/integration/component/test_escalations_vmware.py b/test/integration/component/test_escalations_vmware.py index fec1f6fa741..aba4af0fc51 100644 --- a/test/integration/component/test_escalations_vmware.py +++ b/test/integration/component/test_escalations_vmware.py @@ -27,12 +27,13 @@ from marvin.lib.base import (Account, DiskOffering, Template, listConfigurations) -from marvin.lib.common import (get_domain, +from marvin.lib.common import (get_domain,list_isos, get_zone, get_template) from nose.plugins.attrib import attr from ast import literal_eval from marvin.codes import PASS +from marvin.cloudstackException import CloudstackAPIException class TestVMware(cloudstackTestCase): @@ -203,3 +204,67 @@ class TestVMware(cloudstackTestCase): self.fail("Failed to attach data disk to RHEL vm whose root disk type is IDE") return + @attr(tags=["advanced", "basic"], required_hardware="true") + def test2_attach_ISO_in_CentOSVM(self): + """ + @desc:Incorrect guest os mapping in vmware for CentOS 5.9 and above + Step1 :Register an CentOS 6.3 template + Step2 :Launch a VM + Step3: Try to attach VMware Tools ISO + Step4: Verify VMware tools ISO attached correctly + """ + self.hypervisor = str(get_hypervisor_type(self.api_client)).lower() + if self.hypervisor != "vmware": + self.skipTest("This test can be run only on vmware") + template = Template.register( + self.userapiclient, + self.services["CentOS6.3template"], + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid, + hypervisor=self.hypervisor + ) + self.debug( + "Registered a template with format {} and id {}".format( + self.services["CentOS6.3template"]["format"],template.id) + ) + template.download(self.userapiclient) + self.cleanup.append(template) + vm = VirtualMachine.create( + self.userapiclient, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + templateid=template.id, + zoneid=self.zone.id + ) + self.cleanup.append(vm) + response = VirtualMachine.list(self.userapiclient,id=vm.id) + status = validateList(response) + self.assertEqual(status[0],PASS,"list vm response returned invalid list") + list_default_iso_response = list_isos( + self.api_client, + name="vmware-tools.iso", + account="system", + isready="true" + ) + status = validateList(list_default_iso_response) + self.assertEquals( + PASS, + status[0], + "ISO list is empty") + self.debug( + "Registered a ISO with name {}".format(list_default_iso_response[0].name)) + try: + vm.attach_iso(self.userapiclient,list_default_iso_response[0]) + except CloudstackAPIException as e: + self.fail("Attached ISO failed : %s" % e) + response = VirtualMachine.list(self.userapiclient, id=vm.id) + status = validateList(response) + self.assertEqual(status[0], PASS,"list vm response returned invalid list") + attachedIsoName=response[0].isoname; + self.assertEqual(attachedIsoName, "vmware-tools.iso", "vmware-tools.iso not attached") + return + + diff --git a/test/integration/component/test_interop_xd_ccp.py b/test/integration/component/test_interop_xd_ccp.py index 0ef5d6ed83c..5d38df2001f 100644 --- a/test/integration/component/test_interop_xd_ccp.py +++ b/test/integration/component/test_interop_xd_ccp.py @@ -49,7 +49,8 @@ from marvin.lib.common import (get_domain, get_template, get_pod, list_hosts, - get_windows_template + get_windows_template, + list_virtual_machines ) from marvin.codes import FAILED, PASS @@ -58,6 +59,7 @@ from nose.plugins.attrib import attr import time import random import string +import unittest _multiprocess_shared_ = True class TestXDCCPInterop(cloudstackTestCase): @@ -168,9 +170,6 @@ class TestXDCCPInterop(cloudstackTestCase): cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = cls.template.id - cls.services["medium"]["zoneid"] = cls.zone.id - cls.services["medium"]["template"] = cls.template.id - user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500)) cls.services["virtual_machine"]["userdata"] = user_data @@ -180,7 +179,7 @@ class TestXDCCPInterop(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.apiclient, - cls.services["medium"], + cls.services["small"], accountid=cls.account.name, domainid=cls.account.domainid, serviceofferingid=cls.service_offering.id, @@ -727,7 +726,7 @@ class TestXDCCPInterop(cloudstackTestCase): ) restorevm = VirtualMachine.create( self.user_api_client, - self.services["medium"], + self.services["small"], accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, @@ -862,7 +861,7 @@ class TestXDCCPInterop(cloudstackTestCase): restorevm = VirtualMachine.create( self.user_api_client, - self.services["medium"], + self.services["small"], networkids=vm1network.id, accountid=self.account.name, domainid=self.account.domainid, @@ -974,7 +973,7 @@ class TestXDCCPInterop(cloudstackTestCase): templatevm = VirtualMachine.create( self.user_api_client, - self.services["medium"], + self.services["small"], templateid=self.template.id, accountid=self.account.name, domainid=self.account.domainid, @@ -1089,7 +1088,7 @@ class TestXDCCPInterop(cloudstackTestCase): templatevm = VirtualMachine.create( self.user_api_client, - self.services["medium"], + self.services["small"], templateid=roottemplate.id, networkids=vm3network.id, serviceofferingid=self.service_offering.id, @@ -1227,8 +1226,8 @@ class TestXDCCPInterop(cloudstackTestCase): vm_1 = VirtualMachine.create( self.user_api_client, - self.services["medium"], - templateid=template.id, + self.services["small"], + templateid=self.template.id, networkids=vm4network.id, serviceofferingid=self.service_offering.id, accountid=self.account.name, diff --git a/test/integration/component/test_ldap.py b/test/integration/component/test_ldap.py index 2a5cf29fd6a..1ebd98aaa13 100644 --- a/test/integration/component/test_ldap.py +++ b/test/integration/component/test_ldap.py @@ -128,7 +128,7 @@ class TestLdap(cloudstackTestCase): if self.ldapconfRes == 1: - self.debug("Ldap Configuration was succcessful") + self.debug("Ldap Configuration was successful") loginRes = self._checklogin( self.services["configurableData"]["ldap_configuration"]["ldapUsername"], diff --git a/test/integration/component/test_routers_iptables_default_policy.py b/test/integration/component/test_routers_iptables_default_policy.py new file mode 100644 index 00000000000..b72e45faa61 --- /dev/null +++ b/test/integration/component/test_routers_iptables_default_policy.py @@ -0,0 +1,649 @@ +# 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. + +""" Test VPC nics after router is destroyed """ + +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.base import (stopRouter, + startRouter, + destroyRouter, + Account, + VpcOffering, + VPC, + ServiceOffering, + NATRule, + NetworkACL, + PublicIPAddress, + NetworkOffering, + Network, + VirtualMachine, + LoadBalancerRule) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_routers, + list_hosts) +from marvin.lib.utils import (cleanup_resources, + get_process_status) +import socket +import time +import inspect +import logging + + +class Services: + """Test VPC network services - Port Forwarding Rules Test Data Class. + """ + + def __init__(self): + self.services = { + "configurableData": { + "host": { + "password": "password", + "username": "root", + "port": 22 + }, + "input": "INPUT", + "forward": "FORWARD" + }, + "account": { + "email": "test@test.com", + "firstname": "Test", + "lastname": "User", + "username": "test", + # Random characters are appended for unique + # username + "password": "password", + }, + "service_offering": { + "name": "Tiny Instance", + "displaytext": "Tiny Instance", + "cpunumber": 1, + "cpuspeed": 100, + "memory": 128, + }, + "shared_network_offering_sg": { + "name": "MySharedOffering-sg", + "displaytext": "MySharedOffering-sg", + "guestiptype": "Shared", + "supportedservices": "Dhcp,Dns,UserData,SecurityGroup", + "specifyVlan": "False", + "specifyIpRanges": "False", + "traffictype": "GUEST", + "serviceProviderList": { + "Dhcp": "VirtualRouter", + "Dns": "VirtualRouter", + "UserData": "VirtualRouter", + "SecurityGroup": "SecurityGroupProvider" + } + }, + "network_offering": { + "name": 'Test Network offering', + "displaytext": 'Test Network offering', + "guestiptype": 'Isolated', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding', + "traffictype": 'GUEST', + "availability": 'Optional', + "serviceProviderList": { + "Dhcp": 'VirtualRouter', + "Dns": 'VirtualRouter', + "SourceNat": 'VirtualRouter', + "PortForwarding": 'VirtualRouter', + }, + }, + "vpc_network_offering": { + "name": 'VPC Network offering', + "displaytext": 'VPC Network off', + "guestiptype": 'Isolated', + "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL', + "traffictype": 'GUEST', + "availability": 'Optional', + "useVpc": 'on', + "serviceProviderList": { + "Vpn": 'VpcVirtualRouter', + "Dhcp": 'VpcVirtualRouter', + "Dns": 'VpcVirtualRouter', + "SourceNat": 'VpcVirtualRouter', + "PortForwarding": 'VpcVirtualRouter', + "Lb": 'VpcVirtualRouter', + "UserData": 'VpcVirtualRouter', + "StaticNat": 'VpcVirtualRouter', + "NetworkACL": 'VpcVirtualRouter' + }, + }, + "vpc_network_offering_no_lb": { + "name": 'VPC Network offering', + "displaytext": 'VPC Network off', + "guestiptype": 'Isolated', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL', + "traffictype": 'GUEST', + "availability": 'Optional', + "useVpc": 'on', + "serviceProviderList": { + "Dhcp": 'VpcVirtualRouter', + "Dns": 'VpcVirtualRouter', + "SourceNat": 'VpcVirtualRouter', + "PortForwarding": 'VpcVirtualRouter', + "UserData": 'VpcVirtualRouter', + "StaticNat": 'VpcVirtualRouter', + "NetworkACL": 'VpcVirtualRouter' + }, + }, + "vpc_offering": { + "name": 'VPC off', + "displaytext": 'VPC off', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat', + }, + "redundant_vpc_offering": { + "name": 'Redundant VPC off', + "displaytext": 'Redundant VPC off', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat', + "serviceProviderList": { + "Vpn": 'VpcVirtualRouter', + "Dhcp": 'VpcVirtualRouter', + "Dns": 'VpcVirtualRouter', + "SourceNat": 'VpcVirtualRouter', + "PortForwarding": 'VpcVirtualRouter', + "Lb": 'VpcVirtualRouter', + "UserData": 'VpcVirtualRouter', + "StaticNat": 'VpcVirtualRouter', + "NetworkACL": 'VpcVirtualRouter' + }, + "serviceCapabilityList": { + "SourceNat": { + "RedundantRouter": 'true' + } + }, + }, + "vpc": { + "name": "TestVPC", + "displaytext": "TestVPC", + "cidr": '10.1.1.1/16' + }, + "network": { + "name": "Test Network", + "displaytext": "Test Network", + "netmask": '255.255.255.0' + }, + "natrule": { + "privateport": 22, + "publicport": 22, + "startport": 22, + "endport": 22, + "protocol": "TCP", + "cidrlist": '0.0.0.0/0', + }, + "virtual_machine": { + "displayname": "Test VM", + "username": "root", + "password": "password", + "ssh_port": 22, + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', + }, + "ostype": 'CentOS 5.3 (64-bit)', + "timeout": 10, + } + + +class TestVPCIpTablesPolicies(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + # We want to fail quicker if it's failure + socket.setdefaulttimeout(60) + + cls.testClient = super(TestVPCIpTablesPolicies, cls).getClsTestClient() + cls.apiclient = cls.testClient.getApiClient() + + cls.services = Services().services + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.services["ostype"]) + + cls.services["virtual_machine"]["zoneid"] = cls.zone.id + cls.services["virtual_machine"]["template"] = cls.template.id + + cls.account = Account.create( + cls.apiclient, + cls.services["account"], + admin=True, + domainid=cls.domain.id) + + cls._cleanup = [cls.account] + + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.services["service_offering"]) + + cls._cleanup.append(cls.service_offering) + + cls.logger = logging.getLogger('TestVPCIpTablesPolicies') + cls.stream_handler = logging.StreamHandler() + cls.logger.setLevel(logging.DEBUG) + cls.logger.addHandler(cls.stream_handler) + + cls.entity_manager = EntityManager(cls.apiclient, cls.services, cls.service_offering, cls.account, cls.zone, cls._cleanup, cls.logger) + + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + def setUp(self): + self.logger.debug("Creating a VPC offering.") + self.vpc_off = VpcOffering.create( + self.apiclient, + self.services["vpc_offering"]) + + self.logger.debug("Enabling the VPC offering created") + self.vpc_off.update(self.apiclient, state='Enabled') + + self.logger.debug("Creating a VPC network in the account: %s" % self.account.name) + + self.vpc = VPC.create( + self.apiclient, + self.services["vpc"], + vpcofferingid=self.vpc_off.id, + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid) + + return + + @attr(tags=["advanced", "intervlan"], required_hardware="true") + def test_01_single_VPC_iptables_policies(self): + """ Test iptables default INPUT/FORWARD policies on VPC router """ + self.logger.debug("Starting test_01_single_VPC_iptables_policies") + + routers = self.entity_manager.query_routers() + + self.assertEqual( + isinstance(routers, list), True, + "Check for list routers response return valid data") + + self.entity_manager.create_network(self.services["vpc_network_offering"], self.vpc.id, "10.1.1.1") + self.entity_manager.create_network(self.services["vpc_network_offering_no_lb"], self.vpc.id, "10.1.2.1") + + self.entity_manager.add_nat_rules(self.vpc.id) + self.entity_manager.do_vpc_test() + + for router in routers: + if not router.isredundantrouter and router.vpcid: + hosts = list_hosts( + self.apiclient, + id=router.hostid) + self.assertEqual( + isinstance(hosts, list), + True, + "Check for list hosts response return valid data") + + host = hosts[0] + host.user = self.services["configurableData"]["host"]["username"] + host.passwd = self.services["configurableData"]["host"]["password"] + host.port = self.services["configurableData"]["host"]["port"] + tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]] + + for table in tables: + try: + result = get_process_status( + host.ipaddress, + host.port, + host.user, + host.passwd, + router.linklocalip, + 'iptables -L %s' % table) + except KeyError: + self.skipTest( + "Provide a marvin config file with host\ + credentials to run %s" % + self._testMethodName) + + self.logger.debug("iptables -L %s: %s" % (table, result)) + res = str(result) + + self.assertEqual( + res.count("DROP"), + 1, + "%s Default Policy should be DROP" % table) + + +class TestRouterIpTablesPolicies(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + # We want to fail quicker if it's failure + socket.setdefaulttimeout(60) + + cls.testClient = super(TestRouterIpTablesPolicies, cls).getClsTestClient() + cls.apiclient = cls.testClient.getApiClient() + + cls.services = Services().services + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.services["ostype"]) + + cls.services["virtual_machine"]["zoneid"] = cls.zone.id + cls.services["virtual_machine"]["template"] = cls.template.id + + cls.account = Account.create( + cls.apiclient, + cls.services["account"], + admin=True, + domainid=cls.domain.id) + + cls._cleanup = [cls.account] + + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.services["service_offering"]) + + cls._cleanup.append(cls.service_offering) + + cls.logger = logging.getLogger('TestRouterIpTablesPolicies') + cls.stream_handler = logging.StreamHandler() + cls.logger.setLevel(logging.DEBUG) + cls.logger.addHandler(cls.stream_handler) + + cls.entity_manager = EntityManager(cls.apiclient, cls.services, cls.service_offering, cls.account, cls.zone, cls._cleanup, cls.logger) + + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "intervlan"], required_hardware="true") + def test_02_routervm_iptables_policies(self): + """ Test iptables default INPUT/FORWARD policy on RouterVM """ + + self.logger.debug("Starting test_02_routervm_iptables_policies") + + vm1 = self.entity_manager.deployvm() + + routers = self.entity_manager.query_routers() + + self.assertEqual( + isinstance(routers, list), True, + "Check for list routers response return valid data") + + for router in routers: + if not router.isredundantrouter and not router.vpcid: + hosts = list_hosts( + self.apiclient, + id=router.hostid) + self.assertEqual( + isinstance(hosts, list), + True, + "Check for list hosts response return valid data") + + host = hosts[0] + host.user = self.services["configurableData"]["host"]["username"] + host.passwd = self.services["configurableData"]["host"]["password"] + host.port = self.services["configurableData"]["host"]["port"] + tables = [self.services["configurableData"]["input"], self.services["configurableData"]["forward"]] + + for table in tables: + try: + result = get_process_status( + host.ipaddress, + host.port, + host.user, + host.passwd, + router.linklocalip, + 'iptables -L %s' % table) + except KeyError: + self.skipTest( + "Provide a marvin config file with host\ + credentials to run %s" % + self._testMethodName) + + self.logger.debug("iptables -L %s: %s" % (table, result)) + res = str(result) + + self.assertEqual( + res.count("DROP"), + 1, + "%s Default Policy should be DROP" % table) + + +class EntityManager(object): + + def __init__(self, apiclient, services, service_offering, account, zone, cleanup, logger): + self.apiclient = apiclient + self.services = services + self.service_offering = service_offering + self.account = account + self.zone = zone + self.cleanup = cleanup + self.logger = logger + + self.networks = [] + self.routers = [] + self.ips = [] + + def add_nat_rules(self, vpc_id): + for o in self.networks: + for vm in o.get_vms(): + if vm.get_ip() is None: + vm.set_ip(self.acquire_publicip(o.get_net(), vpc_id)) + if vm.get_nat() is None: + vm.set_nat(self.create_natrule(vm.get_vm(), vm.get_ip(), o.get_net(), vpc_id)) + time.sleep(5) + + def do_vpc_test(self): + for o in self.networks: + for vm in o.get_vms(): + self.check_ssh_into_vm(vm.get_vm(), vm.get_ip()) + + def create_natrule(self, vm, public_ip, network, vpc_id): + self.logger.debug("Creating NAT rule in network for vm with public IP") + + nat_rule_services = self.services["natrule"] + + nat_rule = NATRule.create( + self.apiclient, + vm, + nat_rule_services, + ipaddressid=public_ip.ipaddress.id, + openfirewall=False, + networkid=network.id, + vpcid=vpc_id) + + self.logger.debug("Adding NetworkACL rules to make NAT rule accessible") + nwacl_nat = NetworkACL.create( + self.apiclient, + networkid=network.id, + services=nat_rule_services, + traffictype='Ingress' + ) + self.logger.debug('nwacl_nat=%s' % nwacl_nat.__dict__) + return nat_rule + + def check_ssh_into_vm(self, vm, public_ip): + self.logger.debug("Checking if we can SSH into VM=%s on public_ip=%s" % + (vm.name, public_ip.ipaddress.ipaddress)) + vm.ssh_client = None + try: + vm.get_ssh_client(ipaddress=public_ip.ipaddress.ipaddress) + self.logger.debug("SSH into VM=%s on public_ip=%s is successful" % + (vm.name, public_ip.ipaddress.ipaddress)) + except: + raise Exception("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress)) + + def create_network(self, net_offerring, vpc_id, gateway='10.1.1.1'): + try: + self.logger.debug('Create NetworkOffering') + net_offerring["name"] = "NET_OFF-" + str(gateway) + nw_off = NetworkOffering.create( + self.apiclient, + net_offerring, + conservemode=False) + + nw_off.update(self.apiclient, state='Enabled') + self.cleanup.append(nw_off) + self.logger.debug('Created and Enabled NetworkOffering') + + self.services["network"]["name"] = "NETWORK-" + str(gateway) + self.logger.debug('Adding Network=%s to VPC ID %s' % (self.services["network"], vpc_id)) + obj_network = Network.create( + self.apiclient, + self.services["network"], + accountid=self.account.name, + domainid=self.account.domainid, + networkofferingid=nw_off.id, + zoneid=self.zone.id, + gateway=gateway, + vpcid=vpc_id) + self.logger.debug("Created network with ID: %s" % obj_network.id) + except Exception, e: + raise Exception('Unable to create a Network with offering=%s because of %s ' % (net_offerring, e)) + + o = networkO(obj_network) + o.add_vm(self.deployvm_in_network(obj_network)) + + self.networks.append(o) + return o + + def deployvm_in_network(self, network): + try: + self.logger.debug('Creating VM in network=%s' % network.name) + vm = VirtualMachine.create( + self.apiclient, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + networkids=[str(network.id)]) + self.logger.debug('Created VM=%s in network=%s' % (vm.id, network.name)) + return vm + except: + raise Exception('Unable to create VM in a Network=%s' % network.name) + + def deployvm(self): + try: + self.logger.debug('Creating VM') + vm = VirtualMachine.create( + self.apiclient, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id) + self.logger.debug('Created VM=%s' % vm.id) + return vm + except: + raise Exception('Unable to create VM') + + def acquire_publicip(self, network, vpc_id): + self.logger.debug("Associating public IP for network: %s" % network.name) + public_ip = PublicIPAddress.create( + self.apiclient, + accountid=self.account.name, + zoneid=self.zone.id, + domainid=self.account.domainid, + networkid=network.id, + vpcid=vpc_id) + self.logger.debug("Associated %s with network %s" % ( + public_ip.ipaddress.ipaddress, + network.id)) + + self.ips.append(public_ip) + return public_ip + + def query_routers(self): + self.routers = list_routers(self.apiclient, + account=self.account.name, + domainid=self.account.domainid) + + return self.routers + + def stop_router(self): + self.logger.debug('Stopping router') + for router in self.routers: + cmd = stopRouter.stopRouterCmd() + cmd.id = router.id + self.apiclient.stopRouter(cmd) + + def destroy_router(self): + self.logger.debug('Destroying router') + for router in self.routers: + cmd = destroyRouter.destroyRouterCmd() + cmd.id = router.id + self.apiclient.destroyRouter(cmd) + + def start_router(self): + self.logger.debug('Starting router') + for router in self.routers: + cmd = startRouter.startRouterCmd() + cmd.id = router.id + self.apiclient.startRouter(cmd) + + +class networkO(object): + def __init__(self, net): + self.network = net + self.vms = [] + + def get_net(self): + return self.network + + def add_vm(self, vm): + self.vms.append(vmsO(vm)) + + def get_vms(self): + return self.vms + + +class vmsO(object): + def __init__(self, vm): + self.vm = vm + self.ip = None + self.nat = None + + def get_vm(self): + return self.vm + + def get_ip(self): + return self.ip + + def get_nat(self): + return self.nat + + def set_ip(self, ip): + self.ip = ip + + def set_nat(self, nat): + self.nat = nat diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py index f132e3a7ced..f1ac0b6ad58 100755 --- a/test/integration/component/test_security_groups.py +++ b/test/integration/component/test_security_groups.py @@ -27,7 +27,8 @@ from marvin.lib.base import (Account, VirtualMachine, SecurityGroup, Router, - Host) + Host, + Network) from marvin.lib.common import (get_domain, get_zone, get_template, @@ -528,6 +529,12 @@ class TestRevokeIngressRule(cloudstackTestCase): return + def revokeSGRule(self, sgid): + cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd() + cmd.id = sgid + self.apiclient.revokeSecurityGroupIngress(cmd) + return + @attr(tags=["sg", "eip", "advancedsg"]) def test_01_revokeIngressRule(self): """Test revoke ingress rule @@ -605,11 +612,21 @@ class TestRevokeIngressRule(cloudstackTestCase): self.debug("Revoking ingress rule for sec group ID: %s for ssh access" % security_group.id) - # Revoke Security group to SSH to VM - security_group.revoke( + security_groups = SecurityGroup.list( self.apiclient, - id=ssh_rule["ruleid"] + account=self.account.name, + domainid=self.account.domainid, + listall=True ) + self.assertEqual( + validateList(security_groups)[0], + PASS, + "Security groups list validation failed" + ) + for sg in security_groups: + if not sg.ingressrule: + continue + self.revokeSGRule(sg.ingressrule[0].ruleid) # SSH Attempt to VM should fail with self.assertRaises(Exception): @@ -617,7 +634,8 @@ class TestRevokeIngressRule(cloudstackTestCase): SshClient(self.virtual_machine.ssh_ip, self.virtual_machine.ssh_port, self.virtual_machine.username, - self.virtual_machine.password + self.virtual_machine.password, + retries=5 ) return @@ -1490,32 +1508,45 @@ class TestIngressRule(cloudstackTestCase): security_group.id, self.account.name )) - result = security_group.revoke( + #skip revoke and ping tests in case of EIP/ELB zone + vm_res = VirtualMachine.list( self.apiclient, - id=icmp_rule["ruleid"] + id=self.virtual_machine.id ) - self.debug("Revoke ingress rule result: %s" % result) - time.sleep(self.testdata["sleep"]) - # User should not be able to ping VM - try: - self.debug("Trying to ping VM %s" % self.virtual_machine.ssh_ip) - if platform_type == 'windows': - result = subprocess.call( - ['ping', '-n', '1', self.virtual_machine.ssh_ip]) - else: - result = subprocess.call( - ['ping', '-c 1', self.virtual_machine.ssh_ip]) - - self.debug("Ping result: %s" % result) - # if ping successful, then result should be 0 - self.assertNotEqual( - result, - 0, - "Check if ping is successful or not" + self.assertEqual(validateList(vm_res)[0], PASS, "invalid vm response") + vm_nw = Network.list( + self.apiclient, + id=vm_res[0].nic[0].networkid + ) + self.assertEqual(validateList(vm_nw)[0], PASS, "invalid network response") + vm_nw_off = vm_nw[0].networkofferingname + if vm_nw_off != "DefaultSharedNetscalerEIPandELBNetworkOffering": + result = security_group.revoke( + self.apiclient, + id=icmp_rule["ruleid"] ) - except Exception as e: - self.fail("Ping failed for ingress rule ID: %s, %s" - % (icmp_rule["ruleid"], e)) + self.debug("Revoke ingress rule result: %s" % result) + time.sleep(self.testdata["sleep"]) + # User should not be able to ping VM + try: + self.debug("Trying to ping VM %s" % self.virtual_machine.ssh_ip) + if platform_type == 'windows': + result = subprocess.call( + ['ping', '-n', '1', self.virtual_machine.ssh_ip]) + else: + result = subprocess.call( + ['ping', '-c 1', self.virtual_machine.ssh_ip]) + + self.debug("Ping result: %s" % result) + # if ping successful, then result should be 0 + self.assertNotEqual( + result, + 0, + "Check if ping is successful or not" + ) + except Exception as e: + self.fail("Ping failed for ingress rule ID: %s, %s" + % (icmp_rule["ruleid"], e)) return @attr(tags=["sg", "eip", "advancedsg"]) @@ -1754,6 +1785,12 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): self.debug(response) return + def revokeSGRule(self, sgid): + cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd() + cmd.id = sgid + self.apiclient.revokeSecurityGroupIngress(cmd) + return + @attr(tags=["sg", "eip", "advancedsg"]) def test_ingress_rules_specific_IP_set(self): """Test ingress rules for specific IP set @@ -1803,18 +1840,20 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - securitygroupids=[defaultSecurityGroup.id] + securitygroupids=[defaultSecurityGroup.id], + mode=self.testdata['mode'] ) - + self.cleanup.append(virtual_machine_1) virtual_machine_2 = VirtualMachine.create( self.apiclient, self.testdata["virtual_machine"], accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - securitygroupids=[defaultSecurityGroup.id] + securitygroupids=[defaultSecurityGroup.id], + mode=self.testdata['mode'] ) - + self.cleanup.append(virtual_machine_2) try: SshClient( virtual_machine_1.ssh_ip, @@ -1823,9 +1862,10 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): virtual_machine_1.password ) except Exception as e: + self.revokeSGRule(ingress_rule.ingressrule[0].ruleid) self.fail("SSH Access failed for %s: %s" % (virtual_machine_1.ipaddress, e) - ) + ) try: SshClient( @@ -1835,42 +1875,66 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): virtual_machine_2.password ) except Exception as e: + self.revokeSGRule(ingress_rule.ingressrule[0].ruleid) self.fail("SSH Access failed for %s: %s" % (virtual_machine_2.ipaddress, e) - ) + ) + try: + sshClient = SshClient( + self.mgtSvrDetails["mgtSvrIp"], + 22, + self.mgtSvrDetails["user"], + self.mgtSvrDetails["passwd"] + ) + except Exception as e: + self.revokeSGRule(ingress_rule.ingressrule[0].ruleid) + self.fail("SSH Access failed for %s: %s" % + (self.mgtSvrDetails["mgtSvrIp"], e) + ) + response = sshClient.execute("ssh %s@%s -v" % + (virtual_machine_1.username, + virtual_machine_1.ssh_ip)) + self.debug("Response is :%s" % response) - sshClient = SshClient( - self.mgtSvrDetails["mgtSvrIp"], - 22, - self.mgtSvrDetails["user"], - self.mgtSvrDetails["passwd"] + self.assertTrue("connection established" in str(response).lower(), + "SSH to VM at %s failed from external machine ip %s other than test machine" % + (virtual_machine_1.ssh_ip, + self.mgtSvrDetails["mgtSvrIp"])) + + response = sshClient.execute("ssh %s@%s -v" % + (virtual_machine_2.username, + virtual_machine_2.ssh_ip)) + self.debug("Response is :%s" % response) + + self.assertTrue("connection established" in str(response).lower(), + "SSH to VM at %s failed from external machine ip %s other than test machine" % + (virtual_machine_2.ssh_ip, + self.mgtSvrDetails["mgtSvrIp"])) + virtual_machine_3 = VirtualMachine.create( + self.apiclient, + self.testdata["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + securitygroupids=[defaultSecurityGroup.id], + mode=self.testdata['mode'] ) - - response = sshClient.execute("ssh %s@%s -v" % - (virtual_machine_1.username, - virtual_machine_1.ssh_ip)) - self.debug("Response is :%s" % response) - - self.assertTrue("connection established" in str(response).lower(), - "SSH to VM at %s failed from external machine ip %s other than test machine" % - (virtual_machine_1.ssh_ip, - self.mgtSvrDetails["mgtSvrIp"])) - - response = sshClient.execute("ssh %s@%s -v" % - (virtual_machine_2.username, - virtual_machine_2.ssh_ip)) - self.debug("Response is :%s" % response) - - self.assertTrue("connection established" in str(response).lower(), - "SSH to VM at %s failed from external machine ip %s other than test machine" % - (virtual_machine_2.ssh_ip, - self.mgtSvrDetails["mgtSvrIp"])) - - - cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd() - cmd.id = ingress_rule.ingressrule[0].ruleid - self.apiclient.revokeSecurityGroupIngress(cmd) - + self.cleanup.append(virtual_machine_3) + security_groups = SecurityGroup.list( + self.apiclient, + account=self.account.name, + domainid=self.account.domainid, + listall=True + ) + self.assertEqual( + validateList(security_groups)[0], + PASS, + "Security groups list validation failed" + ) + for sg in security_groups: + if not sg.ingressrule: + continue + self.revokeSGRule(sg.ingressrule[0].ruleid) localMachineIpAddress = self.getLocalMachineIpAddress() cidr = localMachineIpAddress + "/32" @@ -1882,16 +1946,6 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): cmd.endport = 22 cmd.cidrlist = cidr ingress_rule = self.apiclient.authorizeSecurityGroupIngress(cmd) - - virtual_machine_3 = VirtualMachine.create( - self.apiclient, - self.testdata["virtual_machine"], - accountid=self.account.name, - domainid=self.account.domainid, - serviceofferingid=self.service_offering.id, - securitygroupids=[defaultSecurityGroup.id] - ) - if self.testdata["configurableData"]["setHostConfigurationForIngressRule"]: self.setHostConfiguration() time.sleep(180) @@ -1905,28 +1959,28 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): virtual_machine_3.ssh_port, virtual_machine_3.username, virtual_machine_3.password - ) + ) except Exception as e: self.fail("SSH Access failed for %s: %s" % (virtual_machine_3.ssh_ip, e) - ) + ) sshClient = SshClient( - self.mgtSvrDetails["mgtSvrIp"], - 22, - self.mgtSvrDetails["user"], - self.mgtSvrDetails["passwd"] + self.mgtSvrDetails["mgtSvrIp"], + 22, + self.mgtSvrDetails["user"], + self.mgtSvrDetails["passwd"] ) response = sshClient.execute("ssh %s@%s -v" % - (virtual_machine_3.username, - virtual_machine_3.ssh_ip)) + (virtual_machine_3.username, + virtual_machine_3.ssh_ip)) self.debug("Response is :%s" % response) self.assertFalse("connection established" in str(response).lower(), - "SSH to VM at %s succeeded from external machine ip %s other than test machine" % - (virtual_machine_3.ssh_ip, - self.mgtSvrDetails["mgtSvrIp"])) + "SSH to VM at %s succeeded from external machine ip %s other than test machine" % + (virtual_machine_3.ssh_ip, + self.mgtSvrDetails["mgtSvrIp"])) return @attr(tags=["sg", "eip", "advancedsg"]) @@ -1978,18 +2032,20 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - securitygroupids=[defaultSecurityGroup.id] + securitygroupids=[defaultSecurityGroup.id], + mode=self.testdata['mode'] ) - + self.cleanup.append(virtual_machine_1) virtual_machine_2 = VirtualMachine.create( self.apiclient, self.testdata["virtual_machine"], accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - securitygroupids=[defaultSecurityGroup.id] + securitygroupids=[defaultSecurityGroup.id], + mode=self.testdata['mode'] ) - + self.cleanup.append(virtual_machine_2) try: SshClient( virtual_machine_1.ssh_ip, @@ -2066,9 +2122,10 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - securitygroupids=[security_group.id] + securitygroupids=[security_group.id], + mode=self.testdata['mode'] ) - + self.cleanup.append(virtual_machine_3) if self.testdata["configurableData"]["setHostConfigurationForIngressRule"]: self.setHostConfiguration() time.sleep(180) @@ -2087,7 +2144,21 @@ class TestIngressRuleSpecificIpSet(cloudstackTestCase): self.fail("SSH Access failed for %s: %s" % (virtual_machine_3.ssh_ip, e) ) - + security_groups = SecurityGroup.list( + self.apiclient, + account=self.account.name, + domainid=self.account.domainid, + listall=True + ) + self.assertEqual( + validateList(security_groups)[0], + PASS, + "Security groups list validation failed" + ) + for sg in security_groups: + if sg.id == security_group.id or not sg.ingressrule: + continue + self.revokeSGRule(sg.ingressrule[0].ruleid) sshClient = SshClient( self.mgtSvrDetails["mgtSvrIp"], 22, diff --git a/test/integration/component/test_ss_domain_limits.py b/test/integration/component/test_ss_domain_limits.py index 2591d2f42a9..0d9138ad659 100644 --- a/test/integration/component/test_ss_domain_limits.py +++ b/test/integration/component/test_ss_domain_limits.py @@ -559,7 +559,9 @@ class TestDeleteAccount(cloudstackTestCase): self.assertFalse(result[0], result[1]) self.assertTrue(result[2], "Resource count does not match") - expectedCount *= 2 + self.templateSize = int((int(templates[0].size)*2) / (1024**3)) + + expectedCount = self.templateSize result = isDomainResourceCountEqualToExpectedCount( self.apiclient, self.parent_domain.id, expectedCount, RESOURCE_SECONDARY_STORAGE) diff --git a/test/integration/component/test_vpc_router_nics.py b/test/integration/component/test_vpc_router_nics.py new file mode 100644 index 00000000000..4cabd164d50 --- /dev/null +++ b/test/integration/component/test_vpc_router_nics.py @@ -0,0 +1,449 @@ +# 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. + +""" Test VPC nics after router is destroyed """ + +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.base import (stopRouter, + startRouter, + destroyRouter, + Account, + VpcOffering, + VPC, + ServiceOffering, + NATRule, + NetworkACL, + PublicIPAddress, + NetworkOffering, + Network, + VirtualMachine, + LoadBalancerRule) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_routers) +from marvin.lib.utils import cleanup_resources +import socket +import time +import inspect + + +class Services: + """Test VPC network services - Port Forwarding Rules Test Data Class. + """ + + def __init__(self): + self.services = { + "account": { + "email": "test@test.com", + "firstname": "Test", + "lastname": "User", + "username": "test", + # Random characters are appended for unique + # username + "password": "password", + }, + "service_offering": { + "name": "Tiny Instance", + "displaytext": "Tiny Instance", + "cpunumber": 1, + "cpuspeed": 100, + "memory": 128, + }, + "network_offering": { + "name": 'VPC Network offering', + "displaytext": 'VPC Network off', + "guestiptype": 'Isolated', + "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL', + "traffictype": 'GUEST', + "availability": 'Optional', + "useVpc": 'on', + "serviceProviderList": { + "Vpn": 'VpcVirtualRouter', + "Dhcp": 'VpcVirtualRouter', + "Dns": 'VpcVirtualRouter', + "SourceNat": 'VpcVirtualRouter', + "PortForwarding": 'VpcVirtualRouter', + "Lb": 'VpcVirtualRouter', + "UserData": 'VpcVirtualRouter', + "StaticNat": 'VpcVirtualRouter', + "NetworkACL": 'VpcVirtualRouter' + }, + }, + "network_offering_no_lb": { + "name": 'VPC Network offering', + "displaytext": 'VPC Network off', + "guestiptype": 'Isolated', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL', + "traffictype": 'GUEST', + "availability": 'Optional', + "useVpc": 'on', + "serviceProviderList": { + "Dhcp": 'VpcVirtualRouter', + "Dns": 'VpcVirtualRouter', + "SourceNat": 'VpcVirtualRouter', + "PortForwarding": 'VpcVirtualRouter', + "UserData": 'VpcVirtualRouter', + "StaticNat": 'VpcVirtualRouter', + "NetworkACL": 'VpcVirtualRouter' + }, + }, + "vpc_offering": { + "name": 'VPC off', + "displaytext": 'VPC off', + "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat', + }, + "vpc": { + "name": "TestVPC", + "displaytext": "TestVPC", + "cidr": '10.0.0.1/24' + }, + "network": { + "name": "Test Network", + "displaytext": "Test Network", + "netmask": '255.255.255.0' + }, + "lbrule": { + "name": "SSH", + "alg": "leastconn", + # Algorithm used for load balancing + "privateport": 22, + "publicport": 2222, + "openfirewall": False, + "startport": 22, + "endport": 2222, + "protocol": "TCP", + "cidrlist": '0.0.0.0/0', + }, + "lbrule_http": { + "name": "HTTP", + "alg": "leastconn", + # Algorithm used for load balancing + "privateport": 80, + "publicport": 8888, + "openfirewall": False, + "startport": 80, + "endport": 8888, + "protocol": "TCP", + "cidrlist": '0.0.0.0/0', + }, + "natrule": { + "privateport": 22, + "publicport": 22, + "startport": 22, + "endport": 22, + "protocol": "TCP", + "cidrlist": '0.0.0.0/0', + }, + "http_rule": { + "privateport": 80, + "publicport": 80, + "startport": 80, + "endport": 80, + "cidrlist": '0.0.0.0/0', + "protocol": "TCP" + }, + "virtual_machine": { + "displayname": "Test VM", + "username": "root", + "password": "password", + "ssh_port": 22, + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', + }, + "ostype": 'CentOS 5.3 (64-bit)', + "timeout": 10, + } + + +class TestVPCNics(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + # We want to fail quicker if it's failure + socket.setdefaulttimeout(60) + + cls.testClient = super(TestVPCNics, cls).getClsTestClient() + cls.api_client = cls.testClient.getApiClient() + + cls.services = Services().services + # Get Zone, Domain and templates + cls.domain = get_domain(cls.api_client) + cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) + cls.template = get_template( + cls.api_client, + cls.zone.id, + cls.services["ostype"]) + cls.services["virtual_machine"]["zoneid"] = cls.zone.id + cls.services["virtual_machine"]["template"] = cls.template.id + + cls.service_offering = ServiceOffering.create( + cls.api_client, + cls.services["service_offering"]) + cls._cleanup = [cls.service_offering] + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.api_client, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + def setUp(self): + self.routers = [] + self.networks = [] + self.ips = [] + self.apiclient = self.testClient.getApiClient() + self.account = Account.create( + self.apiclient, + self.services["account"], + admin=True, + domainid=self.domain.id) + + self.cleanup = [self.account] + self.debug("Creating a VPC offering..") + self.vpc_off = VpcOffering.create( + self.apiclient, + self.services["vpc_offering"]) + + self.debug("Enabling the VPC offering created") + self.vpc_off.update(self.apiclient, state='Enabled') + + self.debug("Creating a VPC network in the account: %s" % self.account.name) + self.services["vpc"]["cidr"] = '10.1.1.1/16' + self.vpc = VPC.create( + self.apiclient, + self.services["vpc"], + vpcofferingid=self.vpc_off.id, + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid) + return + + def tearDown(self): + try: + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + self.debug("Warning: Exception during cleanup : %s" % e) + return + + def query_routers(self): + self.routers = list_routers(self.apiclient, + account=self.account.name, + domainid=self.account.domainid, + ) + + self.assertEqual( + isinstance(self.routers, list), True, + "Check for list routers response return valid data") + + def stop_router(self): + self.debug('Stopping router') + for router in self.routers: + cmd = stopRouter.stopRouterCmd() + cmd.id = router.id + self.apiclient.stopRouter(cmd) + + def destroy_router(self): + self.debug('Stopping router') + for router in self.routers: + cmd = destroyRouter.destroyRouterCmd() + cmd.id = router.id + self.apiclient.destroyRouter(cmd) + + def create_network(self, net_offerring, gateway='10.1.1.1', vpc=None): + try: + self.debug('Create NetworkOffering') + net_offerring["name"] = "NET_OFF-" + str(gateway) + nw_off = NetworkOffering.create( + self.apiclient, + net_offerring, + conservemode=False) + + nw_off.update(self.apiclient, state='Enabled') + self._cleanup.append(nw_off) + self.debug('Created and Enabled NetworkOffering') + + self.services["network"]["name"] = "NETWORK-" + str(gateway) + self.debug('Adding Network=%s' % self.services["network"]) + obj_network = Network.create( + self.apiclient, + self.services["network"], + accountid=self.account.name, + domainid=self.account.domainid, + networkofferingid=nw_off.id, + zoneid=self.zone.id, + gateway=gateway, + vpcid=vpc.id if vpc else self.vpc.id + ) + self.debug("Created network with ID: %s" % obj_network.id) + except Exception, e: + self.fail('Unable to create a Network with offering=%s because of %s ' % (net_offerring, e)) + o = networkO(obj_network) + o.add_vm(self.deployvm_in_network(obj_network)) + return o + + def deployvm_in_network(self, network): + try: + self.debug('Creating VM in network=%s' % network.name) + vm = VirtualMachine.create( + self.apiclient, + self.services["virtual_machine"], + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + networkids=[str(network.id)] + ) + self.debug('Created VM=%s in network=%s' % (vm.id, network.name)) + return vm + except: + self.fail('Unable to create VM in a Network=%s' % network.name) + + def acquire_publicip(self, network): + self.debug("Associating public IP for network: %s" % network.name) + public_ip = PublicIPAddress.create( + self.apiclient, + accountid=self.account.name, + zoneid=self.zone.id, + domainid=self.account.domainid, + networkid=network.id, + vpcid=self.vpc.id + ) + self.debug("Associated %s with network %s" % ( + public_ip.ipaddress.ipaddress, + network.id + )) + return public_ip + + def create_natrule(self, vm, public_ip, network, services=None): + self.debug("Creating NAT rule in network for vm with public IP") + if not services: + services = self.services["natrule"] + nat_rule = NATRule.create( + self.apiclient, + vm, + services, + ipaddressid=public_ip.ipaddress.id, + openfirewall=False, + networkid=network.id, + vpcid=self.vpc.id) + + self.debug("Adding NetworkACL rules to make NAT rule accessible") + nwacl_nat = NetworkACL.create( + self.apiclient, + networkid=network.id, + services=services, + traffictype='Ingress' + ) + self.debug('nwacl_nat=%s' % nwacl_nat.__dict__) + return nat_rule + + def check_ssh_into_vm(self, vm, public_ip): + self.debug("Checking if we can SSH into VM=%s on public_ip=%s" % + (vm.name, public_ip.ipaddress.ipaddress)) + vm.ssh_client = None + try: + vm.get_ssh_client(ipaddress=public_ip.ipaddress.ipaddress) + self.debug("SSH into VM=%s on public_ip=%s is successful" % + (vm.name, public_ip.ipaddress.ipaddress)) + except: + self.fail("Failed to SSH into VM - %s" % (public_ip.ipaddress.ipaddress)) + + @attr(tags=["advanced", "intervlan"], required_hardware="true") + def test_01_VPC_nics_after_destroy(self): + """ Create a vpc with two networks with two vms in each network """ + self.debug("Starting test 1") + self.query_routers() + + net1 = self.create_network(self.services["network_offering"], "10.1.1.1") + net2 = self.create_network(self.services["network_offering_no_lb"], "10.1.2.1") + + self.networks.append(net1) + self.networks.append(net2) + + self.add_nat_rules() + self.do_vpc_test() + + self.stop_router() + self.destroy_router() + time.sleep(30) + + net1.add_vm(self.deployvm_in_network(net1.get_net())) + self.add_nat_rules() + self.do_vpc_test() + + def delete_nat_rules(self): + for o in self.networks: + for vm in o.get_vms(): + if vm.get_nat() is not None: + vm.get_nat().delete(self.apiclient) + vm.set_nat(None) + + def add_nat_rules(self): + for o in self.networks: + for vm in o.get_vms(): + if vm.get_ip() is None: + vm.set_ip(self.acquire_publicip(o.get_net())) + if vm.get_nat() is None: + vm.set_nat(self.create_natrule(vm.get_vm(), vm.get_ip(), o.get_net())) + time.sleep(5) + + def do_vpc_test(self): + for o in self.networks: + for vm in o.get_vms(): + self.check_ssh_into_vm(vm.get_vm(), vm.get_ip()) + + +class networkO(object): + def __init__(self, net): + self.network = net + self.vms = [] + + def get_net(self): + return self.network + + def add_vm(self, vm): + self.vms.append(vmsO(vm)) + + def get_vms(self): + return self.vms + + +class vmsO(object): + def __init__(self, vm): + self.vm = vm + self.ip = None + self.nat = None + + def get_vm(self): + return self.vm + + def get_ip(self): + return self.ip + + def get_nat(self): + return self.nat + + def set_ip(self, ip): + self.ip = ip + + def set_nat(self, nat): + self.nat = nat diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py index c1c5d5b8e38..3f78a84481c 100644 --- a/test/integration/smoke/test_affinity_groups.py +++ b/test/integration/smoke/test_affinity_groups.py @@ -62,7 +62,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.ag = AffinityGroup.create(cls.apiclient, cls.services["virtual_machine"]["affinity"], diff --git a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py index e71bae1f3eb..c9eb7672e2d 100644 --- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py +++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py @@ -125,11 +125,9 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): domainid=self.domain.id ) - self.testdata["vgpu260q"]["zoneid"] = self.zone.id - self.testdata["vgpu260q"]["template"] = self.template.id + self.testdata["small"]["zoneid"] = self.zone.id + self.testdata["small"]["template"] = self.template.id - self.testdata["vgpu140q"]["zoneid"] = self.zone.id - self.testdata["vgpu140q"]["template"] = self.template.id self.testdata["service_offerings"]["vgpu260qwin"]["serviceofferingdetails"] = [ { 'pciDevice': 'Group of NVIDIA Corporation GK107GL [GRID K1] GPUs'}, { @@ -156,7 +154,7 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): """ self.virtual_machine = VirtualMachine.create( self.apiclient, - self.testdata["vgpu260q"], + self.testdata["small"], accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, diff --git a/test/integration/smoke/test_deploy_vm_with_userdata.py b/test/integration/smoke/test_deploy_vm_with_userdata.py index c98b38aac0b..96c99861a9e 100644 --- a/test/integration/smoke/test_deploy_vm_with_userdata.py +++ b/test/integration/smoke/test_deploy_vm_with_userdata.py @@ -39,10 +39,10 @@ class TestDeployVmWithUserData(cloudstackTestCase): cls.zone = get_zone(cls.apiClient, testClient.getZoneForTests()) if cls.zone.localstorageenabled: #For devcloud since localstroage is enabled - cls.services["service_offerings"]["storagetype"] = "local" + cls.services["service_offerings"]["tiny"]["storagetype"] = "local" cls.service_offering = ServiceOffering.create( cls.apiClient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create(cls.apiClient, services=cls.services["account"]) cls.cleanup = [cls.account] diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py index 041d23be056..1ef6af9064c 100644 --- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py +++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py @@ -67,7 +67,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): #FIXME: How do we know that first fit actually happened? self.service_offering_firstfit = ServiceOffering.create( self.apiclient, - self.services["service_offerings"], + self.services["service_offerings"]["tiny"], deploymentplanner='FirstFitPlanner' ) @@ -110,7 +110,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): """ self.service_offering_userdispersing = ServiceOffering.create( self.apiclient, - self.services["service_offerings"], + self.services["service_offerings"]["tiny"], deploymentplanner='UserDispersingPlanner' ) @@ -169,7 +169,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): """ self.service_offering_userconcentrated = ServiceOffering.create( self.apiclient, - self.services["service_offerings"], + self.services["service_offerings"]["tiny"], deploymentplanner='UserConcentratedPodPlanner' ) diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py index d2e6364ad2f..174782f5a76 100644 --- a/test/integration/smoke/test_internal_lb.py +++ b/test/integration/smoke/test_internal_lb.py @@ -39,7 +39,7 @@ class TestInternalLb(cloudstackTestCase): cls.domain = get_domain(cls.apiclient) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create(cls.apiclient, services=cls.services["account"]) cls.template = get_template( diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index 830f52adf89..9bad575b8d0 100755 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -19,13 +19,14 @@ # Import Local Modules from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.cloudstackAPI import listZones, updateIso, extractIso, updateIsoPermissions, copyIso, deleteIso -from marvin.lib.utils import cleanup_resources, random_gen, get_hypervisor_type +from marvin.lib.utils import cleanup_resources, random_gen, get_hypervisor_type,validateList from marvin.lib.base import Account, Iso from marvin.lib.common import (get_domain, get_zone, list_isos, list_os_types) from nose.plugins.attrib import attr +from marvin.codes import PASS import urllib # Import System modules import time @@ -253,13 +254,15 @@ class TestISO(cloudstackTestCase): list_default_iso_response = list_isos( self.apiclient, name=isoname, + account="system", isready="true" ) - self.assertEqual( - list_default_iso_response, - None, - "Check if ISO exists in ListIsos" - ) + status = validateList(list_default_iso_response) + self.assertEquals( + PASS, + status[0], + "Check if ISO exists in ListIsos") + @attr( tags=[ @@ -600,6 +603,6 @@ class TestISO(cloudstackTestCase): # list ISO should list default ISOS (VM and xen tools) # ListIsos to list default ISOS (VM and xen tools) - self.get_iso_details("xs-tools.iso") self.get_iso_details("vmware-tools.iso") + self.get_iso_details("xs-tools.iso") return diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py index f6629743630..7da63ed7922 100644 --- a/test/integration/smoke/test_loadbalance.py +++ b/test/integration/smoke/test_loadbalance.py @@ -59,7 +59,7 @@ class TestLoadBalance(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.vm_1 = VirtualMachine.create( cls.apiclient, diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index f5a2a5f107e..80a093285c6 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -272,7 +272,7 @@ class TestPortForwarding(cloudstackTestCase): cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.virtual_machine = VirtualMachine.create( cls.apiclient, @@ -596,7 +596,7 @@ class TestRebootRouter(cloudstackTestCase): ) self.service_offering = ServiceOffering.create( self.apiclient, - self.services["service_offerings"] + self.services["service_offerings"]["tiny"] ) self.vm_1 = VirtualMachine.create( self.apiclient, @@ -765,7 +765,7 @@ class TestReleaseIP(cloudstackTestCase): self.service_offering = ServiceOffering.create( self.apiclient, - self.services["service_offerings"] + self.services["service_offerings"]["tiny"] ) self.virtual_machine = VirtualMachine.create( @@ -905,7 +905,7 @@ class TestDeleteAccount(cloudstackTestCase): ) self.service_offering = ServiceOffering.create( self.apiclient, - self.services["service_offerings"] + self.services["service_offerings"]["tiny"] ) self.vm_1 = VirtualMachine.create( self.apiclient, @@ -1050,7 +1050,7 @@ class TestRouterRules(cloudstackTestCase): cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.virtual_machine = VirtualMachine.create( cls.apiclient, diff --git a/test/integration/smoke/test_network_acl.py b/test/integration/smoke/test_network_acl.py index 015ebabba95..909da7e1e0b 100644 --- a/test/integration/smoke/test_network_acl.py +++ b/test/integration/smoke/test_network_acl.py @@ -37,7 +37,7 @@ class TestNetworkACL(cloudstackTestCase): cls.domain = get_domain(cls.apiclient) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create(cls.apiclient, services=cls.services["account"]) cls.template = get_template( diff --git a/test/integration/smoke/test_nicira_controller.py b/test/integration/smoke/test_nicira_controller.py new file mode 100644 index 00000000000..229612d451d --- /dev/null +++ b/test/integration/smoke/test_nicira_controller.py @@ -0,0 +1,310 @@ +#!/usr/bin/env python +# 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. + +import requests +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import cleanup_resources +from marvin.lib.base import ( + PhysicalNetwork, + NetworkOffering, + NiciraNvp, + ServiceOffering, + Network, + VirtualMachine +) +from marvin.lib.common import (get_domain, get_zone, get_template) +from nose.plugins.attrib import attr +from marvin.codes import (FAILED, PASS) +import time + +class TestNiciraContoller(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + test_case = super(TestNiciraContoller, cls) + + test_client = test_case.getClsTestClient() + cls.config = test_case.getClsConfig() + cls.api_client = test_client.getApiClient() + + cls.physical_networks = cls.config.zones[0].physical_networks + cls.nicira_hosts = cls.config.niciraNvp.hosts + + cls.physical_network_id = cls.get_nicira_enabled_physical_network_id(cls.physical_networks) + + cls.network_offerring_services = { + 'name': 'NiciraEnabledNetwork', + 'displaytext': 'NiciraEnabledNetwork', + 'guestiptype': 'Isolated', + 'supportedservices': 'SourceNat,Firewall,PortForwarding,Connectivity', + 'traffictype': 'GUEST', + 'availability': 'Optional', + 'serviceProviderList': { + 'SourceNat': 'VirtualRouter', + 'Firewall': 'VirtualRouter', + 'PortForwarding': 'VirtualRouter', + 'Connectivity': 'NiciraNvp' + } + } + + cls.network_offering = NetworkOffering.create(cls.api_client, cls.network_offerring_services) + cls.network_offering.update(cls.api_client, state='Enabled') + + cls.nicira_credentials = { + 'username': 'admin', + 'password': 'admin' + } + + cls.nicira_master_controller = cls.determine_master_controller( + cls.nicira_hosts, + cls.nicira_credentials + ) + + cls.transport_zone_uuid = cls.get_transport_zone_from_controller( + cls.nicira_master_controller, + cls.nicira_credentials + ) + + cls.domain = get_domain(cls.api_client) + cls.zone = get_zone(cls.api_client, test_client.getZoneForTests()) + + template = get_template( + cls.api_client, + cls.zone.id + ) + if template == FAILED: + raise Exception("get_template() failed to return template with description %s" % cls.services['ostype']) + + cls.vm_services = { + 'mode': cls.zone.networktype, + 'small': { + 'zoneid': cls.zone.id, + 'template': template.id, + 'displayname': 'testserver', + 'username': cls.config.zones[0].pods[0].clusters[0].hosts[0].username, + 'password': cls.config.zones[0].pods[0].clusters[0].hosts[0].password, + 'ssh_port': 22, + 'hypervisor': cls.config.zones[0].pods[0].clusters[0].hypervisor, + 'privateport': 22, + 'publicport': 22, + 'protocol': 'TCP', + }, + 'service_offerings': { + 'tiny': { + 'name': 'Tiny Instance', + 'displaytext': 'Tiny Instance', + 'cpunumber': 1, + 'cpuspeed': 100, + 'memory': 64, + } + } + } + + if cls.zone.localstorageenabled == True: + cls.vm_services['service_offerings']['tiny']['storagetype'] = 'local' + + cls.service_offering = ServiceOffering.create( + cls.api_client, + cls.vm_services['service_offerings']['tiny'] + ) + + cls.cleanup = [ + cls.network_offering, + cls.service_offering + ] + + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.api_client, reversed(cls.cleanup)) + except Exception as e: + raise Exception("Warning: Exception during class cleanup : %s" % e) + + def setUp(self): + self.test_cleanup = [] + + def tearDown(self): + try: + cleanup_resources(self.api_client, reversed(self.test_cleanup)) + except Exception as e: + raise Exception("Warning: Exception during test cleanup : %s" % e) + + + @classmethod + def determine_master_controller(cls, hosts, credentials): + for host in hosts: + r1 = requests.post("https://%s/ws.v1/login" % host, credentials, verify=False) + r2 = requests.get("https://%s/ws.v1/control-cluster/status" % host, verify=False, cookies=r1.cookies) + status_code = r2.status_code + if status_code == 401: + continue + elif status_code == 200: + return host + raise Exception("None of the supplied hosts (%s) is a Nicira controller" % hosts) + + + @classmethod + def get_transport_zone_from_controller(cls, controller_host, credentials): + r1 = requests.post("https://%s/ws.v1/login" % controller_host, credentials, verify=False) + r2 = requests.get("https://%s/ws.v1/transport-zone" % controller_host, verify=False, cookies=r1.cookies) + status_code = r2.status_code + if status_code == 200: + list_transport_zone_response = r2.json() + result_count = list_transport_zone_response['result_count'] + if result_count == 0: + raise Exception('Nicira controller did not return any Transport Zones') + elif result_count > 1: + self.debug("Nicira controller returned %s Transport Zones, picking first one" % resultCount) + transport_zone_api_url = list_transport_zone_response['results'][0]['_href'] + r3 = requests.get( + "https://%s%s" % (controller_host, transport_zone_api_url), + verify=False, + cookies=r1.cookies + ) + return r3.json()['uuid'] + else: + raise Exception("Unexpected response from Nicira controller. Status code = %s, content = %s" % status_code) + + + @classmethod + def get_nicira_enabled_physical_network_id(cls, physical_networks): + nicira_physical_network_name = None + for physical_network in physical_networks: + for provider in physical_network.providers: + if provider.name == 'NiciraNvp': + nicira_physical_network_name = physical_network.name + if nicira_physical_network_name is None: + raise Exception('Did not find a Nicira enabled physical network in configuration') + return PhysicalNetwork.list(cls.api_client, name=nicira_physical_network_name)[0].id + + + def determine_slave_conroller(self, hosts, master_controller): + slaves = [ s for s in hosts if s != master_controller ] + if len(slaves) > 0: + return slaves[0] + else: + raise Exception("None of the supplied hosts (%s) is a Nicira slave" % hosts) + + @attr(tags = ["advanced", "smoke", "nicira"], required_hardware="true") + def test_01_nicira_controller(self): + nicira_device = NiciraNvp.add( + self.api_client, + None, + self.physical_network_id, + hostname=self.nicira_master_controller, + username=self.nicira_credentials['username'], + password=self.nicira_credentials['password'], + transportzoneuuid=self.transport_zone_uuid) + self.test_cleanup.append(nicira_device) + + network_services = { + 'name' : 'nicira_enabled_network', + 'displaytext' : 'nicira_enabled_network', + 'zoneid' : self.zone.id, + 'networkoffering' : self.network_offering.id + } + network = Network.create( + self.api_client, + network_services, + accountid='admin', + domainid=self.domain.id, + ) + self.test_cleanup.append(network) + + virtual_machine = VirtualMachine.create( + self.api_client, + self.vm_services['small'], + accountid='admin', + domainid=self.domain.id, + serviceofferingid=self.service_offering.id, + networkids=[network.id], + mode=self.vm_services['mode'] + ) + self.test_cleanup.append(virtual_machine) + + list_vm_response = VirtualMachine.list(self.api_client, id=virtual_machine.id) + self.debug("Verify listVirtualMachines response for virtual machine: %s" % virtual_machine.id) + + self.assertEqual(isinstance(list_vm_response, list), True, 'Response did not return a valid list') + self.assertNotEqual(len(list_vm_response), 0, 'List of VMs is empty') + + vm_response = list_vm_response[0] + self.assertEqual(vm_response.id, virtual_machine.id, 'Virtual machine in response does not match request') + self.assertEqual(vm_response.state, 'Running', 'VM is not in Running state') + + @attr(tags = ["advanced", "smoke", "nicira"], required_hardware="true") + def test_02_nicira_controller_redirect(self): + """ + Nicira clusters will redirect clients (in this case ACS) to the master node. + This test assumes that a Nicira cluster is present and configured properly, and + that it has at least two controller nodes. The test will check that ASC follows + redirects by: + - adding a Nicira Nvp device that points to one of the cluster's slave controllers, + - create a VM in a Nicira backed network + If all is well, no matter what controller is specified (slaves or master), the vm (and respective router VM) + should be created without issues. + """ + nicira_slave = self.determine_slave_conroller(self.nicira_hosts, self.nicira_master_controller) + self.debug("Nicira slave controller is: %s " % nicira_slave) + + nicira_device = NiciraNvp.add( + self.api_client, + None, + self.physical_network_id, + hostname=nicira_slave, + username=self.nicira_credentials['username'], + password=self.nicira_credentials['password'], + transportzoneuuid=self.transport_zone_uuid) + self.test_cleanup.append(nicira_device) + + network_services = { + 'name' : 'nicira_enabled_network', + 'displaytext' : 'nicira_enabled_network', + 'zoneid' : self.zone.id, + 'networkoffering' : self.network_offering.id + } + network = Network.create( + self.api_client, + network_services, + accountid='admin', + domainid=self.domain.id, + ) + self.test_cleanup.append(network) + + virtual_machine = VirtualMachine.create( + self.api_client, + self.vm_services['small'], + accountid='admin', + domainid=self.domain.id, + serviceofferingid=self.service_offering.id, + networkids=[network.id], + mode=self.vm_services['mode'] + ) + self.test_cleanup.append(virtual_machine) + + list_vm_response = VirtualMachine.list(self.api_client, id=virtual_machine.id) + self.debug("Verify listVirtualMachines response for virtual machine: %s" % virtual_machine.id) + + self.assertEqual(isinstance(list_vm_response, list), True, 'Response did not return a valid list') + self.assertNotEqual(len(list_vm_response), 0, 'List of VMs is empty') + + vm_response = list_vm_response[0] + self.assertEqual(vm_response.id, virtual_machine.id, 'Virtual machine in response does not match request') + self.assertEqual(vm_response.state, 'Running', 'VM is not in Running state') + diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index a9010399ecf..4478c7b8a89 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -79,7 +79,7 @@ class TestRouterServices(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.vm_1 = VirtualMachine.create( cls.apiclient, diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py index 6968277229b..0a0f4155f95 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -174,7 +174,79 @@ class TestScaleVm(cloudstackTestCase): self.assertNotEqual( list_vm_response, None, - "Check virtual machine is listVirtualMachines" + "Check virtual machine is in listVirtualMachines" + ) + + vm_response = list_vm_response[0] + self.assertEqual( + vm_response.id, + self.virtual_machine.id, + "Check virtual machine ID of scaled VM" + ) + + self.debug( + "Scaling VM-ID: %s from service offering: %s to new service\ + offering %s and the response says %s" % + (self.virtual_machine.id, + self.virtual_machine.serviceofferingid, + self.big_offering.id, + vm_response.serviceofferingid)) + self.assertEqual( + vm_response.serviceofferingid, + self.big_offering.id, + "Check service offering of the VM" + ) + + self.assertEqual( + vm_response.state, + 'Running', + "Check the state of VM" + ) + return + + @attr(tags=["advanced", "basic"], required_hardware="false") + def test_02_scale_vm_without_hypervisor_specifics(self): + # Validate the following + # Scale up the vm and see if it scales to the new svc offering and is + # finally in running state + + # VirtualMachine should be updated to tell cloudstack + # it has PV tools + # available and successfully scaled. We will only mock + # that behaviour + # here but it is not expected in production since the VM + # scaling is not + # guaranteed until tools are installed, vm rebooted + + self.virtual_machine.update( + self.apiclient, + isdynamicallyscalable='true') + + self.debug("Scaling VM-ID: %s to service offering: %s and state %s" % ( + self.virtual_machine.id, + self.big_offering.id, + self.virtual_machine.state + )) + + cmd = scaleVirtualMachine.scaleVirtualMachineCmd() + cmd.serviceofferingid = self.big_offering.id + cmd.id = self.virtual_machine.id + self.apiclient.scaleVirtualMachine(cmd) + + list_vm_response = VirtualMachine.list( + self.apiclient, + id=self.virtual_machine.id + ) + self.assertEqual( + isinstance(list_vm_response, list), + True, + "Check list response returns a valid list" + ) + + self.assertNotEqual( + list_vm_response, + None, + "Check virtual machine is in listVirtualMachines" ) vm_response = list_vm_response[0] diff --git a/test/integration/smoke/test_service_offerings.py b/test/integration/smoke/test_service_offerings.py index 56989e3b158..519b5ae4caa 100644 --- a/test/integration/smoke/test_service_offerings.py +++ b/test/integration/smoke/test_service_offerings.py @@ -75,7 +75,7 @@ class TestCreateServiceOffering(cloudstackTestCase): service_offering = ServiceOffering.create( self.apiclient, - self.services["service_offerings"] + self.services["service_offerings"]["tiny"] ) self.cleanup.append(service_offering) @@ -101,27 +101,27 @@ class TestCreateServiceOffering(cloudstackTestCase): self.assertEqual( list_service_response[0].cpunumber, - self.services["service_offerings"]["cpunumber"], + self.services["service_offerings"]["tiny"]["cpunumber"], "Check server id in createServiceOffering" ) self.assertEqual( list_service_response[0].cpuspeed, - self.services["service_offerings"]["cpuspeed"], + self.services["service_offerings"]["tiny"]["cpuspeed"], "Check cpuspeed in createServiceOffering" ) self.assertEqual( list_service_response[0].displaytext, - self.services["service_offerings"]["displaytext"], + self.services["service_offerings"]["tiny"]["displaytext"], "Check server displaytext in createServiceOfferings" ) self.assertEqual( list_service_response[0].memory, - self.services["service_offerings"]["memory"], + self.services["service_offerings"]["tiny"]["memory"], "Check memory in createServiceOffering" ) self.assertEqual( list_service_response[0].name, - self.services["service_offerings"]["name"], + self.services["service_offerings"]["tiny"]["name"], "Check name in createServiceOffering" ) return @@ -157,11 +157,11 @@ class TestServiceOfferings(cloudstackTestCase): cls.service_offering_1 = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.service_offering_2 = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) template = get_template( cls.apiclient, @@ -176,8 +176,6 @@ class TestServiceOfferings(cloudstackTestCase): cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = template.id - cls.services["medium"]["zoneid"] = cls.zone.id - cls.services["medium"]["template"] = template.id # Create VMs, NAT Rules etc cls.account = Account.create( @@ -197,7 +195,7 @@ class TestServiceOfferings(cloudstackTestCase): ) cls.medium_virtual_machine = VirtualMachine.create( cls.apiclient, - cls.services["medium"], + cls.services["small"], accountid=cls.account.name, domainid=cls.account.domainid, serviceofferingid=cls.medium_offering.id, diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py index d230c6765bf..4b1fcbd526f 100644 --- a/test/integration/smoke/test_snapshots.py +++ b/test/integration/smoke/test_snapshots.py @@ -31,6 +31,7 @@ from marvin.lib.common import (get_domain, list_snapshots) from marvin.lib.decoratorGenerators import skipTestIf + class TestSnapshotRootDisk(cloudstackTestCase): @classmethod @@ -52,46 +53,48 @@ class TestSnapshotRootDisk(cloudstackTestCase): cls._cleanup = [] if not cls.hypervisorNotSupported: template = get_template( - cls.apiclient, - cls.zone.id, - cls.services["ostype"] - ) + cls.apiclient, + cls.zone.id, + cls.services["ostype"] + ) if template == FAILED: - assert False, "get_template() failed to return template with description %s" % cls.services["ostype"] + assert False, "get_template() failed to return template with description %s" % cls.services[ + "ostype"] cls.services["domainid"] = cls.domain.id - cls.services["server_without_disk"]["zoneid"] = cls.zone.id + cls.services["small"]["zoneid"] = cls.zone.id cls.services["templates"]["ostypeid"] = template.ostypeid cls.services["zoneid"] = cls.zone.id # Create VMs, NAT Rules etc cls.account = Account.create( - cls.apiclient, - cls.services["account"], - domainid=cls.domain.id - ) + cls.apiclient, + cls.services["account"], + domainid=cls.domain.id + ) cls._cleanup.append(cls.account) cls.service_offering = ServiceOffering.create( - cls.apiclient, - cls.services["service_offerings"] - ) + cls.apiclient, + cls.services["service_offerings"]["tiny"] + ) cls._cleanup.append(cls.service_offering) cls.virtual_machine = cls.virtual_machine_with_disk = \ - VirtualMachine.create( - cls.apiclient, - cls.services["server_without_disk"], - templateid=template.id, - accountid=cls.account.name, - domainid=cls.account.domainid, - serviceofferingid=cls.service_offering.id, - mode=cls.services["mode"] - ) + VirtualMachine.create( + cls.apiclient, + cls.services["small"], + templateid=template.id, + accountid=cls.account.name, + domainid=cls.account.domainid, + zoneid=cls.zone.id, + serviceofferingid=cls.service_offering.id, + mode=cls.services["mode"] + ) return @classmethod def tearDownClass(cls): try: - #Cleanup resources used + # Cleanup resources used cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) @@ -105,14 +108,14 @@ class TestSnapshotRootDisk(cloudstackTestCase): def tearDown(self): try: - #Clean up, terminate the created instance, volumes and snapshots + # Clean up, terminate the created instance, volumes and snapshots cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return @skipTestIf("hypervisorNotSupported") - @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") + @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_01_snapshot_root_disk(self): """Test Snapshot Root Disk """ @@ -123,65 +126,76 @@ class TestSnapshotRootDisk(cloudstackTestCase): # the reqd volume under # /secondary/snapshots//$account_id/$volumeid/$snapshot_uuid # 3. verify backup_snap_id was non null in the `snapshots` table + # 4. Verify that zoneid is returned in listSnapshots API response volumes = list_volumes( - self.apiclient, - virtualmachineid=self.virtual_machine_with_disk.id, - type='ROOT', - listall=True - ) + self.apiclient, + virtualmachineid=self.virtual_machine_with_disk.id, + type='ROOT', + listall=True + ) snapshot = Snapshot.create( - self.apiclient, - volumes[0].id, - account=self.account.name, - domainid=self.account.domainid - ) + self.apiclient, + volumes[0].id, + account=self.account.name, + domainid=self.account.domainid + ) self.debug("Snapshot created: ID - %s" % snapshot.id) snapshots = list_snapshots( - self.apiclient, - id=snapshot.id - ) + self.apiclient, + id=snapshot.id + ) self.assertEqual( - isinstance(snapshots, list), - True, - "Check list response returns a valid list" - ) + isinstance(snapshots, list), + True, + "Check list response returns a valid list" + ) self.assertNotEqual( - snapshots, - None, - "Check if result exists in list item call" - ) + snapshots, + None, + "Check if result exists in list item call" + ) self.assertEqual( - snapshots[0].id, - snapshot.id, - "Check resource id in list resources call" - ) + snapshots[0].id, + snapshot.id, + "Check resource id in list resources call" + ) + + self.assertIsNotNone(snapshots[0].zoneid, + "Zone id is not none in listSnapshots") + self.assertEqual( + snapshots[0].zoneid, + self.zone.id, + "Check zone id in the list snapshots" + ) + self.debug( - "select backup_snap_id, account_id, volume_id from snapshots where uuid = '%s';" \ + "select backup_snap_id, account_id, volume_id from snapshots where uuid = '%s';" % str(snapshot.id) - ) + ) qresultset = self.dbclient.execute( - "select backup_snap_id, account_id, volume_id from snapshots where uuid = '%s';" \ - % str(snapshot.id) - ) + "select backup_snap_id, account_id, volume_id from snapshots where uuid = '%s';" + % str(snapshot.id) + ) self.assertNotEqual( - len(qresultset), - 0, - "Check DB Query result set" - ) + len(qresultset), + 0, + "Check DB Query result set" + ) qresult = qresultset[0] snapshot_uuid = qresult[0] # backup_snap_id = snapshot UUID self.assertNotEqual( - str(snapshot_uuid), - 'NULL', - "Check if backup_snap_id is not null" - ) + str(snapshot_uuid), + 'NULL', + "Check if backup_snap_id is not null" + ) - self.assertTrue(is_snapshot_on_nfs(self.apiclient, self.dbclient, self.config, self.zone.id, snapshot.id)) + self.assertTrue(is_snapshot_on_nfs( + self.apiclient, self.dbclient, self.config, self.zone.id, snapshot.id)) return diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index 21701631cfa..145282937ac 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -34,9 +34,54 @@ from nose.plugins.attrib import attr import urllib #Import System modules import time +from marvin.cloudstackAPI import (createTemplate, listOsTypes) _multiprocess_shared_ = True +# Function to create template with name existing in test_data without any extensions + + +def create(apiclient, services, volumeid=None, account=None, domainid=None, projectid=None): + cmd = createTemplate.createTemplateCmd() + cmd.displaytext = services["displaytext"] + cmd.name = services["name"] + if "ostypeid" in services: + cmd.ostypeid = services["ostypeid"] + elif "ostype" in services: + sub_cmd = listOsTypes.listOsTypesCmd() + sub_cmd.description = services["ostype"] + ostypes = apiclient.listOsTypes(sub_cmd) + + if not isinstance(ostypes, list): + raise Exception( + "Unable to find Ostype id with desc: %s" % services["ostype"] + ) + cmd.ostypeid = ostypes[0].id + else: + raise Exception( + "Unable to find Ostype is required for creating template") + + cmd.isfeatured = services[ + "isfeatured"] if "isfeatured" in services else False + + cmd.ispublic = services[ + "ispublic"] if "ispublic" in services else False + cmd.isextractable = services[ + "isextractable"] if "isextractable" in services else False + cmd.passwordenabled = services[ + "passwordenabled"] if "passwordenabled" in services else False + + if volumeid: + cmd.volumeid = volumeid + if account: + cmd.account = account + if domainid: + cmd.domainid = domainid + if projectid: + cmd.projectid = projectid + return apiclient.createTemplate(cmd) + + class TestCreateTemplate(cloudstackTestCase): def setUp(self): @@ -106,7 +151,7 @@ class TestCreateTemplate(cloudstackTestCase): cls._cleanup.append(cls.account) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls._cleanup.append(cls.service_offering) #create virtual machine @@ -147,6 +192,46 @@ class TestCreateTemplate(cloudstackTestCase): return + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") + def test_CreateTemplateWithDuplicateName(self): + """Test when createTemplate is used to create templates having the same name all of them get + different unique names so that the templates with same name does not get deleted during template sync""" + + #1. Create 2 templates with same name + #2. check the db that the templates with same name have different unique_name + + #Create templates from Virtual machine and Volume ID + template1 = create(self.apiclient, + self.services["template"], + self.volume.id, + account=self.account.name) + template2 = create(self.apiclient, + self.services["template"], + self.volume.id, + account=self.account.name) + + self.debug("Created template with ID: %s" % template1.id) + self.debug("Created template with ID: %s" % template2.id) + + self.assertEqual( + template1.name, template2.name, "Created templates with same name") + + self.debug("select unique_name from vm_template where name='%s';" + % template1.name) + + #Db query to check for unique_name for the templates with same name + + qresultset = self.dbclient.execute("select unique_name from vm_template where name='%s' and removed is NULL ;" + % template1.name) + + + self.debug("unique_name of template1 is '%s' and unique_name of template2 is '%s'", qresultset[0], + qresultset[1]) + + self.assertNotEqual(qresultset[0], qresultset[1], + "unique names are different") + + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_01_create_template(self): """Test create public & private template @@ -268,7 +353,7 @@ class TestTemplates(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) #create virtual machine cls.virtual_machine = VirtualMachine.create( diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py index 294dc7986f7..1553d0bd5e1 100755 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -72,8 +72,6 @@ class TestDeployVM(cloudstackTestCase): cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = template.id - cls.services["medium"]["zoneid"] = cls.zone.id - cls.services["medium"]["template"] = template.id cls.services["iso1"]["zoneid"] = cls.zone.id cls.account = Account.create( @@ -286,8 +284,6 @@ class TestVMLifeCycle(cloudstackTestCase): cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = template.id - cls.services["medium"]["zoneid"] = cls.zone.id - cls.services["medium"]["template"] = template.id cls.services["iso1"]["zoneid"] = cls.zone.id # Create VMs, NAT Rules etc @@ -317,7 +313,7 @@ class TestVMLifeCycle(cloudstackTestCase): ) cls.medium_virtual_machine = VirtualMachine.create( cls.apiclient, - cls.services["medium"], + cls.services["small"], accountid=cls.account.name, domainid=cls.account.domainid, serviceofferingid=cls.medium_offering.id, diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py index 58ac7e54d0b..93f1c3ebd74 100644 --- a/test/integration/smoke/test_vm_snapshots.py +++ b/test/integration/smoke/test_vm_snapshots.py @@ -60,7 +60,7 @@ class TestVmSnapshot(cloudstackTestCase): with description %s" % cls.services["ostype"] cls.services["domainid"] = cls.domain.id - cls.services["server"]["zoneid"] = cls.zone.id + cls.services["small"]["zoneid"] = cls.zone.id cls.services["templates"]["ostypeid"] = template.ostypeid cls.services["zoneid"] = cls.zone.id @@ -74,12 +74,12 @@ class TestVmSnapshot(cloudstackTestCase): cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls._cleanup.append(cls.service_offering) cls.virtual_machine = VirtualMachine.create( cls.apiclient, - cls.services["server"], + cls.services["small"], templateid=template.id, accountid=cls.account.name, domainid=cls.account.domainid, diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index 2ac592606e0..4dcf26387ad 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -101,7 +101,7 @@ class TestCreateVolume(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.virtual_machine = VirtualMachine.create( cls.apiclient, @@ -322,7 +322,7 @@ class TestVolumes(cloudstackTestCase): ) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.virtual_machine = VirtualMachine.create( cls.apiclient, diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py index 9e8f97f61a6..0b78ad11340 100644 --- a/test/integration/smoke/test_vpc_vpn.py +++ b/test/integration/smoke/test_vpc_vpn.py @@ -39,7 +39,7 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase): cls.domain = get_domain(cls.apiclient) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create(cls.apiclient, services=cls.services["account"]) cls.template = get_template( @@ -147,7 +147,7 @@ class TestVpcSite2SiteVpn(cloudstackTestCase): cls.domain = get_domain(cls.apiclient) cls.service_offering = ServiceOffering.create( cls.apiclient, - cls.services["service_offerings"] + cls.services["service_offerings"]["tiny"] ) cls.account = Account.create(cls.apiclient, services=cls.services["account"]) cls.template = get_template( diff --git a/test/integration/testpaths/testpath_attach_disk_zwps.py b/test/integration/testpaths/testpath_attach_disk_zwps.py new file mode 100644 index 00000000000..d386438310f --- /dev/null +++ b/test/integration/testpaths/testpath_attach_disk_zwps.py @@ -0,0 +1,209 @@ +# 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. +""" Test case for Data Disk Attach to VM on ZWPS Test Path +""" + +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + DiskOffering, + Volume, + VirtualMachine, + StoragePool + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template + ) + +from marvin.codes import (PASS, + ZONETAG1) + + +class TestAttachDataDisk(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestAttachDataDisk, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + cls.hypervisor = cls.testClient.getHypervisorInfo() + + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + cls._cleanup = [] + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + cls.skiptest = False + + try: + cls.pools = StoragePool.list(cls.apiclient, zoneid=cls.zone.id) + except Exception as e: + cls.skiptest = True + return + try: + + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + cls._cleanup.append(cls.account) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + # Create Service offering + cls.service_offering_zone1 = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + tags=ZONETAG1 + ) + cls._cleanup.append(cls.service_offering_zone1) + + # Create Disk offering + cls.disk_offering = DiskOffering.create( + cls.apiclient, + cls.testdata["disk_offering"] + ) + + cls._cleanup.append(cls.disk_offering) + + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + self.cleanup = [] + + def tearDown(self): + try: + for storagePool in self.pools: + StoragePool.update(self.apiclient, id=storagePool.id, tags="") + + if hasattr(self, "data_volume_created"): + data_volumes_list = Volume.list( + self.userapiclient, + id=self.data_volume_created.id, + virtualmachineid=self.vm.id + ) + if data_volumes_list: + self.vm.detach_volume( + self.userapiclient, + data_volumes_list[0] + ) + + status = validateList(data_volumes_list) + self.assertEqual( + status[0], + PASS, + "DATA Volume List Validation Failed") + + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["basic", "advanced"], required_hardware="true") + def test_01_attach_datadisk_to_vm_on_zwps(self): + """ Attach Data Disk To VM on ZWPS + 1. Check if zwps storage pool exists. + 2. Adding tag to zone wide primary storage + 3. Launch a VM on ZWPS + 4. Attach data disk to vm which is on zwps. + 5. Verify disk is attached. + """ + + # Step 1 + if len(list(storagePool for storagePool in self.pools + if storagePool.scope == "ZONE")) < 1: + self.skipTest("There must be at least one zone wide \ + storage pools available in the setup") + + # Adding tags to Storage Pools + zone_no = 1 + for storagePool in self.pools: + if storagePool.scope == "ZONE": + StoragePool.update( + self.apiclient, + id=storagePool.id, + tags=[ZONETAG1[:-1] + repr(zone_no)]) + zone_no += 1 + + self.vm = VirtualMachine.create( + self.apiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering_zone1.id, + zoneid=self.zone.id + ) + + self.data_volume_created = Volume.create( + self.userapiclient, + self.testdata["volume"], + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid, + diskofferingid=self.disk_offering.id + ) + + self.cleanup.append(self.data_volume_created) + + # Step 2 + self.vm.attach_volume( + self.userapiclient, + self.data_volume_created + ) + + data_volumes_list = Volume.list( + self.userapiclient, + id=self.data_volume_created.id, + virtualmachineid=self.vm.id + ) + + data_volume = data_volumes_list[0] + + status = validateList(data_volume) + + # Step 3 + self.assertEqual( + status[0], + PASS, + "Check: Data if Disk is attached to VM") + + return diff --git a/test/integration/testpaths/testpath_multiple_snapshot.py b/test/integration/testpaths/testpath_multiple_snapshot.py new file mode 100644 index 00000000000..540aca35f0c --- /dev/null +++ b/test/integration/testpaths/testpath_multiple_snapshot.py @@ -0,0 +1,290 @@ +# 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. + +""" Test case for Multiple Volume Snapshot in ZWPS +""" +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + DiskOffering, + Snapshot, + VirtualMachine, + StoragePool + ) +from marvin.lib.common import (get_domain, + get_zone, + list_volumes, + list_clusters, + get_template + ) + +from marvin.codes import PASS, ZONETAG1, ROOT, DATA + + +class TestMultipleVolumeSnapshots(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestMultipleVolumeSnapshots, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + cls.hypervisor = cls.testClient.getHypervisorInfo() + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + + cls.skiptest = False + + clus_list = list_clusters(cls.apiclient) + + if cls.hypervisor.lower() not in ['vmware'] or len(clus_list) < 2: + cls.skiptest = True + return + + try: + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + # Create Service offering + cls.service_offering_zwps = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + tags=ZONETAG1 + ) + + cls.disk_offering_zwps = DiskOffering.create( + cls.apiclient, + cls.testdata["disk_offering"], + tags=ZONETAG1 + ) + + cls._cleanup = [ + cls.account, + cls.service_offering_zwps, + cls.disk_offering_zwps, + ] + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + + self.cleanup = [] + if self.skiptest: + self.skipTest("Skip test as setup is either not VMWare or \ + having less than 2 clusters %s" % self.hypervisor) + + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + self.pools = [] + + def tearDown(self): + try: + for storagePool in self.pools: + StoragePool.update(self.apiclient, id=storagePool.id, tags="") + + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "basic"], required_hardware="true") + def test_01_multiple_snapshot_in_zwps(self): + """ Test multiple volume snapshot in zwps + + # 1. Verify if setup has a ZWPS and 2 CWPS + # 2. Deploy a VM with data disk in ZWPS + # 1. Verify ROOT and DATA Disk of the VM is in ZWPS. + # 2. Take a snapshot of VM. + # 3. Create Multiple Snapshots till operation fails. + """ + try: + self.pools = StoragePool.list(self.apiclient, zoneid=self.zone.id) + status = validateList(self.pools) + + self.assertEqual( + status[0], + PASS, + "Check: Failed to list storage pools due to %s" % + status[2]) + + zonepoolList = list(storagePool for storagePool in self.pools + if storagePool.scope == "ZONE") + + if len(zonepoolList) < 1: + self.skipTest("There must be at least one zone wide\ + storage pools available in the setup") + if len(list(storagePool for storagePool in self.pools + if storagePool.scope == "CLUSTER")) < 2: + self.skipTest("There must be at atleast two cluster wide\ + storage pools available in the setup") + except Exception as e: + self.skipTest(e) + + # Adding tags to Storage Pools + zone_no = 1 + StoragePool.update( + self.apiclient, + id=zonepoolList[0].id, + tags=[ZONETAG1[:-1] + repr(zone_no)]) + + self.vm_zwps = VirtualMachine.create( + self.apiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering_zwps.id, + diskofferingid=self.disk_offering_zwps.id, + zoneid=self.zone.id, + ) + + self.cleanup.append(self.vm_zwps) + + # Step 1 + volumes_root_list = list_volumes( + self.apiclient, + virtualmachineid=self.vm_zwps.id, + type=ROOT, + listall=True + ) + status = validateList(volumes_root_list) + + self.assertEqual( + status[0], + PASS, + "Check: Failed to list root vloume due to %s" % + status[2]) + + root_volume = volumes_root_list[0] + + if root_volume.storage != zonepoolList[0].name: + self.fail("Root Volume not in Zone-Wide Storage Pool !") + + volumes_data_list = list_volumes( + self.apiclient, + virtualmachineid=self.vm_zwps.id, + type=DATA, + listall=True + ) + status = validateList(volumes_data_list) + + self.assertEqual( + status[0], + PASS, + "Check: Failed to list data vloume due to %s" % + status[2]) + + data_volume = volumes_data_list[0] + + if data_volume.storage != zonepoolList[0].name: + self.fail("Data Volume not in Zone-Wide Storage Pool !") + + # Step 2 + self.vm_zwps.stop(self.apiclient) + + self.debug( + "Creation of Snapshot of Data Volume after VM is stopped.....") + + Snapshot.create( + self.apiclient, + data_volume.id) + + snapshots_list = Snapshot.list( + self.apiclient, + volumeid=data_volume.id, + listall=True) + + snap_list_validation_result = validateList(snapshots_list) + + self.assertEqual( + snap_list_validation_result[0], + PASS, + "snapshot list validation failed due to %s" % + snap_list_validation_result[2]) + + snap_count = len(snapshots_list) + + # Step 3 + self.debug( + "Creating Multiple Snapshots(Should create more than 10).....") + try: + while snap_count <= 12: + Snapshot.create( + self.apiclient, + data_volume.id) + + snapshots_list = Snapshot.list( + self.apiclient, + volumeid=data_volume.id, + listall=True) + + snap_list_validation_result = validateList(snapshots_list) + + self.assertEqual( + snap_list_validation_result[0], + PASS, + "snapshot list validation failed due to %s" % + snap_list_validation_result[2]) + + snap_count = len(snapshots_list) + except Exception as e: + snapshots_list = Snapshot.list( + self.apiclient, + volumeid=data_volume.id, + listall=True) + + snap_list_validation_result = validateList(snapshots_list) + + self.assertEqual( + snap_list_validation_result[0], + PASS, + "snapshot list validation failed due to %s" % + snap_list_validation_result[2]) + + assert len(snapshots_list) >= 10,\ + "Less than 10 snapshots created...." + raise Exception("Snapshot creation failed !: %s" % e) + + return diff --git a/test/integration/testpaths/testpath_queryAsyncJobResult.py b/test/integration/testpaths/testpath_queryAsyncJobResult.py new file mode 100644 index 00000000000..c4249654383 --- /dev/null +++ b/test/integration/testpaths/testpath_queryAsyncJobResult.py @@ -0,0 +1,133 @@ +# 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. +""" Test case to check if queryAsyncJobResult returns jobinstanceid +""" +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources) +from marvin.lib.base import (Account, + ServiceOffering, + VirtualMachine, + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + ) + +from marvin.cloudstackAPI import queryAsyncJobResult + + +class TestJobinstanceid(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestJobinstanceid, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + + cls.hypervisor = cls.testClient.getHypervisorInfo() + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + + try: + + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + + # Create Service offering + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + ) + + cls._cleanup = [ + cls.account, + cls.service_offering, + ] + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + self.cleanup = [] + + def tearDown(self): + try: + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "basic"], required_hardware="false") + def test_queryAsyncJobResult_jobinstanceid(self): + """ Test queryAsyncJobResult api return jobinstanceid + + # 1. Deploy a VM + # 2. Call queryAsyncJobResult API with jobid of previous step + # 3. Verify that queryAsyncJobResult returns jobinstanceid + + """ + # Step 1 + + vm = VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) + + # Step 2 + cmd = queryAsyncJobResult.queryAsyncJobResultCmd() + cmd.jobid = vm.jobid + result = self.apiclient.queryAsyncJobResult(cmd) + + # Step 3 + self.assertTrue( + "jobinstanceid" in dir(result), + "Check if jobinstanceid is returned by queryAsyncJobResult API") + + return diff --git a/test/integration/testpaths/testpath_revert_snap.py b/test/integration/testpaths/testpath_revert_snap.py new file mode 100644 index 00000000000..8026f343919 --- /dev/null +++ b/test/integration/testpaths/testpath_revert_snap.py @@ -0,0 +1,161 @@ +# 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. +""" Test cases for Verifying revert snapshot +""" +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + Snapshot, + VmSnapshot, + VirtualMachine, + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_volumes, + ) +from marvin.codes import PASS + +class TestUnableToRevertSnapshot(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestUnableToRevertSnapshot, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + + cls.hypervisor = cls.testClient.getHypervisorInfo() + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + + try: + + cls.skiptest = False + + if cls.hypervisor.lower() not in ['xenserver']: + cls.skiptest = True + return + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + # Create Service offering + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + ) + + cls._cleanup = [ + cls.account, + cls.service_offering, + ] + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + self.cleanup = [] + if self.skiptest: + self.skipTest("This test is to be checked on xenserver only Hence, skip for %s" % self.hypervisor) + + def tearDown(self): + try: + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "basic"]) + def test_01_check_revert_snapshot(self): + """ Test revert snapshot on XenServer + + # 1. Deploy a VM. + # 2. Take VM snapshot. + # 3. Verify that volume snapshot fails with error + can not create volume snapshot for VM with VM-snapshot + + """ + # Step 1 + vm = VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) + volumes_cluster_list = list_volumes( + self.apiclient, + virtualmachineid=vm.id, + type='ROOT', + listall=True + ) + + volume_list_validation = validateList(volumes_cluster_list) + + self.assertEqual( + volume_list_validation[0], + PASS, + "Event list validation failed due to %s" % + volume_list_validation[2] + ) + + root_volume = volumes_cluster_list[0] + + #Step 2 + vm_snap = VmSnapshot.create(self.apiclient, + vm.id) + + volume_list_validation = validateList(vm_snap) + + #Step 3 + with self.assertRaises(Exception): + Snapshot.create( + self.apiclient, + root_volume.id) + + return diff --git a/test/integration/testpaths/testpath_same_vm_name.py b/test/integration/testpaths/testpath_same_vm_name.py index ef464391ab0..da2c22da9f8 100644 --- a/test/integration/testpaths/testpath_same_vm_name.py +++ b/test/integration/testpaths/testpath_same_vm_name.py @@ -28,7 +28,7 @@ from marvin.lib.base import (Account, from marvin.lib.common import (get_domain, get_zone, get_template, - ) + ) from marvin.sshClient import SshClient import time @@ -45,6 +45,7 @@ class TestSameVMName(cloudstackTestCase): # Get Zone, Domain and templates cls.domain = get_domain(cls.apiclient) cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + cls.hypervisor = cls.testClient.getHypervisorInfo() cls.template = get_template( cls.apiclient, @@ -82,7 +83,7 @@ class TestSameVMName(cloudstackTestCase): UserName=cls.account_2.name, DomainName=cls.account_2.domain ) - # Create Service offering + # Create Service offering cls.service_offering = ServiceOffering.create( cls.apiclient, cls.testdata["service_offering"], @@ -103,11 +104,11 @@ class TestSameVMName(cloudstackTestCase): """Restart management server""" sshClient = SshClient( - cls.mgtSvrDetails["mgtSvrIp"], - 22, - cls.mgtSvrDetails["user"], - cls.mgtSvrDetails["passwd"] - ) + cls.mgtSvrDetails["mgtSvrIp"], + 22, + cls.mgtSvrDetails["user"], + cls.mgtSvrDetails["passwd"] + ) command = "service cloudstack-management restart" sshClient.execute(command) @@ -125,7 +126,9 @@ class TestSameVMName(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() self.cleanup = [] if self.skiptest: - self.skipTest("This test is to be checked on VMWare only Hence, skip for %s" % self.hypervisor) + self.skipTest( + "This test is to be checked on VMWare only \ + Hence, skip for %s" % self.hypervisor) def tearDown(self): try: @@ -160,8 +163,8 @@ class TestSameVMName(cloudstackTestCase): self.RestartServer() time.sleep(120) - self.testdata["small"]["displayname"]="TestName" - self.testdata["small"]["name"]="TestName" + self.testdata["small"]["displayname"] = "TestName" + self.testdata["small"]["name"] = "TestName" VirtualMachine.create( self.userapiclient_1, self.testdata["small"], diff --git a/test/integration/testpaths/testpath_snapshot_limits.py b/test/integration/testpaths/testpath_snapshot_limits.py index a8dfb399b21..a99f053e66d 100644 --- a/test/integration/testpaths/testpath_snapshot_limits.py +++ b/test/integration/testpaths/testpath_snapshot_limits.py @@ -63,7 +63,6 @@ class TestStorageSnapshotsLimits(cloudstackTestCase): return try: - # Create an account cls.account = Account.create( cls.apiclient, diff --git a/test/integration/testpaths/testpath_usage.py b/test/integration/testpaths/testpath_usage.py index f8788060b80..5f36c694d7c 100644 --- a/test/integration/testpaths/testpath_usage.py +++ b/test/integration/testpaths/testpath_usage.py @@ -17,7 +17,7 @@ """ Test cases for Usage Test Path """ from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackTestCase import cloudstackTestCase from marvin.lib.utils import (cleanup_resources, validateList, verifyRouterState, @@ -53,6 +53,7 @@ from marvin.lib.common import (get_domain, get_builtin_template_info, findSuitableHostForMigration, list_hosts, + list_volumes, list_routers) from marvin.codes import (PASS, FAIL, ERROR_NO_HOST_FOR_MIGRATION) from marvin.sshClient import SshClient @@ -105,7 +106,6 @@ class TestUsage(cloudstackTestCase): cls.zone.id, cls.testdata["ostype"]) - try: # If local storage is enabled, alter the offerings to use # localstorage @@ -1120,7 +1120,6 @@ class TestUsage(cloudstackTestCase): self.userapiclient, rootVolume.id) - # Verifying usage for Snapshot - START response = self.listUsageRecords(usagetype=9) self.assertEqual(response[0], PASS, response[1]) @@ -1231,7 +1230,6 @@ class TestUsage(cloudstackTestCase): # Step 7 templateFromVolume.delete(self.userapiclient) - # Verifying usage for Template is stoppd after deleting it - START response = self.listUsageRecords(usagetype=7) self.assertEqual(response[0], PASS, response[1]) @@ -1316,8 +1314,8 @@ class TestUsage(cloudstackTestCase): # Step 9 volumeFromSnapshot.delete(self.userapiclient) - - # Verifying usage for Volume from Snapshot is stopped after delete - START + # Verifying usage for Volume from Snapshot is stopped after delete - + # START response = self.listUsageRecords(usagetype=6) self.assertEqual(response[0], PASS, response[1]) volumeUsageRecords = response[1] @@ -1346,7 +1344,8 @@ class TestUsage(cloudstackTestCase): "usage for volume after deletion should remain the same\ after specific intervals of time") - # Verifying usage for Volume from Snapshot is stopped after delete - END + # Verifying usage for Volume from Snapshot is stopped after delete - + # END # Step 10 templateFromSnapshot = Template.create_from_snapshot( @@ -1418,7 +1417,8 @@ class TestUsage(cloudstackTestCase): templateFromSnapshot.delete(self.userapiclient) - # Verifying usage for Template from Snapshot is stopped after delete - START + # Verifying usage for Template from Snapshot is stopped after delete - + # START response = self.listUsageRecords(usagetype=7) self.assertEqual(response[0], PASS, response[1]) templateUsageRecords = response[1] @@ -1444,11 +1444,13 @@ class TestUsage(cloudstackTestCase): "usage for volume after deletion should remain the same\ after specific intervals of time") - # Verifying usage for Template from Snapshot is stopped after delete - END + # Verifying usage for Template from Snapshot is stopped after delete - + # END snapshotFromRootVolume.delete(self.userapiclient) - # Verifying usage for Snapshot from volume is stopped after delete - START + # Verifying usage for Snapshot from volume is stopped after delete - + # START response = self.listUsageRecords(usagetype=9) self.assertEqual(response[0], PASS, response[1]) templateUsageRecords = response[1] @@ -1474,7 +1476,8 @@ class TestUsage(cloudstackTestCase): "usage for volume after deletion should remain the same\ after specific intervals of time") - # Verifying usage for Snapshot from volume is stopped after delete - END + # Verifying usage for Snapshot from volume is stopped after delete - + # END return @attr(tags=["advanced"], required_hardware="true") @@ -2879,6 +2882,74 @@ class TestUsage(cloudstackTestCase): # aggregation period and current period will give the network usage return + @attr(tags=["advanced", "basic"], required_hardware="false") + def test_08_checkNewVolumein_listUsageRecords(self): + """ Test case to check if new volume crated after + restore VM is listed in listUsageRecords + # 1. Launch a VM + # 2. Restore the VM + # 3. Check if the new volume created is listed in listUsageRecords API + """ + + # Step 1 + vm = VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) + + volumes_root_list = list_volumes( + self.apiclient, + virtualmachineid=vm.id, + type='ROOT', + listall=True + ) + list_validation = validateList(volumes_root_list) + + self.assertEqual( + list_validation[0], + PASS, + "Volume list validation failed due to %s" % + list_validation[2]) + + root_volume = volumes_root_list[0] + + # Step 2 + vm.restore(self.apiclient) + + qresultset = self.dbclient.execute( + "select id from volumes where name='%s' and state='Ready';" % + root_volume.name) + + db_list_validation = validateList(qresultset) + + self.assertEqual( + db_list_validation[0], + PASS, + "Database list validation failed due to %s" % + db_list_validation[2]) + + self.assertNotEqual( + len(qresultset), + 0, + "Check DB Query result set" + ) + + volumeCheck = "Volume Id: " + str(qresultset[0][0]) + " usage time" + + response = self.listUsageRecords(usagetype=6) + self.assertEqual(response[0], PASS, response[1]) + UsageRecords = [record for record in response[1] + if volumeCheck in record.description] + # Step 3 + if not UsageRecords: + self.fail( + "listUsageRecords not returning usage for newly created volume") + class TestUsageDataAggregatior(cloudstackTestCase): @@ -2986,7 +3057,6 @@ class TestUsageDirectMeteringBasicZone(cloudstackTestCase): cls.zone.id, cls.testdata["ostype"]) - try: # If local storage is enabled, alter the offerings to use # localstorage diff --git a/test/integration/testpaths/testpath_uuid_event.py b/test/integration/testpaths/testpath_uuid_event.py new file mode 100644 index 00000000000..29ec4497d74 --- /dev/null +++ b/test/integration/testpaths/testpath_uuid_event.py @@ -0,0 +1,196 @@ +# 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. + +""" Test cases to verify presentation of volume id in events table + for 'SNAPSHOT.CREATE' type. +""" + +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + Snapshot, + VirtualMachine, + Configurations + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_volumes, + ) + +from marvin.codes import PASS + + +class TestVerifyEventsTable(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestVerifyEventsTable, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + + cls.hypervisor = cls.testClient.getHypervisorInfo() + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + + try: + + cls.unsupportedHypervisor = False + if cls.hypervisor.lower() in ['hyperv', 'lxc', 'kvm']: + if cls.hypervisor.lower() == 'kvm': + configs = Configurations.list( + cls.apiclient, + name='kvm.snapshot.enabled' + ) + + if configs[0].value == "false": + cls.unsupportedHypervisor = True + else: + cls.unsupportedHypervisor = True + + return + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + # Create Service offering + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + ) + + cls._cleanup = [ + cls.account, + cls.service_offering, + ] + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + cleanup_resources(cls.apiclient, cls._cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + + def setUp(self): + + self.cleanup = [] + if self.unsupportedHypervisor: + self.skipTest( + "snapshots are not supported on %s" % + self.hypervisor.lower()) + self.apiclient = self.testClient.getApiClient() + self.dbclient = self.testClient.getDbConnection() + + def tearDown(self): + try: + cleanup_resources(self.apiclient, self.cleanup) + except Exception as e: + raise Exception("Warning: Exception during cleanup : %s" % e) + return + + @attr(tags=["advanced", "basic"], required_hardware="false") + def test_01_verify_events_table(self): + """ Test events table + + # 1. Deploy a VM. + # 2. Take VM snapshot. + # 3. Verify that events table records UUID of the volume in descrption + instead of volume ID + """ + # Step 1 + # Create VM + vm = VirtualMachine.create( + self.userapiclient, + self.testdata["small"], + templateid=self.template.id, + accountid=self.account.name, + domainid=self.account.domainid, + serviceofferingid=self.service_offering.id, + zoneid=self.zone.id, + ) + volumes_list = list_volumes( + self.apiclient, + virtualmachineid=vm.id, + type='ROOT', + listall=True + ) + + volume_list_validation = validateList(volumes_list) + self.assertEqual( + volume_list_validation[0], + PASS, + "volume list validation failed due to %s" % + volume_list_validation[2] + ) + root_volume = volumes_list[0] + + # Step 2 + # Create snapshot of root volume + snapshot = Snapshot.create( + self.apiclient, + root_volume.id) + + self.assertNotEqual( + len(snapshot), + 0, + "Check if snapshot gets created properly" + ) + + # Step 3 + qresultset = self.dbclient.execute( + "select description from event where type='SNAPSHOT.CREATE' AND \ + description like '%%%s%%'" % root_volume.id) + + event_validation_result = validateList(qresultset) + + self.assertEqual( + event_validation_result[0], + PASS, + "event list validation failed due to %s" % + event_validation_result[2] + ) + + self.assertNotEqual( + len(qresultset), + 0, + "Check if events table records UUID of the volume" + ) + + return diff --git a/test/src/com/cloud/test/regression/ApiCommand.java b/test/src/com/cloud/test/regression/ApiCommand.java index 7b685f9f46a..b9229963f68 100644 --- a/test/src/com/cloud/test/regression/ApiCommand.java +++ b/test/src/com/cloud/test/regression/ApiCommand.java @@ -802,6 +802,7 @@ public class ApiCommand { try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while during async job result query."); } } else { break; diff --git a/test/src/com/cloud/test/stress/StressTestDirectAttach.java b/test/src/com/cloud/test/stress/StressTestDirectAttach.java index 7d0647a6dd6..15a0ba29b27 100644 --- a/test/src/com/cloud/test/stress/StressTestDirectAttach.java +++ b/test/src/com/cloud/test/stress/StressTestDirectAttach.java @@ -262,6 +262,8 @@ public class StressTestDirectAttach { int stopResponseCode = executeStop(server, developerServer, username); s_logger.info("stop response code: " + stopResponseCode); } catch (Exception e1) { + s_logger.info("[ignored]" + + "error executing stop during stress test: " + e1.getLocalizedMessage()); } } finally { NDC.clear(); @@ -1335,6 +1337,7 @@ public class StressTestDirectAttach { try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while during async job result query."); } } else { break; diff --git a/test/src/com/cloud/test/stress/TestClientWithAPI.java b/test/src/com/cloud/test/stress/TestClientWithAPI.java index 420bda61590..c41fae8b817 100644 --- a/test/src/com/cloud/test/stress/TestClientWithAPI.java +++ b/test/src/com/cloud/test/stress/TestClientWithAPI.java @@ -347,6 +347,8 @@ public class TestClientWithAPI { int stopResponseCode = executeStop(server, developerServer, username, true); s_logger.info("stop response code: " + stopResponseCode); } catch (Exception e1) { + s_logger.info("[ignored]" + + "error executing stop during api test: " + e1.getLocalizedMessage()); } } finally { NDC.clear(); @@ -2271,6 +2273,7 @@ public class TestClientWithAPI { try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.debug("[ignored] interupted while during async job result query."); } } else { break; diff --git a/test/src/com/cloud/test/ui/AddAndDeleteAISO.java b/test/src/com/cloud/test/ui/AddAndDeleteAISO.java index 23f4b930478..d97fed3756f 100644 --- a/test/src/com/cloud/test/ui/AddAndDeleteAISO.java +++ b/test/src/com/cloud/test/ui/AddAndDeleteAISO.java @@ -56,6 +56,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase { selenium.click("//div[" + i + "]/div/div[2]/span/span"); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "error during clicking test on iso: " + e.getLocalizedMessage()); } for (int second = 0;; second++) { @@ -65,6 +67,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase { if (selenium.isVisible("//div[@id='after_action_info_container_on_top']")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error during visibility test of iso: " + e.getLocalizedMessage()); } Thread.sleep(10000); } @@ -101,6 +105,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase { if (selenium.isVisible("after_action_info_container_on_top")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error checking visibility after test completion for iso: " + e.getLocalizedMessage()); } Thread.sleep(1000); } diff --git a/test/src/com/cloud/test/ui/AddAndDeleteATemplate.java b/test/src/com/cloud/test/ui/AddAndDeleteATemplate.java index 962a463414a..b0b7183774f 100644 --- a/test/src/com/cloud/test/ui/AddAndDeleteATemplate.java +++ b/test/src/com/cloud/test/ui/AddAndDeleteATemplate.java @@ -56,6 +56,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase { selenium.click("//div[" + i + "]/div/div[2]/span/span"); } } catch (Exception ex) { + s_logger.info("[ignored]" + + "error during clicking test on template: " + e.getLocalizedMessage()); } for (int second = 0;; second++) { @@ -65,6 +67,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase { if (selenium.isVisible("//div[@id='after_action_info_container_on_top']")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error during visibility test of template: " + e.getLocalizedMessage()); } Thread.sleep(10000); } @@ -101,6 +105,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase { if (selenium.isVisible("after_action_info_container_on_top")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error checking visibility after test completion for template: " + e.getLocalizedMessage()); } Thread.sleep(1000); } diff --git a/test/src/com/cloud/test/ui/UIScenarioTest.java b/test/src/com/cloud/test/ui/UIScenarioTest.java index cbf5341f848..8fde7e37ea6 100644 --- a/test/src/com/cloud/test/ui/UIScenarioTest.java +++ b/test/src/com/cloud/test/ui/UIScenarioTest.java @@ -48,6 +48,8 @@ public class UIScenarioTest extends AbstractSeleniumTestCase { if (selenium.isVisible("//div/p[@id='after_action_info']")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error during visibility test after start vm: " + e.getLocalizedMessage()); } Thread.sleep(10000); } @@ -64,6 +66,8 @@ public class UIScenarioTest extends AbstractSeleniumTestCase { if (selenium.isVisible("//div/p[@id='after_action_info']")) break; } catch (Exception e) { + s_logger.info("[ignored]" + + "error during visibility test after stop vm: " + e.getLocalizedMessage()); } Thread.sleep(10000); } diff --git a/test/src/com/cloud/test/utils/ConsoleProxy.java b/test/src/com/cloud/test/utils/ConsoleProxy.java index bc77bc918c7..35de0773593 100644 --- a/test/src/com/cloud/test/utils/ConsoleProxy.java +++ b/test/src/com/cloud/test/utils/ConsoleProxy.java @@ -67,7 +67,7 @@ public class ConsoleProxy implements Runnable { try { Thread.sleep(1000); } catch (InterruptedException e) { - + s_logger.debug("[ignored] interupted."); } } diff --git a/test/src/com/cloud/test/utils/IpSqlGenerator.java b/test/src/com/cloud/test/utils/IpSqlGenerator.java index 736f454cb7d..c37d08b86ff 100644 --- a/test/src/com/cloud/test/utils/IpSqlGenerator.java +++ b/test/src/com/cloud/test/utils/IpSqlGenerator.java @@ -82,7 +82,8 @@ public class IpSqlGenerator { out.close(); } } catch (Exception e) { - + s_logger.info("[ignored]" + + "error during ip insert generator: " + e.getLocalizedMessage()); } } } diff --git a/test/src/com/cloud/test/utils/SqlDataGenerator.java b/test/src/com/cloud/test/utils/SqlDataGenerator.java index 530ae3e0d90..8b42b1f1237 100644 --- a/test/src/com/cloud/test/utils/SqlDataGenerator.java +++ b/test/src/com/cloud/test/utils/SqlDataGenerator.java @@ -42,7 +42,8 @@ public class SqlDataGenerator { out.flush(); out.close(); } catch (Exception e) { - + s_logger.info("[ignored]" + + "error during sql generation: " + e.getLocalizedMessage()); } } } diff --git a/test/src/com/cloud/test/utils/TestClient.java b/test/src/com/cloud/test/utils/TestClient.java index 024502276d0..a32a34be49e 100644 --- a/test/src/com/cloud/test/utils/TestClient.java +++ b/test/src/com/cloud/test/utils/TestClient.java @@ -197,6 +197,8 @@ public class TestClient { String url = server + "?email=" + username + "&password=" + username + "&command=stop"; client.executeMethod(new GetMethod(url)); } catch (Exception e1) { + s_logger.info("[ignored]" + + "error while executing last resort stop attampt: " + e1.getLocalizedMessage()); } } finally { NDC.clear(); diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh index 203f45a79d2..c8b7b91e7b4 100644 --- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh +++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh @@ -65,7 +65,7 @@ function install_packages() { xl2tpd bcrelay ppp ipsec-tools tdb-tools \ openswan=1:2.6.37-3 \ xenstore-utils libxenstore3.0 \ - conntrackd ipvsadm libnetfilter-conntrack3 libnl1 \ + conntrackd ipvsadm libnetfilter-conntrack3 libnl-3-200 libnl-genl-3-200 \ ipcalc \ openjdk-7-jre-headless \ iptables-persistent \ diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh index 025eec5f81c..424b7887b60 100755 --- a/tools/build/build_asf.sh +++ b/tools/build/build_asf.sh @@ -96,6 +96,11 @@ perl -pi -e "s/6.2.0-1-SNAPSHOT<\/cs.xapi.version>/ +LABEL Vendor="Apache.org" License="ApacheV2" Version="4.6.0" + +RUN apt-get -y update && apt-get install -y \ + genisoimage \ + git \ + maven \ + openjdk-7-jdk \ + python-dev \ + python-setuptools \ + python-pip \ + supervisor + +RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \ + echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections; + +RUN apt-get install -qqy mysql-server && \ + apt-get clean all + +RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password '' + +RUN pip install --allow-external mysql-connector-python mysql-connector-python + +COPY tools/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY . ./root +WORKDIR /root + +RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install + +RUN (/usr/bin/mysqld_safe &); \ + sleep 3; \ + mvn -Pdeveloper -pl developer -Ddeploydb; \ + mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \ + pip install tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz + +EXPOSE 8080 8096 + +CMD ["/usr/bin/supervisord"] diff --git a/tools/docker/Dockerfile.centos6 b/tools/docker/Dockerfile.centos6 new file mode 100644 index 00000000000..8f520569ef1 --- /dev/null +++ b/tools/docker/Dockerfile.centos6 @@ -0,0 +1,50 @@ +# 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. +# +FROM centos:6 + +MAINTAINER "Apache CloudStack" +LABEL Vendor="Apache.org" License="ApacheV2" Version="4.6.0" + +ENV PKG_URL=http://jenkins.buildacloud.org/job/package-rhel63-master/lastSuccessfulBuild/artifact/dist/rpmbuild/RPMS/x86_64 + +# install CloudStack +RUN yum install -y \ + ${PKG_URL}/cloudstack-common-4.6.0-SNAPSHOT.el6.x86_64.rpm \ + ${PKG_URL}/cloudstack-management-4.6.0-SNAPSHOT.el6.x86_64.rpm + +RUN cd /etc/cloudstack/management; \ + ln -s tomcat6-nonssl.conf tomcat6.conf; \ + ln -s server-nonssl.xml server.xml; \ + ln -s log4j-cloud.xml log4j.xml +COPY init.sh_centos6 /root/init.sh + +RUN yum clean all + +RUN sed -i "s/cluster.node.IP=.*/cluster.node.IP=localhost/" /etc/cloudstack/management/db.properties + +EXPOSE 8080 8250 8096 45219 9090 8787 +# Ports: +# 8080: webui, api +# 8250: systemvm communication +# 8096: api port without authentication(default=off) +# Troubleshooting ports: +# 8787: CloudStack (Tomcat) debug socket +# 9090: Cloudstack Management Cluster Interface +# 45219: JMX console + +CMD ["/root/init.sh"] \ No newline at end of file diff --git a/tools/docker/Dockerfile.marvin b/tools/docker/Dockerfile.marvin new file mode 100644 index 00000000000..4293f563274 --- /dev/null +++ b/tools/docker/Dockerfile.marvin @@ -0,0 +1,40 @@ +# 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. +# +# +# build for cloudstack_home_dir not this folder +FROM python:2 + +MAINTAINER "Apache CloudStack" +LABEL Vendor="Apache.org" License="ApacheV2" Version="4.6.0" + +ENV WORK_DIR=/marvin + +ENV PKG_URL=http://jenkins.buildacloud.org/job/cloudstack-marvin-master/lastSuccessfulBuild/artifact/tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz + +RUN pip install --upgrade paramiko nose requests +RUN pip install --allow-external mysql-connector-python mysql-connector-python +RUN pip install ${PKG_URL} + +RUN mkdir -p ${WORK_DIR} +COPY setup/dev ${WORK_DIR}/dev +COPY tools/marvin/marvin ${WORK_DIR}/marvin +COPY test/integration ${WORK_DIR}/integration + +WORKDIR ${WORK_DIR} + +CMD /bin/bash \ No newline at end of file diff --git a/tools/docker/README.md b/tools/docker/README.md new file mode 100644 index 00000000000..b5c798cc693 --- /dev/null +++ b/tools/docker/README.md @@ -0,0 +1,100 @@ +# Docker Files for Apache CloudStack + +Dockerfiles used to build CloudStack images available on Docker hub. + + +## Using images from docker-hub + + +### CloudStack Simulator + +CloudStack Simulator if a all on one CloudStack Build including the simulator that mimic Hypervisor. This is usefull to test CloudStack API behavior without having to deploy real hypervisor nodes. CloudStack Simulator is used for tests and CI. + +``` +docker pull cloudstack/simulator +docker run --name simulator -p 8080:8080 -d cloudstack/simulator +``` + +### CloudStack Management-server + +``` +docker pull mysql:5.5 +docker pull cloudstack/management_centos6 +docker run --name cloudstack-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:5.5 +docker run -ti --name cloudstack --link cloudstack-mysql:mysql -d -p 8080:8080 -p 8250:8250 cloudstack/management_centos6 +``` + +### Marvin + +Use marvin to deploy or test your CloudStack environment. +Use Marvin with cloudstack connection thru the API port (8096) + +``` +docker pull cloudstack/marvin +docker run -ti --rm --name marvin --link simulator:8096 cloudstack/marvin +``` + +Deploy Cloud using marvin: + +``` +docker run -ti --rm --link simulator:8096 cloudstack/marvin python /root/tools/marvin/marvin/deployDataCenter.py -i /root/setup/dev/advanced.cfg +``` + +Perform Smoke tests against CloudStack Simulator containter: +``` +docker run -ti --rm --link simulator:8096 \ + nosetests-2.7 -v --with-marvin \ + --marvin-config=dev/advanced.cfg \ + --with-xunit \ + --xunit-file=xunit.xml \ + -a tags=advanced,required_hardware=false \ + --zone=Sandbox-simulator \ + --hypervisor=simulator \ + -w integration/smoke +``` + +# How to build images + +Image provide by CloudStack are automatically build by Jenkins performing following tasks: + + +### CentOS 6 + +CentOS 6 image use RPM's from jenkins.buildacloud.org +tag:latest = master branch + +1. build the base image + + ``` + docker build -f Dockerfile.centos6 -t cloudstack/management_centos6 . + ``` + +2. on jenkins, database and systemvm.iso are pre-deployed. the inital start require privileged container to + mount systemvm.iso and copy ssh_rsa.pub into it. + + ``` + docker run --name cloudstack-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:5.5 + docker run --privileged --link cloudstack-mysql:mysql -d --name cloudstack cloudstack/management_centos6 + sleep 300 + docker exec cloudstack /etc/init.d/cloudstack-management stop + docker stop cloudstack + docker commit -m "init system.iso" -a "Apache CloudStack" cloudstack cloudstack/management_centos6 + ``` + +### Marvin + +Build Marvin container usable to deploy cloud in the CloudStack management server container. + +1. to build the image + + ``` + docker build -f Dockerfile.marvin -t cloudstack/marvin ../.. + ``` + +### Simulator + +Build CloudStack with Simulator. this image is an all on one, including the database. Build from source using maven. + +``` +docker build -f Dockerfile -t cloudstack/simulator ../.. +``` \ No newline at end of file diff --git a/tools/docker/init.sh_centos6 b/tools/docker/init.sh_centos6 new file mode 100755 index 00000000000..52189ca2a52 --- /dev/null +++ b/tools/docker/init.sh_centos6 @@ -0,0 +1,50 @@ +#!/bin/bash +# 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. +# +# update database connection +# start cloudstack-management server +#/usr/bin/cloudstack-setup-databases cloud:password@$MYSQL_PORT_3306_TCP_ADDR + +# initial startup of the container to generage ssh_key +# performed as privileged +if [ ! -d /var/cloudstack/management/.ssh ]; then + mknod /dev/loop6 -m0660 b 7 6 +fi +sleep 5 + +mysql -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -h"$MYSQL_PORT_3306_TCP_ADDR" \ + -e "show databases;"|grep -q cloud + +case $? in + 1) + echo "deploying new cloud databases" + cloudstack-setup-databases cloud:password@${MYSQL_PORT_3306_TCP_ADDR} \ + --deploy-as=root:${MYSQL_ENV_MYSQL_ROOT_PASSWORD} -i localhost + ;; + 0) + echo "using existing databases" + cloudstack-setup-databases cloud:password@${MYSQL_PORT_3306_TCP_ADDR} + ;; + *) + echo "cannot access database" + exit 12 + ;; +esac + +service cloudstack-management start +tail -f /var/log/cloudstack/management/catalina.out diff --git a/supervisord.conf b/tools/docker/supervisord.conf similarity index 75% rename from supervisord.conf rename to tools/docker/supervisord.conf index a3e454bcd7e..fe1575be0df 100644 --- a/supervisord.conf +++ b/tools/docker/supervisord.conf @@ -10,6 +10,6 @@ user=root [program:cloudstack] command=/bin/bash -c "mvn -pl client jetty:run -Dsimulator" directory=/root -stderr_logfile=/var/log/acs.err.log -stdout_logfile=/var/log/acs.out.log +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 user=root diff --git a/tools/git/git-fwd-merge b/tools/git/git-fwd-merge new file mode 100755 index 00000000000..d0ce46a681a --- /dev/null +++ b/tools/git/git-fwd-merge @@ -0,0 +1,56 @@ +#!/bin/bash + +# 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. + +# Var +tmpMessageFile="${PWD}/.git-tmp-message.txt" + +# Check if branch was specified +branch=$1 +if [ -z ${branch} ]; then + echo "Usage: git fwd-merge branch-name" + echo + exit 1 +fi + +# Construct merge message +currentBranch=$(git branch | grep "^*" | sed -e "s/^[*] //") +echo "Merge release branch ${branch} to ${currentBranch}" > ${tmpMessageFile} + +# Are you sure? +echo "Merging release branch ***${branch}*** into ***${currentBranch}*** branch in 5 seconds. CTRL+c to abort.." +sec=5 +while [ $sec -ge 0 ]; do + echo -n "${sec} " + sec=$((sec-1)) + sleep 1 +done +echo "There we go!" + +# Do the actual merge +git merge --no-ff --log -m "$(cat .git-tmp-message.txt)" ${branch} +if [ $? -gt 0 ]; then + echo "ERROR: Merge failed, aborting." + git merge --abort +fi + +# Clean up +rm -fr ${tmpMessageFile} + +# What's next +echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure." diff --git a/tools/git/git-pr b/tools/git/git-pr new file mode 100755 index 00000000000..2bd58f689eb --- /dev/null +++ b/tools/git/git-pr @@ -0,0 +1,235 @@ +#!/bin/bash + +# 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. + +# Should we clean-up? +cleanup=1 + +clean_up_and_exit() { + if [ "${cleanup}" -eq 1 ]; then + echo + git branch -D pr/${prId} >/dev/null 2>&1 + rm ${jsonTmp} ${tmpMessageFile} >/dev/null 2>&1 + fi + exit $1 +} + +# Arguments +argument=$1 +prId=${argument} +force=0 +if [[ "${2}" == "--force" ]]; then + force=1 +fi + +# Some of us got used to a git pr alias that you had to feed with the PR url +# Let's make this script backwards compatible with the previous one. +if [[ ${argument} =~ https://github.com.* ]]; then + prId=$(echo "${argument}" | awk -F/ {'print $7'}) + echo "INFO: Found PR id ${prId} from url" +fi + +# Check the arguments +if [ -z ${prId} ]; then + echo "Usage: git pr pool-request-number [ --force ]" + echo "Works for any Apache repository mirrored on GitHub'" + echo "For instructions, see: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61311655" + clean_up_and_exit 1 +fi + +# Vars we need +jsonTmp="${PWD}/${prId}.json" +tmpMessageFile="${PWD}/.git-tmp-message.txt" +repoName=$(basename `git rev-parse --show-toplevel`) + +# We need UTF-8 to support the GitHub '...' 3-dots-in-1-char, for example. +export LANG="en_EN.UTF-8" + +if [ "${prId}" -eq "${prId}" 2>/dev/null ]; then + # Get json data from Github API + curl -s https://api.github.com/repos/apache/${repoName}/pulls/${prId} > ${jsonTmp} +else + echo "ERROR: Pull-request id must be an integer, not '${prId}'" + clean_up_and_exit 1 +fi + +# Get vars from the GitHub API and parse the returned json +prAuthor=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['user']['login'].encode('utf-8').decode('ascii','ignore') +except: + print '' +") + +prTitle=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['title'].encode('utf-8').decode('ascii','ignore') +except: + print '' +") + +prBody=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['body'].encode('utf-8').decode('ascii','ignore') +except: + print '' +") + +prOriginBranch=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['head']['label'].encode('utf-8').decode('ascii','ignore') +except: + print '' +" | sed -e "s/:/\//") + +prState=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['state'].encode('utf-8').decode('ascii','ignore') +except: + print 'Unknown' +") + +prMergeableState=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['mergeable_state'].encode('utf-8').decode('ascii','ignore') +except: + print 'Unknown' +") + +prDestinationBranch=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['base']['ref'].encode('utf-8').decode('ascii','ignore') +except: + print 'Unknown' +") + +prCommits=$(cat ${jsonTmp} | python -c " +try: + import sys, json + print json.load(sys.stdin)['commits'] +except: + print 'Unknown' +") + +# Do some sanity checking +if [ ${#prAuthor} -eq 0 ]; then + echo "ERROR: We couldn't grab the PR author. Something went wrong querying the GitHub API." + clean_up_and_exit 1 +fi + +if [ ${#prTitle} -eq 0 ]; then + echo "ERROR: We couldn't grab the PR title. Something went wrong querying the GitHub API." + clean_up_and_exit 1 +fi + +if [ ${#prOriginBranch} -eq 0 ]; then + echo "ERROR: We couldn't grab the PR branch name. Something went wrong querying the GitHub API." + clean_up_and_exit 1 +fi + +currentBranch=$(git branch | grep "^*" | sed -e "s/^[*] //") +if [ "${prDestinationBranch}" != "${currentBranch}" ] && [ ${force} -lt 1 ]; then + echo "ERROR: This PR is made against branch '${prDestinationBranch}' while your current checked out branch is '${currentBranch}'." + echo "ERROR: Please make sure you're in the right branch and run this scipt again." + clean_up_and_exit 1 +elif [ "${prDestinationBranch}" != "${currentBranch}" ] && [ ${force} -eq 1 ]; then + echo "WARNING: You used --force to merge to '${currentBranch}' while this PR is for branch '${prDestinationBranch}'." +fi + +if [ "${prState}" != "open" ] && [ ${force} -lt 1 ]; then + echo "ERROR: We couldn't merge the PR because the state is not 'open' but '${prState}'." + echo "ERROR: In general it's a bad idea to merge closed PRs!" + echo "ERROR: Run this script again with --force if you know what you're doing" + echo "ERROR: (continuing work on an abandoned PR in which case you'd merge to a branch in your fork" + echo "ERROR: and send that as a new PR). Ask for help on @dev if unsure." + clean_up_and_exit 1 +elif [ "${prState}" != "open" ] &&[ ${force} -eq 1 ]; then + echo "WARNING: You used --force to merge a PR with state '${prState}'." +fi + +if [ "${prMergeableState}" != "clean" ] && [ ${force} -lt 1 ]; then + echo "ERROR: We couldn't merge the PR because it cannot be merged 'clean' (GitHub reports '${prMergeableState}')." + echo "ERROR: This can be caused by a Travis build in progress, a failed Travis build or an unclean merge (conflicts)" + echo "ERROR: Run this script again with --force if you know what you're doing. Ask for help on @dev if unsure." + clean_up_and_exit 1 +elif [ "${prMergeableState}" != "clean" ] && [ ${force} -eq 1 ]; then + echo "WARNING: You used --force to merge a PR with non-clean merge state '${prMergeableState}'." +fi + +github_remote=$(git remote -v | grep -E "apache/${repoName}(.git)?" | head -n 1 | cut -f1) +if [ ${#github_remote} -eq 0 ]; then + echo "ERROR: We couldn't find a git remote pointing to 'apache/${repoName}.git' to merge the PR from." + echo "INFO: Currently, your configured remotes are:" + echo "INFO: ***********************************************************************************" + git remote -v + echo "INFO: ***********************************************************************************" + echo "INFO: To merge a PR, we need access to two remotes: " + echo "INFO: 1. Read-only access to GitHub mirror" + echo "INFO: 2. Read/write access to Apache git" + echo "INFO: Please add a remote like this: 'git remote add github https://github.com/apache/${repoName}.git'" + echo "INFO: For more help, visit: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61311655" + echo "INFO: Once done, run this script again." + clean_up_and_exit 1 +fi + +echo "INFO: Using remote repository '${github_remote}' to fetch PR (should point to github.com/apache/${repoName}.git)" +echo "INFO: PR #${prId} against branch '${prDestinationBranch}' from '${prAuthor}': '${prTitle}'" +echo "INFO: has state '${prState}' and mergable state '${prMergeableState}', about to be merged in branch '${currentBranch}'." + +# Construct commit merge message +echo "Merge pull request #${prId} from ${prOriginBranch}" > ${tmpMessageFile} +echo "" >> ${tmpMessageFile} +echo "${prTitle}${prBody}" >> ${tmpMessageFile} + +# Are you sure? +echo "ATTENTION: Merging pull request #${prId} from ${prOriginBranch} into '${currentBranch}' branch in 5 seconds. CTRL+c to abort.." +sec=5 +while [ $sec -ge 0 ]; do + printf "${sec} " + sec=$((sec-1)) + sleep 1 +done +echo +echo "INFO: Executing the merge now.. Git output below:" +echo "INFO: ***********************************************************************************" + +# Do the actual merge +git fetch ${github_remote} pull/${prId}/head:pr/${prId} +git merge --no-ff --log -m "$(cat ${tmpMessageFile})" pr/${prId} +if [ $? -eq 0 ]; then + git commit --amend -s --allow-empty-message -m '' +else + echo "ERROR: Merge failed, aborting." + git merge --abort + clean_up_and_exit 1 +fi + +# What's next +echo "INFO: ***********************************************************************************" +echo "INFO: Merged successfully! Please double check using 'git log -p' and 'git push' when you're sure." +echo "INFO: About commits: there should be ${prCommits} from the PR plus 1 merge commit." +echo + +clean_up_and_exit 0 diff --git a/tools/marvin/marvin/cloudstackTestCase.py b/tools/marvin/marvin/cloudstackTestCase.py index 5cb4a109286..692e817245a 100644 --- a/tools/marvin/marvin/cloudstackTestCase.py +++ b/tools/marvin/marvin/cloudstackTestCase.py @@ -52,3 +52,7 @@ class cloudstackTestCase(unittest.case.TestCase): @classmethod def getClsTestClient(cls): return cls.clstestclient + + @classmethod + def getClsConfig(cls): + return cls.config diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index ac46ab65cc0..c81e7e901a4 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -147,4 +147,4 @@ Storage Pools Scope ''' CLUSTER = "cluster" - +DATA = "DATA" diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index 4c1a1ba54b7..b607b68f924 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -81,16 +81,6 @@ test_data = { "publicport": 22, "protocol": 'TCP', }, - "medium": { - "displayname": "testserver", - "username": "root", - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, "service_offering": { "name": "Tiny Instance", "displaytext": "Tiny Instance", @@ -99,12 +89,6 @@ test_data = { "memory": 256, # In MBs }, "service_offerings": { - "name": "Tiny Instance", - "displaytext": "Tiny Instance", - "cpunumber": 1, - "cpuspeed": 100, - "memory": 128, - "tiny": { "name": "Tiny Instance", "displaytext": "Tiny Instance", @@ -380,16 +364,6 @@ test_data = { "name": "testvm3", "displayname": "Test VM3", }, - "server_without_disk": { - "displayname": "Test VM-No Disk", - "username": "root", - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, "shared_network": { "name": "MySharedNetwork - Test", "displaytext": "MySharedNetwork", @@ -801,6 +775,15 @@ test_data = { "ostype": "CentOS 5.6 (64-bit)" }, + "CentOS6.3template": { + "displaytext": "Centos", + "name": "Centos", + "passwordenabled": False, + "ostype": "CentOS 6.3 (64-bit)", + "url": "http://10.147.28.7/templates/centos63.ova", + "format": "OVA", + "ispublic": "true" + }, "template_2": { "displaytext": "Public Template", "name": "Public template", @@ -863,7 +846,7 @@ test_data = { "displaytext": "xs", "name": "xs", "passwordenabled": False, - "url": "http://10.147.28.7/templates/ttylinux_pv.vhd", + "url": "http://10.147.28.7/templates/ttylinux_pv.vhd.bz2", "format": "VHD" }, "security_group": {"name": "custom_Sec_Grp"}, @@ -994,16 +977,6 @@ test_data = { "gateway": "10.2.1.1", "netmask": "255.255.255.192" }, - "server": { - "displayname": "TestVM", - "username": "root", - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP' - }, "privateport": 22, "publicport": 22, "protocol": 'TCP', @@ -1114,28 +1087,6 @@ test_data = { # ensure unique username generated each time "password": "password", }, - "vgpu260q": # Create a virtual machine instance with vgpu type as 260q - { - "displayname": "testserver", - "username": "root", # VM creds for SSH - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, - "vgpu140q": # Create a virtual machine instance with vgpu type as 140q - { - "displayname": "testserver", - "username": "root", - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, "service_offerings": { "GRID K260Q": diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index 4fcd6967f62..3dd56672dde 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -534,7 +534,7 @@ class DeployDataCenters(object): netprov.physicalnetworkid = phynetwrk.id result = self.__apiClient.addNetworkServiceProvider(netprov) self.enableProvider(result.id) - elif provider.name in ['Netscaler', 'JuniperSRX', 'F5BigIp']: + elif provider.name in ['Netscaler', 'JuniperSRX', 'F5BigIp', 'NiciraNvp']: netprov = addNetworkServiceProvider.\ addNetworkServiceProviderCmd() netprov.name = provider.name @@ -548,55 +548,67 @@ class DeployDataCenters(object): self.__addToCleanUp( "NetworkServiceProvider", result.id) - for device in provider.devices: - if provider.name == 'Netscaler': - dev = addNetscalerLoadBalancer.\ - addNetscalerLoadBalancerCmd() - dev.username = device.username - dev.password = device.password - dev.networkdevicetype = device.networkdevicetype - dev.url = configGenerator.getDeviceUrl(device) - dev.physicalnetworkid = phynetwrk.id - ret = self.__apiClient.addNetscalerLoadBalancer( - dev) - if ret.id: + if provider.devices is not None: + for device in provider.devices: + if provider.name == 'Netscaler': + dev = addNetscalerLoadBalancer.\ + addNetscalerLoadBalancerCmd() + dev.username = device.username + dev.password = device.password + dev.networkdevicetype = device.networkdevicetype + dev.url = configGenerator.getDeviceUrl(device) + dev.physicalnetworkid = phynetwrk.id + ret = self.__apiClient.addNetscalerLoadBalancer( + dev) + if ret.id: + self.__tcRunLogger.\ + debug("==== AddNetScalerLB " + "Successful=====") + self.__addToCleanUp( + "NetscalerLoadBalancer", + ret.id) + elif provider.name == 'JuniperSRX': + dev = addSrxFirewall.addSrxFirewallCmd() + dev.username = device.username + dev.password = device.password + dev.networkdevicetype = device.networkdevicetype + dev.url = configGenerator.getDeviceUrl(device) + dev.physicalnetworkid = phynetwrk.id + ret = self.__apiClient.addSrxFirewall(dev) + if ret.id: + self.__tcRunLogger.\ + debug("==== AddSrx " + "Successful=====") + self.__addToCleanUp("SrxFirewall", ret.id) + elif provider.name == 'F5BigIp': + dev = addF5LoadBalancer.addF5LoadBalancerCmd() + dev.username = device.username + dev.password = device.password + dev.networkdevicetype = device.networkdevicetype + dev.url = configGenerator.getDeviceUrl(device) + dev.physicalnetworkid = phynetwrk.id + ret = self.__apiClient.addF5LoadBalancer(dev) + if ret.id: + self.__tcRunLogger.\ + debug("==== AddF5 " + "Successful=====") + self.__addToCleanUp("F5LoadBalancer", ret.id) + elif provider.name == 'NiciraNvp': + cmd = addNiciraNvpDevice.addNiciraNvpDeviceCmd() + cmd.hostname = device.hostname + cmd.username = device.username + cmd.password = device.password + cmd.transportzoneuuid = device.transportzoneuuid + cmd.physicalnetworkid = phynetwrk.id + ret = self.__apiClient.addNiciraNvpDevice(cmd) self.__tcRunLogger.\ - debug("==== AddNetScalerLB " - "Successful=====") - self.__addToCleanUp( - "NetscalerLoadBalancer", - ret.id) - elif provider.name == 'JuniperSRX': - dev = addSrxFirewall.addSrxFirewallCmd() - dev.username = device.username - dev.password = device.password - dev.networkdevicetype = device.networkdevicetype - dev.url = configGenerator.getDeviceUrl(device) - dev.physicalnetworkid = phynetwrk.id - ret = self.__apiClient.addSrxFirewall(dev) - if ret.id: - self.__tcRunLogger.\ - debug("==== AddSrx " - "Successful=====") - self.__addToCleanUp("SrxFirewall", ret.id) - elif provider.name == 'F5BigIp': - dev = addF5LoadBalancer.addF5LoadBalancerCmd() - dev.username = device.username - dev.password = device.password - dev.networkdevicetype = device.networkdevicetype - dev.url = configGenerator.getDeviceUrl(device) - dev.physicalnetworkid = phynetwrk.id - ret = self.__apiClient.addF5LoadBalancer(dev) - if ret.id: - self.__tcRunLogger.\ - debug("==== AddF5 " - "Successful=====") - self.__addToCleanUp("F5LoadBalancer", ret.id) - else: - raise InvalidParameterException( - "Device %s doesn't match " - "any know provider " - "type" % device) + debug("==== AddNiciraNvp Successful =====") + self.__addToCleanUp("NiciraNvp", ret.id) + else: + raise InvalidParameterException( + "Device %s doesn't match " + "any know provider " + "type" % device) self.enableProvider(result.id) except Exception as e: print "Exception Occurred: %s" % GetDetailExceptionInfo(e) @@ -1133,7 +1145,7 @@ if __name__ == "__main__": print "\n===Deploy Failed===" tc_run_logger.debug("\n===Deploy Failed==="); exit(1) - + if options.remove and os.path.isfile(options.remove) and options.input: ''' diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 71aa3e67a67..54922c84ed3 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -2637,6 +2637,22 @@ class StoragePool: cmd.id = self.id return apiclient.enableStorageMaintenance(cmd) + @classmethod + def enableMaintenance(cls, apiclient, id): + """enables maintenance mode Storage pool""" + + cmd = enableStorageMaintenance.enableStorageMaintenanceCmd() + cmd.id = id + return apiclient.enableStorageMaintenance(cmd) + + @classmethod + def cancelMaintenance(cls, apiclient, id): + """Cancels maintenance mode Host""" + + cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd() + cmd.id = id + return apiclient.cancelStorageMaintenance(cmd) + @classmethod def list(cls, apiclient, **kwargs): """List all storage pools matching criteria""" @@ -3818,6 +3834,52 @@ class NetScaler: cmd.listall = True return(apiclient.listNetscalerLoadBalancers(cmd)) +class NiciraNvp: + + def __init__(self, items): + self.__dict__.update(items) + + @classmethod + def add(cls, apiclient, services, physicalnetworkid, + hostname=None, username=None, password=None, transportzoneuuid=None): + cmd = addNiciraNvpDevice.addNiciraNvpDeviceCmd() + cmd.physicalnetworkid = physicalnetworkid + if hostname: + cmd.hostname = hostname + else: + cmd.hostname = services['hostname'] + + if username: + cmd.username = username + else: + cmd.username = services['username'] + + if password: + cmd.password = password + else: + cmd.password = services['password'] + + if transportzoneuuid: + cmd.transportzoneuuid = transportzoneuuid + else: + cmd.transportzoneuuid = services['transportZoneUuid'] + + return NiciraNvp(apiclient.addNiciraNvpDevice(cmd).__dict__) + + def delete(self, apiclient): + cmd = deleteNiciraNvpDevice.deleteNiciraNvpDeviceCmd() + cmd.nvpdeviceid = self.nvpdeviceid + apiclient.deleteNiciraNvpDevice(cmd) + return + + @classmethod + def list(cls, apiclient, **kwargs): + cmd = listNiciraNvpDevices.listNiciraNvpDevicesCmd() + [setattr(cmd, k, v) for k, v in kwargs.items()] + if 'account' in kwargs.keys() and 'domainid' in kwargs.keys(): + cmd.listall = True + return(apiclient.listNiciraNvpDevices(cmd)) + class NetworkServiceProvider: """Manage network serivce providers for CloudStack""" diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index 4faced546e2..97b80ac308a 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -41,6 +41,43 @@ from marvin.codes import ( EMPTY_LIST, FAILED) +def _configure_ssh_credentials(hypervisor): + ssh_command = "ssh -i ~/.ssh/id_rsa.cloud -ostricthostkeychecking=no " + + if (str(hypervisor).lower() == 'vmware' + or str(hypervisor).lower() == 'hyperv'): + ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " + + return ssh_command + + +def _configure_timeout(hypervisor): + timeout = 5 + + # Increase hop into router + if str(hypervisor).lower() == 'hyperv': + timeout = 12 + + return timeout + + +def _execute_ssh_command(hostip, port, username, password, ssh_command): + #SSH to the machine + ssh = SshClient(hostip, port, username, password) + # Ensure the SSH login is successful + while True: + res = ssh.execute(ssh_command) + if "Connection refused".lower() in res[0].lower(): + pass + elif res[0] != "Host key verification failed.": + break + elif timeout == 0: + break + + time.sleep(5) + timeout = timeout - 1 + return res + def restart_mgmt_server(server): """Restarts the management server""" @@ -191,40 +228,19 @@ def get_host_credentials(config, hostip): raise KeyError("Please provide the marvin configuration file with credentials to your hosts") -def get_process_status(hostip, port, username, password, linklocalip, process, hypervisor=None): - """Double hop and returns a process status""" +def get_process_status(hostip, port, username, password, linklocalip, command, hypervisor=None): + """Double hop and returns a command execution result""" - #SSH to the machine - ssh = SshClient(hostip, port, username, password) - if (str(hypervisor).lower() == 'vmware' - or str(hypervisor).lower() == 'hyperv'): - ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " - else: - ssh_command = "ssh -i ~/.ssh/id_rsa.cloud -ostricthostkeychecking=no " + ssh_command = _configure_ssh_credentials(hypervisor) ssh_command = ssh_command +\ "-oUserKnownHostsFile=/dev/null -p 3922 %s %s" % ( linklocalip, - process) + command) + timeout = _configure_timeout(hypervisor) - # Double hop into router - if str(hypervisor).lower() == 'hyperv': - timeout = 12 - else: - timeout = 5 - # Ensure the SSH login is successful - while True: - res = ssh.execute(ssh_command) - if "Connection refused".lower() in res[0].lower(): - pass - elif res[0] != "Host key verification failed.": - break - elif timeout == 0: - break - - time.sleep(5) - timeout = timeout - 1 - return res + result = _execute_ssh_command(hostip, port, username, password, ssh_command) + return result def isAlmostEqual(first_digit, second_digit, range=0): @@ -504,5 +520,4 @@ def verifyRouterState(apiclient, routerid, allowedstates): if routers[0].state.lower() not in allowedstates: return [FAIL, "state of the router should be in %s but is %s" % (allowedstates, routers[0].state)] - return [PASS, None] - + return [PASS, None] \ No newline at end of file diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 2bcd5e5a158..61301d58155 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -9657,7 +9657,7 @@ div.container div.panel div#details-tab-addloadBalancer.detail-group div.loadBal } /*** View switcher (drop-down)*/ -.project-switcher { +.project-switcher, .domain-switcher { float: left; width: 223px; padding: 9px 17px 0 19px; @@ -9668,7 +9668,7 @@ div.container div.panel div#details-tab-addloadBalancer.detail-group div.loadBal border-radius: 4px; } -.project-switcher label { +.project-switcher label, .domain-switcher label { top: 29px; color: #FFFFFF; font-size: 13px; @@ -9677,7 +9677,7 @@ div.container div.panel div#details-tab-addloadBalancer.detail-group div.loadBal margin-top: 5px; } -.project-switcher select { +.project-switcher select, .domain-switcher select { width: 70%; float: left; margin-top: 0px; @@ -12675,6 +12675,7 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -167px -677px; } +.revertSnapshot .icon, .restoreVM .icon, .restore .icon, .recover .icon { @@ -12690,6 +12691,7 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -167px -66px; } +.revertSnapshot:hover .icon, .restoreVM:hover .icon, .restore:hover .icon { background-position: -168px -613px; @@ -12851,6 +12853,14 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -230px -677px; } +.linktoldap .icon { + background-position: -197px -65px; +} + +.linktoldap:hover .icon { + background-position: -197px -647px; +} + .label-hovered { cursor: pointer; color: #0000FF !important; diff --git a/ui/css/custom.css b/ui/css/custom.css new file mode 100644 index 00000000000..021362338d8 --- /dev/null +++ b/ui/css/custom.css @@ -0,0 +1,21 @@ +/* +* 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. +* +* +* Use custom.css to override the default CloudStack styles +*/ diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp index 7d172670f73..4161498da3e 100644 --- a/ui/dictionary.jsp +++ b/ui/dictionary.jsp @@ -1041,5 +1041,7 @@ dictionary = { 'label.role': '', 'label.root.disk.controller': '', 'label.root.disk.offering': '', +'message.configure.firewall.rules.allow.traffic': '', +'message.configure.firewall.rules.block.traffic': '', }; diff --git a/ui/dictionary2.jsp b/ui/dictionary2.jsp index 12518beee93..26cebf178dd 100644 --- a/ui/dictionary2.jsp +++ b/ui/dictionary2.jsp @@ -182,7 +182,11 @@ under the License. 'label.update.ssl': '', 'label.updating': '', 'label.upload': '', +'label.upload.from.local': '', +'label.upload.template.from.local': '', 'label.upload.volume': '', +'label.upload.volume.from.local': '', +'label.upload.volume.from.url': '', 'label.url': '', 'label.usage.interface': '', 'label.used': '', @@ -279,6 +283,7 @@ under the License. 'label.password.reset.confirm': '', 'label.openDaylight': '', 'label.change.affinity': '', +'label.custom.disk.offering': '', 'label.assign.instance.another': '', 'label.network.addVM': '', 'label.set.default.NIC': '', @@ -817,6 +822,7 @@ under the License. 'label.type.lower': '', 'label.rule.number': '', 'label.action': '', +'label.action.register.template': '', 'label.name.lower': '', 'label.ucs': '', 'label.persistent': '', @@ -1058,6 +1064,63 @@ under the License. 'label.ovm3.pool': '', 'label.ovm3.cluster': '', 'label.ovm3.vip': '', -'label.local.storage.enabled.system.vms': '' +'label.local.file': '', +'label.local.storage.enabled.system.vms': '', +'label.link.domain.to.ldap': '', +'message.link.domain.to.ldap': '', +'label.ldap.link.type': '', +'label.account.type': '', +'label.create.ssh.key.pair': '', +'label.fingerprint': '', +'label.host.tag': '', +'label.new.ssh.key.pair': '', +'label.private.key': '', +'label.public.key': '', +'label.remove.ssh.key.pair': '', +'label.reset.ssh.key.pair': '', +'label.reset.ssh.key.pair.on.vm': '', +'label.ssh.key.pair': '', +'label.ssh.key.pair.details': '', +'message.desc.created.ssh.key.pair': '', +'message.desc.reset.ssh.key.pair': '', +'message.desc.created.ssh.key.pair': '', +'message.please.confirm.remove.ssh.key.pair': '', +'message.password.has.been.reset.to': '', +'message.password.of.the.vm.has.been.reset.to': '', +'message.question.are.you.sure.you.want.to.add': '', +'label.domain.details': '', +'label.account.details': '', +'label.user.details': '', +'label.service.offering.details': '', +'label.system.service.offering.details': '', +'label.disk.offering.details': '', +'label.network.offering.details': '', +'label.remove.this.physical.network': '', +'label.physical.network.name': '', +'label.save.changes': '', +'label.autoscale.configuration.wizard': '', +'label.health.check.wizard': '', +'label.health.check.message.desc': '', +'label.health.check.configurations.options': '', +'label.health.check.advanced.options': '', +'label.add.isolated.guest.network.with.sourcenat': '', +'message.network.remote.access.vpn.configuration': '', +'label.vpc.router.details': '', +'label.edit.rule': '', +'label.advanced.search': '', +'label.internal.lb': '', +'label.public.lb': '', +'label.acl.list.rules': '', +'label.static.routes': '', +'label.network.details': '', +'label.scaleup.policy': '', +'label.scaledown.policy': '', +'label.configure.sticky.policy': '', +'label.please.complete.the.following.fields': '', +'message.desc.add.new.lb.sticky.rule': '', +'label.ssh.key.pairs': '', +'message.desc.create.ssh.key.pair': '', +'message.removed.ssh.key.pair': '', +'message.please.select.ssh.key.pair.use.with.this.vm': '' }); diff --git a/ui/index.jsp b/ui/index.jsp index e062799618b..9ea62c08d5b 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -40,6 +40,7 @@ + @@ -75,13 +76,6 @@ -
-
- - -
-
-
" /> @@ -580,7 +574,7 @@
- SSH Key Pairs +
@@ -1841,6 +1835,7 @@ + diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index 6f55b3d54a9..f0c0bff80ad 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -17,7 +17,7 @@ (function(cloudStack) { var domainObjs; - + cloudStack.sections.accounts = { title: 'label.accounts', id: 'accounts', @@ -91,7 +91,7 @@ } }, - + addLdapAccount: { label: 'label.add.ldap.account', isHeader: true, @@ -123,7 +123,7 @@ ) } - } + } }, dataProvider: function(args) { @@ -168,7 +168,7 @@ }, detailView: { - name: 'Account details', + name: 'label.account.details', isMaximized: true, viewAll: { path: 'accounts.users', @@ -422,59 +422,59 @@ data: data, async: true, success: function(json) { - var resourcecounts= json.updateresourcecountresponse.resourcecount; + var resourcecounts= json.updateresourcecountresponse.resourcecount; //pop up API response in a dialog box since only updateResourceCount API returns resourcecount (listResourceLimits API does NOT return resourcecount) var msg = ''; if (resourcecounts != null) { - for (var i = 0; i < resourcecounts.length; i++) { - switch (resourcecounts[i].resourcetype) { - case '0': - msg += 'Instance'; //vmLimit - break; - case '1': - msg += 'Public IP'; //ipLimit - break; - case '2': - msg += 'Volume'; //volumeLimit - break; - case '3': - msg += 'Snapshot'; //snapshotLimit - break; - case '4': - msg += 'Template'; //templateLimit - break; - case '5': - continue; //resourcetype 5 is not in use. so, skip to next item. - break; - case '6': - msg += 'Network'; //networkLimit - break; - case '7': - msg += 'VPC'; //vpcLimit - break; - case '8': - msg += 'CPU'; //cpuLimit - break; - case '9': - msg += 'Memory'; //memoryLimit - break; - case '10': - msg += 'Primary Storage'; //primaryStorageLimit - break; - case '11': - msg += 'Secondary Storage'; //secondaryStorageLimit - break; - } - - msg += ' Count: ' + resourcecounts[i].resourcecount + '
'; - } + for (var i = 0; i < resourcecounts.length; i++) { + switch (resourcecounts[i].resourcetype) { + case '0': + msg += 'Instance'; //vmLimit + break; + case '1': + msg += 'Public IP'; //ipLimit + break; + case '2': + msg += 'Volume'; //volumeLimit + break; + case '3': + msg += 'Snapshot'; //snapshotLimit + break; + case '4': + msg += 'Template'; //templateLimit + break; + case '5': + continue; //resourcetype 5 is not in use. so, skip to next item. + break; + case '6': + msg += 'Network'; //networkLimit + break; + case '7': + msg += 'VPC'; //vpcLimit + break; + case '8': + msg += 'CPU'; //cpuLimit + break; + case '9': + msg += 'Memory'; //memoryLimit + break; + case '10': + msg += 'Primary Storage'; //primaryStorageLimit + break; + case '11': + msg += 'Secondary Storage'; //secondaryStorageLimit + break; + } + + msg += ' Count: ' + resourcecounts[i].resourcecount + '
'; + } } - - + + cloudStack.dialog.notice({ - message: msg - }); - + message: msg + }); + args.response.success(); }, error: function(json) { @@ -653,13 +653,13 @@ } }, - + tabFilter: function(args) { - var hiddenTabs = []; - if(!isAdmin()) { - hiddenTabs.push('settings'); - } - return hiddenTabs; + var hiddenTabs = []; + if(!isAdmin()) { + hiddenTabs.push('settings'); + } + return hiddenTabs; }, tabs: { @@ -896,7 +896,7 @@ // Granular settings for account settings: { - title: 'Settings', + title: 'label.settings', custom: cloudStack.uiCustom.granularSettings({ dataProvider: function(args) { $.ajax({ @@ -1221,7 +1221,7 @@ }, detailView: { - name: 'User details', + name: 'label.user.details', isMaximized: true, actions: { edit: { @@ -1665,7 +1665,7 @@ sshkeypairs: { type: 'select', id: 'sshkeypairs', - title: 'SSH Key Pairs', + title: 'label.ssh.key.pairs', listView: { name: 'sshkeypairs', fields: { @@ -1679,7 +1679,7 @@ label: 'label.account' }, privatekey: { - label: 'Private Key', + label: 'label.private.key', span: false } }, @@ -1704,7 +1704,7 @@ }, actions: { add: { - label: 'Create a SSH Key Pair', + label: 'label.create.ssh.key.pair', preFilter: function(args) { return true; @@ -1712,13 +1712,13 @@ messages: { notification: function(args) { - return 'Created a SSH Key Pair.'; + return _l('message.desc.created.ssh.key.pair'); } }, createForm: { - title: 'Create a SSH Key Pair', - desc: 'Please fill in the following data to create or register a ssh key pair.

(1) If public key is set, CloudStack will register the public key. You can use it through your private key.

(2) If public key is not set, CloudStack will create a new SSH Key pair. In this case, please copy and save the private key. CloudStack will not keep it.
', + title: 'label.create.ssh.key.pair', + desc: 'message.desc.create.ssh.key.pair', fields: { name: { label: 'label.name', @@ -1727,7 +1727,7 @@ } }, publickey: { - label: 'Public Key' + label: 'label.public.key' }, domain: { label: 'label.domain', @@ -1813,7 +1813,7 @@ if (args.data.publickey != null && args.data.publickey.length > 0) { $.extend(data, { - publickey: encodeURIComponent(args.data.publickey) + publickey: args.data.publickey }); $.ajax({ url: createURL('registerSSHKeyPair'), @@ -1857,7 +1857,7 @@ }, detailView: { - name: 'SSH Key Pair Details', + name: 'label.ssh.key.pair.details', isMaximized: true, viewAll: { label: 'label.instances', @@ -1865,13 +1865,13 @@ }, actions: { remove: { - label: 'Remove SSH Key Pair', + label: 'label.remove.ssh.key.pair', messages: { confirm: function(args) { - return 'Please confirm that you want to remove this SSH Key Pair'; + return _l('message.please.confirm.remove.ssh.key.pair'); }, notification: function(args) { - return 'Removed a SSH Key Pair'; + return _l('message.removed.ssh.key.pair'); } }, action: function(args) { @@ -1911,11 +1911,11 @@ label: 'label.account' }, privatekey: { - label: 'Private Key', + label: 'label.private.key', span: false }, fingerprint: { - label: 'FingerPrint' + label: 'label.fingerprint' } }], @@ -2001,23 +2001,23 @@ allowedActions.push("remove"); } } else { //domain-admin, regular-user - if (jsonObj.username == g_username) { //selected user is self - allowedActions.push("changePassword"); + if (jsonObj.username == g_username) { //selected user is self + allowedActions.push("changePassword"); allowedActions.push("generateKeys"); - } else if (isDomainAdmin()) { //if selected user is not self, and the current login is domain-admin - allowedActions.push("edit"); + } else if (isDomainAdmin()) { //if selected user is not self, and the current login is domain-admin + allowedActions.push("edit"); if (jsonObj.state == "enabled") allowedActions.push("disable"); if (jsonObj.state == "disabled") allowedActions.push("enable"); allowedActions.push("remove"); - + allowedActions.push("changePassword"); allowedActions.push("generateKeys"); if (g_idpList) { allowedActions.push("configureSamlAuthorization"); } - } + } } return allowedActions; } diff --git a/ui/scripts/accountsWizard.js b/ui/scripts/accountsWizard.js index 03dc65c3c0a..633821edb14 100644 --- a/ui/scripts/accountsWizard.js +++ b/ui/scripts/accountsWizard.js @@ -78,9 +78,9 @@ validation: { required: true }, - select: function(args) { + select: function(args) { $.ajax({ - url: createURL("listDomains"), + url: createURL("listDomains"), success: function(json) { var items = []; domainObjs = json.listdomainsresponse.domain; @@ -213,7 +213,7 @@ if (md5Hashed) { password = $.md5(password); } else { - password = todb(password); + password = todb(password); } array1.push("&password=" + password); } @@ -227,10 +227,10 @@ } var accountType = args.data.accounttype; - if (accountType == "1") { //if "admin" is selected in account type dropdown - if (rootDomainId == undefined || args.data.domainid != rootDomainId ) { //but current login has no visibility to root domain object, or the selected domain is not root domain + if (accountType == "1") { //if "admin" is selected in account type dropdown + if (rootDomainId == undefined || args.data.domainid != rootDomainId ) { //but current login has no visibility to root domain object, or the selected domain is not root domain accountType = "2"; // change accountType from root-domain("1") to domain-admin("2") - } + } } array1.push("&accounttype=" + accountType); @@ -313,6 +313,6 @@ } }); } - } + } }; }(cloudStack, jQuery)); diff --git a/ui/scripts/affinity.js b/ui/scripts/affinity.js index 4f579e108b8..aecb4d6e46a 100644 --- a/ui/scripts/affinity.js +++ b/ui/scripts/affinity.js @@ -195,7 +195,7 @@ success: function(json) { var item = json.listaffinitygroupsresponse.affinitygroup[0]; args.response.success({ - actionFilter: affinitygroupActionfilter, + actionFilter: affinitygroupActionfilter, data: item }); } @@ -206,14 +206,14 @@ } } }; - + var affinitygroupActionfilter = cloudStack.actionFilter.affinitygroupActionfilter = function(args) { var jsonObj = args.context.item; - var allowedActions = []; + var allowedActions = []; if (jsonObj.type != 'ExplicitDedication' || isAdmin()) { - allowedActions.push("remove"); - } + allowedActions.push("remove"); + } return allowedActions; } - + })(cloudStack); diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index c0c41baaa86..bbd6d9ac977 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -531,7 +531,7 @@ } }, scaleUpPolicy: { - title: 'ScaleUp Policy', + title: 'label.scaleup.policy', label: 'label.scale.up.policy', noSelect: true, noHeaderActionsColumn: true, @@ -636,7 +636,7 @@ }, scaleDownPolicy: { - title: 'ScaleDown Policy', + title: 'label.scaledown.policy', noSelect: true, noHeaderActionsColumn: true, ignoreEmptyFields: true, @@ -1341,7 +1341,7 @@ array1.push("&interval=" + args.data.interval); array1.push("&scaleuppolicyids=" + args.scaleUpPolicyResponse.id); array1.push("&scaledownpolicyids=" + args.scaleDownPolicyResponse.id); - + $.ajax({ url: createURL('createAutoScaleVmGroup' + array1.join("")), dataType: 'json', @@ -1459,7 +1459,7 @@ var $dialog = $('
'); $dialog.dialog({ - title: 'AutoScale Configuration Wizard', + title: 'label.autoscale.configuration.wizard', closeonEscape: false, draggable: true, diff --git a/ui/scripts/cloud.core.callbacks.js b/ui/scripts/cloud.core.callbacks.js index 3ae6d09fe7c..9aad73a75b7 100644 --- a/ui/scripts/cloud.core.callbacks.js +++ b/ui/scripts/cloud.core.callbacks.js @@ -39,9 +39,9 @@ function onLogoutCallback() { return true; // return true means the login page will show /* - window.location.replace("http://www.google.com"); //redirect to a different location - return false; //return false means it will stay in the location window.location.replace() sets it to (i.e. "http://www.google.com") - */ + window.location.replace("http://www.google.com"); //redirect to a different location + return false; //return false means it will stay in the location window.location.replace() sets it to (i.e. "http://www.google.com") + */ } var g_loginResponse = null; diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 6d08735381f..8137043cbc3 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -136,15 +136,16 @@ dataType: "json", async: false, success: function(json) { - g_capabilities = json.listcapabilitiesresponse.capability; - g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean - g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled; //boolean - g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled; //boolean + g_capabilities = json.listcapabilitiesresponse.capability; + g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean + g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled; //boolean + g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled; //boolean if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) { - g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean + g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean } + + g_allowUserExpungeRecoverVm = json.listcapabilitiesresponse.capability.allowuserexpungerecovervm; g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects; - g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion; @@ -251,7 +252,7 @@ }); $.cookie('role', g_role, { expires: 1 - }); + }); $.cookie('timezone', g_timezone, { expires: 1 }); @@ -268,14 +269,14 @@ async: false, success: function(json) { g_capabilities = json.listcapabilitiesresponse.capability; - g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean - g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled; //boolean - g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled; //boolean + g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean + g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled; //boolean + g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled; //boolean if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) { - g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean + g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean } + g_allowUserExpungeRecoverVm = json.listcapabilitiesresponse.capability.allowuserexpungerecovervm; g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects; - g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion; @@ -300,7 +301,7 @@ args.response.error(); } }); - + // Get project configuration // TEMPORARY -- replace w/ output of capability response, etc., once implemented window.g_projectsInviteRequired = false; @@ -462,6 +463,6 @@ cloudStack.uiCustom.login(loginArgs); - document.title = _l('label.app.name'); + document.title = _l('label.app.name'); }); })(cloudStack, jQuery); diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 5cb6f8d6468..fa2276d1284 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -137,7 +137,7 @@ } }, isCustomized: { - label: 'label.custom', + label: 'label.custom', isBoolean: true, isReverse: true, isChecked: false @@ -359,8 +359,8 @@ } }, hostTags: { //Only one single host tag is supported at server-side. Multiple host tags are NOT supported at server-side. - label: 'Host Tag', - docID: 'helpComputeOfferingHostTags' + label: 'label.host.tag', + docID: 'helpComputeOfferingHostTags' }, cpuCap: { label: 'label.CPU.cap', @@ -410,7 +410,7 @@ var $fields = $form.find('.field'); if ($(this).val() == "ImplicitDedicationPlanner") { $form.find('[rel=plannerMode]').css('display', 'block'); - } else { + } else { $form.find('[rel=plannerMode]').hide(); } }); @@ -596,9 +596,9 @@ provisioningType :args.data.provisioningType, customized: (args.data.isCustomized == "on") }; - + //custom fields (begin) - if (args.data.isCustomized != "on") { + if (args.data.isCustomized != "on") { $.extend(data, { cpuNumber: args.data.cpuNumber }); @@ -608,9 +608,9 @@ $.extend(data, { memory: args.data.memory }); - } + } //custom fields (end) - + if (args.data.deploymentPlanner != null && args.data.deploymentPlanner.length > 0) { $.extend(data, { deploymentplanner: args.data.deploymentPlanner @@ -769,7 +769,7 @@ }, detailView: { - name: 'Service offering details', + name: 'label.service.offering.details', actions: { edit: { label: 'label.edit', @@ -872,7 +872,7 @@ converter: function(args) { if (args == undefined) return ''; - else + else return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, @@ -936,10 +936,10 @@ }, deploymentplanner: { label: 'label.deployment.planner' - }, + }, plannerMode: { label: 'label.planner.mode' - }, + }, pciDevice: { label: 'label.gpu' }, @@ -950,7 +950,7 @@ label: 'label.storage.tags' }, hosttags: { - label: 'Host Tag' + label: 'label.host.tag' }, domain: { label: 'label.domain' @@ -972,13 +972,13 @@ async: true, success: function(json) { var item = json.listserviceofferingsresponse.serviceoffering[0]; - + if (item.deploymentplanner != null && item.serviceofferingdetails != null) { if (item.deploymentplanner == 'ImplicitDedicationPlanner' && item.serviceofferingdetails.ImplicitDedicationMode != null) { item.plannerMode = item.serviceofferingdetails.ImplicitDedicationMode; } } - + if (item.serviceofferingdetails != null) { item.pciDevice = item.serviceofferingdetails.pciDevice; item.vgpuType = item.serviceofferingdetails.vgpuType; @@ -1349,7 +1349,7 @@ }, detailView: { - name: 'System service offering details', + name: 'label.system.service.offering.details', actions: { edit: { label: 'label.edit', @@ -1469,7 +1469,7 @@ converter: function(args) { if (args == undefined) return ''; - else + else return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, @@ -1924,7 +1924,7 @@ customized: (args.data.isCustomized == "on") }; - if (args.data.isCustomized != "on") { + if (args.data.isCustomized != "on") { $.extend(data, { disksize: args.data.disksize }); @@ -2018,7 +2018,7 @@ }, detailView: { - name: 'Disk offering details', + name: 'label.disk.offering.details', actions: { edit: { label: 'label.edit', @@ -2556,7 +2556,7 @@ args.$form.find('.form-item[rel=\"service.StaticNat.associatePublicIP\"]').hide(); args.$form.find('.form-item[rel=\"service.StaticNat.associatePublicIP\"]').find('input[type=checkbox]').attr('checked', false); } - + //StretchedL2Subnet checkbox should be displayed only when 'Connectivity' service is checked if (args.$form.find('.form-item[rel=\"service.Connectivity.isEnabled\"]').find('input[type=checkbox]').is(':checked')) { $supportsstrechedl2subnet.css('display', 'inline-block'); @@ -3045,8 +3045,8 @@ inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilitytype'] = 'lbSchemes'; inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = 'internal'; serviceCapabilityIndex++; - } - } else if (value != '') { // normal data (serviceData.length ==1), e.g. "name", "displayText", "networkRate", "guestIpType", "lbType" (unwanted), "availability" (unwated when value is "Optional"), "egressdefaultpolicy", "state" (unwanted), "status" (unwanted), "allocationstate" (unwanted) + } + } else if (value != '') { // normal data (serviceData.length ==1), e.g. "name", "displayText", "networkRate", "guestIpType", "lbType" (unwanted), "availability" (unwated when value is "Optional"), "egressdefaultpolicy", "state" (unwanted), "status" (unwanted), "allocationstate" (unwanted) if (!(key == "lbType" || (key == "availability" && value == "Optional") || key == "state" || key == "status" || key == "allocationstate" || key == "useVpc" )) { inputData[key] = value; } @@ -3097,21 +3097,21 @@ if (inputData['guestIpType'] == "Shared") { //specifyVlan checkbox is disabled, so inputData won't include specifyVlan inputData['specifyVlan'] = true; //hardcode inputData['specifyVlan'] inputData['specifyIpRanges'] = true; - delete inputData.isPersistent; //if Persistent checkbox is unchecked, do not pass isPersistent parameter to API call since we need to keep API call's size as small as possible (p.s. isPersistent is defaulted as false at server-side) + delete inputData.isPersistent; //if Persistent checkbox is unchecked, do not pass isPersistent parameter to API call since we need to keep API call's size as small as possible (p.s. isPersistent is defaulted as false at server-side) } else if (inputData['guestIpType'] == "Isolated") { //specifyVlan checkbox is shown //inputData['specifyIpRanges'] = false; - delete inputData.specifyIpRanges; //if specifyIpRanges should be false, do not pass specifyIpRanges parameter to API call since we need to keep API call's size as small as possible (p.s. specifyIpRanges is defaulted as false at server-side) + delete inputData.specifyIpRanges; //if specifyIpRanges should be false, do not pass specifyIpRanges parameter to API call since we need to keep API call's size as small as possible (p.s. specifyIpRanges is defaulted as false at server-side) if (inputData['specifyVlan'] == 'on') { //specifyVlan checkbox is checked - inputData['specifyVlan'] = true; + inputData['specifyVlan'] = true; } else { //specifyVlan checkbox is unchecked - delete inputData.specifyVlan; //if specifyVlan checkbox is unchecked, do not pass specifyVlan parameter to API call since we need to keep API call's size as small as possible (p.s. specifyVlan is defaulted as false at server-side) + delete inputData.specifyVlan; //if specifyVlan checkbox is unchecked, do not pass specifyVlan parameter to API call since we need to keep API call's size as small as possible (p.s. specifyVlan is defaulted as false at server-side) } if (inputData['isPersistent'] == 'on') { //It is a persistent network inputData['isPersistent'] = true; } else { //Isolated Network with Non-persistent network - delete inputData.isPersistent; //if Persistent checkbox is unchecked, do not pass isPersistent parameter to API call since we need to keep API call's size as small as possible (p.s. isPersistent is defaulted as false at server-side) + delete inputData.isPersistent; //if Persistent checkbox is unchecked, do not pass isPersistent parameter to API call since we need to keep API call's size as small as possible (p.s. isPersistent is defaulted as false at server-side) } } @@ -3186,7 +3186,7 @@ reorder: cloudStack.api.actions.sort('updateNetworkOffering', 'networkOfferings'), detailView: { - name: 'Network offering details', + name: 'label.network.offering.details', actions: { edit: { label: 'label.edit', @@ -4112,5 +4112,5 @@ return allowedActions; }; - + })(cloudStack, jQuery); diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index dff6a91a9e8..f2b56820781 100644 --- a/ui/scripts/dashboard.js +++ b/ui/scripts/dashboard.js @@ -28,9 +28,9 @@ user: { dataProvider: function(args) { var dataFns = { - instances: function(data) { - var totalInstanceCount = 0; - $.ajax({ + instances: function(data) { + var totalInstanceCount = 0; + $.ajax({ url: createURL("listVirtualMachines"), data: { listAll: true, @@ -38,15 +38,15 @@ pageSize: 1 }, async: false, - success: function(json) { - if (json.listvirtualmachinesresponse.count != undefined) { - totalInstanceCount = json.listvirtualmachinesresponse.count; - } + success: function(json) { + if (json.listvirtualmachinesresponse.count != undefined) { + totalInstanceCount = json.listvirtualmachinesresponse.count; + } } }); - - var RunningInstanceCount = 0; - $.ajax({ + + var RunningInstanceCount = 0; + $.ajax({ url: createURL("listVirtualMachines"), data: { listAll: true, @@ -55,15 +55,15 @@ state: "Running" }, async: false, - success: function(json) { - if (json.listvirtualmachinesresponse.count != undefined) { - RunningInstanceCount = json.listvirtualmachinesresponse.count; - } + success: function(json) { + if (json.listvirtualmachinesresponse.count != undefined) { + RunningInstanceCount = json.listvirtualmachinesresponse.count; + } } }); - - var stoppedInstanceCount = 0; - $.ajax({ + + var stoppedInstanceCount = 0; + $.ajax({ url: createURL("listVirtualMachines"), data: { listAll: true, @@ -72,18 +72,18 @@ state: "Stopped" }, async: false, - success: function(json) { - if (json.listvirtualmachinesresponse.count != undefined) { - stoppedInstanceCount = json.listvirtualmachinesresponse.count; - } + success: function(json) { + if (json.listvirtualmachinesresponse.count != undefined) { + stoppedInstanceCount = json.listvirtualmachinesresponse.count; + } } }); - + dataFns.account($.extend(data, { runningInstances: RunningInstanceCount, stoppedInstances: stoppedInstanceCount, totalInstances: totalInstanceCount - })); + })); }, account: function(data) { @@ -103,7 +103,7 @@ data: { listAll: true, page: 1, - pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) + pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) //pageSize: 1 //for testing only }, success: function(json) { @@ -131,7 +131,7 @@ $.ajax({ url: createURL('listPublicIpAddresses'), data: { - page: 1, + page: 1, pageSize: 1 }, success: function(json) { @@ -197,7 +197,7 @@ url: createURL('listAlerts'), data: { page: 1, - pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) + pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) }, success: function(json) { var alerts = json.listalertsresponse.alert ? @@ -222,7 +222,7 @@ data: { state: 'Alert', page: 1, - pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) + pageSize: (pageSize > 4? 4: pageSize) //if default.page.size > 4, show 4 items only (since space on dashboard is limited) }, success: function(json) { var hosts = json.listhostsresponse.host ? @@ -247,7 +247,7 @@ fetchLatest: data.fetchLatest, sortBy: 'usage', page: 0, - pageSize: (pageSize > 8? 8: pageSize) + pageSize: (pageSize > 8? 8: pageSize) }, success: function(json) { var capacities = json.listcapacityresponse.capacity ? diff --git a/ui/scripts/docs.js b/ui/scripts/docs.js index 809c398cd2f..ed6ab0c938c 100755 --- a/ui/scripts/docs.js +++ b/ui/scripts/docs.js @@ -1317,5 +1317,16 @@ cloudStack.docs = { helpOvm3Vip: { desc: 'The VIP used by the pool and cluster', externalLink: '' + }, + helpLdapGroupName: { + desc: 'Fully qualified name of OU/GROUP in LDAP', + externalLink: '' + }, + helpLdapGroupType: { + desc: 'Type of LDAP name provided. Can be either GROUP/OU', + externalLink: '' + }, + helpLdapLinkDomainAdmin: { + desc: 'domain admin of the linked domain. Specify a username in GROUP/OU of LDAP' } }; diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js index e46f104364d..dcec93d53f4 100644 --- a/ui/scripts/domains.js +++ b/ui/scripts/domains.js @@ -21,10 +21,10 @@ // Domain tree treeView: { - overflowScroll: true, + overflowScroll: true, // Details detailView: { - name: 'Domain details', + name: 'label.domain.details', viewAll: { label: 'label.accounts', path: 'accounts' @@ -100,7 +100,7 @@ var domainObj; var data = { - id: args.context.domains[0].id + id: args.context.domains[0].id }; if (args.data.name != null) { //args.data.name == undefined means name field is not editable (when log in as normal user or domain admin) @@ -108,22 +108,22 @@ name: args.data.name }); } - + if (args.data.networkdomain != null) { //args.data.networkdomain == undefined means networkdomain field is not editable (when log in as normal user or domain admin) $.extend(data, { - networkdomain: args.data.networkdomain + networkdomain: args.data.networkdomain }); } - - if('name' in data || 'networkdomain' in data) { - $.ajax({ - url: createURL("updateDomain"), - async: false, - data: data, - success: function(json) { - domainObj = json.updatedomainresponse.domain; - } - }); + + if('name' in data || 'networkdomain' in data) { + $.ajax({ + url: createURL("updateDomain"), + async: false, + data: data, + success: function(json) { + domainObj = json.updatedomainresponse.domain; + } + }); } if (args.data.vmLimit != null) { @@ -313,6 +313,109 @@ } }, + linktoldap: { + label: 'label.link.domain.to.ldap', + + action: function(args) { + var data = { + domainid: args.context.domains[0].id, + type: args.data.type, + name: args.data.name, + accounttype: args.data.accounttype + }; + + if (args.data.admin != null && args.data.admin.length > 0) { + $.extend(data, { + admin: args.data.admin + }); + } + + $.ajax({ + url: createURL('linkDomainToLdap'), + data: data, + success: function(json) { + var item = json.linkdomaintoldapresponse.LinkDomainToLdap.domainid; + args.response.success({ + data: item + }); + }, + error: function(XMLHttpResponse) { + var errorMsg = parseXMLHttpResponse(XMLHttpResponse); + args.response.error(errorMsg); + } + }); + }, + + messages: { + notification: function(args) { + return 'label.link.domain.to.ldap'; + } + }, + + createForm: { + title: 'label.link.domain.to.ldap', + desc: 'message.link.domain.to.ldap', + fields: { + type: { + label: 'label.ldap.link.type', + docID: 'helpLdapGroupType', + validation: { + required: true + }, + select: function(args) { + var items = []; + items.push({ + id: "GROUP", + description: "GROUP" + }); //regular-user + items.push({ + id: "OU", + description: "OU" + }); //root-admin + args.response.success({ + data: items + }); + } + }, + name: { + label: 'label.name', + docID: 'helpLdapGroupName', + validation: { + required: true + } + }, + accounttype: { + label: 'label.account.type', + docID: 'helpAccountType', + validation: { + required: true + }, + select: function(args) { + var items = []; + items.push({ + id: 0, + description: "Normal User" + }); //regular-user + items.push({ + id: 2, + description: "Domain Admin" + }); //root-admin + args.response.success({ + data: items + }); + } + }, + admin: { + label: 'label.domain.admin', + docID: 'helpLdapLinkDomainAdmin', + validation: { + required: false + } + } + } + } + }, + updateResourceCount: { label: 'label.action.update.resource.count', messages: { @@ -366,7 +469,7 @@ networkdomain: { label: 'label.network.domain', isEditable: function(args) { - if (isAdmin()) + if (isAdmin()) return true; else return false; @@ -652,10 +755,13 @@ if (jsonObj.level != 0) { //ROOT domain (whose level is 0) is not allowed to delete allowedActions.push("delete"); } - } else if (isDomainAdmin()) { - if (args.context.domains[0].id != g_domainid) { - allowedActions.push("edit"); //merge updateResourceLimit into edit - } + if(isLdapEnabled()) { + allowedActions.push("linktoldap") + } + } else if (isDomainAdmin()) { + if (args.context.domains[0].id != g_domainid) { + allowedActions.push("edit"); //merge updateResourceLimit into edit + } } allowedActions.push("updateResourceCount"); return allowedActions; diff --git a/ui/scripts/events.js b/ui/scripts/events.js index 92804290095..2fd70dd018d 100644 --- a/ui/scripts/events.js +++ b/ui/scripts/events.js @@ -75,7 +75,7 @@ }, action: function(args) { var events = args.context.events; - + $.ajax({ url: createURL("deleteEvents"), data: { @@ -90,7 +90,7 @@ error:function(data) { args.response.error(parseXMLHttpResponse(data)); } - }); + }); } }, @@ -154,7 +154,7 @@ }); } }, - + archive: { label: 'label.archive.events', isHeader: true, @@ -215,7 +215,7 @@ } }, - + // Archive multiple events archiveMulti: { label: 'label.archive.events', @@ -232,7 +232,7 @@ }, action: function(args) { var events = args.context.events; - + $.ajax({ url: createURL("archiveEvents"), data: { @@ -247,7 +247,7 @@ error:function(data) { args.response.error(parseXMLHttpResponse(data)); } - }); + }); } } @@ -494,7 +494,7 @@ }, action: function(args) { var events = args.context.alerts; - + $.ajax({ url: createURL("deleteAlerts"), data: { @@ -509,10 +509,10 @@ error:function(data) { args.response.error(parseXMLHttpResponse(data)); } - }); + }); } }, - + remove: { label: 'label.delete.alerts', isHeader: true, @@ -593,7 +593,7 @@ }, action: function(args) { var events = args.context.alerts; - + $.ajax({ url: createURL("archiveAlerts"), data: { @@ -608,10 +608,10 @@ error:function(data) { args.response.error(parseXMLHttpResponse(data)); } - }); + }); } }, - + archive: { label: 'label.archive.alerts', isHeader: true, diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js index 2b1fe5c905e..eba8e687b5b 100644 --- a/ui/scripts/globalSettings.js +++ b/ui/scripts/globalSettings.js @@ -234,17 +234,17 @@ } } } - }, + }, baremetalRct: { type: 'select', title: 'label.baremetal.rack.configuration', listView: { id: 'baremetalRct', label: 'label.baremetal.rack.configuration', - fields: { - id: { - label: 'label.id' - }, + fields: { + id: { + label: 'label.id' + }, url: { label: 'label.url' } @@ -252,19 +252,19 @@ dataProvider: function(args) { var data = {}; listViewDataProvider(args, data); - + $.ajax({ - url: createURL("listBaremetalRct"), - data: data, - success: function(json) { - args.response.success({ data: json.listbaremetalrctresponse.baremetalrct }); - } - }); + url: createURL("listBaremetalRct"), + data: data, + success: function(json) { + args.response.success({ data: json.listbaremetalrctresponse.baremetalrct }); + } + }); }, actions: { add: { label: 'label.add.baremetal.rack.configuration', - messages: { + messages: { notification: function(args) { return 'label.add.baremetal.rack.configuration'; } @@ -280,35 +280,35 @@ } } }, - action: function(args) { + action: function(args) { $.ajax({ - url: createURL("addBaremetalRct"), - data: { - baremetalrcturl: args.data.url - }, - success: function(json) { - var jid = json.addbaremetalrctresponse.jobid - args.response.success({ + url: createURL("addBaremetalRct"), + data: { + baremetalrcturl: args.data.url + }, + success: function(json) { + var jid = json.addbaremetalrctresponse.jobid + args.response.success({ _custom: { jobId: jid, - getUpdatedItem: function(json) { + getUpdatedItem: function(json) { return json.queryasyncjobresultresponse.jobresult.baremetalrct; } } }); - } + } }); }, notification: { poll: pollAsyncJobResult } } - }, - + }, + detailView: { - name: "details", - actions: { - remove: { + name: "details", + actions: { + remove: { label: 'label.delete.baremetal.rack.configuration', messages: { confirm: function(args) { @@ -318,7 +318,7 @@ return 'label.delete.baremetal.rack.configuration'; } }, - action: function(args) { + action: function(args) { var data = { id: args.context.baremetalRct[0].id }; @@ -326,12 +326,12 @@ url: createURL('deleteBaremetalRct'), data: data, success: function(json) { - var jid = json.deletebaremetalrctresponse.jobid; + var jid = json.deletebaremetalrctresponse.jobid; args.response.success({ _custom: { jobId: jid } - }); + }); } }); }, @@ -339,35 +339,35 @@ poll: pollAsyncJobResult } } - }, - tabs: { + }, + tabs: { details: { title: 'label.details', fields: [{ - id: { - label: 'label.id' - }, + id: { + label: 'label.id' + }, url: { label: 'label.url' } }], - dataProvider: function(args) { + dataProvider: function(args) { var data = { id: args.context.baremetalRct[0].id - }; + }; $.ajax({ - url: createURL("listBaremetalRct"), - data: data, - success: function(json) { - args.response.success({ data: json.listbaremetalrctresponse.baremetalrct[0] }); - } - }); + url: createURL("listBaremetalRct"), + data: data, + success: function(json) { + args.response.success({ data: json.listbaremetalrctresponse.baremetalrct[0] }); + } + }); } } - } - } + } + } } - }, + }, hypervisorCapabilities: { type: 'select', title: 'label.hypervisor.capabilities', diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index 3d3f74e56e3..1401acef8e2 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -184,22 +184,22 @@ }); } } - }); + }); $.ajax({ url: createURL("listTemplates&templatefilter=sharedexecutable&zoneid=" + args.currentData.zoneid), dataType: "json", async: false, success: function(json) { if (json.listtemplatesresponse.template == null) { - sharedTemplateObjs = null; + sharedTemplateObjs = null; } else { - sharedTemplateObjs = $.grep(json.listtemplatesresponse.template, function(item, index) { + sharedTemplateObjs = $.grep(json.listtemplatesresponse.template, function(item, index) { if ($.inArray(item.hypervisor, hypervisorArray) > -1) return true; }); } } - }); + }); } else if (selectedTemplateOrIso == 'select-iso') { $.ajax({ url: createURL("listIsos&isofilter=featured&zoneid=" + args.currentData.zoneid + "&bootable=true"), @@ -243,12 +243,12 @@ async: false, success: function(json) { if (json.listisosresponse.iso == null) { - sharedIsoObjs = null; + sharedIsoObjs = null; } else { - sharedIsoObjs = json.listisosresponse.iso; + sharedIsoObjs = json.listisosresponse.iso; } } - }); + }); } //***** get templates/ISOs (end) ***** @@ -282,19 +282,19 @@ //// return true; // Disabled -- not supported in backend right now //// - + if (selectedTemplateOrIso == 'select-template') { return false; //show Root Disk Size field } else { //selectedTemplateOrIso == 'select-iso' - return true; //hide Root Disk Size field - } + return true; //hide Root Disk Size field + } } }); }, // Step 3: Service offering function(args) { - selectedTemplateObj = null; //reset + selectedTemplateObj = null; //reset if (args.currentData["select-template"] == "select-template") { if (featuredTemplateObjs != null && featuredTemplateObjs.length > 0) { for (var i = 0; i < featuredTemplateObjs.length; i++) { @@ -323,7 +323,7 @@ } } } - } + } if (selectedTemplateObj == null) { if (sharedTemplateObjs != null && sharedTemplateObjs.length > 0) { for (var i = 0; i < sharedTemplateObjs.length; i++) { @@ -333,7 +333,7 @@ } } } - } + } if (selectedTemplateObj == null) { alert("unable to find matched template object"); } else { @@ -346,36 +346,36 @@ // if the user is leveraging a template, then we can show custom IOPS, if applicable var canShowCustomIopsForServiceOffering = (args.currentData["select-template"] != "select-iso" ? true : false); - + // get serviceOfferingObjs - $(window).removeData("cloudStack.module.instanceWizard.serviceOfferingObjs"); + $(window).removeData("cloudStack.module.instanceWizard.serviceOfferingObjs"); $(window).trigger("cloudStack.module.instanceWizard.serviceOffering.dataProvider", { - context: args.context, - currentData: args.currentData - }); - if ($(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs") == undefined) { - $.ajax({ - url: createURL("listServiceOfferings&issystem=false"), - dataType: "json", - async: false, - success: function(json) { - serviceOfferingObjs = json.listserviceofferingsresponse.serviceoffering; - } - }); - } else { - serviceOfferingObjs = $(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs"); + context: args.context, + currentData: args.currentData + }); + if ($(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs") == undefined) { + $.ajax({ + url: createURL("listServiceOfferings&issystem=false"), + dataType: "json", + async: false, + success: function(json) { + serviceOfferingObjs = json.listserviceofferingsresponse.serviceoffering; + } + }); + } else { + serviceOfferingObjs = $(window).data("cloudStack.module.instanceWizard.serviceOfferingObjs"); } - - + + args.response.success({ canShowCustomIops: canShowCustomIopsForServiceOffering, customFlag: 'iscustomized', - //customFlag: 'offerha', //for testing only - customIopsFlag: 'iscustomizediops', + //customFlag: 'offerha', //for testing only + customIopsFlag: 'iscustomizediops', data: { serviceOfferings: serviceOfferingObjs } - }); + }); }, // Step 4: Data disk offering @@ -409,23 +409,23 @@ var data = { affinityGroups: affinitygroups }; - + if(selectedZoneObj.domainid != null && selectedZoneObj.affinitygroupid != null) { - var defaultAffinityGroup; - if(affinitygroups != null) { - for(var i = 0; i < affinitygroups.length; i++) { - if(affinitygroups[i].id == selectedZoneObj.affinitygroupid) { - defaultAffinityGroup = affinitygroups[i]; - break; - } - } - } - $.extend(data, { + var defaultAffinityGroup; + if(affinitygroups != null) { + for(var i = 0; i < affinitygroups.length; i++) { + if(affinitygroups[i].id == selectedZoneObj.affinitygroupid) { + defaultAffinityGroup = affinitygroups[i]; + break; + } + } + } + $.extend(data, { selectedObj: defaultAffinityGroup, selectedObjNonEditable: true }); - } - + } + args.response.success({ data: data }); @@ -608,21 +608,21 @@ } } - + // get networkObjsToPopulate - $(window).removeData("cloudStack.module.instanceWizard.networkObjs"); + $(window).removeData("cloudStack.module.instanceWizard.networkObjs"); $(window).trigger("cloudStack.module.instanceWizard.network.dataProvider", { - context: args.context, - currentData: args.currentData, - networkObjsToPopulate: networkObjsToPopulate - }); - if ($(window).data("cloudStack.module.instanceWizard.networkObjs") == undefined) { - //do nothing - } else { - networkObjsToPopulate = $(window).data("cloudStack.module.instanceWizard.networkObjs"); //override networkObjsToPopulate - } - - + context: args.context, + currentData: args.currentData, + networkObjsToPopulate: networkObjsToPopulate + }); + if ($(window).data("cloudStack.module.instanceWizard.networkObjs") == undefined) { + //do nothing + } else { + networkObjsToPopulate = $(window).data("cloudStack.module.instanceWizard.networkObjs"); //override networkObjsToPopulate + } + + $.ajax({ url: createURL("listNetworkOfferings"), dataType: "json", @@ -639,7 +639,7 @@ networkOfferingObjs = json.listnetworkofferingsresponse.networkoffering; } }); - //get network offerings (end) *** + //get network offerings (end) *** $networkStepContainer.removeClass('repeat next-use-security-groups'); @@ -729,88 +729,88 @@ // Create a new VM!!!! var deployVmData = {}; - //step 1 : select zone + //step 1 : select zone $.extend(deployVmData, { - zoneid : args.data.zoneid + zoneid : args.data.zoneid }); - //step 2: select template + //step 2: select template $.extend(deployVmData, { - templateid : args.data.templateid + templateid : args.data.templateid }); - + $.extend(deployVmData, { - hypervisor : selectedHypervisor + hypervisor : selectedHypervisor }); - + if (args.$wizard.find('input[name=rootDiskSize]').parent().css('display') != 'none') { - if (args.$wizard.find('input[name=rootDiskSize]').val().length > 0) { - $.extend(deployVmData, { - rootdisksize : args.$wizard.find('input[name=rootDiskSize]').val() - }); - } + if (args.$wizard.find('input[name=rootDiskSize]').val().length > 0) { + $.extend(deployVmData, { + rootdisksize : args.$wizard.find('input[name=rootDiskSize]').val() + }); + } } - - //step 3: select service offering + + //step 3: select service offering $.extend(deployVmData, { - serviceofferingid : args.data.serviceofferingid + serviceofferingid : args.data.serviceofferingid }); - + if (args.$wizard.find('input[name=compute-cpu-cores]').parent().parent().css('display') != 'none') { - if (args.$wizard.find('input[name=compute-cpu-cores]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].cpuNumber' : args.$wizard.find('input[name=compute-cpu-cores]').val() - }); - } - if (args.$wizard.find('input[name=compute-cpu]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].cpuSpeed' : args.$wizard.find('input[name=compute-cpu]').val() - }); - } - if (args.$wizard.find('input[name=compute-memory]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].memory' : args.$wizard.find('input[name=compute-memory]').val() - }); - } + if (args.$wizard.find('input[name=compute-cpu-cores]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].cpuNumber' : args.$wizard.find('input[name=compute-cpu-cores]').val() + }); + } + if (args.$wizard.find('input[name=compute-cpu]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].cpuSpeed' : args.$wizard.find('input[name=compute-cpu]').val() + }); + } + if (args.$wizard.find('input[name=compute-memory]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].memory' : args.$wizard.find('input[name=compute-memory]').val() + }); + } } if (args.$wizard.find('input[name=disk-min-iops]').parent().parent().css('display') != 'none') { - if (args.$wizard.find('input[name=disk-min-iops]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].minIops' : args.$wizard.find('input[name=disk-min-iops]').val() - }); - } - if (args.$wizard.find('input[name=disk-max-iops]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].maxIops' : args.$wizard.find('input[name=disk-max-iops]').val() - }); - } + if (args.$wizard.find('input[name=disk-min-iops]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].minIops' : args.$wizard.find('input[name=disk-min-iops]').val() + }); + } + if (args.$wizard.find('input[name=disk-max-iops]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].maxIops' : args.$wizard.find('input[name=disk-max-iops]').val() + }); + } } //step 4: select disk offering - if (args.data.diskofferingid != null && args.data.diskofferingid != "0") { - $.extend(deployVmData, { - diskofferingid : args.data.diskofferingid - }); - - if (selectedDiskOfferingObj.iscustomized == true) { - $.extend(deployVmData, { - size : args.data.size - }); + if (args.data.diskofferingid != null && args.data.diskofferingid != "0") { + $.extend(deployVmData, { + diskofferingid : args.data.diskofferingid + }); + + if (selectedDiskOfferingObj.iscustomized == true) { + $.extend(deployVmData, { + size : args.data.size + }); } if (selectedDiskOfferingObj.iscustomizediops == true) { - if (args.$wizard.find('input[name=disk-min-iops-do]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].minIopsDo' : args.$wizard.find('input[name=disk-min-iops-do]').val() - }); - } + if (args.$wizard.find('input[name=disk-min-iops-do]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].minIopsDo' : args.$wizard.find('input[name=disk-min-iops-do]').val() + }); + } - if (args.$wizard.find('input[name=disk-max-iops-do]').val().length > 0) { - $.extend(deployVmData, { - 'details[0].maxIopsDo' : args.$wizard.find('input[name=disk-max-iops-do]').val() - }); - } + if (args.$wizard.find('input[name=disk-max-iops-do]').val().length > 0) { + $.extend(deployVmData, { + 'details[0].maxIopsDo' : args.$wizard.find('input[name=disk-max-iops-do]').val() + }); + } } } @@ -825,16 +825,16 @@ checkedAffinityGroupIdArray = []; } - if (checkedAffinityGroupIdArray.length > 0) { - $.extend(deployVmData, { - affinitygroupids : checkedAffinityGroupIdArray.join(",") - }); + if (checkedAffinityGroupIdArray.length > 0) { + $.extend(deployVmData, { + affinitygroupids : checkedAffinityGroupIdArray.join(",") + }); } //step 6: select network if (step6ContainerType == 'select-network' || step6ContainerType == 'select-advanced-sg') { var array2 = []; - var array3 = []; + var array3 = []; var defaultNetworkId = args.data.defaultNetwork; //args.data.defaultNetwork might be equal to string "new-network" or a network ID var checkedNetworkIdArray; @@ -882,60 +882,60 @@ if (defaultNetworkId == null) { - cloudStack.dialog.notice({ + cloudStack.dialog.notice({ message: "Please select a default network in Network step." - }); - return; - } - + }); + return; + } + if (checkedNetworkIdArray.length > 0) { for (var i = 0; i < checkedNetworkIdArray.length; i++) { - if (checkedNetworkIdArray[i] == defaultNetworkId) { - array2.unshift(defaultNetworkId); - - var ipToNetwork = { - networkid: defaultNetworkId - }; - if (args.data["new-network"] == "create-new-network") { - if (args.data['new-network-ip'] != null && args.data['new-network-ip'].length > 0) { - $.extend(ipToNetwork, { - ip: args.data['new-network-ip'] - }); - } - } else { - if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) { - $.extend(ipToNetwork, { - ip: args.data["my-network-ips"][i] - }); - } - } - array3.unshift(ipToNetwork); - - } else { - array2.push(checkedNetworkIdArray[i]); - + if (checkedNetworkIdArray[i] == defaultNetworkId) { + array2.unshift(defaultNetworkId); + var ipToNetwork = { - networkid: checkedNetworkIdArray[i] - }; - if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) { - $.extend(ipToNetwork, { - ip: args.data["my-network-ips"][i] - }); - } - array3.push(ipToNetwork); - } + networkid: defaultNetworkId + }; + if (args.data["new-network"] == "create-new-network") { + if (args.data['new-network-ip'] != null && args.data['new-network-ip'].length > 0) { + $.extend(ipToNetwork, { + ip: args.data['new-network-ip'] + }); + } + } else { + if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) { + $.extend(ipToNetwork, { + ip: args.data["my-network-ips"][i] + }); + } + } + array3.unshift(ipToNetwork); + + } else { + array2.push(checkedNetworkIdArray[i]); + + var ipToNetwork = { + networkid: checkedNetworkIdArray[i] + }; + if (args.data["my-network-ips"][i] != null && args.data["my-network-ips"][i].length > 0) { + $.extend(ipToNetwork, { + ip: args.data["my-network-ips"][i] + }); + } + array3.push(ipToNetwork); + } } } - + //deployVmData.push("&networkIds=" + array2.join(",")); //ipToNetworkMap can't be specified along with networkIds or ipAddress - - for (var k = 0; k < array3.length; k++) { - deployVmData["iptonetworklist[" + k + "].networkid"] = array3[k].networkid; - if (array3[k].ip != undefined && array3[k].ip.length > 0) { - deployVmData["iptonetworklist[" + k + "].ip"] = array3[k].ip; - } - } - + + for (var k = 0; k < array3.length; k++) { + deployVmData["iptonetworklist[" + k + "].networkid"] = array3[k].networkid; + if (array3[k].ip != undefined && array3[k].ip.length > 0) { + deployVmData["iptonetworklist[" + k + "].ip"] = array3[k].ip; + } + } + } else if (step6ContainerType == 'select-security-group') { var checkedSecurityGroupIdArray; if (typeof(args.data["security-groups"]) == "object" && args.data["security-groups"].length != null) { //args.data["security-groups"] is an array of string, e.g. ["2375f8cc-8a73-4b8d-9b26-50885a25ffe0", "27c60d2a-de7f-4bb7-96e5-a602cec681df","c6301d77-99b5-4e8a-85e2-3ea2ab31c342"], @@ -947,10 +947,10 @@ checkedSecurityGroupIdArray = []; } - if (checkedSecurityGroupIdArray.length > 0) { - $.extend(deployVmData, { - securitygroupids : checkedSecurityGroupIdArray.join(",") - }); + if (checkedSecurityGroupIdArray.length > 0) { + $.extend(deployVmData, { + securitygroupids : checkedSecurityGroupIdArray.join(",") + }); } if (selectedZoneObj.networktype == "Advanced" && selectedZoneObj.securitygroupsenabled == true) { // Advanced SG-enabled zone @@ -980,29 +980,29 @@ array2.push(checkedNetworkIdArray[i]); } } - + $.extend(deployVmData, { - networkids : array2.join(",") + networkids : array2.join(",") }); } } else if (step6ContainerType == 'nothing-to-select') { - if ("vpc" in args.context) { //from VPC tier - deployVmData["iptonetworklist[0].networkid"] = args.context.networks[0].id; - if (args.data["vpc-specify-ip"] != undefined && args.data["vpc-specify-ip"].length > 0) { - deployVmData["iptonetworklist[0].ip"] = args.data["vpc-specify-ip"]; - } - + if ("vpc" in args.context) { //from VPC tier + deployVmData["iptonetworklist[0].networkid"] = args.context.networks[0].id; + if (args.data["vpc-specify-ip"] != undefined && args.data["vpc-specify-ip"].length > 0) { + deployVmData["iptonetworklist[0].ip"] = args.data["vpc-specify-ip"]; + } + $.extend(deployVmData, { - domainid : args.context.vpc[0].domainid + domainid : args.context.vpc[0].domainid }); - if (args.context.vpc[0].account != null) { - $.extend(deployVmData, { - account : args.context.vpc[0].account - }); - } else if (args.context.vpc[0].projectid != null) { - $.extend(deployVmData, { - projectid : args.context.vpc[0].projectid - }); + if (args.context.vpc[0].account != null) { + $.extend(deployVmData, { + account : args.context.vpc[0].account + }); + } else if (args.context.vpc[0].projectid != null) { + $.extend(deployVmData, { + projectid : args.context.vpc[0].projectid + }); } } } @@ -1015,28 +1015,28 @@ } var displayname = args.data.displayname; - if (displayname != null && displayname.length > 0) { - $.extend(deployVmData, { - displayname : displayname - }); - $.extend(deployVmData, { - name : displayname - }); + if (displayname != null && displayname.length > 0) { + $.extend(deployVmData, { + displayname : displayname + }); + $.extend(deployVmData, { + name : displayname + }); } var group = args.data.groupname; - if (group != null && group.length > 0) { - $.extend(deployVmData, { - group : group - }); + if (group != null && group.length > 0) { + $.extend(deployVmData, { + group : group + }); } - + var keyboard = args.data.keyboardLanguage; - if (keyboard != null && keyboard.length > 0) { //when blank option (default option) is selected => args.data.keyboardLanguage == "" - $.extend(deployVmData, { - keyboard : keyboard - }); - } + if (keyboard != null && keyboard.length > 0) { //when blank option (default option) is selected => args.data.keyboardLanguage == "" + $.extend(deployVmData, { + keyboard : keyboard + }); + } if (g_hostid != null) { $.extend(deployVmData, { @@ -1050,7 +1050,7 @@ userdata : todb(btoa(userdata)) }); } - + $(window).trigger('cloudStack.deployVirtualMachine', { deployVmData: deployVmData, formData: args.data diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 81732d76307..9901cf70a37 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -61,7 +61,7 @@ } args.form.fields.quiescevm.isChecked = true; - + return false; } } @@ -69,7 +69,7 @@ }, action: function(args) { var instances = args.context.instances; - + $(instances).map(function(index, instance) { var array1 = []; array1.push("&snapshotmemory=" + (args.data.snapshotMemory == "on")); @@ -103,7 +103,7 @@ error: function(json) { args.response.error(parseXMLHttpResponse(json)); } - }); + }); }); }, @@ -118,10 +118,10 @@ isMultiSelectAction: true }); } - + return action; - }; - + }; + cloudStack.sections.instances = { title: 'label.instances', id: 'instances', @@ -601,10 +601,10 @@ return 'label.action.reboot.instance'; }, complete: function(args) { - if (args.password != null && args.password.length > 0) - return 'Password has been reset to ' + args.password; - else - return null; + if (args.password != null && args.password.length > 0) + return _l('message.password.has.been.reset.to') + ' ' + args.password; + else + return null; } }, notification: { @@ -616,51 +616,49 @@ label: 'label.action.destroy.instance', compactLabel: 'label.destroy', createForm: { - title: 'label.action.destroy.instance', + title: 'label.action.destroy.instance', desc: 'label.action.destroy.instance', - isWarning: true, + isWarning: true, preFilter: function(args) { - if (isAdmin() || isDomainAdmin()) { - args.$form.find('.form-item[rel=expunge]').css('display', 'inline-block'); - } else { - args.$form.find('.form-item[rel=expunge]').hide(); - } + if (! g_allowUserExpungeRecoverVm) { + args.$form.find('.form-item[rel=expunge]').hide(); + } }, fields: { - expunge: { + expunge: { label: 'label.expunge', isBoolean: true, isChecked: false } } - }, - messages: { + }, + messages: { notification: function(args) { return 'label.action.destroy.instance'; } }, - action: function(args) { - var data = { - id: args.context.instances[0].id - }; - if (args.data.expunge == 'on') { - $.extend(data, { - expunge: true - }); - } + action: function(args) { + var data = { + id: args.context.instances[0].id + }; + if (args.data.expunge == 'on') { + $.extend(data, { + expunge: true + }); + } $.ajax({ url: createURL('destroyVirtualMachine'), - data: data, + data: data, success: function(json) { var jid = json.destroyvirtualmachineresponse.jobid; args.response.success({ _custom: { jobId: jid, - getUpdatedItem: function(json) { - if ('virtualmachine' in json.queryasyncjobresultresponse.jobresult) //destroy without expunge + getUpdatedItem: function(json) { + if ('virtualmachine' in json.queryasyncjobresultresponse.jobresult) //destroy without expunge return json.queryasyncjobresultresponse.jobresult.virtualmachine; - else //destroy with expunge - return { 'toRemove': true }; + else //destroy with expunge + return { 'toRemove': true }; }, getActionFilter: function() { return vmActionfilter; @@ -753,10 +751,10 @@ return 'label.reinstall.vm'; }, complete: function(args) { - if (args.password != null && args.password.length > 0) + if (args.password != null && args.password.length > 0) return _l('label.password.reset.confirm') + args.password; - else - return null; + else + return null; } }, @@ -765,19 +763,19 @@ url: createURL("restoreVirtualMachine&virtualmachineid=" + args.context.instances[0].id), dataType: "json", async: true, - success: function(json) { - var jid = json.restorevmresponse.jobid; - args.response.success({ + success: function(json) { + var jid = json.restorevmresponse.jobid; + args.response.success({ _custom: { jobId: jid, - getUpdatedItem: function(json) { + getUpdatedItem: function(json) { return json.queryasyncjobresultresponse.jobresult.virtualmachine; }, getActionFilter: function() { return vmActionfilter; } } - }); + }); } }); @@ -951,54 +949,54 @@ }); } }); - - + + //***** addResourceDetail ***** - //XenServer only (starts here) - if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) { - $.ajax({ - url: createURL('addResourceDetail'), - data: { - resourceType: 'uservm', - resourceId: args.context.instances[0].id, - 'details[0].key': 'hypervisortoolsversion', - 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56' - }, - success: function(json) { - var jobId = json.addResourceDetailresponse.jobid; + //XenServer only (starts here) + if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) { + $.ajax({ + url: createURL('addResourceDetail'), + data: { + resourceType: 'uservm', + resourceId: args.context.instances[0].id, + 'details[0].key': 'hypervisortoolsversion', + 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56' + }, + success: function(json) { + var jobId = json.addResourceDetailresponse.jobid; var addResourceDetailIntervalID = setInterval(function() { $.ajax({ url: createURL("queryAsyncJobResult&jobid=" + jobId), dataType: "json", success: function(json) { var result = json.queryasyncjobresultresponse; - + if (result.jobstatus == 0) { return; //Job has not completed } else { clearInterval(addResourceDetailIntervalID); - if (result.jobstatus == 1) { - //do nothing + if (result.jobstatus == 1) { + //do nothing } else if (result.jobstatus == 2) { - cloudStack.dialog.notice({ + cloudStack.dialog.notice({ message: _s(result.jobresult.errortext) - }); + }); } } }, - error: function(XMLHttpResponse) { + error: function(XMLHttpResponse) { cloudStack.dialog.notice({ message: parseXMLHttpResponse(XMLHttpResponse) - }); + }); } }); - }, g_queryAsyncJobResultInterval); - } - }); - } - //XenServer only (ends here) - + }, g_queryAsyncJobResultInterval); + } + }); + } + //XenServer only (ends here) + } }, @@ -1015,9 +1013,9 @@ $.ajax({ url: createURL("listIsos"), data: { - isofilter: 'featured', - isReady: true, - zoneid: args.context.instances[0].zoneid + isofilter: 'featured', + isReady: true, + zoneid: args.context.instances[0].zoneid }, async: false, success: function(json) { @@ -1034,9 +1032,9 @@ $.ajax({ url: createURL("listIsos"), data: { - isofilter: 'community', - isReady: true, - zoneid: args.context.instances[0].zoneid + isofilter: 'community', + isReady: true, + zoneid: args.context.instances[0].zoneid }, async: false, success: function(json) { @@ -1055,9 +1053,9 @@ $.ajax({ url: createURL("listIsos"), data: { - isofilter: 'selfexecutable', - isReady: true, - zoneid: args.context.instances[0].zoneid + isofilter: 'selfexecutable', + isReady: true, + zoneid: args.context.instances[0].zoneid }, async: false, success: function(json) { @@ -1155,10 +1153,10 @@ return 'message.action.instance.reset.password'; }, notification: function(args) { - return 'label.action.reset.password'; + return _l('label.action.reset.password'); }, complete: function(args) { - return 'Password has been reset to ' + args.password; + return _l('message.password.has.been.reset.to') + ' ' + args.password; } }, @@ -1233,18 +1231,18 @@ }, osTypeId: { label: 'label.os.type', - select: function(args) { - if (ostypeObjs == undefined) { - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; - } - }); - } - var items = []; + select: function(args) { + if (ostypeObjs == undefined) { + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; + } + }); + } + var items = []; $(ostypeObjs).each(function() { items.push({ id: this.id, @@ -1253,7 +1251,7 @@ }); args.response.success({ data: items - }); + }); } }, isPublic: { @@ -1493,73 +1491,73 @@ createForm: { title: 'label.change.service.offering', desc: function(args) { - var description = ''; - var vmObj = args.jsonObj; - if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { - description = 'message.read.admin.guide.scaling.up'; - } - return description; + var description = ''; + var vmObj = args.jsonObj; + if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { + description = 'message.read.admin.guide.scaling.up'; + } + return description; }, fields: { - serviceofferingid: { + serviceofferingid: { label: 'label.compute.offering', select: function(args) { - var serviceofferingObjs; + var serviceofferingObjs; $.ajax({ url: createURL("listServiceOfferings&VirtualMachineId=" + args.context.instances[0].id), dataType: "json", async: true, success: function(json) { - serviceofferingObjs = json.listserviceofferingsresponse.serviceoffering; - var items = []; + serviceofferingObjs = json.listserviceofferingsresponse.serviceoffering; + var items = []; if (serviceofferingObjs != null) { - for (var i = 0; i < serviceofferingObjs.length; i++) { - items.push({ + for (var i = 0; i < serviceofferingObjs.length; i++) { + items.push({ id: serviceofferingObjs[i].id, description: serviceofferingObjs[i].name }); - } - } + } + } args.response.success({ data: items }); } }); - + args.$select.change(function(){ - var $form = $(this).closest('form'); - + var $form = $(this).closest('form'); + var serviceofferingid = $(this).val(); if (serviceofferingid == null || serviceofferingid.length == 0) return; - + var items = []; var selectedServiceofferingObj; if (serviceofferingObjs != null) { - for (var i = 0; i < serviceofferingObjs.length; i++) { - if (serviceofferingObjs[i].id == serviceofferingid) { - selectedServiceofferingObj = serviceofferingObjs[i]; - break; - } - } - } - if (selectedServiceofferingObj == undefined) - return; - + for (var i = 0; i < serviceofferingObjs.length; i++) { + if (serviceofferingObjs[i].id == serviceofferingid) { + selectedServiceofferingObj = serviceofferingObjs[i]; + break; + } + } + } + if (selectedServiceofferingObj == undefined) + return; + if (selectedServiceofferingObj.iscustomized == true) { - $form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block'); - $form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block'); - $form.find('.form-item[rel=memory]').css('display', 'inline-block'); + $form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block'); + $form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block'); + $form.find('.form-item[rel=memory]').css('display', 'inline-block'); } else { - $form.find('.form-item[rel=cpuSpeed]').hide(); - $form.find('.form-item[rel=cpuNumber]').hide(); - $form.find('.form-item[rel=memory]').hide(); + $form.find('.form-item[rel=cpuSpeed]').hide(); + $form.find('.form-item[rel=cpuNumber]').hide(); + $form.find('.form-item[rel=memory]').hide(); } }); } - }, + }, cpuSpeed: { - label: 'label.cpu.mhz', + label: 'label.cpu.mhz', validation: { required: true, number: true @@ -1567,7 +1565,7 @@ isHidden: true }, cpuNumber: { - label: 'label.num.cpu.cores', + label: 'label.num.cpu.cores', validation: { required: true, number: true @@ -1575,38 +1573,38 @@ isHidden: true }, memory: { - label: 'label.memory.mb', + label: 'label.memory.mb', validation: { required: true, number: true }, isHidden: true - } + } } }, action: function(args) { - var data = { - id: args.context.instances[0].id, - serviceofferingid: args.data.serviceofferingid - }; - - if (args.$form.find('.form-item[rel=cpuSpeed]').is(':visible')) { + var data = { + id: args.context.instances[0].id, + serviceofferingid: args.data.serviceofferingid + }; + + if (args.$form.find('.form-item[rel=cpuSpeed]').is(':visible')) { $.extend(data, { - 'details[0].cpuSpeed': args.data.cpuSpeed + 'details[0].cpuSpeed': args.data.cpuSpeed }); - } - if (args.$form.find('.form-item[rel=cpuNumber]').is(':visible')) { + } + if (args.$form.find('.form-item[rel=cpuNumber]').is(':visible')) { $.extend(data, { - 'details[0].cpuNumber': args.data.cpuNumber + 'details[0].cpuNumber': args.data.cpuNumber }); - } - if (args.$form.find('.form-item[rel=memory]').is(':visible')) { + } + if (args.$form.find('.form-item[rel=memory]').is(':visible')) { $.extend(data, { - 'details[0].memory': args.data.memory + 'details[0].memory': args.data.memory }); - } - + } + $.ajax({ url: createURL('scaleVirtualMachine'), data: data, @@ -1640,15 +1638,15 @@ poll: pollAsyncJobResult } }, - + resetSSHKeyForVirtualMachine: { - label: 'Reset SSH Key Pair', + label: 'label.reset.ssh.key.pair', createForm: { - title: 'Reset SSH Key Pair on VM', - desc: 'Please specify a ssh key pair that you would like to add to this VM. Please note the root password will be changed by this operation if password is enabled.', + title: 'label.reset.ssh.key.pair.on.vm', + desc: 'message.desc.reset.ssh.key.pair', fields: { sshkeypair: { - label: 'New SSH Key Pair', + label: 'label.new.ssh.key.pair', validation: { required: true }, @@ -1718,11 +1716,11 @@ }, messages: { notification: function(args) { - return 'Reset SSH Key Pair on VM'; + return _l('label.reset.ssh.key.pair.on.vm'); }, complete: function(args) { if (args.password != null) { - return 'Password of the VM has been reset to ' + args.password; + return _l('message.password.of.the.vm.has.been.reset.to') + ' ' + args.password; } return false; @@ -1732,66 +1730,66 @@ poll: pollAsyncJobResult } }, - + assignVmToAnotherAccount: { label: 'label.assign.instance.another', createForm: { title: 'label.assign.instance.another', - fields: { - domainid: { - label: 'label.domain', - validation: { + fields: { + domainid: { + label: 'label.domain', + validation: { required: true }, - select: function(args) { - $.ajax({ - url: createURL('listDomains'), - data: { - listAll: true, - details: 'min' - }, - success: function(json) { - var array1 = []; - var domains = json.listdomainsresponse.domain; - if (domains != null && domains.length > 0) { - for (var i = 0; i < domains.length; i++) { - array1.push({ - id: domains[i].id, - description: domains[i].path - }); - } - } + select: function(args) { + $.ajax({ + url: createURL('listDomains'), + data: { + listAll: true, + details: 'min' + }, + success: function(json) { + var array1 = []; + var domains = json.listdomainsresponse.domain; + if (domains != null && domains.length > 0) { + for (var i = 0; i < domains.length; i++) { + array1.push({ + id: domains[i].id, + description: domains[i].path + }); + } + } array1.sort(function(a, b) { return a.description.localeCompare(b.description); }); - args.response.success({ - data: array1 - }); - } - }); - } - }, - account: { - label: 'label.account', - validation: { + args.response.success({ + data: array1 + }); + } + }); + } + }, + account: { + label: 'label.account', + validation: { required: true } - } + } } }, - action: function(args) { + action: function(args) { $.ajax({ url: createURL('assignVirtualMachine'), data: { virtualmachineid: args.context.instances[0].id, domainid: args.data.domainid, account: args.data.account - }, - success: function(json) { - var item = json.assignvirtualmachineresponse.virtualmachine; + }, + success: function(json) { + var item = json.assignvirtualmachineresponse.virtualmachine; args.response.success({ data: item - }); + }); } }); }, @@ -1805,8 +1803,8 @@ args.complete(); } } - }, - + }, + viewConsole: { label: 'label.view.console', action: { @@ -1835,36 +1833,36 @@ } else { hiddenFields = ["hypervisor", 'xenserverToolsVersion61plus']; } - + if ('instances' in args.context && args.context.instances[0].hypervisor != 'XenServer') { - hiddenFields.push('xenserverToolsVersion61plus'); + hiddenFields.push('xenserverToolsVersion61plus'); } - - if ('instances' in args.context && args.context.instances[0].guestosid != undefined) { - if (ostypeObjs == undefined) { - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; - } - }); - } - if (ostypeObjs != undefined) { - var ostypeName; - for (var i = 0; i < ostypeObjs.length; i++) { - if (ostypeObjs[i].id == args.context.instances[0].guestosid) { - ostypeName = ostypeObjs[i].description; - break; - } - } - if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { - hiddenFields.push('xenserverToolsVersion61plus'); - } - } + + if ('instances' in args.context && args.context.instances[0].guestosid != undefined) { + if (ostypeObjs == undefined) { + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; + } + }); + } + if (ostypeObjs != undefined) { + var ostypeName; + for (var i = 0; i < ostypeObjs.length; i++) { + if (ostypeObjs[i].id == args.context.instances[0].guestosid) { + ostypeName = ostypeObjs[i].description; + break; + } + } + if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { + hiddenFields.push('xenserverToolsVersion61plus'); + } + } } - + if (!args.context.instances[0].publicip) { hiddenFields.push('publicip'); } @@ -1920,17 +1918,17 @@ guestosid: { label: 'label.os.type', isEditable: true, - select: function(args) { - if (ostypeObjs == undefined) { - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; - } - }); - } + select: function(args) { + if (ostypeObjs == undefined) { + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; + } + }); + } var items = []; $(ostypeObjs).each(function() { items.push({ @@ -1959,16 +1957,7 @@ }, converter: cloudStack.converters.toBooleanText }, - - /* - isoid: { - label: 'label.attached.iso', - isEditable: false, - converter: function(isoid) { - return cloudStack.converters.toBooleanText(isoid != null); - } - }, - */ + isoname: { label: 'label.attached.iso' }, @@ -1977,13 +1966,13 @@ label: 'label.compute.offering' }, cpunumber: { - label: 'label.num.cpu.cores' + label: 'label.num.cpu.cores' }, cpuspeed: { - label: 'label.cpu.mhz' + label: 'label.cpu.mhz' }, memory: { - label: 'label.memory.mb' + label: 'label.memory.mb' }, vgpu: { label: 'label.vgpu' @@ -2011,7 +2000,7 @@ label: 'label.public.ip' }, keypair: { - label: 'SSH Key Pair' + label: 'label.ssh.key.pair' }, domain: { label: 'label.domain' @@ -2045,7 +2034,7 @@ var jsonObj; if (json.listvirtualmachinesresponse.virtualmachine != null && json.listvirtualmachinesresponse.virtualmachine.length > 0) jsonObj = json.listvirtualmachinesresponse.virtualmachine[0]; - else if (isAdmin()) + else if (isAdmin()) jsonObj = $.extend(args.context.instances[0], { state: "Expunged" }); //after root/domain admin expunge a VM, listVirtualMachines API will no longer returns this expunged VM to all users. @@ -2060,12 +2049,12 @@ else jsonObj.xenserverToolsVersion61plus = false; } - + $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', { - obj: jsonObj, - objType: "UserVM" + obj: jsonObj, + objType: "UserVM" }); - + args.response.success({ actionFilter: vmActionfilter, data: jsonObj @@ -2099,19 +2088,19 @@ networkid: { label: 'label.network', select: function(args) { - var data1 = { - zoneid: args.context.instances[0].zoneid - }; - if (isAdmin()) { - $.extend(data1, { - listAll: true - }); - } else { - $.extend(data1, { - account: args.context.instances[0].account, + var data1 = { + zoneid: args.context.instances[0].zoneid + }; + if (isAdmin()) { + $.extend(data1, { + listAll: true + }); + } else { + $.extend(data1, { + account: args.context.instances[0].account, domainid: args.context.instances[0].domainid - }); - } + }); + } $.ajax({ url: createURL('listNetworks'), data: data1, @@ -2322,7 +2311,7 @@ secondaryips: secondaryips }) } - + var name = 'NIC ' + (index + 1); if (nic.isdefault) { name += ' (' + _l('label.default') + ')'; @@ -2434,27 +2423,29 @@ var allowedActions = []; if (jsonObj.state == 'Destroyed') { - if (isAdmin() || isDomainAdmin()) { + if (g_allowUserExpungeRecoverVm) { allowedActions.push("recover"); } - if (isAdmin() || isDomainAdmin()) + + if (g_allowUserExpungeRecoverVm) { allowedActions.push("expunge"); + } } else if (jsonObj.state == 'Running') { allowedActions.push("stop"); allowedActions.push("restart"); - - if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true) - && (jsonObj.hypervisor != 'LXC')) { + + if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true) + && (jsonObj.hypervisor != 'LXC')) { allowedActions.push("snapshot"); } - - allowedActions.push("destroy"); + + allowedActions.push("destroy"); allowedActions.push("reinstall"); - + //when userVm is running, scaleUp is not supported for KVM, LXC if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'LXC') { - allowedActions.push("scaleUp"); - } + allowedActions.push("scaleUp"); + } if (isAdmin()) allowedActions.push("migrate"); @@ -2476,13 +2467,13 @@ allowedActions.push("start"); allowedActions.push("destroy"); allowedActions.push("reinstall"); - - if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true) - && (jsonObj.hypervisor != 'LXC')) { + + if ((jsonObj.hypervisor != 'KVM' || g_kvmsnapshotenabled == true) + && (jsonObj.hypervisor != 'LXC')) { allowedActions.push("snapshot"); } - - allowedActions.push("scaleUp"); //when vm is stopped, scaleUp is supported for all hypervisors + + allowedActions.push("scaleUp"); //when vm is stopped, scaleUp is supported for all hypervisors allowedActions.push("changeAffinity"); if (isAdmin()) @@ -2493,11 +2484,11 @@ } else { allowedActions.push("detachISO"); } - allowedActions.push("resetPassword"); + allowedActions.push("resetPassword"); if (jsonObj.hypervisor == "BareMetal") { allowedActions.push("createTemplate"); } - + if (isAdmin() || isDomainAdmin()) { allowedActions.push("assignVmToAnotherAccount"); } @@ -2507,8 +2498,9 @@ } else if (jsonObj.state == 'Error') { allowedActions.push("destroy"); } else if (jsonObj.state == 'Expunging') { - if (isAdmin() || isDomainAdmin()) + if (g_allowUserExpungeRecoverVm) { allowedActions.push("expunge"); + } } return allowedActions; } diff --git a/ui/scripts/lbStickyPolicy.js b/ui/scripts/lbStickyPolicy.js index 11d4799e575..6d619763ea9 100644 --- a/ui/scripts/lbStickyPolicy.js +++ b/ui/scripts/lbStickyPolicy.js @@ -180,8 +180,8 @@ cloudStack.dialog.createForm({ form: { - title: 'Configure Sticky Policy', - desc: 'Please complete the following fields', + title: 'label.configure.sticky.policy', + desc: 'label.please.complete.the.following.fields', fields: fields }, after: function(args) { @@ -251,7 +251,7 @@ }, success: function(json) { cloudStack.ui.notifications.add({ - desc: 'Add new LB sticky rule', + desc: 'message.desc.add.new.lb.sticky.rule', section: 'Network', poll: pollAsyncJobResult, _custom: { diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 4e337fb57e3..110bc4b98e4 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -37,7 +37,7 @@ }; //value of Primary IP in subselect dropdown is -1, for single VM selection (API parameter virtualmachineid + vmguestip), e.g. enableStaticNat API, createPortForwardingRule API. - var singleVmSecondaryIPSubselect = function(args) { + var singleVmSecondaryIPSubselect = function(args) { var instance = args.context.instances[0]; var network = args.context.networks[0]; @@ -50,9 +50,9 @@ success: function(json) { var nics = json.listnicsresponse.nic; var ipSelection = []; - - $(nics).map(function(index, nic) { - var primaryIp = nic.ipaddress; + + $(nics).map(function(index, nic) { + var primaryIp = nic.ipaddress; var secondaryIps = nic.secondaryip ? nic.secondaryip : []; var prefix = '[NIC ' + (index + 1) + '] '; @@ -61,7 +61,7 @@ id: nic.networkid + ',-1', description: prefix + primaryIp + ' (Primary)' }); - + // Add secondary IPs $(secondaryIps).map(function(index, secondaryIp) { ipSelection.push({ @@ -69,58 +69,58 @@ description: prefix + secondaryIp.ipaddress }); }); - }); + }); + + args.response.success({ + data: ipSelection + }); + } + }); + + } else { //non-portable IP which has only one NIC + /* + var nic = $.grep(instance.nic, function(nic) { + return nic.networkid == network.id; + })[0]; + */ + + // Get NIC IPs + $.ajax({ + url: createURL('listNics'), + data: { + virtualmachineid: instance.id, + nicId: instance.nic[0].id + }, + success: function(json) { + var nic = json.listnicsresponse.nic[0]; + var primaryIp = nic.ipaddress; + var secondaryIps = nic.secondaryip ? nic.secondaryip : []; + var ipSelection = []; + + // Add primary IP as default + ipSelection.push({ + id: primaryIp, + description: primaryIp + ' (Primary)' + }); + + // Add secondary IPs + $(secondaryIps).map(function(index, secondaryIp) { + ipSelection.push({ + id: secondaryIp.ipaddress, + description: secondaryIp.ipaddress + }); + }); args.response.success({ data: ipSelection }); } }); - - } else { //non-portable IP which has only one NIC - /* - var nic = $.grep(instance.nic, function(nic) { - return nic.networkid == network.id; - })[0]; - */ - - // Get NIC IPs - $.ajax({ - url: createURL('listNics'), - data: { - virtualmachineid: instance.id, - nicId: instance.nic[0].id - }, - success: function(json) { - var nic = json.listnicsresponse.nic[0]; - var primaryIp = nic.ipaddress; - var secondaryIps = nic.secondaryip ? nic.secondaryip : []; - var ipSelection = []; - - // Add primary IP as default - ipSelection.push({ - id: primaryIp, - description: primaryIp + ' (Primary)' - }); - - // Add secondary IPs - $(secondaryIps).map(function(index, secondaryIp) { - ipSelection.push({ - id: secondaryIp.ipaddress, - description: secondaryIp.ipaddress - }); - }); - - args.response.success({ - data: ipSelection - }); - } - }); } }; //value of Primary IP in subselect dropdown is itself (not -1), for multiple VM selection (API parameter vmidipmap), e.g. assignToLoadBalancerRule API. - var multipleVmSecondaryIPSubselect = function(args) { + var multipleVmSecondaryIPSubselect = function(args) { var instance = args.context.instances[0]; var network = args.context.networks[0]; @@ -137,7 +137,7 @@ //portable IP has multiple NICs. Each NIC has a different network ID. $(nics).map(function(index, nic) { var primaryIp = nic.ipaddress; - var secondaryIps = nic.secondaryip ? nic.secondaryip : []; + var secondaryIps = nic.secondaryip ? nic.secondaryip : []; var prefix = '[NIC ' + (index + 1) + '] '; // Add primary IP as default @@ -145,7 +145,7 @@ id: nic.networkid + ',' + primaryIp, description: prefix + primaryIp + ' (Primary)' }); - + // Add secondary IPs $(secondaryIps).map(function(index, secondaryIp) { ipSelection.push({ @@ -153,21 +153,21 @@ description: prefix + secondaryIp.ipaddress }); }); - }); - + }); + args.response.success({ data: ipSelection }); } - }); - - } else { //non-portable IP which has only one NIC + }); + + } else { //non-portable IP which has only one NIC /* - var nic = $.grep(instance.nic, function(nic) { + var nic = $.grep(instance.nic, function(nic) { return nic.networkid == network.id; })[0]; */ - + // Get NIC IPs $.ajax({ url: createURL('listNics'), @@ -175,7 +175,7 @@ virtualmachineid: instance.id, nicId: instance.nic[0].id }, - success: function(json) { + success: function(json) { var nic = json.listnicsresponse.nic[0]; var primaryIp = nic.ipaddress; var secondaryIps = nic.secondaryip ? nic.secondaryip : []; @@ -207,9 +207,9 @@ }); } }); - } + } }; - + var ipChangeNotice = function() { cloudStack.dialog.confirm({ message: 'message.ip.address.changed', @@ -243,107 +243,107 @@ ipObj.issystem == true) { return []; } - + if (ipObj.issourcenat) { //sourceNAT IP doesn't support staticNAT disallowedActions.push('enableStaticNAT'); disallowedActions.push('disableStaticNAT'); disallowedActions.push('remove'); } else { //non-sourceNAT IP supports staticNAT - disallowedActions.push('enableVPN'); - if (ipObj.isstaticnat) { + disallowedActions.push('enableVPN'); + if (ipObj.isstaticnat) { disallowedActions.push('enableStaticNAT'); } else { disallowedActions.push('disableStaticNAT'); } - } + } //***** apply to both Isolated Guest Network IP, VPC IP (end) ***** - - + + if (!('vpc' in args.context)) { //***** Guest Network section > Guest Network page > IP Address page ***** - if (args.context.networks[0].networkofferingconservemode == false) { - /* - (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added. - */ - if (ipObj.issourcenat == true) { - disallowedActions.push('enableStaticNAT'); - disallowedActions.push('enableVPN'); - } - - /* - (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer at first. - 1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. - 2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. - 3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. - 4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. - */ - else { //ipObj.issourcenat == false - if (ipObj.isstaticnat) { //1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. - disallowedActions.push('enableVPN'); - } - if (ipObj.vpnenabled) { //2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. - disallowedActions.push('enableStaticNAT'); - } - - //3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. - $.ajax({ - url: createURL('listPortForwardingRules'), - data: { - ipaddressid: ipObj.id, - listAll: true - }, - dataType: 'json', - async: false, - success: function(json) { - var rules = json.listportforwardingrulesresponse.portforwardingrule; - if (rules != null && rules.length > 0) { - disallowedActions.push('enableVPN'); - disallowedActions.push('enableStaticNAT'); - } - } - }); - - //4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. - $.ajax({ - url: createURL('listLoadBalancerRules'), - data: { - publicipid: ipObj.id, - listAll: true - }, - dataType: 'json', - async: false, - success: function(json) { - var rules = json.listloadbalancerrulesresponse.loadbalancerrule; - if (rules != null && rules.length > 0) { - disallowedActions.push('enableVPN'); - disallowedActions.push('enableStaticNAT'); - } - } - }); - } - } - - if (ipObj.networkOfferingHavingVpnService == true) { - if (ipObj.vpnenabled) { - disallowedActions.push('enableVPN'); - } else { - disallowedActions.push('disableVPN'); - } - } else { //ipObj.networkOfferingHavingVpnService == false - disallowedActions.push('disableVPN'); - disallowedActions.push('enableVPN'); - } - } else { //***** VPC section > Configuration VPC > Router > Public IP Addresses ***** - if (ipObj.issourcenat) { //VPC sourceNAT IP: supports VPN - if (ipObj.vpnenabled) { - disallowedActions.push('enableVPN'); - } else { - disallowedActions.push('disableVPN'); - } - } else { //VPC non-sourceNAT IP: doesn't support VPN - disallowedActions.push('enableVPN'); - disallowedActions.push('disableVPN'); - } - } + if (args.context.networks[0].networkofferingconservemode == false) { + /* + (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added. + */ + if (ipObj.issourcenat == true) { + disallowedActions.push('enableStaticNAT'); + disallowedActions.push('enableVPN'); + } + + /* + (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer at first. + 1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. + 2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. + 3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. + 4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. + */ + else { //ipObj.issourcenat == false + if (ipObj.isstaticnat) { //1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. + disallowedActions.push('enableVPN'); + } + if (ipObj.vpnenabled) { //2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. + disallowedActions.push('enableStaticNAT'); + } + + //3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. + $.ajax({ + url: createURL('listPortForwardingRules'), + data: { + ipaddressid: ipObj.id, + listAll: true + }, + dataType: 'json', + async: false, + success: function(json) { + var rules = json.listportforwardingrulesresponse.portforwardingrule; + if (rules != null && rules.length > 0) { + disallowedActions.push('enableVPN'); + disallowedActions.push('enableStaticNAT'); + } + } + }); + + //4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. + $.ajax({ + url: createURL('listLoadBalancerRules'), + data: { + publicipid: ipObj.id, + listAll: true + }, + dataType: 'json', + async: false, + success: function(json) { + var rules = json.listloadbalancerrulesresponse.loadbalancerrule; + if (rules != null && rules.length > 0) { + disallowedActions.push('enableVPN'); + disallowedActions.push('enableStaticNAT'); + } + } + }); + } + } + + if (ipObj.networkOfferingHavingVpnService == true) { + if (ipObj.vpnenabled) { + disallowedActions.push('enableVPN'); + } else { + disallowedActions.push('disableVPN'); + } + } else { //ipObj.networkOfferingHavingVpnService == false + disallowedActions.push('disableVPN'); + disallowedActions.push('enableVPN'); + } + } else { //***** VPC section > Configuration VPC > Router > Public IP Addresses ***** + if (ipObj.issourcenat) { //VPC sourceNAT IP: supports VPN + if (ipObj.vpnenabled) { + disallowedActions.push('enableVPN'); + } else { + disallowedActions.push('disableVPN'); + } + } else { //VPC non-sourceNAT IP: doesn't support VPN + disallowedActions.push('enableVPN'); + disallowedActions.push('disableVPN'); + } + } allowedActions = $.grep(allowedActions, function(item) { return $.inArray(item, disallowedActions) == -1; @@ -437,7 +437,7 @@ }, createForm: { - title: 'Add Isolated Guest Network with SourceNat', + title: 'label.add.isolated.guest.network.with.sourcenat', fields: { name: { label: 'label.name', @@ -487,44 +487,44 @@ }, dependsOn: 'zoneId', docID: 'helpGuestNetworkNetworkOffering', - select: function(args) { + select: function(args) { var data = { - zoneid: args.zoneId, + zoneid: args.zoneId, guestiptype: 'Isolated', supportedServices: 'SourceNat', state: 'Enabled' }; - - if ('vpc' in args.context) { //from VPC section - $.extend(data, { - forVpc: true - }); + + if ('vpc' in args.context) { //from VPC section + $.extend(data, { + forVpc: true + }); } else { //from guest network section - var vpcs; - $.ajax({ + var vpcs; + $.ajax({ url: createURL('listVPCs'), data: { listAll: true }, async: false, - success: function(json) { - vpcs = json.listvpcsresponse.vpc; + success: function(json) { + vpcs = json.listvpcsresponse.vpc; } - }); + }); if (vpcs == null || vpcs.length == 0) { //if there is no VPC in the system - $.extend(data, { - forVpc: false - }); + $.extend(data, { + forVpc: false + }); } } - if(!isAdmin()) { //normal user is not aware of the VLANs in the system, so normal user is not allowed to create network with network offerings whose specifyvlan = true - $.extend(data, { - specifyvlan: false - }); + if(!isAdmin()) { //normal user is not aware of the VLANs in the system, so normal user is not allowed to create network with network offerings whose specifyvlan = true + $.extend(data, { + specifyvlan: false + }); } - + $.ajax({ url: createURL('listNetworkOfferings'), data: data, @@ -554,7 +554,7 @@ }) }); } - }); + }); } }, @@ -952,7 +952,7 @@ if (args.context.networks[0].type == "Isolated") { //Isolated network cloudStack.dialog.confirm({ message: 'message.confirm.current.guest.CIDR.unchanged', - action: function() { //"Yes" button is clicked + action: function() { //"Yes" button is clicked $.extend(data, { changecidr: false }); @@ -1090,7 +1090,7 @@ confirm: function(args) { return 'message.action.delete.network'; }, - isWarning: true, + isWarning: true, notification: function(args) { return 'label.action.delete.network'; } @@ -1124,8 +1124,8 @@ var isAdvancedSGZone = false; var hiddenTabs = []; var isSharedNetwork; - - var thisNetwork = args.context.networks[0]; + + var thisNetwork = args.context.networks[0]; if (thisNetwork.vpcid != null) { isVPC = true; } @@ -1157,7 +1157,7 @@ return true; }); } - }); + }); // Get zone data $.ajax({ @@ -1261,7 +1261,7 @@ return _l('label.na'); } }, - + ispersistent: { label: 'label.persistent', converter: cloudStack.converters.toBooleanText @@ -1279,11 +1279,11 @@ vlan: { label: 'label.vnet.id' }, - + broadcasturi: { - label: 'label.broadcasturi' + label: 'label.broadcasturi' }, - + networkofferingid: { label: 'label.network.offering', isEditable: true, @@ -1317,13 +1317,13 @@ }); } }); - + //include currently selected network offeirng to dropdown items.push({ id: args.context.networks[0].networkofferingid, description: args.context.networks[0].networkofferingdisplaytext - }); - + }); + args.response.success({ data: items }); @@ -1390,13 +1390,13 @@ async: true, success: function(json) { var jsonObj = json.listnetworksresponse.network[0]; - addExtraPropertiesToGuestNetworkObject(jsonObj); - + addExtraPropertiesToGuestNetworkObject(jsonObj); + $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', { - obj: jsonObj, - objType: "Network" + obj: jsonObj, + objType: "Network" }); - + args.response.success({ actionFilter: cloudStack.actionFilter.guestNetwork, data: jsonObj @@ -1410,6 +1410,7 @@ title: 'label.egress.rules', custom: function(args) { var context = args.context; + var isConfigRulesMsgShown = false; return $('
').multiEdit({ context: context, @@ -1612,6 +1613,34 @@ }); } }); + + if (!isConfigRulesMsgShown) { + isConfigRulesMsgShown = true; + $.ajax({ + url: createURL('listNetworkOfferings'), + data: { + id: args.context.networks[0].networkofferingid + }, + dataType: 'json', + async: true, + success: function(json) { + var response = json.listnetworkofferingsresponse.networkoffering ? + json.listnetworkofferingsresponse.networkoffering[0] : null; + + if (response != null) { + if (response.egressdefaultpolicy == true) { + cloudStack.dialog.notice({ + message: _l('message.configure.firewall.rules.block.traffic') + }); + } else { + cloudStack.dialog.notice({ + message: _l('message.configure.firewall.rules.allow.traffic') + }); + } + } + } + }); + } } }); } @@ -1732,8 +1761,8 @@ addButton: true }, 'state' : { - edit: 'ignore', - label: 'label.state' + edit: 'ignore', + label: 'label.state' } }, @@ -2094,8 +2123,8 @@ $.ajax({ url: createURL('listZones'), data: dataObj, - // id: args.context.networks[0].zoneid - // }, + // id: args.context.networks[0].zoneid + // }, async: false, success: function(json) { zoneObj = json.listzonesresponse.zone[0]; @@ -2108,35 +2137,35 @@ if (zoneObj.networktype == 'Basic') { var havingEIP = false, - havingELB = false; - + havingELB = false; + var services = args.context.networks[0].service; if(services != null) { - for(var i = 0; i < services.length; i++) { - var thisService = services[i]; - var capabilities = thisService.capability; - if (thisService.name == "StaticNat") { - if(capabilities != null) { - for(var k = 0; k < capabilities.length; k++) { - if (capabilities[k].name == "ElasticIp" && capabilities[k].value == "true") { + for(var i = 0; i < services.length; i++) { + var thisService = services[i]; + var capabilities = thisService.capability; + if (thisService.name == "StaticNat") { + if(capabilities != null) { + for(var k = 0; k < capabilities.length; k++) { + if (capabilities[k].name == "ElasticIp" && capabilities[k].value == "true") { havingEIP = true; - break; + break; } - } - } + } + } } else if (thisService.name == "Lb") { - if(capabilities != null) { - for(var k = 0; k < capabilities.length; k++) { - if (capabilities[k].name == "ElasticLb" && capabilities[k].value == "true") { - havingELB = true; - break; + if(capabilities != null) { + for(var k = 0; k < capabilities.length; k++) { + if (capabilities[k].name == "ElasticLb" && capabilities[k].value == "true") { + havingELB = true; + break; } - } - } - } - } + } + } + } + } } - + if (havingEIP != true || havingELB != true) { //not EIP-ELB return false; //acquire new IP is not allowed in non-EIP-ELB basic zone } @@ -2155,7 +2184,7 @@ return true; //VPC section, show Acquire IP button } }, - messages: { + messages: { notification: function(args) { return 'label.acquire.new.ip'; } @@ -2163,29 +2192,29 @@ createForm: { title: 'label.acquire.new.ip', desc: 'Please confirm that you want to acquire new IP', - preFilter: function(args) { - $.ajax({ - url: createURL('listRegions'), - success: function(json) { - var selectedRegionName = $(".region-switcher .title").text(); - if ( selectedRegionName == undefined || selectedRegionName.length == 0) { - selectedRegionName = "Local"; - } - var items = json.listregionsresponse.region; - if(items != null) { - for(var i = 0; i < items.length; i++) { - if(items[i].name == selectedRegionName) { - if(items[i].portableipserviceenabled == true) { - args.$form.find('.form-item[rel=isportable]').css('display', 'inline-block'); - } else { - args.$form.find('.form-item[rel=isportable]').hide(); - } - break; - } - } - } - } - }); + preFilter: function(args) { + $.ajax({ + url: createURL('listRegions'), + success: function(json) { + var selectedRegionName = $(".region-switcher .title").text(); + if ( selectedRegionName == undefined || selectedRegionName.length == 0) { + selectedRegionName = "Local"; + } + var items = json.listregionsresponse.region; + if(items != null) { + for(var i = 0; i < items.length; i++) { + if(items[i].name == selectedRegionName) { + if(items[i].portableipserviceenabled == true) { + args.$form.find('.form-item[rel=isportable]').css('display', 'inline-block'); + } else { + args.$form.find('.form-item[rel=isportable]').hide(); + } + break; + } + } + } + } + }); }, fields: { isportable: { @@ -2209,13 +2238,13 @@ } }, action: function(args) { - var dataObj = {}; - if (args.$form.find('.form-item[rel=isportable]').css("display") != "none") { - $.extend(dataObj, { - isportable: args.data.isportable - }); - } - + var dataObj = {}; + if (args.$form.find('.form-item[rel=isportable]').css("display") != "none") { + $.extend(dataObj, { + isportable: args.data.isportable + }); + } + if ('vpc' in args.context) { //from VPC section $.extend(dataObj, { vpcid: args.context.vpc[0].id @@ -2266,9 +2295,9 @@ }, dataProvider: function(args) { - var items = []; - var data = {}; - listViewDataProvider(args, data); + var items = []; + var data = {}; + listViewDataProvider(args, data); if (args.context.networks) { $.extend(data, { associatedNetworkId: args.context.networks[0].id @@ -2278,8 +2307,8 @@ $.extend(data, { vpcid: args.context.vpc[0].id }); - } - + } + $.ajax({ url: createURL('listPublicIpAddresses'), data: $.extend({}, data, { @@ -2288,48 +2317,48 @@ dataType: "json", async: false, success: function(json) { - var ips = json.listpublicipaddressesresponse.publicipaddress; + var ips = json.listpublicipaddressesresponse.publicipaddress; if(ips != null) { - for(var i = 0; i < ips.length; i++) { - getExtaPropertiesForIpObj(ips[i], args); - items.push(ips[i]); - } - } + for(var i = 0; i < ips.length; i++) { + getExtaPropertiesForIpObj(ips[i], args); + items.push(ips[i]); + } + } } }); - - if (g_supportELB == "guest") { - $.ajax({ - url: createURL('listPublicIpAddresses'), - data: $.extend({}, data, { - forvirtualnetwork: false, // ELB IPs are allocated on guest network - forloadbalancing: true - }), - dataType: "json", - async: false, - success: function(json) { - var ips = json.listpublicipaddressesresponse.publicipaddress; - if(ips != null) { - for(var i = 0; i < ips.length; i++) { - getExtaPropertiesForIpObj(ips[i], args); - items.push(ips[i]); - } - } - } - }); + + if (g_supportELB == "guest") { + $.ajax({ + url: createURL('listPublicIpAddresses'), + data: $.extend({}, data, { + forvirtualnetwork: false, // ELB IPs are allocated on guest network + forloadbalancing: true + }), + dataType: "json", + async: false, + success: function(json) { + var ips = json.listpublicipaddressesresponse.publicipaddress; + if(ips != null) { + for(var i = 0; i < ips.length; i++) { + getExtaPropertiesForIpObj(ips[i], args); + items.push(ips[i]); + } + } + } + }); } - + args.response.success({ actionFilter: actionFilters.ipAddress, data: items - }); + }); }, // Detail view detailView: { name: 'IP address detail', tabFilter: function(args) { - var item = args.context.ipAddresses[0]; + var item = args.context.ipAddresses[0]; var disabledTabs = []; var ipAddress = args.context.ipAddresses[0]; @@ -2351,15 +2380,15 @@ if (ipAddress.vpcid != null && ipAddress.issourcenat) { //don't show Configuration(ipRules) tab on VPC sourceNAT IP disableIpRules = true; } - + if (('vpc' in args.context) == false && ipAddress.vpcid != null) { //from Guest Network section, don't show Configuration(ipRules) tab on VPC IP disableIpRules = true; } - if (disableVpn) - disabledTabs.push('vpn'); - if (disableIpRules) - disabledTabs.push('ipRules'); + if (disableVpn) + disabledTabs.push('vpn'); + if (disableIpRules) + disabledTabs.push('ipRules'); return disabledTabs; }, @@ -2379,12 +2408,12 @@ success: function(data) { args.response.success({ _custom: { - getUpdatedItem: function(json) { - var vpnenabledAndRunning = false; - if (json.queryasyncjobresultresponse.jobresult.remoteaccessvpn.state == "Running") { - vpnenabledAndRunning = true; - } - + getUpdatedItem: function(json) { + var vpnenabledAndRunning = false; + if (json.queryasyncjobresultresponse.jobresult.remoteaccessvpn.state == "Running") { + vpnenabledAndRunning = true; + } + return { remoteaccessvpn: json.queryasyncjobresultresponse.jobresult.remoteaccessvpn, vpnenabled: vpnenabledAndRunning @@ -2410,12 +2439,12 @@ return 'label.enable.vpn'; }, complete: function(args) { - var msg; - if (args.remoteaccessvpn.state == "Running") { - msg = _l('message.enabled.vpn') + ' ' + args.remoteaccessvpn.publicip + '.' + '
' + _l('message.enabled.vpn.ip.sec') + '
' + args.remoteaccessvpn.presharedkey; - } else { - msg = "Remote Access VPN configuration has been generated, but it failed to apply. Please check connectivity of the network element, then re-try."; - } + var msg; + if (args.remoteaccessvpn.state == "Running") { + msg = _l('message.enabled.vpn') + ' ' + args.remoteaccessvpn.publicip + '.' + '
' + _l('message.enabled.vpn.ip.sec') + '
' + args.remoteaccessvpn.presharedkey; + } else { + msg = _l('message.network.remote.access.vpn.configuration'); + } return msg; } }, @@ -2797,10 +2826,10 @@ }, associatednetworkid: { label: 'label.associated.network.id' - }, + }, associatednetworkname: { label: 'label.network.name' - }, + }, state: { label: 'label.state' }, @@ -2896,20 +2925,20 @@ if (!('vpc' in args.context)) { //from Guest Network section var services = args.context.networks[0].service; if(services != null) { - for(var i = 0; i < services.length; i++) { - var thisService = services[i]; - if (thisService.name == "Firewall") + for(var i = 0; i < services.length; i++) { + var thisService = services[i]; + if (thisService.name == "Firewall") havingFirewallService = true; if (thisService.name == "PortForwarding") havingPortForwardingService = true; if (thisService.name == "Lb") havingLbService = true; if (thisService.name == "Vpn") - havingVpnService = true; - } - } + havingVpnService = true; + } + } } else { //from VPC section - //a VPC network from Guest Network section or from VPC section + //a VPC network from Guest Network section or from VPC section // Firewall is not supported in IP from VPC section // (because ACL has already supported in tier from VPC section) havingFirewallService = false; @@ -2929,21 +2958,21 @@ }, async: false, success: function(json) { - var networkObj = json.listnetworksresponse.network[0]; + var networkObj = json.listnetworksresponse.network[0]; var services = networkObj.service; if(services != null) { - for(var i = 0; i < services.length; i++) { - if (services[i].name == "PortForwarding") + for(var i = 0; i < services.length; i++) { + if (services[i].name == "PortForwarding") havingPortForwardingService = true; if (services[i].name == "Lb") havingLbService = true; - } - } - + } + } + if (networkObj.networkofferingconservemode == false) { /* - (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added. - */ + (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added. + */ if (args.context.ipAddresses[0].issourcenat) { if (havingFirewallService == false) { //firewall is not supported in IP from VPC section (because ACL has already supported in tier from VPC section) disallowedActions.push("firewall"); @@ -2954,12 +2983,12 @@ } /* - (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer at first. - 1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. - 2. If VPN service is supported (i.e. IP comes from Guest Network section, not from VPC section), once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. - 3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. - 4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. - */ + (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer at first. + 1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer. + 2. If VPN service is supported (i.e. IP comes from Guest Network section, not from VPC section), once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer. + 3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer. + 4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding. + */ else { //args.context.ipAddresses[0].issourcenat == false if (havingFirewallService == false) disallowedActions.push("firewall"); @@ -3012,11 +3041,11 @@ } }); } - } + } } }); } - } + } return disallowedActions; }, @@ -3103,8 +3132,8 @@ addButton: true }, 'state' : { - edit: 'ignore', - label: 'label.state' + edit: 'ignore', + label: 'label.state' } }, @@ -3368,28 +3397,28 @@ } }, filters: false, - - //when server-side change of adding new parameter "vmidipmap" to assignToLoadBalancerRule API is in, uncomment the following commented 4 lines. + + //when server-side change of adding new parameter "vmidipmap" to assignToLoadBalancerRule API is in, uncomment the following commented 4 lines. subselect: { isMultiple: true, label: 'label.use.vm.ips', - dataProvider: multipleVmSecondaryIPSubselect + dataProvider: multipleVmSecondaryIPSubselect }, - - dataProvider: function(args) { - var itemData = $.isArray(args.context.multiRule) && args.context.subItemData ? args.context.subItemData : []; - var data = {}; + dataProvider: function(args) { + var itemData = $.isArray(args.context.multiRule) && args.context.subItemData ? args.context.subItemData : []; + + var data = {}; listViewDataProvider(args, data); - + var networkid; if ('vpc' in args.context) { networkid = args.context.multiData.tier; } else { networkid = args.context.ipAddresses[0].associatednetworkid; } - $.extend(data, { - networkid: networkid + $.extend(data, { + networkid: networkid }); if (!args.context.projects) { @@ -3520,7 +3549,7 @@ } }, multipleAdd: true, - + fields: { 'name': { edit: true, @@ -3587,45 +3616,45 @@ buttonLabel: 'label.configure', action: cloudStack.uiCustom.autoscaler(cloudStack.autoscaler) }, - isHidden: function(args) { - if (!('vpc' in args.context)) { //from Guest Network section - var lbProviderIsNetscaler = false; - $.ajax({ - url: createURL('listNetworkOfferings'), - data: { - id: args.context.networks[0].networkofferingid - }, - async: false, - success: function(json) { - var networkOffering = json.listnetworkofferingsresponse.networkoffering[0]; - var services = networkOffering.service; - if (services != null) { - for (var i = 0; i < services.length; i++) { - if (services[i].name == 'Lb') { - var providers = services[i].provider; - if (providers != null) { - for (var k = 0; k < providers.length; k++) { - if (providers[k].name == 'Netscaler') { - lbProviderIsNetscaler = true; - break; - } - } - } - break; - } - } - } - } - }); - if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter) - return false; //show AutoScale button - } else { - return 2; //hide Autoscale button (both header and form) - } + isHidden: function(args) { + if (!('vpc' in args.context)) { //from Guest Network section + var lbProviderIsNetscaler = false; + $.ajax({ + url: createURL('listNetworkOfferings'), + data: { + id: args.context.networks[0].networkofferingid + }, + async: false, + success: function(json) { + var networkOffering = json.listnetworkofferingsresponse.networkoffering[0]; + var services = networkOffering.service; + if (services != null) { + for (var i = 0; i < services.length; i++) { + if (services[i].name == 'Lb') { + var providers = services[i].provider; + if (providers != null) { + for (var k = 0; k < providers.length; k++) { + if (providers[k].name == 'Netscaler') { + lbProviderIsNetscaler = true; + break; + } + } + } + break; + } + } + } + } + }); + if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter) + return false; //show AutoScale button + } else { + return 2; //hide Autoscale button (both header and form) + } } else { //from VPC section - //VPC doesn't support autoscale - return 2; - } + //VPC doesn't support autoscale + return 2; + } } }, @@ -3633,10 +3662,10 @@ label: 'label.add.vms', addButton: true }, - + 'state' : { - edit: 'ignore', - label: 'label.state' + edit: 'ignore', + label: 'label.state' } }, @@ -3669,7 +3698,7 @@ }; var stickyData = $.extend(true, {}, args.data.sticky); - + //***** create new LB rule > Add VMs ***** $.ajax({ url: createURL('createLoadBalancerRule'), @@ -3680,52 +3709,52 @@ var itemData = args.itemData; var jobID = data.createloadbalancerruleresponse.jobid; var lbID = data.createloadbalancerruleresponse.id; - + var inputData = { - id: data.createloadbalancerruleresponse.id - }; - + id: data.createloadbalancerruleresponse.id + }; + /* var inputData = { id: data.createloadbalancerruleresponse.id, virtualmachineids: $.map(itemData, function(elem) { return elem.id; }).join(',') - }; - */ + }; + */ //virtualmachineids parameter has been replaced with vmidipmap parameter, so comment out the 6 lines above. - - - /* + + + /* * e.g. first VM(xxx) has two IPs(10.1.1.~), second VM(yyy) has three IPs(10.2.2.~): - * vmidipmap[0].vmid=xxx vmidipmap[0].vmip=10.1.1.11 - * vmidipmap[1].vmid=xxx vmidipmap[1].vmip=10.1.1.12 - * vmidipmap[2].vmid=yyy vmidipmap[2].vmip=10.2.2.77 - * vmidipmap[3].vmid=yyy vmidipmap[3].vmip=10.2.2.78 - * vmidipmap[4].vmid=yyy vmidipmap[4].vmip=10.2.2.79 + * vmidipmap[0].vmid=xxx vmidipmap[0].vmip=10.1.1.11 + * vmidipmap[1].vmid=xxx vmidipmap[1].vmip=10.1.1.12 + * vmidipmap[2].vmid=yyy vmidipmap[2].vmip=10.2.2.77 + * vmidipmap[3].vmid=yyy vmidipmap[3].vmip=10.2.2.78 + * vmidipmap[4].vmid=yyy vmidipmap[4].vmip=10.2.2.79 */ var selectedVMs = args.itemData; if (selectedVMs != null) { - var vmidipmapIndex = 0; - for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) { - var selectedIPs = selectedVMs[vmIndex]._subselect; - for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) { - inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id; - - if (args.context.ipAddresses[0].isportable) { - inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1]; - } else { - inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex]; - } - - vmidipmapIndex++; - } - } - } - + var vmidipmapIndex = 0; + for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) { + var selectedIPs = selectedVMs[vmIndex]._subselect; + for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) { + inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id; + + if (args.context.ipAddresses[0].isportable) { + inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1]; + } else { + inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex]; + } + + vmidipmapIndex++; + } + } + } + $.ajax({ url: createURL('assignToLoadBalancerRule'), - data: inputData, + data: inputData, success: function(data) { var jobID = data.assigntoloadbalancerruleresponse.jobid; var lbStickyCreated = false; @@ -3832,41 +3861,41 @@ }, itemActions: { - //***** update existing LB rule > Add VMs ***** - add: { + //***** update existing LB rule > Add VMs ***** + add: { label: 'label.add.vms.to.lb', action: function(args) { var inputData = { - id: args.multiRule.id - }; - - /* + id: args.multiRule.id + }; + + /* * e.g. first VM(xxx) has two IPs(10.1.1.~), second VM(yyy) has three IPs(10.2.2.~): - * vmidipmap[0].vmid=xxx vmidipmap[0].vmip=10.1.1.11 - * vmidipmap[1].vmid=xxx vmidipmap[1].vmip=10.1.1.12 - * vmidipmap[2].vmid=yyy vmidipmap[2].vmip=10.2.2.77 - * vmidipmap[3].vmid=yyy vmidipmap[3].vmip=10.2.2.78 - * vmidipmap[4].vmid=yyy vmidipmap[4].vmip=10.2.2.79 + * vmidipmap[0].vmid=xxx vmidipmap[0].vmip=10.1.1.11 + * vmidipmap[1].vmid=xxx vmidipmap[1].vmip=10.1.1.12 + * vmidipmap[2].vmid=yyy vmidipmap[2].vmip=10.2.2.77 + * vmidipmap[3].vmid=yyy vmidipmap[3].vmip=10.2.2.78 + * vmidipmap[4].vmid=yyy vmidipmap[4].vmip=10.2.2.79 */ var selectedVMs = args.data; if (selectedVMs != null) { - var vmidipmapIndex = 0; - for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) { - var selectedIPs = selectedVMs[vmIndex]._subselect; - for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) { - inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id; - - if (args.context.ipAddresses[0].isportable) { - inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1]; - } else { - inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex]; - } - - vmidipmapIndex++; - } - } - } - + var vmidipmapIndex = 0; + for (var vmIndex = 0; vmIndex < selectedVMs.length; vmIndex++) { + var selectedIPs = selectedVMs[vmIndex]._subselect; + for (var ipIndex = 0; ipIndex < selectedIPs.length; ipIndex++) { + inputData['vmidipmap[' + vmidipmapIndex + '].vmid'] = selectedVMs[vmIndex].id; + + if (args.context.ipAddresses[0].isportable) { + inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex].split(',')[1]; + } else { + inputData['vmidipmap[' + vmidipmapIndex + '].vmip'] = selectedIPs[ipIndex]; + } + + vmidipmapIndex++; + } + } + } + $.ajax({ url: createURL('assignToLoadBalancerRule'), data: inputData, @@ -3892,21 +3921,21 @@ }, destroy: { label: 'label.remove.vm.from.lb', - action: function(args) { - var inputData; - if (args.item.itemIp == undefined) { - inputData = { + action: function(args) { + var inputData; + if (args.item.itemIp == undefined) { + inputData = { id: args.multiRule.id, virtualmachineids: args.item.id }; - } else { - inputData = { + } else { + inputData = { id: args.multiRule.id, "vmidipmap[0].vmid": args.item.id, - "vmidipmap[0].vmip": args.item.itemIp - }; - } - + "vmidipmap[0].vmip": args.item.itemIp + }; + } + $.ajax({ url: createURL('removeFromLoadBalancerRule'), data: inputData, @@ -3943,12 +3972,12 @@ dataType: 'json', async: true, success: function(data) { - var loadbalancerrules = data.listloadbalancerrulesresponse.loadbalancerrule; - - $(loadbalancerrules).each(function() { + var loadbalancerrules = data.listloadbalancerrulesresponse.loadbalancerrule; + + $(loadbalancerrules).each(function() { var lbRule = this; var stickyData = {}; - + //var lbInstances = []; var itemData = []; @@ -4017,19 +4046,19 @@ data: { listAll: true, lbvmips: true, - id: lbRule.id + id: lbRule.id }, success: function(data) { - //when "lbvmips: true" is not passed to API - //lbVMs = data.listloadbalancerruleinstancesresponse.loadbalancerruleinstance; - - //when "lbvmips: true" is passed to API - lbrulevmidips = data.listloadbalancerruleinstancesresponse.lbrulevmidip; - + //when "lbvmips: true" is not passed to API + //lbVMs = data.listloadbalancerruleinstancesresponse.loadbalancerruleinstance; + + //when "lbvmips: true" is passed to API + lbrulevmidips = data.listloadbalancerruleinstancesresponse.lbrulevmidip; + if (lbrulevmidips != null) { - for (var k = 0; k < lbrulevmidips.length; k++) { - var lbrulevmidip = lbrulevmidips[k]; - var lbVM = lbrulevmidip.loadbalancerruleinstance; + for (var k = 0; k < lbrulevmidips.length; k++) { + var lbrulevmidip = lbrulevmidips[k]; + var lbVM = lbrulevmidip.loadbalancerruleinstance; if (lbVM.displayname.indexOf('AutoScale-LB-') > -1) //autoscale VM is not allowed to be deleted manually. So, hide destroy button lbVM._hideActions = ['destroy']; @@ -4037,24 +4066,24 @@ lbVM._itemStateLabel = 'label.service.state'; lbVM._itemState = lbVM.servicestate; } - + if (lbrulevmidip.lbvmipaddresses != null) { - for (var m = 0 ; m < lbrulevmidip.lbvmipaddresses.length; m++) { - var ip = lbrulevmidip.lbvmipaddresses[m]; - itemData.push($.extend({}, lbVM, { - itemIp: ip - })); - } + for (var m = 0 ; m < lbrulevmidip.lbvmipaddresses.length; m++) { + var ip = lbrulevmidip.lbvmipaddresses[m]; + itemData.push($.extend({}, lbVM, { + itemIp: ip + })); + } } else { - itemData.push(lbVM); - } - } - } + itemData.push(lbVM); + } + } + } }, error: function(data) { args.response.error(parseXMLHttpResponse(data)); } - }); + }); $.extend(lbRule, { _itemName: 'name', @@ -4158,18 +4187,18 @@ dataProvider: singleVmSecondaryIPSubselect }, dataProvider: function(args) { - var data = {}; + var data = {}; listViewDataProvider(args, data); - - var networkid; + + var networkid; if ('vpc' in args.context) { networkid = args.context.multiData.tier; } else { networkid = args.context.ipAddresses[0].associatednetworkid; - } + } $.extend(data, { - networkid: networkid - }); + networkid: networkid + }); if (!args.context.projects) { $.extend(data, { @@ -4233,8 +4262,8 @@ } }, 'state' : { - edit: 'ignore', - label: 'label.state' + edit: 'ignore', + label: 'label.state' }, 'add-vm': { label: 'label.add.vm', @@ -4261,7 +4290,7 @@ virtualmachineid: args.itemData[0].id, openfirewall: false }; - + if (args.context.ipAddresses[0].isportable) { var subselect = args.itemData[0]._subselect.split(','); //var networkid = subselect[0]; @@ -4274,7 +4303,7 @@ } } else if (args.itemData[0]._subselect && args.itemData[0]._subselect != -1) { data.vmguestip = args.itemData[0]._subselect; - } + } if ('vpc' in args.context) { //from VPC section if (args.data.tier == null) { @@ -4297,7 +4326,7 @@ args.response.success({ _custom: { jobId: data.createportforwardingruleresponse.jobid, - getUpdatedItem: function(json) { + getUpdatedItem: function(json) { return json.queryasyncjobresultresponse.jobresult.portforwardingrule; } }, @@ -4378,16 +4407,16 @@ success: function(data) { loadCurrent++; var vms = data.listvirtualmachinesresponse.virtualmachine; - + //if this VM is destroyed, data.listvirtualmachinesresponse.virtualmachine will be undefined for regular-user (CLOUDSTACK-3195) - if (vms == undefined) { - vms = [{ + if (vms == undefined) { + vms = [{ "id": item.virtualmachineid, "name": item.virtualmachinename, "displayname": item.virtualmachinedisplayname - }]; - } - + }]; + } + $.extend(item, { _itemData: $.map(vms, function(vm) { return $.extend(vm, { @@ -4446,7 +4475,7 @@ }) }, vpn: { - title: 'VPN', + title: 'label.vpn', custom: function(args) { var ipAddress = args.context.ipAddresses[0].ipaddress; var psk = ""; @@ -4620,7 +4649,7 @@ messages: { confirm: function(args) { - return 'Are you sure you want to add ' + args.name + '?'; + return _l('message.question.are.you.sure.you.want.to.add') + ' ' + args.name + '?'; }, notification: function(args) { return 'label.add.security.group'; @@ -5550,52 +5579,52 @@ restart: { label: 'label.restart.vpc', createForm: { - title: 'label.restart.vpc', - desc: function(args) { - if (Boolean(args.context.vpc[0].redundantvpcrouter)) { - return 'message.restart.vpc'; - } else { - return 'message.restart.vpc.remark'; - } - }, - - preFilter: function(args) { - var zoneObj; - $.ajax({ - url: createURL("listZones&id=" + args.context.vpc[0].zoneid), - dataType: "json", - async: false, - success: function(json) { - zoneObj = json.listzonesresponse.zone[0]; - } - }); - - - args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked - args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown - args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked - args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown - - if (Boolean(args.context.vpc[0].redundantvpcrouter)) { - args.$form.find('.form-item[rel=makeredundant]').hide(); - } else { - args.$form.find('.form-item[rel=makeredundant]').show(); - } - }, - fields: { - cleanup: { - label: 'label.clean.up', - isBoolean: true - }, - makeredundant: { - label: 'label.make.redundant', - isBoolean: true - } - } - }, + title: 'label.restart.vpc', + desc: function(args) { + if (Boolean(args.context.vpc[0].redundantvpcrouter)) { + return 'message.restart.vpc'; + } else { + return 'message.restart.vpc.remark'; + } + }, + + preFilter: function(args) { + var zoneObj; + $.ajax({ + url: createURL("listZones&id=" + args.context.vpc[0].zoneid), + dataType: "json", + async: false, + success: function(json) { + zoneObj = json.listzonesresponse.zone[0]; + } + }); + + + args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked + args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown + args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked + args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown + + if (Boolean(args.context.vpc[0].redundantvpcrouter)) { + args.$form.find('.form-item[rel=makeredundant]').hide(); + } else { + args.$form.find('.form-item[rel=makeredundant]').show(); + } + }, + fields: { + cleanup: { + label: 'label.clean.up', + isBoolean: true + }, + makeredundant: { + label: 'label.make.redundant', + isBoolean: true + } + } + }, messages: { confirm: function(args) { - return 'message.restart.vpc'; + return 'message.restart.vpc'; }, notification: function(args) { return 'label.restart.vpc'; @@ -5763,7 +5792,7 @@ } }, router: { - title: 'VPC Router Details', + title: 'label.vpc.router.details', fields: [{ name: { label: 'label.name' @@ -6479,57 +6508,57 @@ } }; - function getExtaPropertiesForIpObj(ipObj, args) { - if (!('vpc' in args.context)) { //***** Guest Network section > Guest Network page > IP Address page ***** - var services = args.context.networks[0].service; - if(services != null) { - for(var i = 0; i < services.length; i++) { - var thisService = services[i]; - if (thisService.name == "Vpn") { - ipObj.networkOfferingHavingVpnService = true; - break; - } - } - } - if (ipObj.networkOfferingHavingVpnService == true) { - $.ajax({ - url: createURL('listRemoteAccessVpns'), - data: { - listAll: true, - publicipid: ipObj.id - }, - async: false, - success: function(vpnResponse) { - var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count; - if (isVPNEnabled) { - ipObj.vpnenabled = true; - ipObj.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0]; - } else { - ipObj.vpnenabled = false; - } - } - }); - } - } else { //***** VPC section > Configuration VPC > Router > Public IP Addresses ***** - if (ipObj.issourcenat) { //VPC sourceNAT IP: supports VPN - $.ajax({ - url: createURL('listRemoteAccessVpns'), - data: { - listAll: true, - publicipid: ipObj.id - }, - async: false, - success: function(vpnResponse) { - var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count; - if (isVPNEnabled) { - ipObj.vpnenabled = true; - ipObj.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0]; - } else { - ipObj.vpnenabled = false; - } - } - }); - } + function getExtaPropertiesForIpObj(ipObj, args) { + if (!('vpc' in args.context)) { //***** Guest Network section > Guest Network page > IP Address page ***** + var services = args.context.networks[0].service; + if(services != null) { + for(var i = 0; i < services.length; i++) { + var thisService = services[i]; + if (thisService.name == "Vpn") { + ipObj.networkOfferingHavingVpnService = true; + break; + } + } + } + if (ipObj.networkOfferingHavingVpnService == true) { + $.ajax({ + url: createURL('listRemoteAccessVpns'), + data: { + listAll: true, + publicipid: ipObj.id + }, + async: false, + success: function(vpnResponse) { + var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count; + if (isVPNEnabled) { + ipObj.vpnenabled = true; + ipObj.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0]; + } else { + ipObj.vpnenabled = false; + } + } + }); + } + } else { //***** VPC section > Configuration VPC > Router > Public IP Addresses ***** + if (ipObj.issourcenat) { //VPC sourceNAT IP: supports VPN + $.ajax({ + url: createURL('listRemoteAccessVpns'), + data: { + listAll: true, + publicipid: ipObj.id + }, + async: false, + success: function(vpnResponse) { + var isVPNEnabled = vpnResponse.listremoteaccessvpnsresponse.count; + if (isVPNEnabled) { + ipObj.vpnenabled = true; + ipObj.remoteaccessvpn = vpnResponse.listremoteaccessvpnsresponse.remoteaccessvpn[0]; + } else { + ipObj.vpnenabled = false; + } + } + }); + } } }; diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js index 86e4f88b052..f980f21ac61 100644 --- a/ui/scripts/projects.js +++ b/ui/scripts/projects.js @@ -621,48 +621,48 @@ }, // Project listing data provider - dataProvider: function(args) { + dataProvider: function(args) { var user = args.context.users[0]; var data1 = { accountId: user.userid, listAll: true }; if (args.projectName) { - data1.keyword = args.projectName; + data1.keyword = args.projectName; } var array1 = []; - var page = 1; - var getNextPage = function() { - var data2 = $.extend({}, data1, { - page: page, - pageSize: 500 - }); - - $.ajax({ - url: createURL('listProjects', { - ignoreProject: true - }), - data: data2, - async: false, - success: function(json) { - var projects = json.listprojectsresponse.project; - if (projects != undefined) { - for(var i = 0; i < projects.length; i++) { - array1.push($.extend(projects[i], { - displayText: projects[i].displaytext - })); - } - } - if (array1.length < json.listprojectsresponse.count) { - page++; - getNextPage(); - } - } - }); + var page = 1; + var getNextPage = function() { + var data2 = $.extend({}, data1, { + page: page, + pageSize: 500 + }); + + $.ajax({ + url: createURL('listProjects', { + ignoreProject: true + }), + data: data2, + async: false, + success: function(json) { + var projects = json.listprojectsresponse.project; + if (projects != undefined) { + for(var i = 0; i < projects.length; i++) { + array1.push($.extend(projects[i], { + displayText: projects[i].displaytext + })); + } + } + if (array1.length < json.listprojectsresponse.count) { + page++; + getNextPage(); + } + } + }); } - getNextPage(); - args.response.success({ data: array1 }); + getNextPage(); + args.response.success({ data: array1 }); } }; diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js index f7cb8fdaeed..44530548c47 100644 --- a/ui/scripts/regions.js +++ b/ui/scripts/regions.js @@ -196,16 +196,6 @@ preAction: function(args) { var region = args.context.regions[0]; - /* e.g. - region.endpoint == "http://localhost:8080/client/" - document.location.href == "http://localhost:8080/client/#" - */ - /* - if(document.location.href.indexOf(region.endpoint) != -1) { - cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') }); - return false; - } - */ return true; }, action: function(args) { @@ -271,7 +261,7 @@ GSLB: { id: 'GSLB', type: 'select', - title: 'GSLB', + title: 'label.gslb', listView: { id: 'GSLB', label: 'label.gslb', @@ -481,33 +471,33 @@ path: 'regions.lbUnderGSLB', label: 'label.gslb.assigned.lb' }, - actions: { - edit: { + actions: { + edit: { label: 'label.edit', - action: function(args) { + action: function(args) { var data = { - id: args.context.GSLB[0].id, - description: args.data.description, - gslblbmethod: args.data.gslblbmethod - }; + id: args.context.GSLB[0].id, + description: args.data.description, + gslblbmethod: args.data.gslblbmethod + }; $.ajax({ url: createURL('updateGlobalLoadBalancerRule'), data: data, - success: function(json) { - var jid = json.updategloballoadbalancerruleresponse.jobid; + success: function(json) { + var jid = json.updategloballoadbalancerruleresponse.jobid; args.response.success({ _custom: { jobId: jid } - }); + }); } }); - }, + }, notification: { poll: pollAsyncJobResult } - }, - remove: { + }, + remove: { label: 'label.gslb.delete', messages: { confirm: function(args) { @@ -956,8 +946,8 @@ $.ajax({ url: createURL('removeFromGlobalLoadBalancerRule'), data: { - id: args.context.GSLB[0].id, - loadbalancerrulelist: args.context.lbUnderGSLB[0].id + id: args.context.GSLB[0].id, + loadbalancerrulelist: args.context.lbUnderGSLB[0].id }, success: function(json) { var jid = json.removefromloadbalancerruleresponse.jobid; diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 2dc19d94dcc..7b4b26a0ca2 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -30,6 +30,7 @@ var g_supportELB = null; var g_kvmsnapshotenabled = null; var g_regionsecondaryenabled = null; var g_userPublicTemplateEnabled = "true"; +var g_allowUserExpungeRecoverVm = "false"; var g_cloudstackversion = null; var g_queryAsyncJobResultInterval = 3000; var g_idpList = null; @@ -161,7 +162,7 @@ var pollAsyncJobResult = function(args) { }, error: function(XMLHttpResponse) { args.error({ - message: parseXMLHttpResponse(XMLHttpResponse) + message: parseXMLHttpResponse(XMLHttpResponse) }); } }); @@ -268,7 +269,7 @@ var addGuestNetworkDialog = { if (items != null) { for (var i = 0; i < items.length; i++) { if (items[i].networktype == 'Advanced') { - addGuestNetworkDialog.zoneObjs.push(items[i]); + addGuestNetworkDialog.zoneObjs.push(items[i]); } } } @@ -294,43 +295,43 @@ var addGuestNetworkDialog = { if ('physicalNetworks' in args.context) { //Infrastructure menu > zone detail > guest traffic type > network tab (only shown in advanced zone) > add guest network dialog addGuestNetworkDialog.physicalNetworkObjs = args.context.physicalNetworks; } else { //Network menu > guest network section > add guest network dialog - var selectedZoneId = args.$form.find('.form-item[rel=zoneId]').find('select').val(); + var selectedZoneId = args.$form.find('.form-item[rel=zoneId]').find('select').val(); if (selectedZoneId != undefined && selectedZoneId.length > 0) { - $.ajax({ - url: createURL('listPhysicalNetworks'), - data: { - zoneid: selectedZoneId - }, - async: false, - success: function(json) { - var items = []; - var physicalnetworks = json.listphysicalnetworksresponse.physicalnetwork; - if (physicalnetworks != null) { - for (var i = 0; i < physicalnetworks.length; i++) { - $.ajax({ - url: createURL('listTrafficTypes'), - data: { - physicalnetworkid: physicalnetworks[i].id - }, - async: false, - success: function(json) { - var traffictypes = json.listtraffictypesresponse.traffictype; - if (traffictypes != null) { - for (var k = 0; k < traffictypes.length; k++) { - if (traffictypes[k].traffictype == 'Guest') { - items.push(physicalnetworks[i]); - break; - } - } - } - } - }); - } - } - - addGuestNetworkDialog.physicalNetworkObjs = items; - } - }); + $.ajax({ + url: createURL('listPhysicalNetworks'), + data: { + zoneid: selectedZoneId + }, + async: false, + success: function(json) { + var items = []; + var physicalnetworks = json.listphysicalnetworksresponse.physicalnetwork; + if (physicalnetworks != null) { + for (var i = 0; i < physicalnetworks.length; i++) { + $.ajax({ + url: createURL('listTrafficTypes'), + data: { + physicalnetworkid: physicalnetworks[i].id + }, + async: false, + success: function(json) { + var traffictypes = json.listtraffictypesresponse.traffictype; + if (traffictypes != null) { + for (var k = 0; k < traffictypes.length; k++) { + if (traffictypes[k].traffictype == 'Guest') { + items.push(physicalnetworks[i]); + break; + } + } + } + } + }); + } + } + + addGuestNetworkDialog.physicalNetworkObjs = items; + } + }); } } var items = []; @@ -536,14 +537,14 @@ var addGuestNetworkDialog = { label: 'label.network.offering', docID: 'helpGuestNetworkZoneNetworkOffering', dependsOn: ['zoneId', 'physicalNetworkId', 'scope'], - select: function(args) { - if(args.$form.find('.form-item[rel=zoneId]').find('select').val() == null || args.$form.find('.form-item[rel=zoneId]').find('select').val().length == 0) { - args.response.success({ + select: function(args) { + if(args.$form.find('.form-item[rel=zoneId]').find('select').val() == null || args.$form.find('.form-item[rel=zoneId]').find('select').val().length == 0) { + args.response.success({ data: null }); - return; - } - + return; + } + var data = { state: 'Enabled', zoneid: args.$form.find('.form-item[rel=zoneId]').find('select').val() @@ -975,9 +976,9 @@ var roleTypeDomainAdmin = "2"; cloudStack.converters = { convertBytes: function(bytes) { - if (bytes == undefined) - return ''; - + if (bytes == undefined) + return ''; + if (bytes < 1024 * 1024) { return (bytes / 1024).toFixed(2) + " KB"; } else if (bytes < 1024 * 1024 * 1024) { @@ -1030,29 +1031,29 @@ cloudStack.converters = { if (g_timezoneoffset != null) { localDate = disconnected.getTimePlusTimezoneOffset(g_timezoneoffset); - } else { - var browserDate = new Date(); - var browserTimezoneoffset = browserDate.getTimezoneOffset(); - if (browserTimezoneoffset == undefined || isNaN(browserTimezoneoffset) ) { - localDate = disconnected.toUTCString(); - } else { - g_timezoneoffset = (browserTimezoneoffset/60) * (-1); - localDate = disconnected.getTimePlusTimezoneOffset(g_timezoneoffset); - } + } else { + var browserDate = new Date(); + var browserTimezoneoffset = browserDate.getTimezoneOffset(); + if (browserTimezoneoffset == undefined || isNaN(browserTimezoneoffset) ) { + localDate = disconnected.toUTCString(); + } else { + g_timezoneoffset = (browserTimezoneoffset/60) * (-1); + localDate = disconnected.getTimePlusTimezoneOffset(g_timezoneoffset); + } } } return localDate; }, - toBooleanText: function(booleanValue) { + toBooleanText: function(booleanValue) { var text1; - if (booleanValue == true) { - text1 = "Yes"; + if (booleanValue == true) { + text1 = "Yes"; } else if (booleanValue == false) { - text1 = "No"; + text1 = "No"; } else { //booleanValue == undefined - text1 = ""; + text1 = ""; } - return text1; + return text1; }, convertHz: function(hz) { if (hz == null) @@ -1239,13 +1240,13 @@ cloudStack.converters = { } } -function isModuleIncluded(moduleName) { +function isModuleIncluded(moduleName) { for(var moduleIndex = 0; moduleIndex < cloudStack.modules.length; moduleIndex++) { if (cloudStack.modules[moduleIndex] == moduleName) { - return true; - break; + return true; + break; } - } + } return false; } @@ -1313,26 +1314,26 @@ var addExtraPropertiesToGuestNetworkObject = function(jsonObj) { jsonObj.vlan = jsonObj.broadcasturi.replace("vlan://", ""); } if(jsonObj.vxlan == null && jsonObj.broadcasturi != null && jsonObj.broadcasturi.substring(0,8) == "vxlan://") { - jsonObj.vxlan = jsonObj.broadcasturi.replace("vxlan://", ""); + jsonObj.vxlan = jsonObj.broadcasturi.replace("vxlan://", ""); } } //used by infrastructure page var addExtraPropertiesToUcsBladeObject = function(jsonObj) { - var array1 = jsonObj.bladedn.split('/'); - jsonObj.chassis = array1[1]; - jsonObj.bladeid = array1[2]; + var array1 = jsonObj.bladedn.split('/'); + jsonObj.chassis = array1[1]; + jsonObj.bladeid = array1[2]; } -var processPropertiesInImagestoreObject = function(jsonObj) { - if (jsonObj.url != undefined) { - var url = jsonObj.url; //e.g. 'cifs://10.1.1.1/aaa/aaa2/aaa3?user=bbb&password=ccc&domain=ddd' - var passwordIndex = url.indexOf('&password='); //38 - var domainIndex = url.indexOf('&domain='); //51 - if (passwordIndex >= 0) { - jsonObj.url = url.substring(0, passwordIndex) + url.substring(domainIndex); //remove '&password=ccc' from jsonObj.url - } - } +var processPropertiesInImagestoreObject = function(jsonObj) { + if (jsonObj.url != undefined) { + var url = jsonObj.url; //e.g. 'cifs://10.1.1.1/aaa/aaa2/aaa3?user=bbb&password=ccc&domain=ddd' + var passwordIndex = url.indexOf('&password='); //38 + var domainIndex = url.indexOf('&domain='); //51 + if (passwordIndex >= 0) { + jsonObj.url = url.substring(0, passwordIndex) + url.substring(domainIndex); //remove '&password=ccc' from jsonObj.url + } + } } //find service object in network object @@ -1388,14 +1389,14 @@ var processPropertiesInImagestoreObject = function(jsonObj) { } if (server.indexOf('://') == -1) { - url += 'cifs://'; + url += 'cifs://'; } - + url += (server + path); - + return url; } - + function presetupURL(server, path) { var url; if (server.indexOf("://") == -1) @@ -1427,9 +1428,9 @@ var processPropertiesInImagestoreObject = function(jsonObj) { var url; /* - Replace the + and / symbols by - and _ to have URL-safe base64 going to the API - It's hacky, but otherwise we'll confuse java.net.URI which splits the incoming URI - */ + Replace the + and / symbols by - and _ to have URL-safe base64 going to the API + It's hacky, but otherwise we'll confuse java.net.URI which splits the incoming URI + */ secret = secret.replace("+", "-"); secret = secret.replace("/", "_"); @@ -1499,11 +1500,11 @@ var processPropertiesInImagestoreObject = function(jsonObj) { } return vmName; } - + var timezoneMap = new Object(); timezoneMap["Etc/GMT+12"] = "Etc/GMT+12 [GMT-12:00]"; timezoneMap["Etc/GMT+11"] = "Etc/GMT+11 [GMT-11:00]"; -timezoneMap["Pacific/Midway"] = "Pacific/Midway [Samoa Standard Time]"; +timezoneMap["Pacific/Midway"] = "Pacific/Midway [Samoa Standard Time]"; timezoneMap["Pacific/Niue"] = "Pacific/Niue [Niue Time]"; timezoneMap["Pacific/Pago_Pago"] = "Pacific/Pago_Pago [Samoa Standard Time]"; timezoneMap["Pacific/Samoa"] = "Pacific/Samoa [Samoa Standard Time]"; @@ -2221,12 +2222,12 @@ cloudStack.api = { } }, dataProvider: function(args) { - if (args.jsonObj != undefined) { - args.response.success({ - data: args.jsonObj.tags - }); - } else { - var resourceId = args.context[contextId][0].id; + if (args.jsonObj != undefined) { + args.response.success({ + data: args.jsonObj.tags + }); + } else { + var resourceId = args.context[contextId][0].id; var data = { resourceId: resourceId, resourceType: resourceType @@ -2256,7 +2257,7 @@ cloudStack.api = { args.response.error(parseXMLHttpResponse(json)); } }); - } + } } }; } @@ -2332,4 +2333,3 @@ $.validator.addMethod("ipv4cidr", function(value, element) { return true; }, "The specified IPv4 CIDR is invalid."); - diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 9cabaf9a83a..77bd00284b1 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -53,15 +53,6 @@ vmdisplayname: { label: 'label.vm.display.name' } - - /* - state: { - label: 'State', - indicator: { - 'Ready': 'on' - } - } - */ }, // List view actions @@ -256,19 +247,19 @@ uploadVolume: { isHeader: true, - label: 'Upload', + label: 'label.upload', preFilter: function(args) { return !args.context.instances; }, messages: { notification: function() { - return 'Upload Volume from URL'; + return 'label.upload.volume.from.url'; } }, createForm: { - title: 'Upload Volume from URL', + title: 'label.upload.volume.from.url', fields: { - url: { + url: { label: 'label.url', docID: 'helpUploadVolumeURL', validation: { @@ -330,29 +321,29 @@ }); } - }, + }, diskOffering: { - label: 'Custom Disk Offering', + label: 'label.custom.disk.offering', docID: 'helpVolumeDiskOffering', select: function(args) { - var diskofferingObjs; - $.ajax({ + var diskofferingObjs; + $.ajax({ url: createURL("listDiskOfferings"), dataType: "json", async: false, success: function(json) { diskofferingObjs = json.listdiskofferingsresponse.diskoffering; var items = [{ - id: '', + id: '', description: '' }]; $(diskofferingObjs).each(function() { - if (this.iscustomized == true) { - items.push({ - id: this.id, - description: this.displaytext - }); - } + if (this.iscustomized == true) { + items.push({ + id: this.id, + description: this.displaytext + }); + } }); args.response.success({ data: items @@ -360,29 +351,29 @@ } }); } - }, + }, diskOffering: { - label: 'Custom Disk Offering', + label: 'label.custom.disk.offering', docID: 'helpVolumeDiskOffering', select: function(args) { - var diskofferingObjs; - $.ajax({ + var diskofferingObjs; + $.ajax({ url: createURL("listDiskOfferings"), dataType: "json", async: false, success: function(json) { diskofferingObjs = json.listdiskofferingsresponse.diskoffering; var items = [{ - id: '', + id: '', description: '' }]; $(diskofferingObjs).each(function() { - if (this.iscustomized == true) { - items.push({ - id: this.id, - description: this.displaytext - }); - } + if (this.iscustomized == true) { + items.push({ + id: this.id, + description: this.displaytext + }); + } }); args.response.success({ data: items @@ -390,7 +381,7 @@ } }); } - }, + }, checksum: { docID: 'helpUploadVolumeChecksum', label: 'label.md5.checksum' @@ -406,12 +397,12 @@ url: args.data.url }; - if (args.data.diskOffering != '' && args.data.diskOffering.length > 0) { - $.extend(data, { - diskofferingid: args.data.diskOffering + if (args.data.diskOffering != '' && args.data.diskOffering.length > 0) { + $.extend(data, { + diskofferingid: args.data.diskOffering }); } - + if (args.data.checksum != null && args.data.checksum.length > 0) { $.extend(data, { checksum: args.data.checksum @@ -445,24 +436,24 @@ poll: pollAsyncJobResult } }, - + uploadVolumefromLocal: { isHeader: true, - label: 'Upload from Local', + label: 'label.upload.from.local', preFilter: function(args) { return !args.context.instances; }, messages: { notification: function() { - return 'Upload Volume from Local'; + return 'label.upload.volume.from.local'; } }, createForm: { - title: 'Upload Volume from Local', + title: 'label.upload.volume.from.local', fileUpload: { getURL: function(args) { args.data = args.formData; - + var data = { name: args.data.name, zoneId: args.data.availabilityZone, @@ -475,7 +466,7 @@ checksum: args.data.checksum }); } - + $.ajax({ url: createURL('getUploadParamsForVolume'), data: data, @@ -506,10 +497,10 @@ args.response.success(); } } - }, + }, fields: { volumeFileUpload: { - label: 'local file', + label: 'label.local.file', isFileUpload: true, validation: { required: true @@ -584,7 +575,7 @@ notification: { poll: pollAsyncJobResult } - } + } }, advSearchFields: { @@ -686,12 +677,12 @@ $.extend(data, { virtualMachineId: args.context.instances[0].id }); - } + } if ("primarystorages" in args.context) { $.extend(data, { - storageid: args.context.primarystorages[0].id + storageid: args.context.primarystorages[0].id }); - } + } } $.ajax({ @@ -804,9 +795,9 @@ isBoolean: true, isHidden: function(args) { if (args.context.volumes[0].quiescevm == true) - return false; + return false; else - return true; + return true; } }, name: { @@ -1137,7 +1128,7 @@ hypervisor: args.context.volumes[0].hypervisor }); } - + $(['Running', 'Stopped']).each(function() { $.ajax({ url: createURL('listVirtualMachines'), @@ -1147,11 +1138,11 @@ async: false, success: function(json) { var instanceObjs = json.listvirtualmachinesresponse.virtualmachine; - $(instanceObjs).each(function() { + $(instanceObjs).each(function() { items.push({ id: this.id, description: this.displayname ? this.displayname : this.name - }); + }); }); } }); @@ -1285,12 +1276,12 @@ title: 'label.create.template', preFilter: cloudStack.preFilter.createTemplate, desc: '', - preFilter: function(args) { - if (args.context.volumes[0].hypervisor == "XenServer") { - if (isAdmin()) { - args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); - } - } + preFilter: function(args) { + if (args.context.volumes[0].hypervisor == "XenServer") { + if (isAdmin()) { + args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); + } + } }, fields: { name: { @@ -1304,25 +1295,25 @@ validation: { required: true } - }, + }, xenserverToolsVersion61plus: { label: 'label.xenserver.tools.version.61.plus', isBoolean: true, - isChecked: function (args) { - var b = false; - var vmObj; - $.ajax({ - url: createURL("listVirtualMachines"), - data: { - id: args.context.volumes[0].virtualmachineid - }, - async: false, - success: function(json) { - vmObj = json.listvirtualmachinesresponse.virtualmachine[0]; - } - }); - if (vmObj == undefined) { //e.g. VM has failed over - if (isAdmin()) { + isChecked: function (args) { + var b = false; + var vmObj; + $.ajax({ + url: createURL("listVirtualMachines"), + data: { + id: args.context.volumes[0].virtualmachineid + }, + async: false, + success: function(json) { + vmObj = json.listvirtualmachinesresponse.virtualmachine[0]; + } + }); + if (vmObj == undefined) { //e.g. VM has failed over + if (isAdmin()) { $.ajax({ url: createURL('listConfigurations'), data: { @@ -1336,18 +1327,18 @@ } }); } - } else { - if ('details' in vmObj && 'hypervisortoolsversion' in vmObj.details) { + } else { + if ('details' in vmObj && 'hypervisortoolsversion' in vmObj.details) { if (vmObj.details.hypervisortoolsversion == 'xenserver61') b = true; else b = false; } - } + } return b; }, isHidden: true - }, + }, osTypeId: { label: 'label.os.type', select: function(args) { @@ -1406,17 +1397,17 @@ isfeatured: (args.data.isFeatured == "on") }); } - - //XenServer only (starts here) + + //XenServer only (starts here) if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').length > 0) { - if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css("display") != "none") { - $.extend(data, { - 'details[0].hypervisortoolsversion': (args.data.xenserverToolsVersion61plus == "on") ? "xenserver61" : "xenserver56" - }); - } - } - //XenServer only (ends here) - + if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css("display") != "none") { + $.extend(data, { + 'details[0].hypervisortoolsversion': (args.data.xenserverToolsVersion61plus == "on") ? "xenserver61" : "xenserver56" + }); + } + } + //XenServer only (ends here) + $.ajax({ url: createURL('createTemplate'), data: data, @@ -1580,8 +1571,8 @@ return; var $form = $(this).closest('form'); - - var $shrinkok = $form.find('.form-item[rel=shrinkok]'); + + var $shrinkok = $form.find('.form-item[rel=shrinkok]'); //unit of args.context.volumes[0].size is "byte" //unit of selectedDiskOfferingObj.disksize is "gigabyte" ("GB"), so transfer it into "byte" by multiply (1024 * 1024 * 1024) if (args.context.volumes[0].size > selectedDiskOfferingObj.disksize * (1024 * 1024 * 1024)) { //if original disk size > new disk size @@ -1589,7 +1580,7 @@ } else { $shrinkok.hide(); } - + var $newsize = $form.find('.form-item[rel=newsize]'); if (selectedDiskOfferingObj.iscustomized == true) { $newsize.css('display', 'inline-block'); @@ -1642,11 +1633,11 @@ }, action: function(args) { var array1 = []; - - if(args.$form.find('.form-item[rel=shrinkok]').css("display") != "none") { - array1.push("&shrinkok=" + (args.data.shrinkok == "on")); - } - + + if(args.$form.find('.form-item[rel=shrinkok]').css("display") != "none") { + array1.push("&shrinkok=" + (args.data.shrinkok == "on")); + } + var newDiskOffering = args.data.newdiskoffering; var newSize; if (selectedDiskOfferingObj.iscustomized == true) { @@ -1838,13 +1829,13 @@ dataType: "json", async: true, success: function(json) { - var jsonObj = json.listvolumesresponse.volume[0]; - + var jsonObj = json.listvolumesresponse.volume[0]; + $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', { - obj: jsonObj, - objType: "Volume" + obj: jsonObj, + objType: "Volume" }); - + args.response.success({ actionFilter: volumeActionfilter, data: jsonObj @@ -1871,6 +1862,9 @@ volumename: { label: 'label.volume' }, + name: { + label: 'label.name' + }, intervaltype: { label: 'label.interval.type' }, @@ -2117,11 +2111,11 @@ title: 'label.action.create.volume', desc: '', preFilter: function(args) { - if (g_regionsecondaryenabled == true) { - args.$form.find('.form-item[rel=zoneid]').css('display', 'inline-block'); - } else { - args.$form.find('.form-item[rel=zoneid]').hide(); - } + if (g_regionsecondaryenabled == true) { + args.$form.find('.form-item[rel=zoneid]').css('display', 'inline-block'); + } else { + args.$form.find('.form-item[rel=zoneid]').hide(); + } }, fields: { name: { @@ -2129,9 +2123,9 @@ validation: { required: true } - }, + }, zoneid: { - label: 'label.availability.zone', + label: 'label.availability.zone', isHidden: true, select: function(args) { $.ajax({ @@ -2139,26 +2133,26 @@ dataType: "json", async: true, success: function(json) { - var zoneObjs = json.listzonesresponse.zone; + var zoneObjs = json.listzonesresponse.zone; var items = [{ id: '', description: '' - }]; + }]; if (zoneObjs != null) { - for (i = 0; i < zoneObjs.length; i++) { - items.push({ - id: zoneObjs[i].id, - description: zoneObjs[i].name - }); - } - } - args.response.success({ + for (i = 0; i < zoneObjs.length; i++) { + items.push({ + id: zoneObjs[i].id, + description: zoneObjs[i].name + }); + } + } + args.response.success({ data: items }); } }); } - } + } } }, action: function(args) { @@ -2166,13 +2160,13 @@ snapshotid: args.context.snapshots[0].id, name: args.data.name }; - - if (args.$form.find('.form-item[rel=zoneid]').css("display") != "none" && args.data.zoneid != '') { - $.extend(data, { - zoneId: args.data.zoneid - }); - } - + + if (args.$form.find('.form-item[rel=zoneid]').css("display") != "none" && args.data.zoneid != '') { + $.extend(data, { + zoneId: args.data.zoneid + }); + } + $.ajax({ url: createURL('createVolume'), data: data, @@ -2329,22 +2323,22 @@ return ["remove"]; } - if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") { - if (jsonObj.hypervisor == 'KVM') { - if (jsonObj.vmstate == 'Running') { - if (g_kvmsnapshotenabled == true) { //"kvm.snapshot.enabled" flag should be taken to account only when snapshot is being created for Running vm (CLOUDSTACK-4428) - allowedActions.push("takeSnapshot"); - allowedActions.push("recurringSnapshot"); - } - } else { - allowedActions.push("takeSnapshot"); - allowedActions.push("recurringSnapshot"); - } - } else { - allowedActions.push("takeSnapshot"); - allowedActions.push("recurringSnapshot"); - } - + if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") { + if (jsonObj.hypervisor == 'KVM') { + if (jsonObj.vmstate == 'Running') { + if (g_kvmsnapshotenabled == true) { //"kvm.snapshot.enabled" flag should be taken to account only when snapshot is being created for Running vm (CLOUDSTACK-4428) + allowedActions.push("takeSnapshot"); + allowedActions.push("recurringSnapshot"); + } + } else { + allowedActions.push("takeSnapshot"); + allowedActions.push("recurringSnapshot"); + } + } else { + allowedActions.push("takeSnapshot"); + allowedActions.push("recurringSnapshot"); + } + if (jsonObj.type == "DATADISK") { allowedActions.push("resize"); } diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 0f8fe6a9b38..46686776313 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -16,27 +16,27 @@ // under the License. (function ($, cloudStack) { - + var zoneObjs, podObjs, clusterObjs, domainObjs, networkOfferingObjs, physicalNetworkObjs; var selectedClusterObj, selectedZoneObj, selectedPublicNetworkObj, selectedManagementNetworkObj, selectedPhysicalNetworkObj, selectedGuestNetworkObj; var nspMap = { }; //from listNetworkServiceProviders API var nspHardcodingArray =[]; //for service providers listView (hardcoding, not from listNetworkServiceProviders API) - + // Add router type to virtual router // -- can be either Project, VPC, or System (standard) var mapRouterType = function (index, router) { var routerType = _l('label.menu.system'); - + if (router.projectid) routerType = _l('label.project'); if (router.vpcid) routerType = _l('label.vpc'); - + return $.extend(router, { routerType: routerType }); }; - + cloudStack.publicIpRangeAccount = { dialog: function (args) { return function (args) { @@ -71,7 +71,7 @@ } }; var success = args.response.success; - + if (args.$item) { // Account data is read-only after creation $.ajax({ @@ -82,7 +82,7 @@ }, success: function (json) { var domain = json.listdomainsresponse.domain[0]; - + cloudStack.dialog.notice({ message: '
  • ' + _l('label.account') + ': ' + data.account + '
  • ' + '
  • ' + _l('label.domain') + ': ' + domain.path + '
' }); @@ -97,7 +97,7 @@ }, after: function (args) { var data = cloudStack.serializeForm(args.$form); - + success({ data: data }); @@ -107,11 +107,11 @@ }; } }; - + var getTrafficType = function (physicalNetwork, typeID) { var trafficType = { }; - + $.ajax({ url: createURL('listTrafficTypes'), data: { @@ -126,7 +126,7 @@ })[0]; } }); - + if (trafficType.xennetworklabel == null || trafficType.xennetworklabel == 0) trafficType.xennetworklabel = _l( 'label.network.label.display.for.blank.value'); if (trafficType.kvmnetworklabel == null || trafficType.kvmnetworklabel == 0) @@ -141,10 +141,10 @@ trafficType.hypervnetworklabel = _l( 'label.network.label.display.for.blank.value'); if (trafficType.ovm3networklabel == null || trafficType.ovm3networklabel == 0) trafficType.ovm3networklabel = _l( 'label.network.label.display.for.blank.value'); - + return trafficType; }; - + var updateTrafficLabels = function (trafficType, labels, complete) { var array1 =[]; if (labels.xennetworklabel != _l( 'label.network.label.display.for.blank.value')) @@ -161,7 +161,7 @@ array1.push("&hypervnetworklabel=" + labels.hypervnetworklabel); if (labels.ovm3networklabel != _l( 'label.network.label.display.for.blank.value')) array1.push("&ovm3networklabel=" + labels.ovm3networklabel); - + $.ajax({ url: createURL('updateTrafficType' + array1.join("")), data: { @@ -169,7 +169,7 @@ }, success: function (json) { var jobID = json.updatetraffictyperesponse.jobid; - + cloudStack.ui.notifications.add({ desc: 'Update traffic labels', poll: pollAsyncJobResult, @@ -193,7 +193,7 @@ } }) }; - + function virtualRouterProviderActionFilter(args) { var allowedActions =[]; var jsonObj = args.context.item; //args.context.item == nspMap["virtualRouter"] @@ -202,7 +202,7 @@ allowedActions.push("enable"); return allowedActions; }; - + function ovsProviderActionFilter(args) { var allowedActions = []; var jsonObj = args.context.item; //args.context.item == nspMap["virtualRouter"] @@ -212,11 +212,11 @@ allowedActions.push("enable"); return allowedActions; }; - + cloudStack.sections.system = { title: 'label.menu.infrastructure', id: 'system', - + // System dashboard dashboard: { dataProvider: function (args) { @@ -236,7 +236,7 @@ } }); }, - + podCount: function (data) { $.ajax({ url: createURL('listPods'), @@ -251,7 +251,7 @@ } }); }, - + clusterCount: function (data) { $.ajax({ url: createURL('listClusters'), @@ -263,9 +263,9 @@ dataFns.hostCount($.extend(data, { clusterCount: json.listclustersresponse.count ? json.listclustersresponse.count: 0 })); - + //comment the 4 lines above and uncomment the following 4 lines if listHosts API still responds slowly. - + /* dataFns.primaryStorageCount($.extend(data, { clusterCount: json.listclustersresponse.count ? @@ -275,7 +275,7 @@ } }); }, - + hostCount: function (data) { var data2 = { type: 'routing', @@ -292,7 +292,7 @@ } }); }, - + primaryStorageCount: function (data) { var data2 = { page: 1, @@ -308,7 +308,7 @@ } }); }, - + secondaryStorageCount: function (data) { var data2 = { page: 1, @@ -324,7 +324,7 @@ } }); }, - + systemVmCount: function (data) { $.ajax({ url: createURL('listSystemVms'), @@ -339,10 +339,10 @@ } }); }, - + virtualRouterCount: function (data) { var data2 = { - listAll: true, + listAll: true, page: 1, pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property. }; @@ -352,57 +352,57 @@ success: function (json) { var total1 = json.listroutersresponse.count ? json.listroutersresponse.count: 0; var total2 = 0; //reset - + /* * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), - * because in project view, all API calls are appended with projectid=[projectID]. + * because in project view, all API calls are appended with projectid=[projectID]. * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. - */ + */ if (cloudStack.context && cloudStack.context.projects == null) { //non-project view var data3 = { listAll: true, - projectid: -1, + projectid: -1, page: 1, pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property. }; $.ajax({ url: createURL('listRouters'), data: data3, - async: false, + async: false, success: function (json) { - total2 = json.listroutersresponse.count ? json.listroutersresponse.count : 0; - } - }); + total2 = json.listroutersresponse.count ? json.listroutersresponse.count : 0; + } + }); } - + dataFns.capacity($.extend(data, { virtualRouterCount: (total1 + total2) })); } }); }, - + capacity: function (data) { if (data.zoneCount) { $.ajax({ url: createURL('listCapacity'), success: function (json) { var capacities = json.listcapacityresponse.capacity; - + var capacityTotal = function (id, converter) { var capacity = $.grep(capacities, function (capacity) { return capacity.type == id; })[0]; - + var total = capacity ? capacity.capacitytotal: 0; - + if (converter) { return converter(total); } - + return total; }; - + dataFns.socketInfo($.extend(data, { cpuCapacityTotal: capacityTotal(1, cloudStack.converters.convertHz), memCapacityTotal: capacityTotal(0, cloudStack.converters.convertBytes), @@ -418,7 +418,7 @@ })); } }, - + socketInfo: function (data) { var socketCount = 0; $.ajax({ @@ -431,8 +431,8 @@ var currentPage = 1; var returnedHostCount = 0; var returnedHostCpusocketsSum = 0; - - var callListHostsWithPage = function() { + + var callListHostsWithPage = function() { $.ajax({ url: createURL('listHosts'), async: false, @@ -446,50 +446,50 @@ if (json.listhostsresponse.count == undefined) { return; } - + totalHostCount = json.listhostsresponse.count; returnedHostCount += json.listhostsresponse.host.length; - + var items = json.listhostsresponse.host; for (var i = 0; i < items.length; i++) { if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { returnedHostCpusocketsSum += items[i].cpusockets; } } - + if (returnedHostCount < totalHostCount) { currentPage++; - callListHostsWithPage(); + callListHostsWithPage(); } } }); } - - callListHostsWithPage(); - + + callListHostsWithPage(); + socketCount += returnedHostCpusocketsSum; }) }); } }); - + complete($.extend(data, { socketCount: socketCount })); } }; - + var complete = function (data) { args.response.success({ data: data }); }; - + dataFns.zoneCount({ }); } }, - + zoneDashboard: function (args) { $.ajax({ url: createURL('listCapacity'), @@ -500,24 +500,24 @@ var capacities = json.listcapacityresponse.capacity; var data = { }; - + $(capacities).each(function () { var capacity = this; - + data[capacity.type] = { used: cloudStack.converters.convertByType(capacity.type, capacity.capacityused), total: cloudStack.converters.convertByType(capacity.type, capacity.capacitytotal), percent: parseInt(capacity.percentused) }; }); - + args.response.success({ data: data }); } }); }, - + // Network-as-a-service configuration naas: { providerListView: { @@ -545,7 +545,7 @@ data: nspHardcodingArray }) }, - + detailView: function (args) { return cloudStack.sections.system.naas.networkProviders.types[ args.context.networkProviders[0].id]; @@ -559,7 +559,7 @@ label: 'label.edit', action: function (args) { var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Public'); - + updateTrafficLabels(trafficType, args.data, function () { args.response.success(); }); @@ -607,7 +607,7 @@ isEditable: true } }], - + dataProvider: function (args) { $.ajax({ url: createURL("listNetworks&listAll=true&trafficType=Public&isSystem=true&zoneId=" + selectedZoneObj.id, { @@ -618,9 +618,9 @@ success: function (json) { var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Public'); var items = json.listnetworksresponse.network; - + selectedPublicNetworkObj = items[0]; - + // Include traffic labels selectedPublicNetworkObj.xennetworklabel = trafficType.xennetworklabel; selectedPublicNetworkObj.kvmnetworklabel = trafficType.kvmnetworklabel; @@ -636,7 +636,7 @@ }); } }, - + ipAddresses: { title: 'label.ip.ranges', custom: function (args) { @@ -682,25 +682,25 @@ action: function (args) { var array1 =[]; array1.push("&zoneId=" + args.context.zones[0].id); - + if (args.data.vlan != null && args.data.vlan.length > 0) array1.push("&vlan=" + todb(args.data.vlan)); else array1.push("&vlan=untagged"); - + array1.push("&gateway=" + args.data.gateway); array1.push("&netmask=" + args.data.netmask); array1.push("&startip=" + args.data.startip); if (args.data.endip != null && args.data.endip.length > 0) array1.push("&endip=" + args.data.endip); - + if (args.data.account) { array1.push("&account=" + args.data.account.account); array1.push("&domainid=" + args.data.account.domainid); } - + array1.push("&forVirtualNetwork=true"); //indicates this new IP range is for public network, not guest network - + $.ajax({ url: createURL("createVlanIpRange" + array1.join("")), dataType: "json", @@ -754,7 +754,7 @@ }); } }, - + releaseFromAccount: { label: 'label.release.account', action: function (args) { @@ -779,7 +779,7 @@ }); } }, - + addAccount: { label: 'label.add.account', createForm: { @@ -844,7 +844,7 @@ dataType: "json", success: function (json) { var items = json.listvlaniprangesresponse.vlaniprange; - + args.response.success({ data: $.map(items, function (item) { return $.extend(item, { @@ -865,7 +865,7 @@ } } }, - + 'storage': { detailView: { actions: { @@ -873,7 +873,7 @@ label: 'label.edit', action: function (args) { var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Storage'); - + updateTrafficLabels(trafficType, args.data, function () { args.response.success(); }); @@ -921,7 +921,7 @@ isEditable: true } }], - + dataProvider: function (args) { $.ajax({ url: createURL("listNetworks&listAll=true&trafficType=Storage&isSystem=true&zoneId=" + selectedZoneObj.id), @@ -931,7 +931,7 @@ var items = json.listnetworksresponse.network; var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Storage'); selectedPublicNetworkObj = items[0]; - + selectedPublicNetworkObj.xennetworklabel = trafficType.xennetworklabel; selectedPublicNetworkObj.kvmnetworklabel = trafficType.kvmnetworklabel; selectedPublicNetworkObj.vmwarenetworklabel = trafficType.vmwarenetworklabel; @@ -946,7 +946,7 @@ }); } }, - + ipAddresses: { title: 'label.ip.ranges', custom: function (args) { @@ -1009,17 +1009,17 @@ var array1 =[]; array1.push("&zoneId=" + args.context.zones[0].id); array1.push("&podid=" + args.data.podid); - + array1.push("&gateway=" + args.data.gateway); - + if (args.data.vlan != null && args.data.vlan.length > 0) array1.push("&vlan=" + todb(args.data.vlan)); - + array1.push("&netmask=" + args.data.netmask); array1.push("&startip=" + args.data.startip); if (args.data.endip != null && args.data.endip.length > 0) array1.push("&endip=" + args.data.endip); - + $.ajax({ url: createURL("createStorageNetworkIpRange" + array1.join("")), dataType: "json", @@ -1081,7 +1081,7 @@ } } }, - + 'management': { detailView: { actions: { @@ -1089,7 +1089,7 @@ label: 'label.edit', action: function (args) { var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Management'); - + updateTrafficLabels(trafficType, args.data, function () { args.response.success(); }); @@ -1143,9 +1143,9 @@ dataType: "json", success: function (json) { selectedManagementNetworkObj = json.listnetworksresponse.network[0]; - + var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Management'); - + selectedManagementNetworkObj.xennetworklabel = trafficType.xennetworklabel; selectedManagementNetworkObj.kvmnetworklabel = trafficType.kvmnetworklabel; selectedManagementNetworkObj.vmwarenetworklabel = trafficType.vmwarenetworklabel; @@ -1215,7 +1215,7 @@ } } }, - + 'guest': { //physical network + Guest traffic type detailView: { @@ -1226,23 +1226,23 @@ var data = { id: selectedPhysicalNetworkObj.id }; - + $.extend(data, { vlan: args.data.vlan }); - + $.extend(data, { tags: args.data.tags }); - + $.ajax({ url: createURL('updatePhysicalNetwork'), data: data, success: function (json) { var jobId = json.updatephysicalnetworkresponse.jobid; - + var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest'); - + updateTrafficLabels(trafficType, args.data, function () { args.response.success({ _custom: { @@ -1258,7 +1258,7 @@ } } }, - + tabFilter: function (args) { var hiddenTabs =[]; if (selectedZoneObj.networktype == 'Basic') { @@ -1270,7 +1270,7 @@ } return hiddenTabs; }, - + tabs: { details: { title: 'label.details', @@ -1341,10 +1341,10 @@ async: true, success: function (json) { selectedPhysicalNetworkObj = json.listphysicalnetworksresponse.physicalnetwork[0]; - - // var startVlan, endVlan; + + // var startVlan, endVlan; var vlan = selectedPhysicalNetworkObj.vlan; - /* if(vlan != null && vlan.length > 0) { + /* if(vlan != null && vlan.length > 0) { if(vlan.indexOf("-") != -1) { var vlanArray = vlan.split("-"); startVlan = vlanArray[0]; @@ -1356,7 +1356,7 @@ selectedPhysicalNetworkObj["startVlan"] = startVlan; selectedPhysicalNetworkObj["endVlan"] = endVlan; }*/ - + //traffic type var xenservertrafficlabel, kvmtrafficlabel, vmwaretrafficlabel; var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest'); @@ -1379,7 +1379,7 @@ }); } }, - + ipAddresses: { title: 'label.ip.ranges', custom: function (args) { @@ -1444,7 +1444,7 @@ array1.push("&endip=" + args.data.endip); array1.push("&forVirtualNetwork=false"); //indicates this new IP range is for guest network, not public network - + $.ajax({ url: createURL("createVlanIpRange" + array1.join("")), dataType: "json", @@ -1507,7 +1507,7 @@ }); if (selectedGuestNetworkObj == null) return; - + $.ajax({ url: createURL("listVlanIpRanges&zoneid=" + selectedZoneObj.id + "&networkId=" + selectedGuestNetworkObj.id), dataType: "json", @@ -1522,7 +1522,7 @@ }); } }, - + network: { title: 'label.network', listView: { @@ -1552,7 +1552,7 @@ actions: { add: addGuestNetworkDialog.def }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -1565,7 +1565,7 @@ } } } - + //need to make 2 listNetworks API call to get all guest networks from one physical network in Advanced zone var items =[]; //"listNetworks&projectid=-1": list guest networks under all projects (no matter who the owner is) @@ -1578,13 +1578,13 @@ items = json.listnetworksresponse.network; } }); - + var networkCollectionMap = { }; $(items).each(function () { networkCollectionMap[ this.id] = this.name; }); - + //"listNetworks&listAll=true: list guest networks that are not under any project (no matter who the owner is) $.ajax({ url: createURL("listNetworks&listAll=true&trafficType=Guest&zoneId=" + selectedZoneObj.id + "&physicalnetworkid=" + selectedPhysicalNetworkObj.id + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), @@ -1597,16 +1597,16 @@ }); } }); - + $(items).each(function () { addExtraPropertiesToGuestNetworkObject(this); }); - + args.response.success({ data: items }); }, - + detailView: { name: 'label.guest.network.details', noCompact: true, @@ -1634,21 +1634,21 @@ var array1 =[]; array1.push("&name=" + todb(args.data.name)); array1.push("&displaytext=" + todb(args.data.displaytext)); - + //args.data.networkdomain is null when networkdomain field is hidden if (args.data.networkdomain != null && args.data.networkdomain != selectedGuestNetworkObj.networkdomain) array1.push("&networkdomain=" + todb(args.data.networkdomain)); - + //args.data.networkofferingid is null when networkofferingid field is hidden if (args.data.networkofferingid != null && args.data.networkofferingid != args.context.networks[0].networkofferingid) { array1.push("&networkofferingid=" + todb(args.data.networkofferingid)); - + if (args.context.networks[0].type == "Isolated") { //Isolated network cloudStack.dialog.confirm({ message: 'message.confirm.current.guest.CIDR.unchanged', action: function () { - //"Yes" button is clicked + //"Yes" button is clicked array1.push("&changecidr=false"); $.ajax({ url: createURL("updateNetwork&id=" + args.context.networks[0].id + array1.join("")), @@ -1695,7 +1695,7 @@ return; } } - + $.ajax({ url: createURL("updateNetwork&id=" + args.context.networks[0].id + array1.join("")), dataType: "json", @@ -1719,7 +1719,7 @@ poll: pollAsyncJobResult } }, - + 'restart': { label: 'label.restart.network', createForm: { @@ -1774,7 +1774,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.action.delete.network', messages: { @@ -1820,7 +1820,7 @@ hiddenFields.push("gateway"); //hiddenFields.push("netmask"); } - + if (selectedGuestNetworkObj.type == "Isolated") { hiddenFields.push("networkofferingdisplaytext"); hiddenFields.push("networkdomaintext"); @@ -1892,23 +1892,23 @@ }); } }); - + //include currently selected network offeirng to dropdown items.push({ id: selectedGuestNetworkObj.networkofferingid, description: selectedGuestNetworkObj.networkofferingdisplaytext }); - + args.response.success({ data: items }); } }, - + networkofferingidText: { label: 'label.network.offering.id' }, - + gateway: { label: 'label.ipv4.gateway' }, @@ -1916,14 +1916,14 @@ cidr: { label: 'label.ipv4.cidr' }, - + ip6gateway: { label: 'label.ipv6.gateway' }, ip6cidr: { label: 'label.ipv6.CIDR' }, - + networkdomaintext: { label: 'label.network.domain' }, @@ -1931,7 +1931,7 @@ label: 'label.network.domain', isEditable: true }, - + domain: { label: 'label.domain' }, @@ -1961,7 +1961,7 @@ listAll: true //pass "&listAll=true" to "listNetworks&id=xxxxxxxx" for now before API gets fixed. }); } - + $.ajax({ url: createURL("listNetworks"), data: data, @@ -1969,12 +1969,12 @@ success: function (json) { selectedGuestNetworkObj = json.listnetworksresponse.network[0]; addExtraPropertiesToGuestNetworkObject(selectedGuestNetworkObj); - + $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', { - obj: selectedGuestNetworkObj, - objType: "Network" + obj: selectedGuestNetworkObj, + objType: "Network" }); - + args.response.success({ actionFilter: cloudStack.actionFilter.guestNetwork, data: selectedGuestNetworkObj @@ -1987,7 +1987,7 @@ } } }, - + dedicatedGuestVlanRanges: { title: 'label.dedicated.vlan.vni.ranges', listView: { @@ -2102,7 +2102,7 @@ } } }, - + detailView: { name: 'label.vlan.range.details', actions: { @@ -2139,7 +2139,7 @@ } } }, - + tabs: { details: { title: 'label.details', @@ -2182,7 +2182,7 @@ } } }, - + networks: { listView: { id: 'physicalNetworks', @@ -2206,7 +2206,7 @@ label: 'label.isolation.method' } }, - + actions: { remove: { label: 'label.action.delete.physical.network', @@ -2255,11 +2255,11 @@ }); } }, - + trafficTypes: { dataProvider: function (args) { selectedPhysicalNetworkObj = args.context.physicalNetworks[0]; - + $.ajax({ url: createURL('listTrafficTypes'), data: { @@ -2278,25 +2278,25 @@ }); } }, - + networkProviders: { statusLabels: { enabled: 'Enabled', //having device, network service provider is enabled 'not-configured': 'Not setup', //no device disabled: 'Disabled' //having device, network service provider is disabled }, - + // Actions performed on entire net. provider type actions: { enable: function (args) { args.response.success(); }, - + disable: function (args) { args.response.success(); } }, - + types: { virtualRouter: { id: 'virtualRouterProviders', @@ -2352,7 +2352,7 @@ }); } }, - + instances: { title: 'label.instances', listView: { @@ -2393,7 +2393,7 @@ } } } - + var data2 = { forvpc: false }; @@ -2404,32 +2404,32 @@ success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); - + /* * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), - * because in project view, all API calls are appended with projectid=[projectID]. + * because in project view, all API calls are appended with projectid=[projectID]. * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. - */ + */ if (cloudStack.context && cloudStack.context.projects == null) { //non-project view $.ajax({ url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"), data: data2, - async: false, + async: false, success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); - } - }); + } + }); } - + args.response.success({ actionFilter: routerActionfilter, data: $(routers).map(mapRouterType) @@ -2475,7 +2475,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.router', createForm: { @@ -2521,7 +2521,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.destroy.router', messages: { @@ -2551,7 +2551,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.router', createForm: { @@ -2631,7 +2631,7 @@ poll: pollAsyncJobResult } }, - + viewConsole: { label: 'label.view.console', action: { @@ -2780,7 +2780,7 @@ async: true, success: function (json) { var jsonObj = json.listroutersresponse.router[0].nic; - + args.response.success({ actionFilter: routerActionfilter, data: $.map(jsonObj, function (nic, index) { @@ -2867,7 +2867,7 @@ } } }, - + InternalLbVm: { id: 'InternalLbVm', label: 'label.internallbvm', @@ -2922,7 +2922,7 @@ }); } }, - + instances: { title: 'label.instances', listView: { @@ -2963,25 +2963,25 @@ } } } - + var routers =[]; $.ajax({ url: createURL("listInternalLoadBalancerVMs&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), success: function (json) { var items = json.listinternallbvmssresponse.internalloadbalancervm ? json.listinternallbvmssresponse.internalloadbalancervm:[]; - + $(items).map(function (index, item) { routers.push(item); }); - + // Get project routers $.ajax({ url: createURL("listInternalLoadBalancerVMs&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"), success: function (json) { var items = json.listinternallbvmssresponse.internalloadbalancervm ? json.listinternallbvmssresponse.internalloadbalancervm:[]; - + $(items).map(function (index, item) { routers.push(item); }); @@ -3032,7 +3032,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.stop.lb.vm', createForm: { @@ -3078,7 +3078,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.migrate.lb.vm', createForm: { @@ -3157,7 +3157,7 @@ poll: pollAsyncJobResult } }, - + viewConsole: { label: 'label.view.console', action: { @@ -3306,7 +3306,7 @@ async: true, success: function (json) { var jsonObj = json.listinternallbvmssresponse.internalloadbalancervm[0].nic; - + args.response.success({ actionFilter: internallbinstanceActionfilter, data: $.map(jsonObj, function (nic, index) { @@ -3393,7 +3393,7 @@ } } }, - + vpcVirtualRouter: { id: 'vpcVirtualRouterProviders', label: 'label.vpc.virtual.router', @@ -3448,7 +3448,7 @@ }); } }, - + instances: { title: 'label.instances', listView: { @@ -3489,7 +3489,7 @@ } } } - + var data2 = { forvpc: true }; @@ -3504,27 +3504,27 @@ $(items).map(function (index, item) { routers.push(item); }); - + /* * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), - * because in project view, all API calls are appended with projectid=[projectID]. + * because in project view, all API calls are appended with projectid=[projectID]. * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. - */ + */ if (cloudStack.context && cloudStack.context.projects == null) { //non-project view $.ajax({ url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"), dataType: 'json', data: data2, - async: false, + async: false, success: function (json) { var items = json.listroutersresponse.router; $(items).map(function (index, item) { routers.push(item); }); - } - }); + } + }); } - + args.response.success({ actionFilter: routerActionfilter, data: $(routers).map(mapRouterType) @@ -3570,7 +3570,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.router', createForm: { @@ -3616,7 +3616,7 @@ poll: pollAsyncJobResult } }, - + restart: { label: 'label.action.reboot.router', messages: { @@ -3652,7 +3652,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.destroy.router', messages: { @@ -3682,7 +3682,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.router', createForm: { @@ -3762,7 +3762,7 @@ poll: pollAsyncJobResult } }, - + viewConsole: { label: 'label.view.console', action: { @@ -3938,7 +3938,7 @@ } } }, - + Ovs: { id: "Ovs", label: "label.ovs", @@ -3947,7 +3947,7 @@ fields: { name: { label: 'label.name' - }, + }, state: { label: 'label.status', indicator: { @@ -3962,10 +3962,10 @@ name: { label: 'label.name' } - }, { + }, { state: { label: 'label.state' - }, + }, supportedServices: { label: 'label.supported.services' }, @@ -4051,8 +4051,8 @@ } } } - }, - + }, + // NetScaler provider detail view netscaler: { type: 'detailView', @@ -4141,7 +4141,7 @@ label: 'label.private.interface', docID: 'helpNetScalerPrivateInterface' }, - + gslbprovider: { label: 'label.gslb.service', isBoolean: true, @@ -4153,7 +4153,7 @@ gslbproviderprivateip: { label: 'label.gslb.service.private.ip' }, - + numretries: { label: 'label.numretries', defaultValue: '2', @@ -4307,7 +4307,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -4326,7 +4326,7 @@ } } }, - + //Baremetal DHCP provider detail view BaremetalDhcpProvider: { type: 'detailView', @@ -4479,7 +4479,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -4498,7 +4498,7 @@ } } }, - + //Baremetal PXE provider detail view BaremetalPxeProvider: { type: 'detailView', @@ -4657,7 +4657,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -4676,7 +4676,7 @@ } } }, - + //f5 provider detail view f5: { type: 'detailView', @@ -4914,7 +4914,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -4933,7 +4933,7 @@ } } }, - + // SRX provider detailView srx: { type: 'detailView', @@ -5188,7 +5188,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -5207,7 +5207,7 @@ } } }, - + // Palo Alto provider detailView pa: { type: 'detailView', @@ -5472,7 +5472,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -5491,7 +5491,7 @@ } } }, - + // Security groups detail view securityGroups: { id: 'securityGroup-providers', @@ -5601,7 +5601,7 @@ } } }, - + fields: { id: { label: 'label.id' @@ -5805,7 +5805,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -5824,7 +5824,7 @@ } } }, - // Brocade Vcs provider detail view + // Brocade Vcs provider detail view brocadeVcs: { type: 'detailView', id: 'brocadeVcsProvider', @@ -6214,7 +6214,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -6233,8 +6233,8 @@ } } }, - - + + // MidoNet provider detailView midoNet: { id: 'midoNet', @@ -6354,7 +6354,7 @@ } } }, - + //ovs Ovs: { id: 'ovsProviders', @@ -6410,7 +6410,7 @@ }); } }, - + instances: { title: 'label.instances', listView: { @@ -6451,7 +6451,7 @@ } } } - + var data2 = { forvpc: false }; @@ -6462,11 +6462,11 @@ success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); - + // Get project routers $.ajax({ url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"), @@ -6474,7 +6474,7 @@ success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); @@ -6525,7 +6525,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.router', createForm: { @@ -6571,7 +6571,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.destroy.router', messages: { @@ -6601,7 +6601,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.router', createForm: { @@ -6681,7 +6681,7 @@ poll: pollAsyncJobResult } }, - + viewConsole: { label: 'label.view.console', action: { @@ -6830,7 +6830,7 @@ async: true, success: function (json) { var jsonObj = json.listroutersresponse.router[0].nic; - + args.response.success({ actionFilter: routerActionfilter, data: $.map(jsonObj, function (nic, index) { @@ -6919,247 +6919,247 @@ }, // Nuage Vsp provider detail view nuageVsp: { - type: 'detailView', - id: 'nuageVspProvider', - label: 'label.nuageVsp', - viewAll: { - label: 'label.devices', - path: '_zone.nuageVspDevices' - }, - tabs: { - details: { - title: 'label.details', - fields: [{ - name: { - label: 'label.name' - } - }, { - state: { - label: 'label.state' - } - }], - dataProvider: function(args) { - refreshNspData("NuageVsp"); - var providerObj; - $(nspHardcodingArray).each(function() { - if (this.id == "nuageVsp") { - providerObj = this; - return false; //break each loop - } - }); - args.response.success({ - data: providerObj, - actionFilter: networkProviderActionFilter('nuageVsp') - }); - } - } - }, - actions: { - add: { - label: 'label.add.NuageVsp.device', - createForm: { - title: 'label.add.NuageVsp.device', - preFilter: function(args) {}, - fields: { - hostname: { - label: 'label.host.name', - validation: { - required: true - }, - docID: 'helpVspHostname' - }, - username: { - label: 'label.username', - validation: { - required: true - }, - docID: 'helpVspUsername' - }, - password: { - label: 'label.password', - isPassword: true, - validation: { - required: true - }, - docID: 'helpVspPassword' - }, - port: { - label: 'label.port', - validation: { - required: false, - number: true - }, - docID: 'helpVspPort' - }, - apiversion: { - label: 'label.api.version', - defaultValue: 'v1_0', - validation: { - required: true - }, - docID: 'helpVspApiVersion' - }, - retrycount: { - label: 'label.numretries', - defaultValue: '4', - validation: { - required: true, - number: true - }, - docID: 'helpVspRetries' - }, - retryinterval: { - label: 'label.retry.interval', - defaultValue: '60', - validation: { - required: false, - number: true - }, - docID: 'helpVspRetryInterval' - } - } - }, - action: function(args) { - if (nspMap["nuageVsp"] == null) { - $.ajax({ - url: createURL("addNetworkServiceProvider&name=NuageVsp&physicalnetworkid=" + selectedPhysicalNetworkObj.id), - dataType: "json", - async: true, - success: function(json) { - var jobId = json.addnetworkserviceproviderresponse.jobid; - var addNuageVspProviderIntervalID = setInterval(function() { - $.ajax({ - url: createURL("queryAsyncJobResult&jobId=" + jobId), - dataType: "json", - success: function(json) { - var result = json.queryasyncjobresultresponse; - if (result.jobstatus == 0) { - return; //Job has not completed - } else { - clearInterval(addNuageVspProviderIntervalID); - if (result.jobstatus == 1) { - nspMap["nuageVsp"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider; - addNuageVspDevice(args, selectedPhysicalNetworkObj, "addNuageVspDevice", "addnuagevspdeviceresponse", "nuagevspdevice") - } else if (result.jobstatus == 2) { - alert("addNetworkServiceProvider&name=NuageVsp failed. Error: " + _s(result.jobresult.errortext)); - } - } - }, - error: function(XMLHttpResponse) { - var errorMsg = parseXMLHttpResponse(XMLHttpResponse); - alert("addNetworkServiceProvider&name=NuageVsp failed. Error: " + errorMsg); - } - }); - }, g_queryAsyncJobResultInterval); - } - }); - } else { - addNuageVspDevice(args, selectedPhysicalNetworkObj, "addNuageVspDevice", "addnuagevspdeviceresponse", "nuagevspdevice") - } - }, - messages: { - notification: function(args) { - return 'label.add.NuageVsp.device'; - } - }, - notification: { - poll: pollAsyncJobResult - } - }, - enable: { - label: 'label.enable.provider', - action: function(args) { - $.ajax({ - url: createURL("updateNetworkServiceProvider&id=" + nspMap["nuageVsp"].id + "&state=Enabled"), - dataType: "json", - success: function(json) { - var jid = json.updatenetworkserviceproviderresponse.jobid; - args.response.success({ - _custom: { - jobId: jid, - getUpdatedItem: function(json) { - $(window).trigger('cloudStack.fullRefresh'); - } - } - }); - } - }); - }, - messages: { - confirm: function(args) { - return 'message.confirm.enable.provider'; - }, - notification: function() { - return 'label.enable.provider'; - } - }, - notification: { - poll: pollAsyncJobResult - } - }, - disable: { - label: 'label.disable.provider', - action: function(args) { - $.ajax({ - url: createURL("updateNetworkServiceProvider&id=" + nspMap["nuageVsp"].id + "&state=Disabled"), - dataType: "json", - success: function(json) { - var jid = json.updatenetworkserviceproviderresponse.jobid; - args.response.success({ - _custom: { - jobId: jid, - getUpdatedItem: function(json) { - $(window).trigger('cloudStack.fullRefresh'); - } - } - }); - } - }); - }, - messages: { - confirm: function(args) { - return 'message.confirm.disable.provider'; - }, - notification: function() { - return 'label.disable.provider'; - } - }, - notification: { - poll: pollAsyncJobResult - } - }, - destroy: { - label: 'label.shutdown.provider', - action: function(args) { - $.ajax({ - url: createURL("deleteNetworkServiceProvider&id=" + nspMap["nuageVsp"].id), - dataType: "json", - success: function(json) { - var jid = json.deletenetworkserviceproviderresponse.jobid; - args.response.success({ - _custom: { - jobId: jid - } - }); - - $(window).trigger('cloudStack.fullRefresh'); - } - }); - }, - messages: { - confirm: function(args) { - return 'message.confirm.shutdown.provider'; - }, - notification: function(args) { - return 'label.shutdown.provider'; - } - }, - notification: { - poll: pollAsyncJobResult - } - } - } - }, + type: 'detailView', + id: 'nuageVspProvider', + label: 'label.nuageVsp', + viewAll: { + label: 'label.devices', + path: '_zone.nuageVspDevices' + }, + tabs: { + details: { + title: 'label.details', + fields: [{ + name: { + label: 'label.name' + } + }, { + state: { + label: 'label.state' + } + }], + dataProvider: function(args) { + refreshNspData("NuageVsp"); + var providerObj; + $(nspHardcodingArray).each(function() { + if (this.id == "nuageVsp") { + providerObj = this; + return false; //break each loop + } + }); + args.response.success({ + data: providerObj, + actionFilter: networkProviderActionFilter('nuageVsp') + }); + } + } + }, + actions: { + add: { + label: 'label.add.NuageVsp.device', + createForm: { + title: 'label.add.NuageVsp.device', + preFilter: function(args) {}, + fields: { + hostname: { + label: 'label.host.name', + validation: { + required: true + }, + docID: 'helpVspHostname' + }, + username: { + label: 'label.username', + validation: { + required: true + }, + docID: 'helpVspUsername' + }, + password: { + label: 'label.password', + isPassword: true, + validation: { + required: true + }, + docID: 'helpVspPassword' + }, + port: { + label: 'label.port', + validation: { + required: false, + number: true + }, + docID: 'helpVspPort' + }, + apiversion: { + label: 'label.api.version', + defaultValue: 'v1_0', + validation: { + required: true + }, + docID: 'helpVspApiVersion' + }, + retrycount: { + label: 'label.numretries', + defaultValue: '4', + validation: { + required: true, + number: true + }, + docID: 'helpVspRetries' + }, + retryinterval: { + label: 'label.retry.interval', + defaultValue: '60', + validation: { + required: false, + number: true + }, + docID: 'helpVspRetryInterval' + } + } + }, + action: function(args) { + if (nspMap["nuageVsp"] == null) { + $.ajax({ + url: createURL("addNetworkServiceProvider&name=NuageVsp&physicalnetworkid=" + selectedPhysicalNetworkObj.id), + dataType: "json", + async: true, + success: function(json) { + var jobId = json.addnetworkserviceproviderresponse.jobid; + var addNuageVspProviderIntervalID = setInterval(function() { + $.ajax({ + url: createURL("queryAsyncJobResult&jobId=" + jobId), + dataType: "json", + success: function(json) { + var result = json.queryasyncjobresultresponse; + if (result.jobstatus == 0) { + return; //Job has not completed + } else { + clearInterval(addNuageVspProviderIntervalID); + if (result.jobstatus == 1) { + nspMap["nuageVsp"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider; + addNuageVspDevice(args, selectedPhysicalNetworkObj, "addNuageVspDevice", "addnuagevspdeviceresponse", "nuagevspdevice") + } else if (result.jobstatus == 2) { + alert("addNetworkServiceProvider&name=NuageVsp failed. Error: " + _s(result.jobresult.errortext)); + } + } + }, + error: function(XMLHttpResponse) { + var errorMsg = parseXMLHttpResponse(XMLHttpResponse); + alert("addNetworkServiceProvider&name=NuageVsp failed. Error: " + errorMsg); + } + }); + }, g_queryAsyncJobResultInterval); + } + }); + } else { + addNuageVspDevice(args, selectedPhysicalNetworkObj, "addNuageVspDevice", "addnuagevspdeviceresponse", "nuagevspdevice") + } + }, + messages: { + notification: function(args) { + return 'label.add.NuageVsp.device'; + } + }, + notification: { + poll: pollAsyncJobResult + } + }, + enable: { + label: 'label.enable.provider', + action: function(args) { + $.ajax({ + url: createURL("updateNetworkServiceProvider&id=" + nspMap["nuageVsp"].id + "&state=Enabled"), + dataType: "json", + success: function(json) { + var jid = json.updatenetworkserviceproviderresponse.jobid; + args.response.success({ + _custom: { + jobId: jid, + getUpdatedItem: function(json) { + $(window).trigger('cloudStack.fullRefresh'); + } + } + }); + } + }); + }, + messages: { + confirm: function(args) { + return 'message.confirm.enable.provider'; + }, + notification: function() { + return 'label.enable.provider'; + } + }, + notification: { + poll: pollAsyncJobResult + } + }, + disable: { + label: 'label.disable.provider', + action: function(args) { + $.ajax({ + url: createURL("updateNetworkServiceProvider&id=" + nspMap["nuageVsp"].id + "&state=Disabled"), + dataType: "json", + success: function(json) { + var jid = json.updatenetworkserviceproviderresponse.jobid; + args.response.success({ + _custom: { + jobId: jid, + getUpdatedItem: function(json) { + $(window).trigger('cloudStack.fullRefresh'); + } + } + }); + } + }); + }, + messages: { + confirm: function(args) { + return 'message.confirm.disable.provider'; + }, + notification: function() { + return 'label.disable.provider'; + } + }, + notification: { + poll: pollAsyncJobResult + } + }, + destroy: { + label: 'label.shutdown.provider', + action: function(args) { + $.ajax({ + url: createURL("deleteNetworkServiceProvider&id=" + nspMap["nuageVsp"].id), + dataType: "json", + success: function(json) { + var jid = json.deletenetworkserviceproviderresponse.jobid; + args.response.success({ + _custom: { + jobId: jid + } + }); + + $(window).trigger('cloudStack.fullRefresh'); + } + }); + }, + messages: { + confirm: function(args) { + return 'message.confirm.shutdown.provider'; + }, + notification: function(args) { + return 'label.shutdown.provider'; + } + }, + notification: { + poll: pollAsyncJobResult + } + } + } + }, Opendaylight: { type: 'detailView', id: 'openDaylightProvider', @@ -7434,7 +7434,7 @@ jobId: jid } }); - + $(window).trigger('cloudStack.fullRefresh'); } }); @@ -7696,7 +7696,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -7722,7 +7722,7 @@ } }); }, - + actions: { add: { label: 'label.add.zone', @@ -7745,7 +7745,7 @@ } } }, - + detailView: { isMaximized: true, actions: { @@ -7793,7 +7793,7 @@ name: args.data.name, vcenter: args.data.vcenter }; - + if (args.data.username != null && args.data.username.length > 0) { $.extend(data, { username: args.data.username @@ -7804,7 +7804,7 @@ password: args.data.password }) } - + $.ajax({ url: createURL('addVmwareDc'), data: data, @@ -7821,7 +7821,7 @@ } } }, - + removeVmwareDc: { label: 'label.remove.vmware.datacenter', messages: { @@ -7843,9 +7843,9 @@ delete args.context.physicalResources[0].vmwaredcName; delete args.context.physicalResources[0].vmwaredcVcenter; delete args.context.physicalResources[0].vmwaredcId; - + selectedZoneObj = args.context.physicalResources[0]; - + args.response.success({ data: args.context.physicalResources[0] }); @@ -7862,7 +7862,7 @@ } } }, - + enable: { label: 'label.action.enable.zone', messages: { @@ -7893,7 +7893,7 @@ } } }, - + disable: { label: 'label.action.disable.zone', messages: { @@ -7924,7 +7924,7 @@ } } }, - + dedicateZone: { label: 'label.dedicate.zone', messages: { @@ -7951,7 +7951,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -7983,7 +7983,7 @@ var array2 =[]; if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - + $.ajax({ url: createURL("dedicateZone&zoneId=" + args.context.physicalResources[0].id + @@ -8042,7 +8042,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.action.delete.zone', messages: { @@ -8087,11 +8087,11 @@ //p6dns1 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank. array1.push("&ip6dns2=" + todb(args.data.ip6dns2)); //ip6dns2 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank. - + if (selectedZoneObj.networktype == "Advanced" && args.data.guestcidraddress) { array1.push("&guestcidraddress=" + todb(args.data.guestcidraddress)); } - + array1.push("&internaldns1=" + todb(args.data.internaldns1)); array1.push("&internaldns2=" + todb(args.data.internaldns2)); //internaldns2 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank. @@ -8117,14 +8117,14 @@ tabs: { details: { title: 'label.details', - + preFilter: function (args) { var hiddenFields =[]; if (selectedZoneObj.networktype == "Basic") hiddenFields.push("guestcidraddress"); return hiddenFields; }, - + fields:[ { name: { label: 'label.zone', @@ -8219,12 +8219,12 @@ }, success: function (json) { selectedZoneObj = json.listzonesresponse.zone[0]; - + $(window).trigger('cloudStack.module.sharedFunctions.addExtraProperties', { - obj: selectedZoneObj, - objType: "Zone" + obj: selectedZoneObj, + objType: "Zone" }); - + $.ajax({ url: createURL('listDedicatedZones'), data: { @@ -8250,7 +8250,7 @@ } } }); - + $.ajax({ url: createURL('listApis'), //listVmwareDcs API only exists in non-oss bild, so have to check whether it exists before calling it. data: { @@ -8279,7 +8279,7 @@ } //override default error handling: cloudStack.dialog.notice({ message: parseXMLHttpResponse(XMLHttpResponse)}); }); - + args.response.success({ actionFilter: zoneActionfilter, data: selectedZoneObj @@ -8288,7 +8288,7 @@ }); } }, - + compute: { title: 'label.compute.and.storage', custom: cloudStack.uiCustom.systemChart('compute') @@ -8301,7 +8301,7 @@ title: 'label.resources', custom: cloudStack.uiCustom.systemChart('resources') }, - + systemVMs: { title: 'label.system.vms', listView: { @@ -8349,7 +8349,7 @@ } } } - + var selectedZoneObj = args.context.physicalResources[0]; $.ajax({ url: createURL("listSystemVms&zoneid=" + selectedZoneObj.id + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), @@ -8364,7 +8364,7 @@ } }); }, - + detailView: { noCompact: true, name: 'label.system.vm.details', @@ -8404,7 +8404,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.systemvm', messages: { @@ -8440,7 +8440,7 @@ poll: pollAsyncJobResult } }, - + restart: { label: 'label.action.reboot.systemvm', messages: { @@ -8476,7 +8476,7 @@ poll: pollAsyncJobResult } }, - + remove: { label: 'label.action.destroy.systemvm', messages: { @@ -8511,7 +8511,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.systemvm', messages: { @@ -8593,7 +8593,7 @@ poll: pollAsyncJobResult } }, - + scaleUp: { label: 'label.change.service.offering', createForm: { @@ -8639,7 +8639,7 @@ } } }, - + action: function (args) { $.ajax({ url: createURL("scaleSystemVm&id=" + args.context.systemVMs[0].id + "&serviceofferingid=" + args.data.serviceOfferingId), @@ -8669,7 +8669,7 @@ return 'message.confirm.scale.up.system.vm'; }, notification: function (args) { - + return 'label.system.vm.scaled.up'; } }, @@ -8677,8 +8677,8 @@ poll: pollAsyncJobResult } }, - - + + viewConsole: { label: 'label.view.console', action: { @@ -8764,7 +8764,7 @@ } } }, - + // Granular settings for zone settings: { title: 'label.settings', @@ -8782,7 +8782,7 @@ data: json.listconfigurationsresponse.configuration }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -8795,7 +8795,7 @@ name: args.data.jsonObj.name, value: args.data.value }; - + $.ajax({ url: createURL('updateConfiguration&zoneid=' + args.context.physicalResources[0].id), data: data, @@ -8805,7 +8805,7 @@ data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -8825,7 +8825,7 @@ var data = { }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listPods'), data: data, @@ -8839,11 +8839,11 @@ } }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -8854,16 +8854,16 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; } } }); - + return listView; }, clusters: function () { @@ -8874,7 +8874,7 @@ var data = { }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listClusters'), data: data, @@ -8888,11 +8888,11 @@ } }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -8903,16 +8903,16 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; } } }); - + return listView; }, hosts: function () { @@ -8924,7 +8924,7 @@ type: 'routing' }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listHosts'), data: data, @@ -8938,11 +8938,11 @@ } }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -8953,16 +8953,16 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; } } }); - + return listView; }, primaryStorage: function () { @@ -8973,7 +8973,7 @@ var data = { }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listStoragePools'), data: data, @@ -8987,11 +8987,11 @@ } }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -9002,19 +9002,19 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; } } }); - + return listView; }, - + secondaryStorage: function () { var listView = $.extend( true, { @@ -9028,7 +9028,7 @@ type: 'SecondaryStorage' }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listImageStores'), data: data, @@ -9056,7 +9056,7 @@ var data = { }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listSecondaryStagingStores'), data: data, @@ -9070,7 +9070,7 @@ } }); } - + /* , detailView: { @@ -9085,7 +9085,7 @@ } } }); - + return listView; }, systemVms: function () { @@ -9096,7 +9096,7 @@ var data = { }; listViewDataProvider(args, data); - + $.ajax({ url: createURL('listSystemVms'), data: data, @@ -9131,11 +9131,11 @@ } }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -9146,16 +9146,16 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; } } }); - + return listView; }, virtualRouters: function () { @@ -9169,9 +9169,9 @@ var data = { }; listViewDataProvider(args, data); - + var routers =[]; - + //get account-owned routers $.ajax({ url: createURL('listRouters'), @@ -9184,25 +9184,25 @@ $(items).map(function (index, item) { routers.push(item); }); - + //if account is specified in advanced search, don't search project-owned routers var accountIsNotSpecifiedInAdvSearch = true; if (args.filterBy != null) { if (args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) == "object") { //advanced search - if ('account' in args.filterBy.advSearch && args.filterBy.advSearch.account.length > 0) { + if ('account' in args.filterBy.advSearch && args.filterBy.advSearch.account.length > 0) { accountIsNotSpecifiedInAdvSearch = false; //since account and projectid can't be specified together } } } - if (accountIsNotSpecifiedInAdvSearch) { - /* - * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), - * because in project view, all API calls are appended with projectid=[projectID]. - * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. - */ - if (cloudStack.context && cloudStack.context.projects == null) { //non-project view + if (accountIsNotSpecifiedInAdvSearch) { + /* + * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), + * because in project view, all API calls are appended with projectid=[projectID]. + * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. + */ + if (cloudStack.context && cloudStack.context.projects == null) { //non-project view $.ajax({ - url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + "&projectid=-1"), + url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + "&projectid=-1"), async: false, success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; @@ -9211,27 +9211,27 @@ }); } }); - + } } - - args.response.success({ - actionFilter: routerActionfilter, - data: $(routers).map(mapRouterType) - }); + + args.response.success({ + actionFilter: routerActionfilter, + data: $(routers).map(mapRouterType) + }); } }); - + args.response.success({ actionFilter: routerActionfilter, data: $(routers).map(mapRouterType) }); }, - + detailView: { updateContext: function (args) { var zone; - + $.ajax({ url: createURL('listZones'), data: { @@ -9242,9 +9242,9 @@ zone = json.listzonesresponse.zone[0]; } }); - + selectedZoneObj = zone; - + return { zones:[zone] }; @@ -9254,10 +9254,10 @@ } } }); - + return listView; }, - + sockets: function () { var listView = { id: 'sockets', @@ -9273,31 +9273,31 @@ } }, dataProvider: function (args) { - var array1 = []; - - // ***** non XenServer (begin) ***** - var hypervisors = ["Hyperv", "KVM", "VMware", "BareMetal", "LXC", "Ovm3"]; + var array1 = []; - var supportSocketHypervisors = { + // ***** non XenServer (begin) ***** + var hypervisors = ["Hyperv", "KVM", "VMware", "BareMetal", "LXC", "Ovm3"]; + + var supportSocketHypervisors = { "Hyperv": 1, "KVM": 1, "VMware": 1, "Ovm3": 1 - }; - - for (var h = 0; h < hypervisors.length; h++) { + }; + + for (var h = 0; h < hypervisors.length; h++) { var totalHostCount = 0; var currentPage = 1; var returnedHostCount = 0; var returnedHostCpusocketsSum = 0; - - var callListHostsWithPage = function() { + + var callListHostsWithPage = function() { $.ajax({ url: createURL('listHosts'), async: false, data: { type: 'routing', - hypervisor: hypervisors[h], + hypervisor: hypervisors[h], page: currentPage, pagesize: pageSize //global variable }, @@ -9305,131 +9305,131 @@ if (json.listhostsresponse.count == undefined) { return; } - + totalHostCount = json.listhostsresponse.count; returnedHostCount += json.listhostsresponse.host.length; - + var items = json.listhostsresponse.host; for (var i = 0; i < items.length; i++) { if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { returnedHostCpusocketsSum += items[i].cpusockets; } } - + if (returnedHostCount < totalHostCount) { currentPage++; - callListHostsWithPage(); + callListHostsWithPage(); } } }); } - - callListHostsWithPage(); - - if ((hypervisors[h] in supportSocketHypervisors) == false) { - returnedHostCpusocketsSum = 'N/A'; - } - - var hypervisorName = hypervisors[h]; - if (hypervisorName == "Hyperv") { - hypervisorName = "Hyper-V"; - } - - array1.push({ + + callListHostsWithPage(); + + if ((hypervisors[h] in supportSocketHypervisors) == false) { + returnedHostCpusocketsSum = 'N/A'; + } + + var hypervisorName = hypervisors[h]; + if (hypervisorName == "Hyperv") { + hypervisorName = "Hyper-V"; + } + + array1.push({ hypervisor: hypervisorName, hosts: totalHostCount, sockets: returnedHostCpusocketsSum }); } - // ***** non XenServer (end) ***** - - - // ***** XenServer (begin) ***** - var totalHostCount = 0; - var currentPage = 1; - var returnedHostCount = 0; - - var returnedHostCountForXenServer650 = 0; //'XenServer 6.5.0' - var returnedHostCpusocketsSumForXenServer650 = 0; - - var returnedHostCountForXenServer620 = 0; //'XenServer 6.2.0' - var returnedHostCpusocketsSumForXenServer620 = 0; - - var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' - - var callListHostsWithPage = function() { - $.ajax({ - url: createURL('listHosts'), - async: false, - data: { - type: 'routing', - hypervisor: 'XenServer', - page: currentPage, - pagesize: pageSize //global variable - }, - success: function(json) { - if (json.listhostsresponse.count == undefined) { - return; - } - - totalHostCount = json.listhostsresponse.count; - returnedHostCount += json.listhostsresponse.host.length; - - var items = json.listhostsresponse.host; - for (var i = 0; i < items.length; i++) { - if (items[i].hypervisorversion == "6.5.0") { - returnedHostCountForXenServer650 ++; - if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { - returnedHostCpusocketsSumForXenServer650 += items[i].cpusockets; - } - } else if (items[i].hypervisorversion == "6.2.0") { - returnedHostCountForXenServer620 ++; - if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { - returnedHostCpusocketsSumForXenServer620 += items[i].cpusockets; - } - } else { - returnedHostCountForXenServer61x++; - } - } - - if (returnedHostCount < totalHostCount) { - currentPage++; - callListHostsWithPage(); - } - } - }); - } - - callListHostsWithPage(); - - array1.push({ + // ***** non XenServer (end) ***** + + + // ***** XenServer (begin) ***** + var totalHostCount = 0; + var currentPage = 1; + var returnedHostCount = 0; + + var returnedHostCountForXenServer650 = 0; //'XenServer 6.5.0' + var returnedHostCpusocketsSumForXenServer650 = 0; + + var returnedHostCountForXenServer620 = 0; //'XenServer 6.2.0' + var returnedHostCpusocketsSumForXenServer620 = 0; + + var returnedHostCountForXenServer61x = 0; //'XenServer 6.1.x and before' + + var callListHostsWithPage = function() { + $.ajax({ + url: createURL('listHosts'), + async: false, + data: { + type: 'routing', + hypervisor: 'XenServer', + page: currentPage, + pagesize: pageSize //global variable + }, + success: function(json) { + if (json.listhostsresponse.count == undefined) { + return; + } + + totalHostCount = json.listhostsresponse.count; + returnedHostCount += json.listhostsresponse.host.length; + + var items = json.listhostsresponse.host; + for (var i = 0; i < items.length; i++) { + if (items[i].hypervisorversion == "6.5.0") { + returnedHostCountForXenServer650 ++; + if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { + returnedHostCpusocketsSumForXenServer650 += items[i].cpusockets; + } + } else if (items[i].hypervisorversion == "6.2.0") { + returnedHostCountForXenServer620 ++; + if (items[i].cpusockets != undefined && isNaN(items[i].cpusockets) == false) { + returnedHostCpusocketsSumForXenServer620 += items[i].cpusockets; + } + } else { + returnedHostCountForXenServer61x++; + } + } + + if (returnedHostCount < totalHostCount) { + currentPage++; + callListHostsWithPage(); + } + } + }); + } + + callListHostsWithPage(); + + array1.push({ hypervisor: 'XenServer 6.5.0', hosts: returnedHostCountForXenServer650, - sockets: returnedHostCpusocketsSumForXenServer650 + sockets: returnedHostCpusocketsSumForXenServer650 }); - - array1.push({ + + array1.push({ hypervisor: 'XenServer 6.2.0', hosts: returnedHostCountForXenServer620, - sockets: returnedHostCpusocketsSumForXenServer620 + sockets: returnedHostCpusocketsSumForXenServer620 }); - - array1.push({ + + array1.push({ hypervisor: 'XenServer 6.1.x and before', hosts: returnedHostCountForXenServer61x, - sockets: 'N/A' - }); - - // ***** XenServer (end) ***** - - - args.response.success({ + sockets: 'N/A' + }); + + // ***** XenServer (end) ***** + + + args.response.success({ data: array1 }); - + } }; - + return listView; } } @@ -9440,18 +9440,18 @@ virtualRouters: { sectionSelect: { label: 'label.select-view', - preFilter: function(args) { - //Only clicking ViewAll Link("view all Virtual Routers") in "Virtual Routers group by XXXXXXX" detailView will have "routerGroupByXXXXXXX" included in args.context + preFilter: function(args) { + //Only clicking ViewAll Link("view all Virtual Routers") in "Virtual Routers group by XXXXXXX" detailView will have "routerGroupByXXXXXXX" included in args.context if ("routerGroupByZone" in args.context) { - return ["routerGroupByZone"]; // read-only (i.e. text "group by Zone") + return ["routerGroupByZone"]; // read-only (i.e. text "group by Zone") } else if ( "routerGroupByPod" in args.context) { - return ["routerGroupByPod"]; // read-only (i.e. text "group by Pod") + return ["routerGroupByPod"]; // read-only (i.e. text "group by Pod") } else if ("routerGroupByCluster" in args.context) { - return ["routerGroupByCluster"]; // read-only (i.e. text "group by Cluster") + return ["routerGroupByCluster"]; // read-only (i.e. text "group by Cluster") } else if ("routerGroupByAccount" in args.context) { - return ["routerGroupByAccount"]; // read-only (i.e. text "group by Account") + return ["routerGroupByAccount"]; // read-only (i.e. text "group by Account") } else { - return ["routerNoGroup", "routerGroupByZone", "routerGroupByPod", "routerGroupByCluster", "routerGroupByAccount"]; //editable dropdown + return ["routerNoGroup", "routerGroupByZone", "routerGroupByPod", "routerGroupByCluster", "routerGroupByAccount"]; //editable dropdown } } }, @@ -9502,32 +9502,32 @@ } } } - + var data2 = { // forvpc: false }; - + if (args.context != undefined) { - if ("routerGroupByZone" in args.context) { - $.extend(data2, { - zoneid: args.context.routerGroupByZone[0].id - }) - } else if ("routerGroupByPod" in args.context) { - $.extend(data2, { - podid: args.context.routerGroupByPod[0].id - }) - } else if ("routerGroupByCluster" in args.context) { - $.extend(data2, { - clusterid: args.context.routerGroupByCluster[0].id - }) - } else if ("routerGroupByAccount" in args.context) { - $.extend(data2, { - account: args.context.routerGroupByAccount[0].name, - domainid: args.context.routerGroupByAccount[0].domainid - }) - } - } - + if ("routerGroupByZone" in args.context) { + $.extend(data2, { + zoneid: args.context.routerGroupByZone[0].id + }) + } else if ("routerGroupByPod" in args.context) { + $.extend(data2, { + podid: args.context.routerGroupByPod[0].id + }) + } else if ("routerGroupByCluster" in args.context) { + $.extend(data2, { + clusterid: args.context.routerGroupByCluster[0].id + }) + } else if ("routerGroupByAccount" in args.context) { + $.extend(data2, { + account: args.context.routerGroupByAccount[0].name, + domainid: args.context.routerGroupByAccount[0].domainid + }) + } + } + var routers =[]; $.ajax({ url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), @@ -9535,43 +9535,43 @@ success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); - + /* * In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1), - * because in project view, all API calls are appended with projectid=[projectID]. + * because in project view, all API calls are appended with projectid=[projectID]. * Therefore, we only call the second listRouters API(with projectid=-1) in non-project view. - */ + */ if (cloudStack.context && cloudStack.context.projects == null) { //non-project view - /* - * account parameter(account+domainid) and project parameter(projectid) are not allowed to be passed together to listXXXXXXX API. + /* + * account parameter(account+domainid) and project parameter(projectid) are not allowed to be passed together to listXXXXXXX API. * So, remove account parameter(account+domainid) from data2 - */ - if ("account" in data2) { - delete data2.account; - } - if ("domainid" in data2) { - delete data2.domainid; - } - - $.ajax({ + */ + if ("account" in data2) { + delete data2.account; + } + if ("domainid" in data2) { + delete data2.domainid; + } + + $.ajax({ url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + "&projectid=-1"), data: data2, - async: false, + async: false, success: function (json) { var items = json.listroutersresponse.router ? json.listroutersresponse.router:[]; - + $(items).map(function (index, item) { routers.push(item); }); - } - }); + } + }); } - + args.response.success({ actionFilter: routerActionfilter, data: $(routers).map(mapRouterType) @@ -9617,7 +9617,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.router', createForm: { @@ -9663,7 +9663,7 @@ poll: pollAsyncJobResult } }, - + upgradeRouterToUseNewerTemplate: { label: 'label.upgrade.router.newer.template', messages: { @@ -9696,7 +9696,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.destroy.router', messages: { @@ -9726,7 +9726,7 @@ poll: pollAsyncJobResult } }, - + restart: { label: 'label.action.reboot.router', messages: { @@ -9762,7 +9762,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.router', createForm: { @@ -9842,7 +9842,7 @@ poll: pollAsyncJobResult } }, - + scaleUp: { //*** Infrastructure > Virtual Routers > change service offering *** label: 'label.change.service.offering', createForm: { @@ -9887,7 +9887,7 @@ } } }, - + action: function (args) { $.ajax({ url: createURL("scaleSystemVm&id=" + args.context.routers[0].id + "&serviceofferingid=" + args.data.serviceOfferingId), @@ -9917,7 +9917,7 @@ return 'message.confirm.scale.up.router.vm'; }, notification: function (args) { - + return 'label.router.vm.scaled.up'; } }, @@ -9925,8 +9925,8 @@ poll: pollAsyncJobResult } }, - - + + viewConsole: { label: 'label.view.console', action: { @@ -9969,7 +9969,7 @@ } } }); - + return hiddenFields; }, fields:[ { @@ -10098,7 +10098,7 @@ async: true, success: function (json) { var jsonObj = json.listroutersresponse.router[0].nic; - + args.response.success({ actionFilter: routerActionfilter, data: $.map(jsonObj, function (nic, index) { @@ -10144,7 +10144,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -10173,11 +10173,11 @@ }); }, detailView: { - name: 'label.virtual.routers.group.zone', + name: 'label.virtual.routers.group.zone', viewAll: { path: '_zone.virtualRouters', label: 'label.virtual.appliances' - }, + }, actions: { upgradeRouterToUseNewerTemplate: { label: 'label.upgrade.router.newer.template', @@ -10233,9 +10233,9 @@ return _l('label.no'); } } - }, + }, numberOfRouterRequiresUpgrade: { - label: 'label.total.virtual.routers.upgrade' + label: 'label.total.virtual.routers.upgrade' } }], dataProvider: function (args) { @@ -10275,7 +10275,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -10304,11 +10304,11 @@ }); }, detailView: { - name: 'label.virtual.routers.group.pod', + name: 'label.virtual.routers.group.pod', viewAll: { path: '_zone.virtualRouters', label: 'label.virtual.appliances' - }, + }, actions: { upgradeRouterToUseNewerTemplate: { label: 'label.upgrade.router.newer.template', @@ -10366,7 +10366,7 @@ } }, numberOfRouterRequiresUpgrade: { - label: 'label.total.virtual.routers.upgrade' + label: 'label.total.virtual.routers.upgrade' }, zonename: { label: 'label.zone' @@ -10409,7 +10409,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -10438,11 +10438,11 @@ }); }, detailView: { - name: 'label.virtual.routers.group.cluster', + name: 'label.virtual.routers.group.cluster', viewAll: { path: '_zone.virtualRouters', label: 'label.virtual.appliances' - }, + }, actions: { upgradeRouterToUseNewerTemplate: { label: 'label.upgrade.router.newer.template', @@ -10500,7 +10500,7 @@ } }, numberOfRouterRequiresUpgrade: { - label: 'label.total.virtual.routers.upgrade' + label: 'label.total.virtual.routers.upgrade' }, podname: { label: 'label.pod' @@ -10549,7 +10549,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -10585,14 +10585,14 @@ var routerCountFromAllPages = json.listroutersresponse.count; var routerCountFromFirstPageToCurrentPage = json.listroutersresponse.router.length; var routerRequiresUpgrade = 0; - + var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + var callListApiWithPage = function () { $.ajax({ url: createURL('listRouters'), @@ -10607,8 +10607,8 @@ success: function (json) { routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { routerRequiresUpgrade++; } } @@ -10639,11 +10639,11 @@ }); }, detailView: { - name: 'label.virtual.routers.group.account', + name: 'label.virtual.routers.group.account', viewAll: { path: '_zone.virtualRouters', label: 'label.virtual.appliances' - }, + }, actions: { upgradeRouterToUseNewerTemplate: { label: 'label.upgrade.router.newer.template', @@ -10703,9 +10703,9 @@ return _l('label.no'); } } - }, + }, numberOfRouterRequiresUpgrade: { - label: 'label.total.virtual.routers.upgrade' + label: 'label.total.virtual.routers.upgrade' } }], dataProvider: function (args) { @@ -10726,14 +10726,14 @@ var routerCountFromAllPages = json.listroutersresponse.count; var routerCountFromFirstPageToCurrentPage = json.listroutersresponse.router.length; var routerRequiresUpgrade = 0; - + var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + var callListApiWithPage = function () { $.ajax({ url: createURL('listRouters'), @@ -10748,8 +10748,8 @@ success: function (json) { routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { routerRequiresUpgrade++; } } @@ -10820,7 +10820,7 @@ 'Destroyed': 'off' } }, - + agentstate: { label: 'label.agent.state', indicator: { @@ -10841,7 +10841,7 @@ } } } - + var selectedZoneObj = args.context.physicalResources[0]; $.ajax({ url: createURL("listSystemVms&zoneid=" + selectedZoneObj.id + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), @@ -10856,7 +10856,7 @@ } }); }, - + detailView: { name: 'label.system.vm.details', actions: { @@ -10895,7 +10895,7 @@ poll: pollAsyncJobResult } }, - + stop: { label: 'label.action.stop.systemvm', messages: { @@ -10931,7 +10931,7 @@ poll: pollAsyncJobResult } }, - + restart: { label: 'label.action.reboot.systemvm', messages: { @@ -10967,7 +10967,7 @@ poll: pollAsyncJobResult } }, - + remove: { label: 'label.action.destroy.systemvm', messages: { @@ -11002,7 +11002,7 @@ poll: pollAsyncJobResult } }, - + migrate: { label: 'label.action.migrate.systemvm', messages: { @@ -11084,7 +11084,7 @@ poll: pollAsyncJobResult } }, - + scaleUp: { //*** Infrastructure > System VMs (consoleProxy or SSVM) > change service offering *** label: 'label.change.service.offering', createForm: { @@ -11102,19 +11102,19 @@ serviceOfferingId: { label: 'label.compute.offering', select: function (args) { - var data1 = { + var data1 = { issystem: 'true', virtualmachineid: args.context.systemVMs[0].id - }; + }; if (args.context.systemVMs[0].systemvmtype == "secondarystoragevm") { - $.extend(data1, { - systemvmtype: 'secondarystoragevm' - }); + $.extend(data1, { + systemvmtype: 'secondarystoragevm' + }); } else if (args.context.systemVMs[0].systemvmtype == "consoleproxy") { - $.extend(data1, { - systemvmtype: 'consoleproxy' - }); + $.extend(data1, { + systemvmtype: 'consoleproxy' + }); } $.ajax({ url: createURL('listServiceOfferings'), @@ -11139,7 +11139,7 @@ } } }, - + action: function (args) { $.ajax({ url: createURL("scaleSystemVm&id=" + args.context.systemVMs[0].id + "&serviceofferingid=" + args.data.serviceOfferingId), @@ -11169,7 +11169,7 @@ return 'message.confirm.scale.up.system.vm'; }, notification: function (args) { - + return 'label.system.vm.scaled.up'; } }, @@ -11177,9 +11177,9 @@ poll: pollAsyncJobResult } }, - - - + + + viewConsole: { label: 'label.view.console', action: { @@ -11344,7 +11344,7 @@ privateinterface: { label: 'label.private.interface' }, - + gslbprovider: { label: 'label.gslb.service', isBoolean: true, @@ -11356,7 +11356,7 @@ gslbproviderprivateip: { label: 'label.gslb.service.private.ip' }, - + numretries: { label: 'label.numretries', defaultValue: '2' @@ -11459,7 +11459,7 @@ } }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -11522,7 +11522,7 @@ } } }, - + // Baremetal DHCP devices listView BaremetalDhcpDevices: { id: 'BaremetalDhcpDevices', @@ -11594,7 +11594,7 @@ } } }, - + // Baremetal PXE devices listView BaremetalPxeDevices: { id: 'BaremetalPxeDevices', @@ -11672,7 +11672,7 @@ } } }, - + // F5 devices listView f5Devices: { id: 'f5Devices', @@ -11898,7 +11898,7 @@ } } }, - + //SRX devices listView srxDevices: { id: 'srxDevices', @@ -12135,7 +12135,7 @@ } } }, - + //Palo Alto devices listView paDevices: { id: 'paDevices', @@ -12379,7 +12379,7 @@ } } }, - + // FIXME convert to nicira detailview // NiciraNvp devices listView niciraNvpDevices: { @@ -12468,7 +12468,7 @@ addNiciraNvpDevice(args, selectedPhysicalNetworkObj, "addNiciraNvpDevice", "addniciranvpdeviceresponse", "niciranvpdevice") } }, - + messages: { notification: function (args) { return 'label.added.nicira.nvp.controller'; @@ -12564,7 +12564,7 @@ } } }, - // BrocadeVcs devices listView + // BrocadeVcs devices listView brocadeVcsDevices: { id: 'brocadeVcsDevices', title: 'label.devices', @@ -12811,7 +12811,7 @@ addBigSwitchBcfDevice(args, selectedPhysicalNetworkObj, "addBigSwitchBcfDevice", "addbigswitchbcfdeviceresponse", "bigswitchbcfdevice") } }, - + messages: { notification: function (args) { return 'label.added.new.bigswitch.bcf.controller'; @@ -13120,7 +13120,7 @@ label: 'label.allocation.state' } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -13133,7 +13133,7 @@ } } } - + $.ajax({ url: createURL("listPods&zoneid=" + args.context.zones[0].id + "&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), dataType: "json", @@ -13147,11 +13147,11 @@ } }); }, - + actions: { add: { label: 'label.add.pod', - + createForm: { title: 'label.add.pod', fields: { @@ -13165,13 +13165,13 @@ var data = args.context.zones ? { id: args.context.zones[0].id }: {}; - + $.ajax({ url: createURL('listZones'), data: data, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + args.response.success({ data: $.map(zones, function (zone) { return { @@ -13219,14 +13219,14 @@ required: false } }, - + isDedicated: { label: 'label.dedicate', isBoolean: true, isChecked: false, docID: 'helpDedicateResource' }, - + domainId: { label: 'label.domain', isHidden: true, @@ -13242,7 +13242,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -13252,7 +13252,7 @@ items.sort(function(a, b) { return a.description.localeCompare(b.description); }); - + args.response.success({ data: items }); @@ -13260,7 +13260,7 @@ }); } }, - + accountId: { label: 'label.account', isHidden: true, @@ -13272,18 +13272,18 @@ } } }, - + action: function (args) { var array1 =[]; var appendData = args.data.append ? args.data.append: { }; - + array1.push("&zoneId=" + args.data.zoneid); array1.push("&name=" + todb(args.data.podname)); array1.push("&gateway=" + todb(args.data.reservedSystemGateway)); array1.push("&netmask=" + todb(args.data.reservedSystemNetmask)); array1.push("&startIp=" + todb(args.data.reservedSystemStartIp)); - + var endip = args.data.reservedSystemEndIp; //optional if (endip != null && endip.length > 0) array1.push("&endIp=" + todb(endip)); @@ -13295,13 +13295,13 @@ success: function (json) { var item = json.createpodresponse.pod; podId = json.createpodresponse.pod.id; - + //EXPLICIT DEDICATION if (args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked') == true) { var array2 =[]; if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - + if (podId != null) { $.ajax({ url: createURL("dedicatePod&podId=" + podId + "&domainId=" + args.data.domainId + array2.join("")), @@ -13317,11 +13317,11 @@ interval: 4500, desc: "Dedicate Pod" }, - + data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(XMLHttpResponse)); } @@ -13338,7 +13338,7 @@ } }); }, - + notification: { poll: function (args) { args.complete({ @@ -13346,7 +13346,7 @@ }); } }, - + messages: { notification: function (args) { return 'label.add.pod'; @@ -13354,7 +13354,7 @@ } } }, - + detailView: { viewAll: { path: '_zone.clusters', @@ -13385,7 +13385,7 @@ array1.push("&endIp=" + todb(args.data.endip)); if (args.data.gateway != null && args.data.gateway.length > 0) array1.push("&gateway=" + todb(args.data.gateway)); - + $.ajax({ url: createURL("updatePod&id=" + args.context.pods[0].id + array1.join("")), dataType: "json", @@ -13402,7 +13402,7 @@ }); } }, - + enable: { label: 'label.action.enable.pod', messages: { @@ -13433,7 +13433,7 @@ } } }, - + dedicate: { label: 'label.dedicate.pod', messages: { @@ -13460,7 +13460,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -13492,7 +13492,7 @@ var array2 =[]; if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - + $.ajax({ url: createURL("dedicatePod&podId=" + args.context.pods[0].id + @@ -13553,8 +13553,8 @@ poll: pollAsyncJobResult } }, - - + + disable: { label: 'label.action.disable.pod', messages: { @@ -13585,7 +13585,7 @@ } } }, - + 'remove': { label: 'label.delete', messages: { @@ -13665,7 +13665,7 @@ label: 'label.allocation.state' } }, { - + isdedicated: { label: 'label.dedicated' }, @@ -13673,15 +13673,15 @@ label: 'label.domain.id' } }], - + dataProvider: function (args) { - + $.ajax({ url: createURL("listPods&id=" + args.context.pods[0].id), success: function (json) { var item = json.listpodsresponse.pod[0]; - - + + $.ajax({ url: createURL("listDedicatedPods&podid=" + args.context.pods[0].id), success: function (json) { @@ -13696,7 +13696,7 @@ $.extend(item, { isdedicated: _l('label.no') }); - + args.response.success({ actionFilter: podActionfilter, data: item @@ -13714,7 +13714,7 @@ }); } }, - + ipAllocations: { title: 'label.ip.allocations', multiple: true, @@ -13781,7 +13781,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -13806,7 +13806,7 @@ $(items).each(function () { addExtraPropertiesToClusterObject(this); }); - + args.response.success({ actionFilter: clusterActionfilter, data: items @@ -13814,7 +13814,7 @@ } }); }, - + actions: { add: { label: 'label.add.cluster', @@ -13842,19 +13842,19 @@ 'vsmpassword_req']; return $.inArray($(this).attr('rel'), nexusDvsReqFields) > -1; }); - + if ($form.find('.form-item[rel=hypervisor] select').val() == 'VMware') { $form.find('.form-item[rel=vCenterHost]').css('display', 'inline-block'); $form.find('.form-item[rel=vCenterUsername]').css('display', 'inline-block'); $form.find('.form-item[rel=vCenterPassword]').css('display', 'inline-block'); $form.find('.form-item[rel=vCenterDatacenter]').css('display', 'inline-block'); - + var $overridePublicTraffic = $form.find('.form-item[rel=overridepublictraffic] input[type=checkbox]'); var $vSwitchPublicType = $form.find('.form-item[rel=vSwitchPublicType] select'); var $overrideGuestTraffic = $form.find('.form-item[rel=overrideguesttraffic] input[type=checkbox]'); var $vSwitchGuestType = $form.find('.form-item[rel=vSwitchGuestType] select'); - - + + var useDvs = false; $.ajax({ url: createURL('listConfigurations'), @@ -13872,7 +13872,7 @@ //If using Distributed vswitch, there is OverrideTraffic option. $form.find('.form-item[rel=overridepublictraffic]').css('display', 'inline-block'); $form.find('.form-item[rel=overrideguesttraffic]').css('display', 'inline-block'); - + var useNexusDvs = false; $.ajax({ url: createURL('listConfigurations'), @@ -13906,11 +13906,11 @@ $form.find('.form-item[rel=overridepublictraffic]').css('display', 'none'); $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'none'); $form.find('.form-item[rel=vSwitchPublicName]').css('display', 'none'); - + $form.find('.form-item[rel=overrideguesttraffic]').css('display', 'none'); $form.find('.form-item[rel=vSwitchGuestType]').css('display', 'none'); $form.find('.form-item[rel=vSwitchGuestName]').css('display', 'none'); - + $nexusDvsOptFields.hide(); $nexusDvsReqFields.hide(); } @@ -13921,13 +13921,13 @@ $form.find('.form-item[rel=vCenterPassword]').css('display', 'none'); $form.find('.form-item[rel=vCenterDatacenter]').css('display', 'none'); $form.find('.form-item[rel=enableNexusVswitch]').css('display', 'none'); - + $form.find('.form-item[rel=overridepublictraffic]').css('display', 'none'); $form.find('.form-item[rel=overrideguesttraffic]').css('display', 'none'); $nexusDvsOptFields.hide(); $nexusDvsReqFields.hide(); } - + if ($form.find('.form-item[rel=overridepublictraffic]').css('display') != 'none' && $overridePublicTraffic.is(':checked')) { $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'inline-block'); $form.find('.form-item[rel=vSwitchPublicName]').css('display', 'inline-block'); @@ -13935,7 +13935,7 @@ $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'none'); $form.find('.form-item[rel=vSwitchPublicName]').css('display', 'none'); } - + if ($form.find('.form-item[rel=overrideguesttraffic]').css('display') != 'none' && $overrideGuestTraffic.is(':checked')) { $form.find('.form-item[rel=vSwitchGuestType]').css('display', 'inline-block'); $form.find('.form-item[rel=vSwitchGuestName]').css('display', 'inline-block'); @@ -13944,7 +13944,7 @@ $form.find('.form-item[rel=vSwitchGuestName]').css('display', 'none'); } }); - + $form.trigger('click'); }, fields: { @@ -13958,13 +13958,13 @@ var data = args.context.zones ? { id: args.context.zones[0].id }: {}; - + $.ajax({ url: createURL('listZones'), data: data, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + args.response.success({ data: $.map(zones, function (zone) { return { @@ -14038,14 +14038,14 @@ required: true } }, - + isDedicated: { label: 'label.dedicate', isBoolean: true, isChecked: false, docID: 'helpDedicateResource' }, - + domainId: { label: 'label.domain', isHidden: true, @@ -14061,7 +14061,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -14079,7 +14079,7 @@ }); } }, - + accountId: { label: 'label.account', isHidden: true, @@ -14144,7 +14144,7 @@ } //legacy zone - validation not required for new VMware dc model }, - + overridepublictraffic: { label: 'label.override.public.traffic', isBoolean: true, @@ -14152,8 +14152,8 @@ isChecked: false, docID: 'helpOverridePublicNetwork' }, - - + + vSwitchPublicType: { label: 'label.public.traffic.vswitch.type', select: function (args) { @@ -14171,7 +14171,7 @@ } } }); - + if (useNexusDvs) { items.push({ id: "nexusdvs", @@ -14199,19 +14199,19 @@ description: "Cisco Nexus 1000v Distributed Virtual Switch" }); } - + args.response.success({ data: items }); }, isHidden: true }, - + vSwitchPublicName: { label: 'label.public.traffic.vswitch.name', isHidden: true }, - + overrideguesttraffic: { label: 'label.override.guest.traffic', isBoolean: true, @@ -14219,12 +14219,12 @@ isChecked: false, docID: 'helpOverrideGuestNetwork' }, - + vSwitchGuestType: { label: 'label.guest.traffic.vswitch.type', select: function (args) { var items =[] - + var useNexusDvs = false; $.ajax({ url: createURL('listConfigurations'), @@ -14238,8 +14238,8 @@ } } }); - - + + if (useNexusDvs) { items.push({ id: "nexusdvs", @@ -14267,20 +14267,20 @@ description: "Cisco Nexus 1000v Distributed Virtual Switch" }); } - + args.response.success({ data: items }); }, isHidden: true }, - + vSwitchGuestName: { label: 'label.guest.traffic.vswitch.name', isHidden: true }, - - + + vsmipaddress: { label: 'label.cisco.nexus1000v.ip.address', validation: { @@ -14328,20 +14328,20 @@ //hypervisor==VMWare ends here } }, - + action: function (args) { var array1 =[]; array1.push("&zoneId=" + args.data.zoneid); array1.push("&hypervisor=" + args.data.hypervisor); - + var clusterType; if (args.data.hypervisor == "VMware") clusterType = "ExternalManaged"; else clusterType = "CloudManaged"; array1.push("&clustertype=" + clusterType); - + array1.push("&podId=" + args.data.podId); - + var clusterName = args.data.name; if (args.data.hypervisor == "Ovm3") { array1.push("&ovm3pool=" + todb(args.data.ovm3pool)); @@ -14351,7 +14351,7 @@ if (args.data.hypervisor == "VMware") { array1.push("&username=" + todb(args.data.vCenterUsername)); array1.push("&password=" + todb(args.data.vCenterPassword)); - + //vSwitch Public Type if (args.$form.find('.form-item[rel=vSwitchPublicType]').css('display') != 'none' && args.data.vSwitchPublicType != "") { array1.push("&publicvswitchtype=" + args.data.vSwitchPublicType); @@ -14359,7 +14359,7 @@ if (args.$form.find('.form-item[rel=vSwitchPublicName]').css('display') != 'none' && args.data.vSwitchPublicName != "") { array1.push("&publicvswitchname=" + args.data.vSwitchPublicName); } - + //vSwitch Guest Type if (args.$form.find('.form-item[rel=vSwitchGuestType]').css('display') != 'none' && args.data.vSwitchGuestType != "") { array1.push("&guestvswitchtype=" + args.data.vSwitchGuestType); @@ -14367,7 +14367,7 @@ if (args.$form.find('.form-item[rel=vSwitchGuestName]').css('display') != 'none' && args.data.vSwitchGuestName != "") { array1.push("&guestvswitchname=" + args.data.vSwitchGuestName); } - + //Nexus VSM fields if (args.$form.find('.form-item[rel=vsmipaddress]').css('display') != 'none' && args.data.vsmipaddress != null && args.data.vsmipaddress.length > 0) { array1.push('&vsmipaddress=' + args.data.vsmipaddress); @@ -14375,25 +14375,25 @@ if (args.$form.find('.form-item[rel=vsmipaddress_req]').css('display') != 'none' && args.data.vsmipaddress_req != null && args.data.vsmipaddress_req.length > 0) { array1.push('&vsmipaddress=' + args.data.vsmipaddress_req); } - + if (args.$form.find('.form-item[rel=vsmusername]').css('display') != 'none' && args.data.vsmusername != null && args.data.vsmusername.length > 0) { array1.push('&vsmusername=' + args.data.vsmusername); } if (args.$form.find('.form-item[rel=vsmusername_req]').css('display') != 'none' && args.data.vsmusername_req != null && args.data.vsmusername_req.length > 0) { array1.push('&vsmusername=' + args.data.vsmusername_req); } - + if (args.$form.find('.form-item[rel=vsmpassword]').css('display') != 'none' && args.data.vsmpassword != null && args.data.vsmpassword.length > 0) { array1.push('&vsmpassword=' + args.data.vsmpassword); } if (args.$form.find('.form-item[rel=vsmpassword_req]').css('display') != 'none' && args.data.vsmpassword_req != null && args.data.vsmpassword_req.length > 0) { array1.push('&vsmpassword=' + args.data.vsmpassword_req); } - - + + var hostname = args.data.vCenterHost; var dcName = args.data.vCenterDatacenter; - + if (hostname.length == 0 && dcName.length == 0) { $.ajax({ url: createURL('listVmwareDcs'), @@ -14411,14 +14411,14 @@ } }); } - + var url; if (hostname.indexOf("http://") == -1) url = "http://" + hostname; else url = hostname; url += "/" + dcName + "/" + clusterName; array1.push("&url=" + todb(url)); - + clusterName = hostname + "/" + dcName + "/" + clusterName; //override clusterName } array1.push("&clustername=" + todb(clusterName)); @@ -14430,13 +14430,13 @@ success: function (json) { var item = json.addclusterresponse.cluster[0]; clusterId = json.addclusterresponse.cluster[0].id; - + //EXPLICIT DEDICATION var array2 =[]; if (args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked') == true) { if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - + if (clusterId != null) { $.ajax({ url: createURL("dedicateCluster&clusterId=" + clusterId + "&domainId=" + args.data.domainId + array2.join("")), @@ -14452,7 +14452,7 @@ interval: 4500, desc: "Dedicate Cluster" }, - + data: $.extend(item, { state: 'Enabled' }) @@ -14477,7 +14477,7 @@ } } }, - + detailView: { viewAll: { path: '_zone.hosts', @@ -14496,21 +14496,21 @@ vSwichConfigEnabled = json.listconfigurationsresponse.configuration[0].value; } }); - + var hypervisorType = args.context.clusters[0].hypervisortype; if (vSwichConfigEnabled != "true" || hypervisorType != 'VMware') { return[ 'nexusVswitch']; } return[]; }, - + actions: { - + edit: { label: 'label.edit', action: function (args) { var array1 =[]; - + $.ajax({ url: createURL("updateCluster&id=" + args.context.clusters[0].id + array1.join("")), dataType: "json", @@ -14526,7 +14526,7 @@ }); } }, - + enable: { label: 'label.action.enable.cluster', messages: { @@ -14559,7 +14559,7 @@ } } }, - + disable: { label: 'label.action.disable.cluster', messages: { @@ -14592,7 +14592,7 @@ } } }, - + dedicate: { label: 'label.dedicate.cluster', messages: { @@ -14619,7 +14619,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -14629,7 +14629,7 @@ items.sort(function(a, b) { return a.description.localeCompare(b.description); }); - + args.response.success({ data: items }); @@ -14708,8 +14708,8 @@ poll: pollAsyncJobResult } }, - - + + manage: { label: 'label.action.manage.cluster', messages: { @@ -14741,7 +14741,7 @@ } } }, - + unmanage: { label: 'label.action.unmanage.cluster', messages: { @@ -14773,7 +14773,7 @@ } } }, - + 'remove': { label: 'label.action.delete.cluster', messages: { @@ -14804,7 +14804,7 @@ } } }, - + tabs: { details: { title: 'label.details', @@ -14875,7 +14875,7 @@ data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(XMLHttpResponse)); } @@ -14936,7 +14936,7 @@ } } }, - + disable: { label: 'label.action.disable.nexusVswitch', messages: { @@ -14974,7 +14974,7 @@ } } } - + /* 'remove': { label: 'label.action.delete.nexusVswitch' , messages: { @@ -15000,7 +15000,7 @@ } }*/ }, - + tabs: { details: { title: 'label.details', @@ -15027,7 +15027,7 @@ } } }, - + dataProvider: function (args) { $.ajax({ url: createURL("listCiscoNexusVSMs&clusterid=" + args.context.clusters[0].id), @@ -15048,7 +15048,7 @@ } } }, - + dataProvider: function (args) { $.ajax({ url: createURL("listCiscoNexusVSMs&clusterid=" + args.context.clusters[0].id), @@ -15070,7 +15070,7 @@ } } }, - + // Granular settings for cluster settings: { title: 'label.settings', @@ -15088,7 +15088,7 @@ data: json.listconfigurationsresponse.configuration }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -15097,29 +15097,29 @@ actions: { edit: function (args) { // call updateClusterLevelParameters - + var data = { name: args.data.jsonObj.name, value: args.data.value }; - + $.ajax({ url: createURL('updateConfiguration&clusterid=' + args.context.clusters[0].id), data: data, success: function (json) { var item = json.updateconfigurationresponse.configuration; - + if (args.data.jsonObj.name == 'cpu.overprovisioning.factor' || args.data.jsonObj.name == 'mem.overprovisioning.factor') { cloudStack.dialog.notice({ message: 'Please note - if you are changing the over provisioning factor for a cluster with vms running, please refer to the admin guide to understand the capacity calculation.' }); } - + args.response.success({ data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -15162,7 +15162,7 @@ } } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -15175,7 +15175,7 @@ } } } - + if (! args.context.instances) { array1.push("&zoneid=" + args.context.zones[0].id); if ("pods" in args.context) @@ -15186,7 +15186,7 @@ //Instances menu > Instance detailView > View Hosts array1.push("&id=" + args.context.instances[0].hostid); } - + $.ajax({ url: createURL("listHosts&type=Routing" + array1.join("") + "&page=" + args.page + "&pagesize=" + pageSize), dataType: "json", @@ -15200,11 +15200,11 @@ } }); }, - + actions: { add: { label: 'label.add.host', - + createForm: { title: 'label.add.host', fields: { @@ -15218,13 +15218,13 @@ var data = args.context.zones ? { id: args.context.zones[0].id }: {}; - + $.ajax({ url: createURL('listZones'), data: data, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + args.response.success({ data: $.map(zones, function (zone) { return { @@ -15237,7 +15237,7 @@ }); } }, - + //always appear (begin) podId: { label: 'label.pod', @@ -15272,7 +15272,7 @@ }); } }, - + clusterId: { label: 'label.cluster', docID: 'helpHostCluster', @@ -15304,14 +15304,14 @@ }); } }); - + args.$select.change(function () { var $form = $(this).closest('form'); - + var clusterId = $(this).val(); if (clusterId == null) return; - + var items =[]; $(clusterObjs).each(function () { if (this.id == clusterId) { @@ -15321,22 +15321,22 @@ }); if (selectedClusterObj == null) return; - + if (selectedClusterObj.hypervisortype == "VMware") { //$('li[input_group="general"]', $dialogAddHost).hide(); $form.find('.form-item[rel=hostname]').hide(); $form.find('.form-item[rel=username]').hide(); $form.find('.form-item[rel=password]').hide(); - + //$('li[input_group="vmware"]', $dialogAddHost).show(); $form.find('.form-item[rel=vcenterHost]').css('display', 'inline-block'); - + //$('li[input_group="baremetal"]', $dialogAddHost).hide(); $form.find('.form-item[rel=baremetalCpuCores]').hide(); $form.find('.form-item[rel=baremetalCpu]').hide(); $form.find('.form-item[rel=baremetalMemory]').hide(); $form.find('.form-item[rel=baremetalMAC]').hide(); - + //$('li[input_group="Ovm"]', $dialogAddHost).hide(); $form.find('.form-item[rel=agentUsername]').hide(); $form.find('.form-item[rel=agentPassword]').hide(); @@ -15353,13 +15353,13 @@ $form.find('.form-item[rel=hostname]').css('display', 'inline-block'); $form.find('.form-item[rel=username]').css('display', 'inline-block'); $form.find('.form-item[rel=password]').css('display', 'inline-block'); - + //$('li[input_group="baremetal"]', $dialogAddHost).show(); $form.find('.form-item[rel=baremetalCpuCores]').css('display', 'inline-block'); $form.find('.form-item[rel=baremetalCpu]').css('display', 'inline-block'); $form.find('.form-item[rel=baremetalMemory]').css('display', 'inline-block'); $form.find('.form-item[rel=baremetalMAC]').css('display', 'inline-block'); - + //$('li[input_group="vmware"]', $dialogAddHost).hide(); $form.find('.form-item[rel=vcenterHost]').hide(); @@ -15379,16 +15379,16 @@ $form.find('.form-item[rel=hostname]').css('display', 'inline-block'); $form.find('.form-item[rel=username]').css('display', 'inline-block'); $form.find('.form-item[rel=password]').css('display', 'inline-block'); - + //$('li[input_group="vmware"]', $dialogAddHost).hide(); $form.find('.form-item[rel=vcenterHost]').hide(); - + //$('li[input_group="baremetal"]', $dialogAddHost).hide(); $form.find('.form-item[rel=baremetalCpuCores]').hide(); $form.find('.form-item[rel=baremetalCpu]').hide(); $form.find('.form-item[rel=baremetalMemory]').hide(); $form.find('.form-item[rel=baremetalMAC]').hide(); - + //$('li[input_group="Ovm"]', $dialogAddHost).show(); $form.find('.form-item[rel=agentUsername]').css('display', 'inline-block'); $form.find('.form-item[rel=agentUsername]').find('input').val("oracle"); @@ -15430,16 +15430,16 @@ $form.find('.form-item[rel=hostname]').css('display', 'inline-block'); $form.find('.form-item[rel=username]').css('display', 'inline-block'); $form.find('.form-item[rel=password]').css('display', 'inline-block'); - + //$('li[input_group="vmware"]', $dialogAddHost).hide(); $form.find('.form-item[rel=vcenterHost]').hide(); - + //$('li[input_group="baremetal"]', $dialogAddHost).hide(); $form.find('.form-item[rel=baremetalCpuCores]').hide(); $form.find('.form-item[rel=baremetalCpu]').hide(); $form.find('.form-item[rel=baremetalMemory]').hide(); $form.find('.form-item[rel=baremetalMAC]').hide(); - + //$('li[input_group="Ovm"]', $dialogAddHost).hide(); $form.find('.form-item[rel=agentUsername]').hide(); $form.find('.form-item[rel=agentPassword]').hide(); @@ -15453,12 +15453,12 @@ $form.find('.form-item[rel=ovm3cluster]').hide(); } }); - + args.$select.trigger("change"); } }, //always appear (end) - + //input_group="general" starts here hostname: { label: 'label.host.name', @@ -15468,7 +15468,7 @@ }, isHidden: true }, - + username: { label: 'label.username', docID: 'helpHostUsername', @@ -15477,7 +15477,7 @@ }, isHidden: true }, - + password: { label: 'label.password', docID: 'helpHostPassword', @@ -15487,14 +15487,14 @@ isHidden: true, isPassword: true }, - + isDedicated: { label: 'label.dedicate', isBoolean: true, isChecked: false, docID: 'helpDedicateResource' }, - + domainId: { label: 'label.domain', isHidden: true, @@ -15509,7 +15509,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -15519,7 +15519,7 @@ items.sort(function(a, b) { return a.description.localeCompare(b.description); }); - + args.response.success({ data: items }); @@ -15527,7 +15527,7 @@ }); } }, - + accountId: { label: 'label.account', isHidden: true, @@ -15537,9 +15537,9 @@ required: false } }, - + //input_group="general" ends here - + //input_group="VMWare" starts here vcenterHost: { label: 'label.esx.host', @@ -15549,7 +15549,7 @@ isHidden: true }, //input_group="VMWare" ends here - + //input_group="BareMetal" starts here baremetalCpuCores: { label: 'label.num.cpu.cores', @@ -15580,7 +15580,7 @@ isHidden: true }, //input_group="BareMetal" ends here - + //input_group="OVM" starts here agentUsername: { label: 'label.agent.username', @@ -15652,7 +15652,7 @@ //always appear (end) } }, - + action: function (args) { var data = { zoneid: args.data.zoneid, @@ -15662,19 +15662,19 @@ clustertype: selectedClusterObj.clustertype, hosttags: args.data.hosttags }; - + if (selectedClusterObj.hypervisortype == "VMware") { $.extend(data, { username: '', password: '' }); - + var hostname = args.data.vcenterHost; var url; if (hostname.indexOf("http://") == -1) url = "http://" + hostname; else url = hostname; - + $.extend(data, { url: url }); @@ -15683,17 +15683,17 @@ username: args.data.username, password: args.data.password }); - + var hostname = args.data.hostname; var url; if (hostname.indexOf("http://") == -1) url = "http://" + hostname; else url = hostname; - + $.extend(data, { url: url }); - + if (selectedClusterObj.hypervisortype == "BareMetal") { $.extend(data, { cpunumber: args.data.baremetalCpuCores, @@ -15714,7 +15714,7 @@ }); } } - + var hostId = null; $.ajax({ url: createURL("addHost"), @@ -15722,17 +15722,17 @@ data: data, success: function (json) { var item = json.addhostresponse.host[0]; - + hostId = json.addhostresponse.host[0].id; - + //EXPLICIT DEDICATION var array2 =[]; - + if (args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked') == true) { if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - - + + if (hostId != null) { $.ajax({ url: createURL("dedicateHost&hostId=" + hostId + "&domainId=" + args.data.domainId + array2.join("")), @@ -15748,11 +15748,11 @@ interval: 4500, desc: "Dedicate Host" }, - + data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(XMLHttpResponse)); } @@ -15763,14 +15763,14 @@ data: item }); }, - + error: function (XMLHttpResponse) { var errorMsg = parseXMLHttpResponse(XMLHttpResponse); args.response.error(errorMsg); } }); }, - + notification: { poll: function (args) { args.complete({ @@ -15778,7 +15778,7 @@ }); } }, - + messages: { notification: function (args) { return 'label.add.host'; @@ -15798,10 +15798,10 @@ action: function (args) { var array1 =[]; array1.push("&hosttags=" + todb(args.data.hosttags)); - + if (args.data.oscategoryid != null && args.data.oscategoryid.length > 0) array1.push("&osCategoryId=" + args.data.oscategoryid); - + $.ajax({ url: createURL("updateHost&id=" + args.context.hosts[0].id + array1.join("")), dataType: "json", @@ -15815,7 +15815,7 @@ }); } }, - + dedicate: { label: 'label.dedicate.host', messages: { @@ -15842,7 +15842,7 @@ success: function (json) { var domainObjs = json.listdomainsresponse.domain; var items =[]; - + $(domainObjs).each(function () { items.push({ id: this.id, @@ -15852,7 +15852,7 @@ items.sort(function(a, b) { return a.description.localeCompare(b.description); }); - + args.response.success({ data: items }); @@ -15874,7 +15874,7 @@ var array2 =[]; if (args.data.accountId != "") array2.push("&account=" + todb(args.data.accountId)); - + $.ajax({ url: createURL("dedicateHost&hostId=" + args.context.hosts[0].id + @@ -15882,7 +15882,7 @@ dataType: "json", success: function (json) { var jid = json.dedicatehostresponse.jobid; - + args.response.success({ _custom: { jobId: jid, @@ -15933,8 +15933,8 @@ poll: pollAsyncJobResult } }, - - + + enableMaintenanceMode: { label: 'label.action.enable.maintenance.mode', action: function (args) { @@ -15970,7 +15970,7 @@ poll: pollAsyncJobResult } }, - + cancelMaintenanceMode: { label: 'label.action.cancel.maintenance.mode', action: function (args) { @@ -16006,7 +16006,7 @@ poll: pollAsyncJobResult } }, - + forceReconnect: { label: 'label.action.force.reconnect', action: function (args) { @@ -16042,14 +16042,14 @@ poll: pollAsyncJobResult } }, - + enable: { label: 'label.enable.host', action: function (args) { - var data = { - id: args.context.hosts[0].id, - allocationstate: "Enable" - }; + var data = { + id: args.context.hosts[0].id, + allocationstate: "Enable" + }; $.ajax({ url: createURL("updateHost"), data: data, @@ -16080,10 +16080,10 @@ disable: { label: 'label.disable.host', action: function (args) { - var data = { - id: args.context.hosts[0].id, - allocationstate: "Disable" - }; + var data = { + id: args.context.hosts[0].id, + allocationstate: "Disable" + }; $.ajax({ url: createURL("updateHost"), data: data, @@ -16110,7 +16110,7 @@ } } }, - + 'remove': { label: 'label.action.remove.host', messages: { @@ -16136,14 +16136,14 @@ }, action: function (args) { var data = { - id: args.context.hosts[0].id - }; + id: args.context.hosts[0].id + }; if(args.$form.find('.form-item[rel=isForced]').css("display") != "none") { - $.extend(data, { - forced: (args.data.isForced == "on") - }); + $.extend(data, { + forced: (args.data.isForced == "on") + }); } - + $.ajax({ url: createURL("deleteHost"), data: data, @@ -16153,10 +16153,10 @@ data: { } }); - + if (args.context.hosts[0].hypervisor == "XenServer"){ - cloudStack.dialog.notice({ message: _s("The host has been deleted. Please eject the host from XenServer Pool") }) - } + cloudStack.dialog.notice({ message: _s("The host has been deleted. Please eject the host from XenServer Pool") }) + } } }); }, @@ -16177,7 +16177,7 @@ tabs: { details: { title: 'label.details', - + preFilter: function (args) { var hiddenFields =[]; $.ajax({ @@ -16192,7 +16192,7 @@ }); return hiddenFields; }, - + fields:[ { name: { label: 'label.name' @@ -16300,10 +16300,10 @@ label: 'label.last.disconnected' }, cpusockets: { - label: 'label.number.of.cpu.sockets' + label: 'label.number.of.cpu.sockets' } }, { - + isdedicated: { label: 'label.dedicated' }, @@ -16311,7 +16311,7 @@ label: 'label.domain.id' } }], - + dataProvider: function (args) { $.ajax({ url: createURL("listHosts&id=" + args.context.hosts[0].id), @@ -16349,7 +16349,7 @@ }); } }, - + stats: { title: 'label.statistics', fields: { @@ -16506,7 +16506,7 @@ label: 'label.scope' } }, - + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -16537,11 +16537,11 @@ } }); }, - + actions: { add: { label: 'label.add.primary.storage', - + createForm: { title: 'label.add.primary.storage', fields: { @@ -16558,22 +16558,22 @@ } // { id: 'host', description: _l('label.host') } ]; - + args.response.success({ data: scope }); - + args.$select.change(function () { var $form = $(this).closest('form'); var scope = $(this).val(); - + if (scope == 'zone') { $form.find('.form-item[rel=podId]').hide(); $form.find('.form-item[rel=clusterId]').hide(); $form.find('.form-item[rel=hostId]').hide(); $form.find('.form-item[rel=hypervisor]').css('display', 'inline-block'); } else if (scope == 'cluster') { - + $form.find('.form-item[rel=hostId]').hide(); $form.find('.form-item[rel=podId]').css('display', 'inline-block'); $form.find('.form-item[rel=clusterId]').css('display', 'inline-block'); @@ -16587,8 +16587,8 @@ }) } }, - - + + hypervisor: { label: 'label.hypervisor', isHidden: true, @@ -16615,7 +16615,7 @@ }); } }, - + zoneid: { label: 'label.zone', docID: 'helpPrimaryStorageZone', @@ -16626,13 +16626,13 @@ var data = args.context.zones ? { id: args.context.zones[0].id }: {}; - + $.ajax({ url: createURL('listZones'), data: data, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + args.response.success({ data: $.map(zones, function (zone) { return { @@ -16673,7 +16673,7 @@ }); } }, - + clusterId: { label: 'label.cluster', docID: 'helpPrimaryStorageCluster', @@ -16703,7 +16703,7 @@ }); } }, - + hostId: { label: 'label.host', validation: { @@ -16731,7 +16731,7 @@ }); } }, - + name: { label: 'label.name', docID: 'helpPrimaryStorageName', @@ -16739,7 +16739,7 @@ required: true } }, - + protocol: { label: 'label.protocol', docID: 'helpPrimaryStorageProtocol', @@ -16750,19 +16750,19 @@ select: function (args) { var clusterId = args.clusterId; if (clusterId == null || clusterId.length == 0) { - args.response.success({ + args.response.success({ data: [] }); return; } - + $(clusterObjs).each(function () { if (this.id == clusterId) { selectedClusterObj = this; return false; //break the $.each() loop } }); - + if (selectedClusterObj.hypervisortype == "KVM") { var items =[]; items.push({ @@ -16877,35 +16877,35 @@ data:[] }); } - + args.$select.change(function () { var $form = $(this).closest('form'); - + var protocol = $(this).val(); if (protocol == null) return; - - + + if (protocol == "nfs") { $form.find('.form-item[rel=server]').css('display', 'inline-block'); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=path]').css('display', 'inline-block'); var $required = $form.find('.form-item[rel=path]').find(".name").find("label span"); $form.find('.form-item[rel=path]').find(".name").find("label").text("Path:").prepend($required); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -16916,23 +16916,23 @@ //"SMB" show almost the same fields as "nfs" does, except 3 more SMB-specific fields. $form.find('.form-item[rel=server]').css('display', 'inline-block'); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=path]').css('display', 'inline-block'); var $required = $form.find('.form-item[rel=path]').find(".name").find("label span"); $form.find('.form-item[rel=path]').find(".name").find("label").text("Path:").prepend($required); - + $form.find('.form-item[rel=smbUsername]').css('display', 'inline-block'); $form.find('.form-item[rel=smbPassword]').css('display', 'inline-block'); $form.find('.form-item[rel=smbDomain]').css('display', 'inline-block'); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -16943,23 +16943,23 @@ //ocfs2 is the same as nfs, except no server field. $form.find('.form-item[rel=server]').hide(); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=path]').css('display', 'inline-block'); var $required = $form.find('.form-item[rel=path]').find(".name").find("label span"); $form.find('.form-item[rel=path]').find(".name").find("label").text("Path:").prepend($required); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -16969,23 +16969,23 @@ } else if (protocol == "PreSetup") { $form.find('.form-item[rel=server]').hide(); $form.find('.form-item[rel=server]').find(".value").find("input").val("localhost"); - + $form.find('.form-item[rel=path]').css('display', 'inline-block'); var $required = $form.find('.form-item[rel=path]').find(".name").find("label span"); $form.find('.form-item[rel=path]').find(".name").find("label").text("SR Name-Label:").prepend($required); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -17019,21 +17019,21 @@ } else if (protocol == "iscsi") { $form.find('.form-item[rel=server]').css('display', 'inline-block'); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=path]').hide(); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').css('display', 'inline-block'); $form.find('.form-item[rel=lun]').css('display', 'inline-block'); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -17043,21 +17043,21 @@ } else if ($(this).val() == "clvm") { $form.find('.form-item[rel=server]').hide(); $form.find('.form-item[rel=server]').find(".value").find("input").val("localhost"); - + $form.find('.form-item[rel=path]').hide(); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').css('display', 'inline-block'); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -17067,21 +17067,21 @@ } else if (protocol == "vmfs") { $form.find('.form-item[rel=server]').css('display', 'inline-block'); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=path]').hide(); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').css('display', 'inline-block'); $form.find('.form-item[rel=vCenterDataStore]').css('display', 'inline-block'); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -17092,23 +17092,23 @@ //"SharedMountPoint" show the same fields as "nfs" does. $form.find('.form-item[rel=server]').hide(); $form.find('.form-item[rel=server]').find(".value").find("input").val("localhost"); - + $form.find('.form-item[rel=path]').css('display', 'inline-block'); var $required = $form.find('.form-item[rel=path]').find(".name").find("label span"); $form.find('.form-item[rel=path]').find(".name").find("label").text("Path:").prepend($required); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); @@ -17118,16 +17118,16 @@ } else if (protocol == "rbd") { $form.find('.form-item[rel=rbdmonitor]').css('display', 'inline-block'); $form.find('.form-item[rel=rbdmonitor]').find(".name").find("label").text("RADOS Monitor:"); - + $form.find('.form-item[rel=rbdpool]').css('display', 'inline-block'); $form.find('.form-item[rel=rbdpool]').find(".name").find("label").text("RADOS Pool:"); - + $form.find('.form-item[rel=rbdid]').css('display', 'inline-block'); $form.find('.form-item[rel=rbdid]').find(".name").find("label").text("RADOS User:"); - + $form.find('.form-item[rel=rbdsecret]').css('display', 'inline-block'); $form.find('.form-item[rel=rbdsecret]').find(".name").find("label").text("RADOS Secret:"); - + $form.find('.form-item[rel=server]').hide(); $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); @@ -17135,7 +17135,7 @@ $form.find('.form-item[rel=path]').hide(); $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); @@ -17169,20 +17169,20 @@ } else { $form.find('.form-item[rel=server]').css('display', 'inline-block'); $form.find('.form-item[rel=server]').find(".value").find("input").val(""); - + $form.find('.form-item[rel=iqn]').hide(); $form.find('.form-item[rel=lun]').hide(); - + $form.find('.form-item[rel=volumegroup]').hide(); - + $form.find('.form-item[rel=vCenterDataCenter]').hide(); $form.find('.form-item[rel=vCenterDataStore]').hide(); - + $form.find('.form-item[rel=rbdmonitor]').hide(); $form.find('.form-item[rel=rbdpool]').hide(); $form.find('.form-item[rel=rbdid]').hide(); $form.find('.form-item[rel=rbdsecret]').hide(); - + $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); @@ -17190,12 +17190,12 @@ $form.find('.form-item[rel=glustervolume]').hide(); } }); - + args.$select.trigger("change"); } }, //always appear (end) - + server: { label: 'label.server', docID: 'helpPrimaryStorageServer', @@ -17204,7 +17204,7 @@ }, isHidden: true }, - + //nfs path: { label: 'label.path', @@ -17313,7 +17313,7 @@ }, isHidden: true }, - + //iscsi iqn: { label: 'label.target.iqn', @@ -17331,7 +17331,7 @@ }, isHidden: true }, - + //clvm volumegroup: { label: 'label.volgroup', @@ -17340,7 +17340,7 @@ }, isHidden: true }, - + //vmfs vCenterDataCenter: { label: 'label.vcenter.datacenter', @@ -17356,7 +17356,7 @@ }, isHidden: true }, - + // RBD rbdmonitor: { label: 'label.rbd.monitor', @@ -17443,25 +17443,25 @@ //always appear (end) } }, - + /******************************/ action: function (args) { var array1 =[]; array1.push("&scope=" + todb(args.data.scope)); - + array1.push("&zoneid=" + args.data.zoneid); - + if (args.data.scope == 'zone') { - + array1.push("&hypervisor=" + args.data.hypervisor); } - + if (args.data.scope == 'cluster') { - + array1.push("&podid=" + args.data.podId); array1.push("&clusterid=" + args.data.clusterId); } - + if (args.data.scope == 'host') { array1.push("&podid=" + args.data.podId); array1.push("&clusterid=" + args.data.clusterId); @@ -17564,11 +17564,11 @@ array1.push("&tags=" + todb(args.data.storageTags)); } - if ("custom" in args.response) { - args.response.custom(array1); - return; - } - + if ("custom" in args.response) { + args.response.custom(array1); + return; + } + $.ajax({ url: createURL("createStoragePool" + array1.join("")), dataType: "json", @@ -17584,7 +17584,7 @@ } }); }, - + notification: { poll: function (args) { args.complete({ @@ -17592,7 +17592,7 @@ }); } }, - + messages: { notification: function (args) { return 'label.add.primary.storage'; @@ -17600,7 +17600,7 @@ } } }, - + detailView: { name: "Primary storage details", viewAll: { @@ -17614,7 +17614,7 @@ action: function (args) { var array1 =[]; array1.push("&tags=" + todb(args.data.tags)); - + if (args.data.disksizetotal != null && args.data.disksizetotal.length > 0) { var diskSizeTotal = args.data.disksizetotal.split(",").join(""); @@ -17642,7 +17642,7 @@ }); } }, - + enableMaintenanceMode: { label: 'label.action.enable.maintenance.mode', action: function (args) { @@ -17678,7 +17678,7 @@ poll: pollAsyncJobResult } }, - + cancelMaintenanceMode: { label: 'label.action.cancel.maintenance.mode', messages: { @@ -17714,7 +17714,7 @@ poll: pollAsyncJobResult } }, - + 'remove': { label: 'label.action.delete.primary.storage', messages: { @@ -17753,7 +17753,7 @@ } } }, - + tabs: { details: { title: 'label.details', @@ -17850,7 +17850,7 @@ } } }], - + dataProvider: function (args) { $.ajax({ url: createURL("listStoragePools&id=" + args.context.primarystorages[0].id), @@ -17866,13 +17866,13 @@ }); } }, - + // Granular settings for storage pool settings: { title: 'label.settings', custom: cloudStack.uiCustom.granularSettings({ dataProvider: function (args) { - + $.ajax({ url: createURL('listConfigurations&storageid=' + args.context.primarystorages[0].id), data: listViewDataProvider(args, { @@ -17885,7 +17885,7 @@ data: json.listconfigurationsresponse.configuration }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -17898,7 +17898,7 @@ name: args.data.jsonObj.name, value: args.data.value }; - + $.ajax({ url: createURL('updateConfiguration&storageid=' + args.context.primarystorages[0].id), data: data, @@ -17908,7 +17908,7 @@ data: item }); }, - + error: function (json) { args.response.error(parseXMLHttpResponse(json)); } @@ -17921,7 +17921,7 @@ } } }, - + ucs: { title: 'UCS', id: 'ucs', @@ -17960,7 +17960,7 @@ }; */ //for testing only (end) - + var items = json.listucsmanagerreponse.ucsmanager; args.response.success({ data: items @@ -17971,13 +17971,13 @@ actions: { add: { label: 'label.add.ucs.manager', - + messages: { notification: function (args) { return 'label.add.ucs.manager'; } }, - + createForm: { title: 'label.add.ucs.manager', fields: { @@ -18008,7 +18008,7 @@ } } }, - + action: function (args) { var data = { zoneid: args.context.physicalResources[0].id, @@ -18021,7 +18021,7 @@ name: args.data.name }); } - + $.ajax({ url: createURL('addUcsManager'), data: data, @@ -18038,7 +18038,7 @@ } }); }, - + notification: { poll: function (args) { args.complete(); @@ -18046,7 +18046,7 @@ } } }, - + detailView: { isMaximized: true, noCompact: true, @@ -18086,7 +18086,7 @@ tabs: { details: { title: 'label.details', - + fields:[ { name: { label: 'label.name' @@ -18100,7 +18100,7 @@ label: 'label.url' } }], - + dataProvider: function (args) { $.ajax({ url: createURL('listUcsManagers'), @@ -18126,7 +18126,7 @@ }; */ //for testing only (end) - + var item = json.listucsmanagerreponse.ucsmanager[0]; args.response.success({ data: item @@ -18135,7 +18135,7 @@ }); } }, - + blades: { title: 'label.blades', listView: { @@ -18192,7 +18192,7 @@ }; */ //for testing only (end) - + var items = json.listucsbladeresponse.ucsblade ? json.listucsbladeresponse.ucsblade:[]; for (var i = 0; i < items.length; i++) { addExtraPropertiesToUcsBladeObject(items[i]); @@ -18269,7 +18269,7 @@ }; */ //for testing only (end) - + /* var item = json.refreshucsbladesresponse.ucsblade[0]; addExtraPropertiesToUcsBladeObject(item); @@ -18287,7 +18287,7 @@ } } }, - + associateTemplateToBlade: { label: 'label.instanciate.template.associate.profile.blade', addRow: 'false', @@ -18303,7 +18303,7 @@ label: 'label.select.template', select: function (args) { var items =[]; - + $.ajax({ url: createURL('listUcsTemplates'), data: { @@ -18325,7 +18325,7 @@ }; */ //for testing only (end) - + var ucstemplates = json.listucstemplatesresponse.ucstemplate; if (ucstemplates != null) { for (var i = 0; i < ucstemplates.length; i++) { @@ -18337,7 +18337,7 @@ } } }); - + args.response.success({ data: items }); @@ -18357,13 +18357,13 @@ templatedn: args.data.templatedn, bladeid: args.context.blades[0].id }; - + if (args.data.profilename != null && args.data.profilename.length > 0) { $.extend(data, { profilename: args.data.profilename }); } - + $.ajax({ url: createURL('instantiateUcsTemplateAndAssocaciateToBlade'), data: data, @@ -18377,7 +18377,7 @@ } */ //for testing only (end) - + var jid = json.instantiateucstemplateandassociatetobladeresponse.jobid; args.response.success({ _custom: { @@ -18408,7 +18408,7 @@ }; */ //for testing only (end) - + addExtraPropertiesToUcsBladeObject(json.queryasyncjobresultresponse.jobresult.ucsblade); return json.queryasyncjobresultresponse.jobresult.ucsblade; } @@ -18421,7 +18421,7 @@ poll: pollAsyncJobResult } }, - + disassociateProfileFromBlade: { label: 'label.disassociate.profile.blade', addRow: 'false', @@ -18457,7 +18457,7 @@ } */ //for testing only (end) - + var jid = json.disassociateucsprofilefrombladeresponse.jobid; args.response.success({ _custom: { @@ -18487,7 +18487,7 @@ }; */ //for testing only (end) - + addExtraPropertiesToUcsBladeObject(json.queryasyncjobresultresponse.jobresult.ucsblade); return json.queryasyncjobresultresponse.jobresult.ucsblade; } @@ -18507,7 +18507,7 @@ } } }, - + 'secondary-storage': { title: 'label.secondary.storage', id: 'secondarystorages', @@ -18529,8 +18529,8 @@ label: 'label.protocol' } }, - - + + dataProvider: function (args) { var array1 =[]; if (args.filterBy != null) { @@ -18544,7 +18544,7 @@ } } array1.push("&zoneid=" + args.context.zones[0].id); - + $.ajax({ url: createURL("listImageStores&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), dataType: "json", @@ -18558,14 +18558,14 @@ } }); }, - + actions: { add: { label: 'label.add.secondary.storage', - + createForm: { title: 'label.add.secondary.storage', - + fields: { name: { label: 'label.name' @@ -18594,11 +18594,11 @@ id: 'Swift', description: 'Swift' }]; - + args.response.success({ data: items }); - + args.$select.change(function () { var $form = $(this).closest('form'); if ($(this).val() == "NFS") { @@ -18606,12 +18606,12 @@ $form.find('.form-item[rel=zoneid]').css('display', 'inline-block'); $form.find('.form-item[rel=nfsServer]').css('display', 'inline-block'); $form.find('.form-item[rel=path]').css('display', 'inline-block'); - + //SMB $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + //S3 $form.find('.form-item[rel=accesskey]').hide(); $form.find('.form-item[rel=secretkey]').hide(); @@ -18621,13 +18621,13 @@ $form.find('.form-item[rel=connectiontimeout]').hide(); $form.find('.form-item[rel=maxerrorretry]').hide(); $form.find('.form-item[rel=sockettimeout]').hide(); - + $form.find('.form-item[rel=createNfsCache]').find('input').removeAttr('checked'); $form.find('.form-item[rel=createNfsCache]').hide(); $form.find('.form-item[rel=nfsCacheZoneid]').hide(); $form.find('.form-item[rel=nfsCacheNfsServer]').hide(); $form.find('.form-item[rel=nfsCachePath]').hide(); - + //Swift $form.find('.form-item[rel=url]').hide(); $form.find('.form-item[rel=account]').hide(); @@ -18638,12 +18638,12 @@ $form.find('.form-item[rel=zoneid]').css('display', 'inline-block'); $form.find('.form-item[rel=nfsServer]').css('display', 'inline-block'); $form.find('.form-item[rel=path]').css('display', 'inline-block'); - + //SMB $form.find('.form-item[rel=smbUsername]').css('display', 'inline-block'); $form.find('.form-item[rel=smbPassword]').css('display', 'inline-block'); $form.find('.form-item[rel=smbDomain]').css('display', 'inline-block'); - + //S3 $form.find('.form-item[rel=accesskey]').hide(); $form.find('.form-item[rel=secretkey]').hide(); @@ -18653,13 +18653,13 @@ $form.find('.form-item[rel=connectiontimeout]').hide(); $form.find('.form-item[rel=maxerrorretry]').hide(); $form.find('.form-item[rel=sockettimeout]').hide(); - + $form.find('.form-item[rel=createNfsCache]').find('input').removeAttr('checked'); $form.find('.form-item[rel=createNfsCache]').hide(); $form.find('.form-item[rel=nfsCacheZoneid]').hide(); $form.find('.form-item[rel=nfsCacheNfsServer]').hide(); $form.find('.form-item[rel=nfsCachePath]').hide(); - + //Swift $form.find('.form-item[rel=url]').hide(); $form.find('.form-item[rel=account]').hide(); @@ -18670,12 +18670,12 @@ $form.find('.form-item[rel=zoneid]').hide(); $form.find('.form-item[rel=nfsServer]').hide(); $form.find('.form-item[rel=path]').hide(); - + //SMB $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + //S3 $form.find('.form-item[rel=accesskey]').css('display', 'inline-block'); $form.find('.form-item[rel=secretkey]').css('display', 'inline-block'); @@ -18685,15 +18685,15 @@ $form.find('.form-item[rel=connectiontimeout]').css('display', 'inline-block'); $form.find('.form-item[rel=maxerrorretry]').css('display', 'inline-block'); $form.find('.form-item[rel=sockettimeout]').css('display', 'inline-block'); - + $form.find('.form-item[rel=createNfsCache]').find('input').attr('checked', 'checked'); //$form.find('.form-item[rel=createNfsCache]').find('input').attr('disabled', 'disabled'); //This checkbox should not be disabled any more because NFS staging (of a zone) might already exist (from "NFS secondary storage => Prepare Object Store Migration => NFS staging") $form.find('.form-item[rel=createNfsCache]').css('display', 'inline-block'); $form.find('.form-item[rel=nfsCacheZoneid]').css('display', 'inline-block'); $form.find('.form-item[rel=nfsCacheNfsServer]').css('display', 'inline-block'); $form.find('.form-item[rel=nfsCachePath]').css('display', 'inline-block'); - - + + //Swift $form.find('.form-item[rel=url]').hide(); $form.find('.form-item[rel=account]').hide(); @@ -18704,12 +18704,12 @@ $form.find('.form-item[rel=zoneid]').hide(); $form.find('.form-item[rel=nfsServer]').hide(); $form.find('.form-item[rel=path]').hide(); - + //SMB $form.find('.form-item[rel=smbUsername]').hide(); $form.find('.form-item[rel=smbPassword]').hide(); $form.find('.form-item[rel=smbDomain]').hide(); - + //S3 $form.find('.form-item[rel=accesskey]').hide(); $form.find('.form-item[rel=secretkey]').hide(); @@ -18719,13 +18719,13 @@ $form.find('.form-item[rel=connectiontimeout]').hide(); $form.find('.form-item[rel=maxerrorretry]').hide(); $form.find('.form-item[rel=sockettimeout]').hide(); - + $form.find('.form-item[rel=createNfsCache]').find('input').removeAttr('checked'); $form.find('.form-item[rel=createNfsCache]').hide(); $form.find('.form-item[rel=nfsCacheZoneid]').hide(); $form.find('.form-item[rel=nfsCacheNfsServer]').hide(); $form.find('.form-item[rel=nfsCachePath]').hide(); - + //Swift $form.find('.form-item[rel=url]').css('display', 'inline-block'); $form.find('.form-item[rel=account]').css('display', 'inline-block'); @@ -18733,12 +18733,12 @@ $form.find('.form-item[rel=key]').css('display', 'inline-block'); } }); - + args.$select.change(); } }, - - + + //NFS, SMB (begin) zoneid: { label: 'label.zone', @@ -18752,7 +18752,7 @@ data: {}, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + if (zones != null) { //$.map(items, fn) - items can not be null args.response.success({ @@ -18787,8 +18787,8 @@ } }, //NFS, SMB (end) - - + + //SMB (begin) smbUsername: { label: 'label.smb.username', @@ -18856,7 +18856,7 @@ label: 'label.s3.socket_timeout', docID: 'helpS3SocketTimeout' }, - + createNfsCache: { label: 'label.create.nfs.secondary.staging.store', isBoolean: true, @@ -18874,7 +18874,7 @@ data: {}, success: function (json) { var zones = json.listzonesresponse.zone; - + if (zones != null) { //$.map(items, fn) - items can not be null args.response.success({ @@ -18911,8 +18911,8 @@ } }, //S3 (end) - - + + //Swift (begin) url: { label: 'label.url', @@ -18932,7 +18932,7 @@ //Swift (end) } }, - + action: function (args) { var data = { }; @@ -18941,19 +18941,19 @@ name: args.data.name }); } - + if (args.data.provider == 'NFS') { var zoneid = args.data.zoneid; var nfs_server = args.data.nfsServer; var path = args.data.path; var url = nfsURL(nfs_server, path); - + $.extend(data, { provider: args.data.provider, zoneid: zoneid, url: url }); - + $.ajax({ url: createURL('addImageStore'), data: data, @@ -18984,7 +18984,7 @@ 'details[2].key': 'domain', 'details[2].value': args.data.smbDomain }); - + $.ajax({ url: createURL('addImageStore'), data: data, @@ -19011,7 +19011,7 @@ 'details[3].key': 'usehttps', 'details[3].value': (args.data.usehttps != null && args.data.usehttps == 'on' ? 'true': 'false') }); - + var index = 4; if (args.data.endpoint != null && args.data.endpoint.length > 0) { data[ 'details[' + index.toString() + '].key'] = 'endpoint'; @@ -19033,13 +19033,13 @@ data[ 'details[' + index.toString() + '].value'] = args.data.sockettimeout; index++; } - + $.ajax({ url: createURL('addImageStore'), data: data, success: function (json) { g_regionsecondaryenabled = true; - + var item = json.addimagestoreresponse.imagestore; args.response.success({ data: item @@ -19049,19 +19049,19 @@ args.response.error(parseXMLHttpResponse(json)); } }); - + if (args.data.createNfsCache == 'on') { var zoneid = args.data.nfsCacheZoneid; var nfs_server = args.data.nfsCacheNfsServer; var path = args.data.nfsCachePath; var url = nfsURL(nfs_server, path); - + var nfsCacheData = { provider: 'NFS', zoneid: zoneid, url: url }; - + $.ajax({ url: createURL('createSecondaryStagingStore'), data: nfsCacheData, @@ -19078,7 +19078,7 @@ provider: args.data.provider, url: args.data.url }); - + var index = 0; if (args.data.account != null && args.data.account.length > 0) { data[ 'details[' + index.toString() + '].key'] = 'account'; @@ -19100,7 +19100,7 @@ data: data, success: function (json) { g_regionsecondaryenabled = true; - + var item = json.addimagestoreresponse.imagestore; args.response.success({ data: item @@ -19112,7 +19112,7 @@ }); } }, - + notification: { poll: function (args) { args.complete({ @@ -19120,7 +19120,7 @@ }); } }, - + messages: { notification: function (args) { return 'label.add.secondary.storage'; @@ -19128,11 +19128,11 @@ } } }, - + detailView: { name: 'label.secondary.storage.details', isMaximized: true, - actions: { + actions: { remove: { label: 'label.action.delete.secondary.storage', messages: { @@ -19196,7 +19196,7 @@ for (var i = 0; i < array1.length; i++) { if (i > 0) string1 += ', '; - + string1 += array1[i].name + ': ' + array1[i].value; } } @@ -19207,7 +19207,7 @@ label: 'label.id' } }], - + dataProvider: function (args) { $.ajax({ url: createURL("listImageStores&id=" + args.context.secondaryStorage[0].id), @@ -19224,7 +19224,7 @@ }); } } - + // Granular settings for storage pool for secondary storage is not required /* settings: { title: 'label.menu.global.settings', @@ -19266,7 +19266,7 @@ label: 'label.provider' } }, - + /* dataProvider: function(args) { //being replaced with dataProvider in line 6898 var array1 = []; @@ -19281,7 +19281,7 @@ } } array1.push("&zoneid=" + args.context.zones[0].id); - + $.ajax({ url: createURL("listImageStores&page=" + args.page + "&pagesize=" + pageSize + array1.join("")), dataType: "json", @@ -19296,7 +19296,7 @@ }); }, */ - + actions: { add: { label: 'label.add.nfs.secondary.staging.store', @@ -19314,7 +19314,7 @@ data: {}, success: function (json) { var zones = json.listzonesresponse.zone ? json.listzonesresponse.zone:[]; - + if (zones != null) { //$.map(items, fn) - items can not be null args.response.success({ @@ -19380,7 +19380,7 @@ } } }, - + detailView: { name: 'label.secondary.staging.store.details', isMaximized: true, @@ -19447,7 +19447,7 @@ for (var i = 0; i < array1.length; i++) { if (i > 0) string1 += ', '; - + string1 += array1[i].name + ': ' + array1[i].value; } } @@ -19458,7 +19458,7 @@ label: 'label.id' } }], - + dataProvider: function (args) { $.ajax({ url: createURL('listSecondaryStagingStores'), @@ -19475,7 +19475,7 @@ }); } } - + // Granular settings for storage pool for secondary storage is not required /* settings: { title: 'label.menu.global.settings', @@ -19502,7 +19502,7 @@ } } }, - + guestIpRanges: { //Advanced zone - Guest traffic type - Network tab - Network detailView - View IP Ranges title: 'label.guest.ip.range', @@ -19523,13 +19523,13 @@ label: 'label.ipv6.end.ip' }, gateway: { - label: 'label.gateway' + label: 'label.gateway' }, netmask: { - label: 'label.netmask' + label: 'label.netmask' } }, - + dataProvider: function (args) { $.ajax({ url: createURL("listVlanIpRanges&zoneid=" + selectedZoneObj.id + "&networkid=" + args.context.networks[0].id + "&page=" + args.page + "&pagesize=" + pageSize), @@ -19543,7 +19543,7 @@ } }); }, - + actions: { add: { label: 'label.add.ip.range', @@ -19578,27 +19578,27 @@ }, action: function (args) { var array2 =[]; - + if (args.data.gateway != null && args.data.gateway.length > 0) array2.push("&gateway=" + args.data.gateway); if (args.data.netmask != null && args.data.netmask.length > 0) array2.push("&netmask=" + args.data.netmask); - + if (args.data.startipv4 != null && args.data.startipv4.length > 0) array2.push("&startip=" + args.data.startipv4); if (args.data.endipv4 != null && args.data.endipv4.length > 0) array2.push("&endip=" + args.data.endipv4); - + if (args.data.ip6cidr != null && args.data.ip6cidr.length > 0) array2.push("&ip6cidr=" + args.data.ip6cidr); if (args.data.ip6gateway != null && args.data.ip6gateway.length > 0) array2.push("&ip6gateway=" + args.data.ip6gateway); - + if (args.data.startipv6 != null && args.data.startipv6.length > 0) array2.push("&startipv6=" + args.data.startipv6); if (args.data.endipv6 != null && args.data.endipv6.length > 0) array2.push("&endipv6=" + args.data.endipv6); - + $.ajax({ url: createURL("createVlanIpRange&forVirtualNetwork=false&networkid=" + args.context.networks[0].id + array2.join("")), dataType: "json", @@ -19625,7 +19625,7 @@ } } }, - + 'remove': { label: 'label.remove.ip.range', messages: { @@ -19663,7 +19663,7 @@ } } }; - + function addBaremetalDhcpDeviceFn(args) { if (nspMap[ "BaremetalDhcpProvider"] == null) { $.ajax({ @@ -19684,7 +19684,7 @@ clearInterval(addBaremetalDhcpProviderIntervalID); if (result.jobstatus == 1) { nspMap[ "BaremetalDhcpProvider"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider; - + $.ajax({ url: createURL('addBaremetalDhcp'), data: { @@ -19747,7 +19747,7 @@ }); } } - + function addBaremetalPxeDeviceFn(args) { if (nspMap[ "BaremetalPxeProvider"] == null) { $.ajax({ @@ -19768,7 +19768,7 @@ clearInterval(addBaremetalPxeProviderIntervalID); if (result.jobstatus == 1) { nspMap[ "BaremetalPxeProvider"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider; - + $.ajax({ url: createURL('addBaremetalPxeKickStartServer'), data: { @@ -19833,28 +19833,28 @@ }); } } - + function addExternalLoadBalancer(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { var array1 =[]; array1.push("&physicalnetworkid=" + physicalNetworkObj.id); array1.push("&username=" + todb(args.data.username)); array1.push("&password=" + todb(args.data.password)); array1.push("&networkdevicetype=" + todb(args.data.networkdevicetype)); - + if (apiCmd == "addNetscalerLoadBalancer") { array1.push("&gslbprovider=" + (args.data.gslbprovider == "on")); array1.push("&gslbproviderpublicip=" + todb(args.data.gslbproviderpublicip)); array1.push("&gslbproviderprivateip=" + todb(args.data.gslbproviderprivateip)); } - + //construct URL starts here var url =[]; - + var ip = args.data.ip; url.push("https://" + ip); - + var isQuestionMarkAdded = false; - + var publicInterface = args.data.publicinterface; if (publicInterface != null && publicInterface.length > 0) { if (isQuestionMarkAdded == false) { @@ -19865,7 +19865,7 @@ } url.push("publicinterface=" + publicInterface); } - + var privateInterface = args.data.privateinterface; if (privateInterface != null && privateInterface.length > 0) { if (isQuestionMarkAdded == false) { @@ -19876,7 +19876,7 @@ } url.push("privateinterface=" + privateInterface); } - + var numretries = args.data.numretries; if (numretries != null && numretries.length > 0) { if (isQuestionMarkAdded == false) { @@ -19887,7 +19887,7 @@ } url.push("numretries=" + numretries); } - + var isInline = args.data.inline; if (isInline != null && isInline.length > 0) { if (isQuestionMarkAdded == false) { @@ -19898,7 +19898,7 @@ } url.push("inline=" + isInline); } - + var capacity = args.data.capacity; if (capacity != null && capacity.length > 0) { if (isQuestionMarkAdded == false) { @@ -19909,9 +19909,9 @@ } url.push("lbdevicecapacity=" + capacity); } - + var dedicated = (args.data.dedicated == "on"); - //boolean (true/false) + //boolean (true/false) if (isQuestionMarkAdded == false) { url.push("?"); isQuestionMarkAdded = true; @@ -19919,11 +19919,11 @@ url.push("&"); } url.push("lbdevicededicated=" + dedicated.toString()); - - + + array1.push("&url=" + todb(url.join(""))); //construct URL ends here - + $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", @@ -19935,7 +19935,7 @@ jobId: jid, getUpdatedItem: function (json) { var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; - + return item; } } @@ -19943,22 +19943,22 @@ } }); } - + function addExternalFirewall(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { var array1 =[]; array1.push("&physicalnetworkid=" + physicalNetworkObj.id); array1.push("&username=" + todb(args.data.username)); array1.push("&password=" + todb(args.data.password)); array1.push("&networkdevicetype=" + todb(args.data.networkdevicetype)); - + //construct URL starts here var url =[]; - + var ip = args.data.ip; url.push("https://" + ip); - + var isQuestionMarkAdded = false; - + var publicInterface = args.data.publicinterface; if (publicInterface != null && publicInterface.length > 0) { if (isQuestionMarkAdded == false) { @@ -19969,7 +19969,7 @@ } url.push("publicinterface=" + publicInterface); } - + var privateInterface = args.data.privateinterface; if (privateInterface != null && privateInterface.length > 0) { if (isQuestionMarkAdded == false) { @@ -19980,7 +19980,7 @@ } url.push("privateinterface=" + privateInterface); } - + var usageInterface = args.data.usageinterface; if (usageInterface != null && usageInterface.length > 0) { if (isQuestionMarkAdded == false) { @@ -19991,7 +19991,7 @@ } url.push("usageinterface=" + usageInterface); } - + var numretries = args.data.numretries; if (numretries != null && numretries.length > 0) { if (isQuestionMarkAdded == false) { @@ -20002,7 +20002,7 @@ } url.push("numretries=" + numretries); } - + var timeout = args.data.timeout; if (timeout != null && timeout.length > 0) { if (isQuestionMarkAdded == false) { @@ -20013,7 +20013,7 @@ } url.push("timeout=" + timeout); } - + var isInline = args.data.inline; if (isInline != null && isInline.length > 0) { if (isQuestionMarkAdded == false) { @@ -20024,7 +20024,7 @@ } url.push("inline=" + isInline); } - + var publicNetwork = args.data.publicnetwork; if (publicNetwork != null && publicNetwork.length > 0) { if (isQuestionMarkAdded == false) { @@ -20035,7 +20035,7 @@ } url.push("publicnetwork=" + publicNetwork); } - + var privateNetwork = args.data.privatenetwork; if (privateNetwork != null && privateNetwork.length > 0) { if (isQuestionMarkAdded == false) { @@ -20046,7 +20046,7 @@ } url.push("privatenetwork=" + privateNetwork); } - + var capacity = args.data.capacity; if (capacity != null && capacity.length > 0) { if (isQuestionMarkAdded == false) { @@ -20057,9 +20057,9 @@ } url.push("fwdevicecapacity=" + capacity); } - + var dedicated = (args.data.dedicated == "on"); - //boolean (true/false) + //boolean (true/false) if (isQuestionMarkAdded == false) { url.push("?"); isQuestionMarkAdded = true; @@ -20067,7 +20067,7 @@ url.push("&"); } url.push("fwdevicededicated=" + dedicated.toString()); - + // START - Palo Alto Specific Fields var externalVirtualRouter = args.data.pavr; if (externalVirtualRouter != null && externalVirtualRouter.length > 0) { @@ -20079,7 +20079,7 @@ } url.push("pavr=" + encodeURIComponent(externalVirtualRouter)); } - + var externalThreatProfile = args.data.patp; if (externalThreatProfile != null && externalThreatProfile.length > 0) { if (isQuestionMarkAdded == false) { @@ -20090,7 +20090,7 @@ } url.push("patp=" + encodeURIComponent(externalThreatProfile)); } - + var externalLogProfile = args.data.palp; if (externalLogProfile != null && externalLogProfile.length > 0) { if (isQuestionMarkAdded == false) { @@ -20102,10 +20102,10 @@ url.push("palp=" + encodeURIComponent(externalLogProfile)); } // END - Palo Alto Specific Fields - + array1.push("&url=" + todb(url.join(""))); //construct URL ends here - + $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", @@ -20117,40 +20117,7 @@ jobId: jid, getUpdatedItem: function (json) { var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; - - return item; - } - } - }); - } - }); - } - - function addNiciraNvpDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { - var array1 =[]; - array1.push("&physicalnetworkid=" + physicalNetworkObj.id); - array1.push("&username=" + todb(args.data.username)); - array1.push("&password=" + todb(args.data.password)); - array1.push("&hostname=" + todb(args.data.host)); - array1.push("&transportzoneuuid=" + todb(args.data.transportzoneuuid)); - - var l3GatewayServiceUuid = args.data.l3gatewayserviceuuid; - if (l3GatewayServiceUuid != null && l3GatewayServiceUuid.length > 0) { - array1.push("&l3gatewayserviceuuid=" + todb(args.data.l3gatewayserviceuuid)); - } - - $.ajax({ - url: createURL(apiCmd + array1.join("")), - dataType: "json", - type: "POST", - success: function (json) { - var jid = json[apiCmdRes].jobid; - args.response.success({ - _custom: { - jobId: jid, - getUpdatedItem: function (json) { - var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; - + return item; } } @@ -20159,7 +20126,40 @@ }); } - function addBrocadeVcsDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { + function addNiciraNvpDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { + var array1 =[]; + array1.push("&physicalnetworkid=" + physicalNetworkObj.id); + array1.push("&username=" + todb(args.data.username)); + array1.push("&password=" + todb(args.data.password)); + array1.push("&hostname=" + todb(args.data.host)); + array1.push("&transportzoneuuid=" + todb(args.data.transportzoneuuid)); + + var l3GatewayServiceUuid = args.data.l3gatewayserviceuuid; + if (l3GatewayServiceUuid != null && l3GatewayServiceUuid.length > 0) { + array1.push("&l3gatewayserviceuuid=" + todb(args.data.l3gatewayserviceuuid)); + } + + $.ajax({ + url: createURL(apiCmd + array1.join("")), + dataType: "json", + type: "POST", + success: function (json) { + var jid = json[apiCmdRes].jobid; + args.response.success({ + _custom: { + jobId: jid, + getUpdatedItem: function (json) { + var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; + + return item; + } + } + }); + } + }); + } + + function addBrocadeVcsDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { var array1 =[]; array1.push("&physicalnetworkid=" + physicalNetworkObj.id); array1.push("&username=" + todb(args.data.username)); @@ -20192,7 +20192,7 @@ array1.push("&username=" + todb(args.data.username)); array1.push("&password=" + todb(args.data.password)); array1.push("&url=" + todb(args.data.url)); - + $.ajax({ url: createURL(apiCmd + array1.join("")), dataType: "json", @@ -20204,7 +20204,7 @@ jobId: jid, getUpdatedItem: function (json) { var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; - + return item; } } @@ -20212,7 +20212,7 @@ } }); } - + function addBigSwitchBcfDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { var array1 =[]; array1.push("&physicalnetworkid=" + physicalNetworkObj.id); @@ -20231,7 +20231,7 @@ jobId: jid, getUpdatedItem: function (json) { var item = json.queryasyncjobresultresponse.jobresult[apiCmdObj]; - + return item; } } @@ -20239,7 +20239,7 @@ } }); } - + function addNuageVspDevice(args, physicalNetworkObj, apiCmd, apiCmdRes, apiCmdObj) { var array1 = []; array1.push("&physicalnetworkid=" + physicalNetworkObj.id); @@ -20312,7 +20312,7 @@ clearInterval(enablePhysicalNetworkIntervalID); if (result.jobstatus == 1) { //alert("updatePhysicalNetwork succeeded."); - + // get network service provider ID of Virtual Router var virtualRouterProviderId; $.ajax({ @@ -20330,7 +20330,7 @@ alert("error: listNetworkServiceProviders API doesn't return VirtualRouter provider ID"); return; } - + var virtualRouterElementId; $.ajax({ url: createURL("listVirtualRouterElements&nspid=" + virtualRouterProviderId), @@ -20347,7 +20347,7 @@ alert("error: listVirtualRouterElements API doesn't return Virtual Router Element Id"); return; } - + $.ajax({ url: createURL("configureVirtualRouterElement&enabled=true&id=" + virtualRouterElementId), dataType: "json", @@ -20366,7 +20366,7 @@ clearInterval(enableVirtualRouterElementIntervalID); if (result.jobstatus == 1) { //alert("configureVirtualRouterElement succeeded."); - + $.ajax({ url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + virtualRouterProviderId), dataType: "json", @@ -20385,7 +20385,7 @@ clearInterval(enableVirtualRouterProviderIntervalID); if (result.jobstatus == 1) { //alert("Virtual Router Provider is enabled"); - + if (newZoneObj.networktype == "Basic") { if (args.data[ "security-groups-enabled"] == "on") { //need to Enable security group provider first @@ -20406,7 +20406,7 @@ alert("error: listNetworkServiceProviders API doesn't return security group provider ID"); return; } - + $.ajax({ url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + securityGroupProviderId), dataType: "json", @@ -20425,7 +20425,7 @@ clearInterval(enableSecurityGroupProviderIntervalID); if (result.jobstatus == 1) { //alert("Security group provider is enabled"); - + //create network (for basic zone only) var array2 =[]; array2.push("&zoneid=" + newZoneObj.id); @@ -20444,11 +20444,11 @@ array3.push("&gateway=" + todb(args.data.podGateway)); array3.push("&netmask=" + todb(args.data.podNetmask)); array3.push("&startIp=" + todb(args.data.podStartIp)); - + var endip = args.data.podEndIp; //optional if (endip != null && endip.length > 0) array3.push("&endIp=" + todb(endip)); - + $.ajax({ url: createURL("createPod" + array3.join("")), dataType: "json", @@ -20495,11 +20495,11 @@ array3.push("&gateway=" + todb(args.data.podGateway)); array3.push("&netmask=" + todb(args.data.podNetmask)); array3.push("&startIp=" + todb(args.data.podStartIp)); - + var endip = args.data.podEndIp; //optional if (endip != null && endip.length > 0) array3.push("&endIp=" + todb(endip)); - + $.ajax({ url: createURL("createPod" + array3.join("")), dataType: "json", @@ -20523,11 +20523,11 @@ array3.push("&gateway=" + todb(args.data.podGateway)); array3.push("&netmask=" + todb(args.data.podNetmask)); array3.push("&startIp=" + todb(args.data.podStartIp)); - + var endip = args.data.podEndIp; //optional if (endip != null && endip.length > 0) array3.push("&endIp=" + todb(endip)); - + $.ajax({ url: createURL("createPod" + array3.join("")), dataType: "json", @@ -20583,31 +20583,31 @@ } }); }; - + //action filters (begin) var zoneActionfilter = cloudStack.actionFilter.zoneActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[ 'enableSwift']; - + if (jsonObj.vmwaredcId == null) allowedActions.push('addVmwareDc'); else allowedActions.push('removeVmwareDc'); - + if (jsonObj.domainid != null) allowedActions.push("releaseDedicatedZone"); else allowedActions.push("dedicateZone"); - + allowedActions.push("edit"); - + if (jsonObj.allocationstate == "Disabled") allowedActions.push("enable"); else if (jsonObj.allocationstate == "Enabled") allowedActions.push("disable"); - + allowedActions.push("remove"); return allowedActions; } - - + + var nexusActionfilter = function (args) { var nexusObj = args.context.item; var allowedActions =[]; @@ -20618,23 +20618,23 @@ allowedActions.push("remove"); return allowedActions; } - + var podActionfilter = function (args) { var podObj = args.context.item; var dedicatedPodObj = args.context.podItem; var allowedActions =[]; - + if (podObj.domainid != null) allowedActions.push("release"); else allowedActions.push("dedicate"); - - + + allowedActions.push("edit"); if (podObj.allocationstate == "Disabled") allowedActions.push("enable"); else if (podObj.allocationstate == "Enabled") allowedActions.push("disable"); allowedActions.push("remove"); - + /* var selectedZoneObj; $(zoneObjs).each(function(){ @@ -20644,7 +20644,7 @@ } }); */ - + if (selectedZoneObj.networktype == "Basic") { //basic-mode network (pod-wide VLAN) //$("#tab_ipallocation, #add_iprange_button, #tab_network_device, #add_network_device_button").show(); @@ -20654,24 +20654,24 @@ //advanced-mode network (zone-wide VLAN) //$("#tab_ipallocation, #add_iprange_button, #tab_network_device, #add_network_device_button").hide(); } - + return allowedActions; } - + var networkDeviceActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; return allowedActions; } - + var clusterActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + if (jsonObj.domainid != null) allowedActions.push("release"); else allowedActions.push("dedicate"); - + if (jsonObj.state == "Enabled") { //managed, allocation enabled allowedActions.push("unmanage"); @@ -20686,26 +20686,26 @@ //Unmanaged, PrepareUnmanaged , PrepareUnmanagedError allowedActions.push("manage"); } - + allowedActions.push("remove"); - + return allowedActions; } - + var hostActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + if (jsonObj.domainid != null) allowedActions.push("release"); else allowedActions.push("dedicate"); - - + + if (jsonObj.resourcestate == "Enabled") { allowedActions.push("edit"); allowedActions.push("enableMaintenanceMode"); - allowedActions.push("disable"); - + allowedActions.push("disable"); + if (jsonObj.state != "Disconnected") allowedActions.push("forceReconnect"); } else if (jsonObj.resourcestate == "ErrorInMaintenance") { @@ -20724,20 +20724,20 @@ allowedActions.push("enable"); allowedActions.push("remove"); } - + if ((jsonObj.state == "Down" || jsonObj.state == "Alert" || jsonObj.state == "Disconnected") && ($.inArray("remove", allowedActions) == -1)) { allowedActions.push("remove"); } - + return allowedActions; } - + var primarystorageActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + allowedActions.push("edit"); - + if (jsonObj.state == 'Up' || jsonObj.state == "Connecting") { allowedActions.push("enableMaintenanceMode"); } else if (jsonObj.state == 'Down') { @@ -20758,53 +20758,53 @@ } return allowedActions; } - + var secondarystorageActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions = []; - allowedActions.push("remove"); + allowedActions.push("remove"); return allowedActions; } - + var routerActionfilter = cloudStack.sections.system.routerActionFilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + if (jsonObj.requiresupgrade == true) { allowedActions.push('upgradeRouterToUseNewerTemplate'); } - + if (jsonObj.state == 'Running') { allowedActions.push("stop"); - + //when router is Running, only VMware support scaleUp(change service offering) if (jsonObj.hypervisor == "VMware") { allowedActions.push("scaleUp"); - } - + } + allowedActions.push("restart"); - + allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); } else if (jsonObj.state == 'Stopped') { allowedActions.push("start"); - + //when router is Stopped, all hypervisors support scaleUp(change service offering) allowedActions.push("scaleUp"); - + allowedActions.push("remove"); } return allowedActions; } - + var internallbinstanceActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + if (jsonObj.state == 'Running') { allowedActions.push("stop"); - + allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); @@ -20813,37 +20813,37 @@ } return allowedActions; } - + var systemvmActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; - + if (jsonObj.state == 'Running') { allowedActions.push("stop"); allowedActions.push("restart"); allowedActions.push("remove"); - + //when systemvm is Running, only VMware support scaleUp(change service offering) if (jsonObj.hypervisor == "VMware") { allowedActions.push("scaleUp"); } - + allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); } else if (jsonObj.state == 'Stopped') { allowedActions.push("start"); - + //when systemvm is Stopped, all hypervisors support scaleUp(change service offering) allowedActions.push("scaleUp"); - + allowedActions.push("remove"); } else if (jsonObj.state == 'Error') { allowedActions.push("remove"); } return allowedActions; } - + var routerGroupActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; @@ -20852,7 +20852,7 @@ } return allowedActions; } - + var bladeActionfilter = function (args) { var jsonObj = args.context.item; var allowedActions =[]; @@ -20863,29 +20863,29 @@ } return allowedActions; } - + //action filters (end) - + var networkProviderActionFilter = function (id) { return function (args) { var allowedActions =[]; var jsonObj = nspMap[id] ? nspMap[id]: { }; - + if (jsonObj.state) { if (jsonObj.state == "Enabled") allowedActions.push("disable"); else if (jsonObj.state == "Disabled") allowedActions.push("enable"); allowedActions.push("destroy"); } - + allowedActions.push('add'); - + return allowedActions; } }; - + var addExtraPropertiesToClusterObject = function (jsonObj) { if (jsonObj.managedstate == "Managed") { jsonObj.state = jsonObj.allocationstate; //jsonObj.state == Enabled, Disabled @@ -20893,7 +20893,7 @@ jsonObj.state = jsonObj.managedstate; //jsonObj.state == Unmanaged, PrepareUnmanaged, PrepareUnmanagedError } } - + var addExtraPropertiesToRouterInstanceObject = function (jsonObj) { if (jsonObj.isredundantrouter == true) { jsonObj[ "redundantRouterState"] = jsonObj.redundantstate; @@ -20901,12 +20901,12 @@ jsonObj[ "redundantRouterState"] = ""; } } - + var refreshNspData = function (nspName) { var array1 =[]; if (nspName != null) array1.push("&name=" + nspName); - + $.ajax({ url: createURL("listNetworkServiceProviders&physicalnetworkid=" + selectedPhysicalNetworkObj.id + array1.join("")), dataType: "json", @@ -20915,7 +20915,7 @@ nspMap = { }; //reset - + var items = json.listnetworkserviceprovidersresponse.networkserviceprovider; if (items != null) { for (var i = 0; i < items.length; i++) { @@ -20931,7 +20931,7 @@ break; case "Ovs": nspMap["Ovs"] = items[i]; - break; + break; case "Netscaler": nspMap[ "netscaler"] = items[i]; break; @@ -20959,7 +20959,7 @@ case "NiciraNvp": nspMap[ "niciraNvp"] = items[i]; break; - case "BrocadeVcs": + case "BrocadeVcs": nspMap[ "brocadeVcs"] = items[i]; break; case "BigSwitchBcf": @@ -20982,7 +20982,7 @@ } } }); - + nspHardcodingArray =[ { id: 'netscaler', name: 'NetScaler', @@ -20998,7 +20998,7 @@ name: 'Nicira Nvp', state: nspMap.niciraNvp ? nspMap.niciraNvp.state: 'Disabled' }, - { + { id: 'brocadeVcs', name: 'Brocade', state: nspMap.brocadeVcs ? nspMap.brocadeVcs.state: 'Disabled' @@ -21017,19 +21017,19 @@ id: 'BaremetalPxeProvider', name: 'Baremetal PXE', state: nspMap.BaremetalPxeProvider ? nspMap.BaremetalPxeProvider.state: 'Disabled' - }, + }, { id: 'Opendaylight', name: 'OpenDaylight (Experimental)', state: nspMap.Opendaylight ? nspMap.Opendaylight.state: 'Disabled' }]; - + $(window).trigger('cloudStack.system.serviceProviders.makeHarcodedArray', { nspHardcodingArray: nspHardcodingArray, selectedZoneObj: selectedZoneObj, selectedPhysicalNetworkObj: selectedPhysicalNetworkObj }); - + if (selectedZoneObj.networktype == "Basic") { nspHardcodingArray.push({ id: 'securityGroups', @@ -21048,13 +21048,13 @@ name: 'Nuage Vsp', state: nspMap.nuageVsp ? nspMap.nuageVsp.state : 'Disabled' }); - + nspHardcodingArray.push({ id: 'InternalLbVm', name: 'Internal LB VM', state: nspMap.InternalLbVm ? nspMap.InternalLbVm.state: 'Disabled' }); - + nspHardcodingArray.push({ id: 'vpcVirtualRouter', name: 'VPC Virtual Router', @@ -21080,43 +21080,43 @@ name: 'GloboDNS', state: nspMap.GloboDns ? nspMap.GloboDns.state : 'Disabled' }); - + //CLOUDSTACK-6840: OVS refers to SDN provider. However, we are not supporting SDN in this release. /* nspHardcodingArray.push({ id: 'Ovs', name: 'Ovs', - state: nspMap.Ovs ? nspMap.Ovs.state: 'Disabled' - }); - */ - } + state: nspMap.Ovs ? nspMap.Ovs.state: 'Disabled' + }); + */ + } }; - + cloudStack.actionFilter.physicalNetwork = function (args) { var state = args.context.item.state; - + if (state != 'Destroyed') { return[ 'remove']; } - + return[]; }; - + function addExtraPropertiesToGroupbyObjects(groupbyObjs, groupbyId) { for (var i = 0; i < groupbyObjs.length; i++) { addExtraPropertiesToGroupbyObject(groupbyObjs[i], groupbyId); } } - + function addExtraPropertiesToGroupbyObject(groupbyObj, groupbyId) { var currentPage = 1; - + var listRoutersData = { listAll: true, pagesize: pageSize //global variable }; listRoutersData[groupbyId] = groupbyObj.id; - + $.ajax({ url: createURL('listRouters'), data: $.extend({ @@ -21126,106 +21126,106 @@ }), async: false, success: function(json) { - if (json.listroutersresponse.count != undefined) { - var routerCountFromAllPages = json.listroutersresponse.count; - var routerCountFromFirstPageToCurrentPage = json.listroutersresponse.router.length; - var routerRequiresUpgrade = 0; - - var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - - $.ajax({ - url: createURL('listRouters'), + if (json.listroutersresponse.count != undefined) { + var routerCountFromAllPages = json.listroutersresponse.count; + var routerCountFromFirstPageToCurrentPage = json.listroutersresponse.router.length; + var routerRequiresUpgrade = 0; + + var items = json.listroutersresponse.router; + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + + $.ajax({ + url: createURL('listRouters'), data: $.extend({}, listRoutersData, { - page: currentPage, - projectid: -1 - }), - async: false, - success: function(json) { - if (json.listroutersresponse.count != undefined) { - routerCountFromAllPages += json.listroutersresponse.count; - groupbyObj.routerCount = routerCountFromAllPages; - - routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; - - var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - } else { - groupbyObj.routerCount = routerCountFromAllPages; - } - } - }); - - var callListApiWithPage = function() { - $.ajax({ - url: createURL('listRouters'), - async: false, - data: $.extend({}, listRoutersData, { - page: currentPage - }), - success: function(json) { - routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; - var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - - $.ajax({ - url: createURL('listRouters'), - async: false, - data: $.extend({}, listRoutersData, { - page: currentPage, - projectid: -1 - }), - success: function(json) { - if (json.listroutersresponse.count != undefined) { - routerCountFromAllPages += json.listroutersresponse.count; - groupbyObj.routerCount = routerCountFromAllPages; - - routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; - - var items = json.listroutersresponse.router; - for (var k = 0; k < items.length; k++) { - if (items[k].requiresupgrade) { - routerRequiresUpgrade++; - } - } - } else { - groupbyObj.routerCount = routerCountFromAllPages; - } - } - }); - - if (routerCountFromFirstPageToCurrentPage < routerCountFromAllPages) { - currentPage++; - callListApiWithPage(); - } - } - }); - } - - if (routerCountFromFirstPageToCurrentPage < routerCountFromAllPages) { - currentPage++; - callListApiWithPage(); - } - - groupbyObj.routerRequiresUpgrade = routerRequiresUpgrade; - groupbyObj.numberOfRouterRequiresUpgrade = routerRequiresUpgrade; - } else { - groupbyObj.routerCount = 0; - groupbyObj.routerRequiresUpgrade = 0; - groupbyObj.numberOfRouterRequiresUpgrade = 0; - } + page: currentPage, + projectid: -1 + }), + async: false, + success: function(json) { + if (json.listroutersresponse.count != undefined) { + routerCountFromAllPages += json.listroutersresponse.count; + groupbyObj.routerCount = routerCountFromAllPages; + + routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; + + var items = json.listroutersresponse.router; + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + } else { + groupbyObj.routerCount = routerCountFromAllPages; + } + } + }); + + var callListApiWithPage = function() { + $.ajax({ + url: createURL('listRouters'), + async: false, + data: $.extend({}, listRoutersData, { + page: currentPage + }), + success: function(json) { + routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; + var items = json.listroutersresponse.router; + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + + $.ajax({ + url: createURL('listRouters'), + async: false, + data: $.extend({}, listRoutersData, { + page: currentPage, + projectid: -1 + }), + success: function(json) { + if (json.listroutersresponse.count != undefined) { + routerCountFromAllPages += json.listroutersresponse.count; + groupbyObj.routerCount = routerCountFromAllPages; + + routerCountFromFirstPageToCurrentPage += json.listroutersresponse.router.length; + + var items = json.listroutersresponse.router; + for (var k = 0; k < items.length; k++) { + if (items[k].requiresupgrade) { + routerRequiresUpgrade++; + } + } + } else { + groupbyObj.routerCount = routerCountFromAllPages; + } + } + }); + + if (routerCountFromFirstPageToCurrentPage < routerCountFromAllPages) { + currentPage++; + callListApiWithPage(); + } + } + }); + } + + if (routerCountFromFirstPageToCurrentPage < routerCountFromAllPages) { + currentPage++; + callListApiWithPage(); + } + + groupbyObj.routerRequiresUpgrade = routerRequiresUpgrade; + groupbyObj.numberOfRouterRequiresUpgrade = routerRequiresUpgrade; + } else { + groupbyObj.routerCount = 0; + groupbyObj.routerRequiresUpgrade = 0; + groupbyObj.numberOfRouterRequiresUpgrade = 0; + } } }); } diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index 98861dde42c..ac739c631e4 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -15,8 +15,10 @@ // specific language governing permissions and limitations // under the License. (function(cloudStack, $) { - var ostypeObjs; - + var ostypeObjs; + var previousCollection = []; + var previousFilterType = null; + cloudStack.sections.templates = { title: 'label.menu.templates', id: 'templates', @@ -44,7 +46,7 @@ label: 'ui.listView.filters.mine' }, shared: { - label: 'Shared' + label: 'label.shared' }, featured: { label: 'label.featured' @@ -100,10 +102,10 @@ reorder: cloudStack.api.actions.sort('updateTemplate', 'templates'), actions: { add: { - label: 'Add', + label: 'label.add', messages: { notification: function(args) { - return 'Register Template from URL'; + return 'label.action.register.template'; } }, createForm: { @@ -111,7 +113,7 @@ docID: 'helpNetworkOfferingName', preFilter: cloudStack.preFilter.createTemplate, fields: { - url: { + url: { label: 'label.url', docID: 'helpRegisterTemplateURL', validation: { @@ -131,46 +133,46 @@ validation: { required: true } - }, + }, zone: { label: 'label.zone', docID: 'helpRegisterTemplateZone', - select: function(args) { - if(g_regionsecondaryenabled == true) { - args.response.success({ + select: function(args) { + if(g_regionsecondaryenabled == true) { + args.response.success({ data: [{ id: -1, description: "All Zones" }] - }); - } else { - $.ajax({ - url: createURL("listZones&available=true"), - dataType: "json", - async: true, - success: function(json) { - var zoneObjs = []; - var items = json.listzonesresponse.zone; - if (items != null) { - for (var i = 0; i < items.length; i++) { - zoneObjs.push({ - id: items[i].id, - description: items[i].name - }); - } - } - if (isAdmin() && !(cloudStack.context.projects && cloudStack.context.projects[0])) { - zoneObjs.unshift({ - id: -1, - description: "All Zones" - }); - } - args.response.success({ - data: zoneObjs - }); - } - }); - } + }); + } else { + $.ajax({ + url: createURL("listZones&available=true"), + dataType: "json", + async: true, + success: function(json) { + var zoneObjs = []; + var items = json.listzonesresponse.zone; + if (items != null) { + for (var i = 0; i < items.length; i++) { + zoneObjs.push({ + id: items[i].id, + description: items[i].name + }); + } + } + if (isAdmin() && !(cloudStack.context.projects && cloudStack.context.projects[0])) { + zoneObjs.unshift({ + id: -1, + description: "All Zones" + }); + } + args.response.success({ + data: zoneObjs + }); + } + }); + } } }, hypervisor: { @@ -184,7 +186,7 @@ var apiCmd; if (args.zone == -1) { //All Zones //apiCmd = "listHypervisors&zoneid=-1"; //"listHypervisors&zoneid=-1" has been changed to return only hypervisors available in all zones (bug 8809) - apiCmd = "listHypervisors"; + apiCmd = "listHypervisors"; } else { apiCmd = "listHypervisors&zoneid=" + args.zone; @@ -215,20 +217,20 @@ $form.find('.form-item[rel=rootDiskControllerType]').css('display', 'inline-block'); $form.find('.form-item[rel=nicAdapterType]').css('display', 'inline-block'); $form.find('.form-item[rel=keyboardType]').css('display', 'inline-block'); - + $form.find('.form-item[rel=xenserverToolsVersion61plus]').hide(); } else if ($(this).val() == "XenServer") { - $form.find('.form-item[rel=rootDiskControllerType]').hide(); + $form.find('.form-item[rel=rootDiskControllerType]').hide(); $form.find('.form-item[rel=nicAdapterType]').hide(); - $form.find('.form-item[rel=keyboardType]').hide(); - + $form.find('.form-item[rel=keyboardType]').hide(); + if (isAdmin()) - $form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); + $form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 'inline-block'); } else { $form.find('.form-item[rel=rootDiskControllerType]').hide(); $form.find('.form-item[rel=nicAdapterType]').hide(); $form.find('.form-item[rel=keyboardType]').hide(); - + $form.find('.form-item[rel=xenserverToolsVersion61plus]').hide(); } }); @@ -260,7 +262,7 @@ }, isHidden: true }, - + //fields for hypervisor == "VMware" (starts here) rootDiskControllerType: { label: 'label.root.disk.controller', @@ -401,7 +403,7 @@ description: 'TAR' }); } else if (args.hypervisor == "Hyperv") { - items.push({ + items.push({ id: 'VHD', description: 'VHD' }); @@ -419,18 +421,18 @@ osTypeId: { label: 'label.os.type', docID: 'helpRegisterTemplateOSType', - select: function(args) { + select: function(args) { $.ajax({ url: createURL("listOsTypes"), dataType: "json", async: true, - success: function(json) { - var ostypeObjs = json.listostypesresponse.ostype; - args.response.success({ + success: function(json) { + var ostypeObjs = json.listostypesresponse.ostype; + args.response.success({ data: ostypeObjs }); } - }); + }); } }, @@ -519,16 +521,14 @@ }); } - - //XenServer only (starts here) + //XenServer only (starts here) if (args.$form.find('.form-item[rel=xenserverToolsVersion61plus]').css("display") != "none") { $.extend(data, { 'details[0].hypervisortoolsversion': (args.data.xenserverToolsVersion61plus == "on") ? "xenserver61" : "xenserver56" }); } //XenServer only (ends here) - - + //VMware only (starts here) if (args.$form.find('.form-item[rel=rootDiskControllerType]').css("display") != "none" && args.data.rootDiskControllerType != "") { $.extend(data, { @@ -555,16 +555,6 @@ args.response.success({ data: items[0] }); - /* - if(items.length > 1) { - for(var i=1; i 0) { + return true; // skip adding this entry + } else { + var templateItem = $.extend(item, { zones: item.zonename, zoneids: [item.zoneid] - })); + }); + itemsView.push(templateItem); + previousCollection.push(templateItem); } - else { - existing[0].zones = 'label.multiplezones'; - existing[0].zoneids.push(item.zoneid); - } - }); + }); args.response.success({ actionFilter: templateActionfilter, @@ -1035,53 +1033,53 @@ } }); - - //***** addResourceDetail ***** - //XenServer only (starts here) - if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) { - $.ajax({ - url: createURL('addResourceDetail'), - data: { - resourceType: 'template', - resourceId: args.context.templates[0].id, - 'details[0].key': 'hypervisortoolsversion', - 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56' - }, - success: function(json) { - var jobId = json.addResourceDetailresponse.jobid; - var addResourceDetailIntervalID = setInterval(function() { - $.ajax({ - url: createURL("queryAsyncJobResult&jobid=" + jobId), - dataType: "json", - success: function(json) { - var result = json.queryasyncjobresultresponse; - - if (result.jobstatus == 0) { - return; //Job has not completed - } else { - clearInterval(addResourceDetailIntervalID); - if (result.jobstatus == 1) { - //do nothing - } else if (result.jobstatus == 2) { - cloudStack.dialog.notice({ - message: "message.XSTools61plus.update.failed" + " " + _s(result.jobresult.errortext) - }); - } - } - }, - error: function(XMLHttpResponse) { - cloudStack.dialog.notice({ - message: "message.XSTools61plus.update.failed" + " " + parseXMLHttpResponse(XMLHttpResponse) - }); - } - }); - }, g_queryAsyncJobResultInterval); - } - }); - } - //XenServer only (ends here) - + //***** addResourceDetail ***** + //XenServer only (starts here) + if(args.$detailView.find('form').find('div .detail-group').find('.xenserverToolsVersion61plus').length > 0) { + $.ajax({ + url: createURL('addResourceDetail'), + data: { + resourceType: 'template', + resourceId: args.context.templates[0].id, + 'details[0].key': 'hypervisortoolsversion', + 'details[0].value': (args.data.xenserverToolsVersion61plus == "on") ? 'xenserver61' : 'xenserver56' + }, + success: function(json) { + var jobId = json.addResourceDetailresponse.jobid; + var addResourceDetailIntervalID = setInterval(function() { + $.ajax({ + url: createURL("queryAsyncJobResult&jobid=" + jobId), + dataType: "json", + success: function(json) { + var result = json.queryasyncjobresultresponse; + + if (result.jobstatus == 0) { + return; //Job has not completed + } else { + clearInterval(addResourceDetailIntervalID); + + if (result.jobstatus == 1) { + //do nothing + } else if (result.jobstatus == 2) { + cloudStack.dialog.notice({ + message: "message.XSTools61plus.update.failed" + " " + _s(result.jobresult.errortext) + }); + } + } + }, + error: function(XMLHttpResponse) { + cloudStack.dialog.notice({ + message: "message.XSTools61plus.update.failed" + " " + parseXMLHttpResponse(XMLHttpResponse) + }); + } + }); + }, g_queryAsyncJobResultInterval); + } + }); + } + //XenServer only (ends here) + //***** listTemplates ***** //So, we call listTemplates API to get a complete template object @@ -1162,36 +1160,36 @@ } else { hiddenFields = ["hypervisor", 'xenserverToolsVersion61plus']; } - + if ('templates' in args.context && args.context.templates[0].hypervisor != 'XenServer') { hiddenFields.push('xenserverToolsVersion61plus'); } - + if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) { - var ostypeObjs; - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - var ostypeObjs = json.listostypesresponse.ostype; - } - }); - - if (ostypeObjs != undefined) { - var ostypeName; - for (var i = 0; i < ostypeObjs.length; i++) { - if (ostypeObjs[i].id == args.context.templates[0].ostypeid) { - ostypeName = ostypeObjs[i].description; - break; - } - } - if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { - hiddenFields.push('xenserverToolsVersion61plus'); - } - } + var ostypeObjs; + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + var ostypeObjs = json.listostypesresponse.ostype; + } + }); + + if (ostypeObjs != undefined) { + var ostypeName; + for (var i = 0; i < ostypeObjs.length; i++) { + if (ostypeObjs[i].id == args.context.templates[0].ostypeid) { + ostypeName = ostypeObjs[i].description; + break; + } + } + if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { + hiddenFields.push('xenserverToolsVersion61plus'); + } + } } - + return hiddenFields; }, @@ -1203,7 +1201,7 @@ required: true } } - }, { + }, { hypervisor: { label: 'label.hypervisor' }, @@ -1217,8 +1215,8 @@ return false; }, converter: cloudStack.converters.toBooleanText - }, - + }, + size: { label: 'label.size', converter: function(args) { @@ -1276,23 +1274,23 @@ return false; }, converter: cloudStack.converters.toBooleanText - }, - + }, + ostypeid: { label: 'label.os.type', isEditable: true, select: function(args) { - var ostypeObjs; + var ostypeObjs; $.ajax({ url: createURL("listOsTypes"), dataType: "json", async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; } }); - - var items = []; + + var items = []; $(ostypeObjs).each(function() { items.push({ id: this.id, @@ -1315,8 +1313,8 @@ validation: { required: true } - }, - + }, + domain: { label: 'label.domain' }, @@ -1327,11 +1325,11 @@ label: 'label.created', converter: cloudStack.converters.toLocalDate }, - + templatetype: { label: 'label.type' }, - + id: { label: 'label.id' } @@ -1343,27 +1341,27 @@ }), - dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab + dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab $.ajax({ url: createURL("listTemplates"), data: { - templatefilter: "self", - id: args.context.templates[0].id + templatefilter: "self", + id: args.context.templates[0].id }, success: function(json) { - var jsonObj = json.listtemplatesresponse.template[0]; - - if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { - if (jsonObj.details.hypervisortoolsversion == 'xenserver61') - jsonObj.xenserverToolsVersion61plus = true; - else - jsonObj.xenserverToolsVersion61plus = false; - } - - args.response.success({ - actionFilter: templateActionfilter, - data: jsonObj - }); + var jsonObj = json.listtemplatesresponse.template[0]; + + if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { + if (jsonObj.details.hypervisortoolsversion == 'xenserver61') + jsonObj.xenserverToolsVersion61plus = true; + else + jsonObj.xenserverToolsVersion61plus = false; + } + + args.response.success({ + actionFilter: templateActionfilter, + data: jsonObj + }); } }); } @@ -1388,36 +1386,37 @@ hideSearchBar: true, - dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) - $.ajax({ + dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) + var data = { templatefilter: "self", + id: args.context.templates[0].id + }; + listViewDataProvider(args, data); + $.ajax({ url: createURL("listTemplates"), - data: { - templatefilter: "self", - id: args.context.templates[0].id - }, + data: data, success: function(json) { - var jsonObjs = json.listtemplatesresponse.template; - - if (jsonObjs != undefined) { - for (var i = 0; i < jsonObjs.length; i++) { - var jsonObj = jsonObjs[i]; - if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { - if (jsonObj.details.hypervisortoolsversion == 'xenserver61') - jsonObj.xenserverToolsVersion61plus = true; - else - jsonObj.xenserverToolsVersion61plus = false; - } - } - } - - args.response.success({ - actionFilter: templateActionfilter, - data: jsonObjs - }); + var jsonObjs = json.listtemplatesresponse.template; + + if (jsonObjs != undefined) { + for (var i = 0; i < jsonObjs.length; i++) { + var jsonObj = jsonObjs[i]; + if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { + if (jsonObj.details.hypervisortoolsversion == 'xenserver61') + jsonObj.xenserverToolsVersion61plus = true; + else + jsonObj.xenserverToolsVersion61plus = false; + } + } + } + + args.response.success({ + actionFilter: templateActionfilter, + data: jsonObjs + }); } - }); + }); }, - + detailView: { noCompact: true, actions: { @@ -1500,18 +1499,18 @@ } } }, - action: function(args) { + action: function(args) { var data = { - id: args.context.templates[0].id, - destzoneid: args.data.destinationZoneId - }; + id: args.context.templates[0].id, + destzoneid: args.data.destinationZoneId + }; $.extend(data, { sourcezoneid: args.context.zones[0].zoneid - }); - - $.ajax({ + }); + + $.ajax({ url: createURL('copyTemplate'), - data: data, + data: data, success: function(json) { var jid = json.copytemplateresponse.jobid; args.response.success({ @@ -1532,7 +1531,7 @@ poll: pollAsyncJobResult } } - }, + }, tabs: { details: { @@ -1544,36 +1543,36 @@ } else { hiddenFields = ["hypervisor", 'xenserverToolsVersion61plus']; } - + if ('templates' in args.context && args.context.templates[0].hypervisor != 'XenServer') { hiddenFields.push('xenserverToolsVersion61plus'); } - + if ('templates' in args.context && args.context.templates[0].ostypeid != undefined) { - var ostypeObjs; - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; - } - }); - - if (ostypeObjs != undefined) { - var ostypeName; - for (var i = 0; i < ostypeObjs.length; i++) { - if (ostypeObjs[i].id == args.context.templates[0].ostypeid) { - ostypeName = ostypeObjs[i].description; - break; - } - } - if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { - hiddenFields.push('xenserverToolsVersion61plus'); - } - } - } - + var ostypeObjs; + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; + } + }); + + if (ostypeObjs != undefined) { + var ostypeName; + for (var i = 0; i < ostypeObjs.length; i++) { + if (ostypeObjs[i].id == args.context.templates[0].ostypeid) { + ostypeName = ostypeObjs[i].description; + break; + } + } + if (ostypeName == undefined || ostypeName.indexOf("Win") == -1) { + hiddenFields.push('xenserverToolsVersion61plus'); + } + } + } + return hiddenFields; }, @@ -1585,17 +1584,17 @@ required: true } } - }, { + }, { id: { label: 'label.id' }, zonename: { label: 'label.zone.name' - }, + }, zoneid: { label: 'label.zone.id' }, - isready: { + isready: { label: 'state.Ready', converter: cloudStack.converters.toBooleanText }, @@ -1616,8 +1615,8 @@ return false; }, converter: cloudStack.converters.toBooleanText - }, - + }, + size: { label: 'label.size', converter: function(args) { @@ -1675,23 +1674,23 @@ return false; }, converter: cloudStack.converters.toBooleanText - }, - + }, + ostypeid: { label: 'label.os.type', isEditable: true, - select: function(args) { - var ostypeObjs; + select: function(args) { + var ostypeObjs; $.ajax({ url: createURL("listOsTypes"), dataType: "json", async: false, success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; + ostypeObjs = json.listostypesresponse.ostype; } }); - - var items = []; + + var items = []; $(ostypeObjs).each(function() { items.push({ id: this.id, @@ -1711,8 +1710,8 @@ validation: { required: true } - }, - + }, + domain: { label: 'label.domain' }, @@ -1723,7 +1722,7 @@ label: 'label.created', converter: cloudStack.converters.toLocalDate }, - + templatetype: { label: 'label.type' } @@ -1736,24 +1735,24 @@ }), - dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) > select a zone from listing > Details tab - var jsonObj = args.context.zones[0]; + dataProvider: function(args) { // UI > Templates menu (listing) > select a template from listing > Details tab > Zones tab (listing) > select a zone from listing > Details tab + var jsonObj = args.context.zones[0]; - if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { - if (jsonObj.details.hypervisortoolsversion == 'xenserver61') - jsonObj.xenserverToolsVersion61plus = true; - else - jsonObj.xenserverToolsVersion61plus = false; - } + if ('details' in jsonObj && 'hypervisortoolsversion' in jsonObj.details) { + if (jsonObj.details.hypervisortoolsversion == 'xenserver61') + jsonObj.xenserverToolsVersion61plus = true; + else + jsonObj.xenserverToolsVersion61plus = false; + } - args.response.success({ - actionFilter: templateActionfilter, - data: jsonObj - }); + args.response.success({ + actionFilter: templateActionfilter, + data: jsonObj + }); } } }} - } + } } } } @@ -1778,7 +1777,7 @@ label: 'ui.listView.filters.mine' }, shared: { - label: 'Shared' + label: 'label.shared' }, featured: { label: 'label.featured' @@ -1832,41 +1831,41 @@ label: 'label.zone', docID: 'helpRegisterISOZone', select: function(args) { - if(g_regionsecondaryenabled == true) { - args.response.success({ + if(g_regionsecondaryenabled == true) { + args.response.success({ data: [{ id: -1, description: "All Zones" }] - }); - } else { - $.ajax({ - url: createURL("listZones&available=true"), - dataType: "json", - async: true, - success: function(json) { - var zoneObjs = []; - var items = json.listzonesresponse.zone; - if (items != null) { - for (var i = 0; i < items.length; i++) { - zoneObjs.push({ - id: items[i].id, - description: items[i].name - }); - } - } - if (isAdmin() && !(cloudStack.context.projects && cloudStack.context.projects[0])) { - zoneObjs.unshift({ - id: -1, - description: "All Zones" - }); - } - args.response.success({ - data: zoneObjs - }); - } - }); - } + }); + } else { + $.ajax({ + url: createURL("listZones&available=true"), + dataType: "json", + async: true, + success: function(json) { + var zoneObjs = []; + var items = json.listzonesresponse.zone; + if (items != null) { + for (var i = 0; i < items.length; i++) { + zoneObjs.push({ + id: items[i].id, + description: items[i].name + }); + } + } + if (isAdmin() && !(cloudStack.context.projects && cloudStack.context.projects[0])) { + zoneObjs.unshift({ + id: -1, + description: "All Zones" + }); + } + args.response.success({ + data: zoneObjs + }); + } + }); + } } }, @@ -1886,12 +1885,12 @@ required: true }, select: function(args) { - $.ajax({ + $.ajax({ url: createURL("listOsTypes"), dataType: "json", async: true, success: function(json) { - var ostypeObjs = json.listostypesresponse.ostype; + var ostypeObjs = json.listostypesresponse.ostype; var items = []; //items.push({id: "", description: "None"}); //shouldn't have None option when bootable is checked $(ostypeObjs).each(function() { @@ -1904,7 +1903,7 @@ data: items }); } - }); + }); } }, @@ -2029,10 +2028,18 @@ dataProvider: function(args) { var data = {}; listViewDataProvider(args, data); + // Due to zonal grouping, low pagesize can result lower + // aggregated items, resulting in no scroll shown + // So, use maximum pagesize + data.pagesize = 200; var ignoreProject = false; if (args.filterBy != null) { //filter dropdown if (args.filterBy.kind != null) { + if (previousFilterType != args.filterBy.kind || args.page == 1) { + previousFilterType = args.filterBy.kind; + previousCollection = []; + } switch (args.filterBy.kind) { case "all": ignoreProject = true; @@ -2047,7 +2054,7 @@ break; case "shared": $.extend(data, { - isofilter: 'shared' + isofilter: 'shared' }); break; case "featured": @@ -2076,22 +2083,24 @@ var itemsView = []; $(items).each(function(index, item) { - var existing = $.grep(itemsView, function(it){ + var existing = $.grep(previousCollection, function(it){ return it != null && it.id !=null && it.id == item.id; }); - if (existing.length == 0) { - itemsView.push({ + + + if (existing.length > 0) { + return true; // skip adding this entry + } else { + var isoItem = { id: item.id, name: item.name, description: item.description, ostypeid: item.ostypeid, zones: item.zonename, zoneids: [item.zoneid] - }); - } - else { - existing[0].zones = 'Multiple Zones'; - existing[0].zoneids.push(item.zoneid); + }; + itemsView.push(isoItem); + previousCollection.push(isoItem); } } ); @@ -2316,17 +2325,17 @@ label: 'label.os.type', isEditable: true, select: function(args) { - if (ostypeObjs == undefined) { - $.ajax({ - url: createURL("listOsTypes"), - dataType: "json", - async: false, - success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; - } - }); - } - var items = []; + if (ostypeObjs == undefined) { + $.ajax({ + url: createURL("listOsTypes"), + dataType: "json", + async: false, + success: function(json) { + ostypeObjs = json.listostypesresponse.ostype; + } + }); + } + var items = []; $(ostypeObjs).each(function() { items.push({ id: this.id, @@ -2394,11 +2403,14 @@ hideSearchBar: true, dataProvider: function(args) { - var jsonObj = args.context.isos[0]; - var apiCmd = "listIsos&isofilter=self&id=" + jsonObj.id; - + var data = { + isofilter: 'self', + id: args.context.isos[0].id + }; + listViewDataProvider(args, data); $.ajax({ - url: createURL(apiCmd), + url: createURL('listIsos'), + data: data, dataType: "json", success: function(json) { var isos = json.listisosresponse.iso; @@ -2412,7 +2424,7 @@ } }); }, - + detailView: { actions: { copyISO: { @@ -2458,18 +2470,18 @@ } } }, - action: function(args) { + action: function(args) { var data = { - id: args.context.isos[0].id, - destzoneid: args.data.destinationZoneId - }; + id: args.context.isos[0].id, + destzoneid: args.data.destinationZoneId + }; if (args.context.zones[0].zoneid != undefined) { $.extend(data, { - sourcezoneid: args.context.zones[0].zoneid - }); - } - - $.ajax({ + sourcezoneid: args.context.zones[0].zoneid + }); + } + + $.ajax({ url: createURL('copyIso'), data: data, success: function(json) { @@ -2610,17 +2622,17 @@ label: 'label.os.type', isEditable: true, select: function(args) { - var ostypeObjs; + var ostypeObjs; $.ajax({ url: createURL("listOsTypes"), dataType: "json", async: false, success: function(json) { - ostypeObjs = json.listostypesresponse.ostype; + ostypeObjs = json.listostypesresponse.ostype; } }); - - var items = []; + + var items = []; $(ostypeObjs).each(function() { items.push({ id: this.id, @@ -2629,7 +2641,7 @@ }); args.response.success({ data: items - }); + }); } }, @@ -2689,15 +2701,8 @@ //do nothing } else { allowedActions.push("edit"); - + allowedActions.push("copyTemplate"); - /* - if(g_regionsecondaryenabled != true) { - allowedActions.push("copyTemplate"); - } - */ - - //allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network. } // "Download Template" @@ -2732,11 +2737,6 @@ allowedActions.push("edit"); allowedActions.push("copyISO"); - /* - if(g_regionsecondaryenabled != true) { - allowedActions.push("copyISO"); - } - */ } // "Create VM" @@ -2746,7 +2746,7 @@ if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)) //if neither root-admin, nor item owner || jsonObj.isready == false) || (jsonObj.bootable == false) - || (jsonObj.domainid == 1 && jsonObj.account == "system") + || (jsonObj.domainid == 1 && jsonObj.account == "system") ) { //do nothing } diff --git a/ui/scripts/ui-custom/accountsWizard.js b/ui/scripts/ui-custom/accountsWizard.js index 0d416e1ffee..93492340835 100644 --- a/ui/scripts/ui-custom/accountsWizard.js +++ b/ui/scripts/ui-custom/accountsWizard.js @@ -130,89 +130,89 @@ dataType: "json", async: false, success: function(json) { - //for testing only (begin) - /* - json = { - "ldapuserresponse": { - "count": 11, - "LdapUser": [ - { - "email": "test@test.com", - "principal": "CN=Administrator,CN=Users,DC=hyd-qa,DC=com", - "username": "Administrator", - "domain": "CN=Administrator" - }, - { - "email": "test@test.com", - "principal": "CN=Guest,CN=Users,DC=hyd-qa,DC=com", - "username": "Guest", - "domain": "CN=Guest" - }, - { - "email": "test@test.com", - "principal": "CN=IUSR_HYD-QA12,CN=Users,DC=hyd-qa,DC=com", - "username": "IUSR_HYD-QA12", - "domain": "CN=IUSR_HYD-QA12" - }, - { - "email": "test@test.com", - "principal": "CN=IWAM_HYD-QA12,CN=Users,DC=hyd-qa,DC=com", - "username": "IWAM_HYD-QA12", - "domain": "CN=IWAM_HYD-QA12" - }, - { - "email": "test@test.com", - "principal": "CN=SUPPORT_388945a0,CN=Users,DC=hyd-qa,DC=com", - "username": "SUPPORT_388945a0", - "domain": "CN=SUPPORT_388945a0" - }, - { - "principal": "CN=jessica j,CN=Users,DC=hyd-qa,DC=com", - "firstname": "jessica", - "lastname": "j", - "username": "jessica", - "domain": "CN=jessica j" - }, - { - "principal": "CN=krbtgt,CN=Users,DC=hyd-qa,DC=com", - "username": "krbtgt", - "domain": "CN=krbtgt" - }, - { - "email": "sadhu@sadhu.com", - "principal": "CN=sadhu,CN=Users,DC=hyd-qa,DC=com", - "firstname": "sadhu", - "username": "sadhu", - "domain": "CN=sadhu" - }, - { - "email": "test@test.com", - "principal": "CN=sangee1 hariharan,CN=Users,DC=hyd-qa,DC=com", - "firstname": "sangee1", - "lastname": "hariharan", - "username": "sangee1", - "domain": "CN=sangee1 hariharan" - }, - { - "email": "test@test.com", - "principal": "CN=sanjeev n.,CN=Users,DC=hyd-qa,DC=com", - "firstname": "sanjeev", - "username": "sanjeev", - "domain": "CN=sanjeev n." - }, - { - "email": "test@test.com", - "principal": "CN=test1dddd,CN=Users,DC=hyd-qa,DC=com", - "firstname": "test1", - "username": "test1dddd", - "domain": "CN=test1dddd" - } - ] - } - }; - */ - //for testing only (end) - + //for testing only (begin) + /* + json = { + "ldapuserresponse": { + "count": 11, + "LdapUser": [ + { + "email": "test@test.com", + "principal": "CN=Administrator,CN=Users,DC=hyd-qa,DC=com", + "username": "Administrator", + "domain": "CN=Administrator" + }, + { + "email": "test@test.com", + "principal": "CN=Guest,CN=Users,DC=hyd-qa,DC=com", + "username": "Guest", + "domain": "CN=Guest" + }, + { + "email": "test@test.com", + "principal": "CN=IUSR_HYD-QA12,CN=Users,DC=hyd-qa,DC=com", + "username": "IUSR_HYD-QA12", + "domain": "CN=IUSR_HYD-QA12" + }, + { + "email": "test@test.com", + "principal": "CN=IWAM_HYD-QA12,CN=Users,DC=hyd-qa,DC=com", + "username": "IWAM_HYD-QA12", + "domain": "CN=IWAM_HYD-QA12" + }, + { + "email": "test@test.com", + "principal": "CN=SUPPORT_388945a0,CN=Users,DC=hyd-qa,DC=com", + "username": "SUPPORT_388945a0", + "domain": "CN=SUPPORT_388945a0" + }, + { + "principal": "CN=jessica j,CN=Users,DC=hyd-qa,DC=com", + "firstname": "jessica", + "lastname": "j", + "username": "jessica", + "domain": "CN=jessica j" + }, + { + "principal": "CN=krbtgt,CN=Users,DC=hyd-qa,DC=com", + "username": "krbtgt", + "domain": "CN=krbtgt" + }, + { + "email": "sadhu@sadhu.com", + "principal": "CN=sadhu,CN=Users,DC=hyd-qa,DC=com", + "firstname": "sadhu", + "username": "sadhu", + "domain": "CN=sadhu" + }, + { + "email": "test@test.com", + "principal": "CN=sangee1 hariharan,CN=Users,DC=hyd-qa,DC=com", + "firstname": "sangee1", + "lastname": "hariharan", + "username": "sangee1", + "domain": "CN=sangee1 hariharan" + }, + { + "email": "test@test.com", + "principal": "CN=sanjeev n.,CN=Users,DC=hyd-qa,DC=com", + "firstname": "sanjeev", + "username": "sanjeev", + "domain": "CN=sanjeev n." + }, + { + "email": "test@test.com", + "principal": "CN=test1dddd,CN=Users,DC=hyd-qa,DC=com", + "firstname": "test1", + "username": "test1dddd", + "domain": "CN=test1dddd" + } + ] + } + }; + */ + //for testing only (end) + if (json.ldapuserresponse.count > 0) { $(json.ldapuserresponse.LdapUser).each(function() { var $result = $(''); @@ -334,4 +334,4 @@ accountsWizard(args); }; }; -})(jQuery, cloudStack); \ No newline at end of file +})(jQuery, cloudStack); diff --git a/ui/scripts/ui-custom/autoscaler.js b/ui/scripts/ui-custom/autoscaler.js index a24eb906262..ca37bea3ce3 100644 --- a/ui/scripts/ui-custom/autoscaler.js +++ b/ui/scripts/ui-custom/autoscaler.js @@ -333,7 +333,7 @@ var $loading = $('
').addClass('loading-overlay').appendTo($autoscalerDialog); $autoscalerDialog.dialog({ - title: 'AutoScale Configuration Wizard', + title: 'label.autoscale.configuration.wizard', width: 825, height: 600, draggable: true, diff --git a/ui/scripts/ui-custom/healthCheck.js b/ui/scripts/ui-custom/healthCheck.js index 8fb018814a4..3280dd9c821 100644 --- a/ui/scripts/ui-custom/healthCheck.js +++ b/ui/scripts/ui-custom/healthCheck.js @@ -35,9 +35,9 @@ var topFieldForm, bottomFieldForm, $topFieldForm, $bottomFieldForm; var topfields = forms.topFields; - var $healthCheckDesc = $('
Your load balancer will automatically perform health checks on your cloudstack instances and only route traffic to instances that pass the health check
').addClass('health-check-description'); - var $healthCheckConfigTitle = $('


Configuration Options :
').addClass('health-check-config-title'); - var $healthCheckAdvancedTitle = $('


Advanced Options :
').addClass('health-check-advanced-title'); + var $healthCheckDesc = $('
' + 'label.health.check.message.desc' + '
').addClass('health-check-description'); + var $healthCheckConfigTitle = $('


' + 'label.health.check.configurations.options' + '
').addClass('health-check-config-title'); + var $healthCheckAdvancedTitle = $('


' + 'label.health.check.advanced.options' + '
').addClass('health-check-advanced-title'); var $healthCheckDialog = $('
').addClass('health-check'); $healthCheckDialog.append($healthCheckDesc); @@ -361,7 +361,7 @@ } $healthCheckDialog.dialog({ - title: 'Health Check Wizard', + title: 'label.health.check.wizard', width: 600, height: 600, draggable: true, diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index 0a5370e53cb..a7ce13965c8 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -301,7 +301,7 @@ 'select-iso': function($step, formData) { $step.find('.section.custom-size').hide(); - + var originalValues = function(formData) { var $inputs = $step.find('.wizard-step-conditional:visible') .find('input[type=radio]'); @@ -323,7 +323,7 @@ return { response: { - success: function(args) { + success: function(args) { if (formData['select-template']) { $step.find('.wizard-step-conditional').filter(function() { return $(this).hasClass(formData['select-template']); @@ -462,7 +462,7 @@ }, { 'wizard-field': 'service-offering' }) - ); + ); $step.find('input[type=radio]').bind('change', function() { var $target = $(this); @@ -576,7 +576,7 @@ $selectContainer.hide(); // Fix issue with containers always showing after reload - $multiDiskSelect.find('.select-container').attr('style', null); + $multiDiskSelect.find('.select-container').attr('style', null); } else { $selectContainer.show(); $step.find('.content .select-container').append( @@ -618,7 +618,7 @@ // handle removal of custom IOPS controls $step.removeClass('custom-iops-do'); } - + return true; } @@ -738,7 +738,7 @@ if (args.data.sshkeyPairs && args.data.sshkeyPairs.length) { $step.prepend( $('
').addClass('main-desc').append( - $('

').html(_l('Please select a ssh key pair you want this VM to use:')) + $('

').html(_l('message.please.select.ssh.key.pair.use.with.this.vm')) ) ); $step.find('.section.no-thanks').show(); @@ -1137,19 +1137,19 @@ // Next button if ($target.closest('div.button.next').size()) { //step 2 - select template/ISO - if($activeStep.hasClass('select-iso')) { - if ($activeStep.find('.content:visible input:checked').size() == 0) { - cloudStack.dialog.notice({ - message: 'message.step.1.continue' - }); - return false; - } - $(window).trigger("cloudStack.module.instanceWizard.clickNextButton", { - $form: $form, - currentStep: 2 - }); - } - + if($activeStep.hasClass('select-iso')) { + if ($activeStep.find('.content:visible input:checked').size() == 0) { + cloudStack.dialog.notice({ + message: 'message.step.1.continue' + }); + return false; + } + $(window).trigger("cloudStack.module.instanceWizard.clickNextButton", { + $form: $form, + currentStep: 2 + }); + } + //step 6 - select network if ($activeStep.find('.wizard-step-conditional.select-network:visible').size() > 0) { var data = $activeStep.data('my-networks'); @@ -1277,7 +1277,7 @@ $wizard.find('.tab-view').tabs(); $wizard.find('.slider').each(function() { var $slider = $(this); - + $slider.slider({ min: minCustomDiskSize, max: maxCustomDiskSize, diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index e1129583454..58255297a48 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -122,8 +122,7 @@ } else if (selectedLogin === 'saml') { // SAML args.samlLoginAction({ - data: {'idpid': $login.find('#login-options').find(':selected').val(), - 'domain': $login.find('#saml-domain').val()} + data: {'idpid': $login.find('#login-options').find(':selected').val()} }); } return false; @@ -133,16 +132,13 @@ var toggleLoginView = function (selectedOption) { $login.find('#login-submit').show(); if (selectedOption === '') { - $login.find('#saml-login').hide(); $login.find('#cloudstack-login').hide(); $login.find('#login-submit').hide(); selectedLogin = 'none'; } else if (selectedOption === 'cloudstack-login') { - $login.find('#saml-login').hide(); $login.find('#cloudstack-login').show(); selectedLogin = 'cloudstack'; } else { - $login.find('#saml-login').show(); $login.find('#cloudstack-login').hide(); selectedLogin = 'saml'; } @@ -160,14 +156,12 @@ $login.find('#login-dropdown').hide(); $login.find('#login-submit').show(); $login.find('#cloudstack-login').show(); - $login.find('#saml-login').hide(); // If any IdP servers were set, SAML is enabled if (g_idpList && g_idpList.length > 0) { $login.find('#login-dropdown').show(); $login.find('#login-submit').hide(); $login.find('#cloudstack-login').hide(); - $login.find('#saml-login').hide(); $login.find('#login-options') .append($('

').addClass('domain-switcher'); + var $domainSelect = $('').attr({ @@ -701,7 +701,7 @@ if ($wizard.find('.select-network-model input:radio[name=network-model]:checked').val() == 'Advanced') { $nameField.append( $('
').append( - $('').html('Isolation method'), + $('').html(_l('label.isolation.method')), $('