mirror of https://github.com/apache/cloudstack.git
Merge branch 'asf-master' into ui-restyle
This commit is contained in:
commit
d0e8fa35c2
|
|
@ -115,5 +115,38 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-antrun-plugin
|
||||
</artifactId>
|
||||
<versionRange>[1.7,)</versionRange>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -119,34 +119,33 @@ public class PropertiesStorage implements StorageComponent {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@Override
|
||||
public void setConfigParams(Map<String, Object> params) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getConfigParams() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public void setConfigParams(Map<String, Object> params) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@Override
|
||||
public int getRunLevel() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRunLevel(int level) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@Override
|
||||
public Map<String, Object> getConfigParams() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunLevel() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRunLevel(int level) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@ package com.cloud.agent.dhcp;
|
|||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
|
|
@ -32,8 +29,6 @@ import javax.naming.ConfigurationException;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,11 +71,4 @@ public class MockVm {
|
|||
return vncPort;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
long i = 10;
|
||||
Long l = null;
|
||||
if (i == l) {
|
||||
System.out.print("fdfd");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,12 @@ import java.util.Properties;
|
|||
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
|
||||
import com.cloud.agent.Agent.ExitStatus;
|
||||
import com.cloud.agent.api.AgentControlAnswer;
|
||||
import com.cloud.agent.api.Answer;
|
||||
|
|
@ -61,7 +64,6 @@ import com.cloud.resource.ServerResourceBase;
|
|||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
import com.cloud.utils.script.Script;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -130,19 +132,6 @@ public class ConsoleProxyResource extends ServerResourceBase implements
|
|||
}
|
||||
}
|
||||
|
||||
private boolean copyCertToDirectory(String certificate, String filePath)
|
||||
throws IOException {
|
||||
boolean success;
|
||||
// copy cert to the dir
|
||||
FileWriter fstream = new FileWriter(filePath);
|
||||
BufferedWriter out = new BufferedWriter(fstream);
|
||||
out.write(certificate);
|
||||
// Close the output stream
|
||||
out.close();
|
||||
success = true;
|
||||
return success;
|
||||
}
|
||||
|
||||
protected Answer execute(final CheckConsoleProxyLoadCommand cmd) {
|
||||
return executeProxyLoadScan(cmd, cmd.getProxyVmId(),
|
||||
cmd.getProxyVmName(), cmd.getProxyManagementIp(),
|
||||
|
|
@ -204,6 +193,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return Host.Type.ConsoleProxy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1180,9 +1180,11 @@ label.virtual.machines=Virtual machines
|
|||
label.virtual.network=Virtual Network
|
||||
label.virtual.router=Virtual Router
|
||||
label.virtual.routers=Virtual Routers
|
||||
label.vlan.id=VLAN ID
|
||||
label.vlan.range=VLAN Range
|
||||
label.vlan=VLAN
|
||||
label.vlan.id=VLAN/VNI ID
|
||||
label.vlan.range=VLAN/VNI Range
|
||||
label.vlan=VLAN/VNI
|
||||
label.vnet=VLAN/VNI
|
||||
label.vnet.id=VLAN/VNI ID
|
||||
label.vxlan.id=VXLAN ID
|
||||
label.vxlan.range=VXLAN Range
|
||||
label.vxlan=VXLAN
|
||||
|
|
|
|||
|
|
@ -172,12 +172,26 @@ public class TemplateServiceImpl implements TemplateService {
|
|||
return;
|
||||
}
|
||||
|
||||
TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(callback,
|
||||
templateOnStore, null);
|
||||
try {
|
||||
TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(callback,
|
||||
templateOnStore, null);
|
||||
|
||||
AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().createTemplateCallback(null, null)).setContext(context);
|
||||
store.getDriver().createAsync(store, templateOnStore, caller);
|
||||
AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().createTemplateCallback(null, null)).setContext(context);
|
||||
store.getDriver().createAsync(store, templateOnStore, caller);
|
||||
} catch (CloudRuntimeException ex) {
|
||||
// clean up already persisted template_store_ref entry in case of createTemplateCallback is never called
|
||||
TemplateDataStoreVO templateStoreVO = _vmTemplateStoreDao.findByStoreTemplate(store.getId(), template.getId());
|
||||
if (templateStoreVO != null) {
|
||||
TemplateInfo tmplObj = _templateFactory.getTemplate(template, store);
|
||||
tmplObj.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed);
|
||||
}
|
||||
TemplateApiResult result = new TemplateApiResult(template);
|
||||
result.setResult(ex.getMessage());
|
||||
if (callback != null) {
|
||||
callback.complete(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -732,11 +746,23 @@ public class TemplateServiceImpl implements TemplateService {
|
|||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Invoke datastore driver createAsync to create template on destination store");
|
||||
}
|
||||
TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(null,
|
||||
(TemplateObject) templateOnStore, future);
|
||||
AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().copyTemplateCrossZoneCallBack(null, null)).setContext(context);
|
||||
destStore.getDriver().createAsync(destStore, templateOnStore, caller);
|
||||
try {
|
||||
TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(null,
|
||||
(TemplateObject)templateOnStore, future);
|
||||
AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().copyTemplateCrossZoneCallBack(null, null)).setContext(context);
|
||||
destStore.getDriver().createAsync(destStore, templateOnStore, caller);
|
||||
} catch (CloudRuntimeException ex) {
|
||||
// clean up already persisted template_store_ref entry in case of createTemplateCallback is never called
|
||||
TemplateDataStoreVO templateStoreVO = _vmTemplateStoreDao.findByStoreTemplate(destStore.getId(), srcTemplate.getId());
|
||||
if (templateStoreVO != null) {
|
||||
TemplateInfo tmplObj = _templateFactory.getTemplate(srcTemplate, destStore);
|
||||
tmplObj.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed);
|
||||
}
|
||||
TemplateApiResult res = new TemplateApiResult((TemplateObject)templateOnStore);
|
||||
res.setResult(ex.getMessage());
|
||||
future.complete(res);
|
||||
}
|
||||
return future;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,5 +185,38 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-antrun-plugin
|
||||
</artifactId>
|
||||
<versionRange>[1.7,)</versionRange>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -85,10 +85,7 @@
|
|||
<bean id="AccountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl" />
|
||||
<bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />
|
||||
<bean id="ServiceOfferingDetailsDao" class="com.cloud.service.dao.ServiceOfferingDetailsDaoImpl" />
|
||||
<<<<<<< HEAD
|
||||
<bean id="storageStrategyFactoryImpl" class="org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl" />
|
||||
=======
|
||||
<bean id="vmsnapshotDetailsDao" class="com.cloud.vm.snapshot.dao.VMSnapshotDetailsDaoImpl" />
|
||||
<bean id="snapshotManager" class="com.cloud.storage.snapshot.SnapshotManagerImpl" />
|
||||
>>>>>>> pluggable_vm_snapshot
|
||||
</beans>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
|
|||
import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
|
||||
|
|
@ -55,7 +56,6 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
|||
import org.apache.cloudstack.storage.command.CommandResult;
|
||||
import org.apache.cloudstack.storage.command.CopyCmdAnswer;
|
||||
import org.apache.cloudstack.storage.command.DeleteCommand;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore;
|
||||
import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager;
|
||||
import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
|
||||
|
|
@ -165,12 +165,24 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
DataObject volumeOnStore = dataStore.create(volume);
|
||||
volumeOnStore.processEvent(Event.CreateOnlyRequested);
|
||||
|
||||
CreateVolumeContext<VolumeApiResult> context = new CreateVolumeContext<VolumeApiResult>(null, volumeOnStore,
|
||||
future);
|
||||
AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().createVolumeCallback(null, null)).setContext(context);
|
||||
try {
|
||||
CreateVolumeContext<VolumeApiResult> context = new CreateVolumeContext<VolumeApiResult>(null, volumeOnStore,
|
||||
future);
|
||||
AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().createVolumeCallback(null, null)).setContext(context);
|
||||
|
||||
dataStore.getDriver().createAsync(dataStore, volumeOnStore, caller);
|
||||
dataStore.getDriver().createAsync(dataStore, volumeOnStore, caller);
|
||||
} catch (CloudRuntimeException ex) {
|
||||
// clean up already persisted volume_store_ref entry in case of createVolumeCallback is never called
|
||||
VolumeDataStoreVO volStoreVO = _volumeStoreDao.findByStoreVolume(dataStore.getId(), volume.getId());
|
||||
if (volStoreVO != null) {
|
||||
VolumeInfo volObj = volFactory.getVolume(volume, dataStore);
|
||||
volObj.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed);
|
||||
}
|
||||
VolumeApiResult volResult = new VolumeApiResult((VolumeObject)volumeOnStore);
|
||||
volResult.setResult(ex.getMessage());
|
||||
future.complete(volResult);
|
||||
}
|
||||
return future;
|
||||
}
|
||||
|
||||
|
|
@ -441,6 +453,7 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
} catch (Throwable e) {
|
||||
s_logger.debug("failed to create template on storage", e);
|
||||
templateOnPrimaryStoreObj.processEvent(Event.OperationFailed);
|
||||
dataStore.create(template); // make sure that template_spool_ref entry is still present so that the second thread can acquire the lock
|
||||
VolumeApiResult result = new VolumeApiResult(volume);
|
||||
result.setResult(e.toString());
|
||||
future.complete(result);
|
||||
|
|
@ -1022,13 +1035,25 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
|
||||
volumeOnStore.processEvent(Event.CreateOnlyRequested);
|
||||
|
||||
CreateVolumeContext<VolumeApiResult> context = new CreateVolumeContext<VolumeApiResult>(null, volumeOnStore,
|
||||
future);
|
||||
AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().registerVolumeCallback(null, null));
|
||||
caller.setContext(context);
|
||||
try {
|
||||
CreateVolumeContext<VolumeApiResult> context = new CreateVolumeContext<VolumeApiResult>(null, volumeOnStore,
|
||||
future);
|
||||
AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
|
||||
caller.setCallback(caller.getTarget().registerVolumeCallback(null, null));
|
||||
caller.setContext(context);
|
||||
|
||||
store.getDriver().createAsync(store, volumeOnStore, caller);
|
||||
store.getDriver().createAsync(store, volumeOnStore, caller);
|
||||
} catch (CloudRuntimeException ex) {
|
||||
// clean up already persisted volume_store_ref entry in case of createVolumeCallback is never called
|
||||
VolumeDataStoreVO volStoreVO = _volumeStoreDao.findByStoreVolume(store.getId(), volume.getId());
|
||||
if (volStoreVO != null) {
|
||||
VolumeInfo volObj = volFactory.getVolume(volume, store);
|
||||
volObj.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed);
|
||||
}
|
||||
VolumeApiResult res = new VolumeApiResult((VolumeObject)volumeOnStore);
|
||||
res.setResult(ex.getMessage());
|
||||
future.complete(res);
|
||||
}
|
||||
return future;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +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. -->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Apache CloudStack Checkstyle Configuration</name>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-maven-standard</artifactId>
|
||||
<version>4.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../maven-standard/pom.xml</relativePath>
|
||||
</parent>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,22 @@
|
|||
<?xml version="1.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.
|
||||
-->
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
/var/log/cloud.log {
|
||||
rotate 4
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
postrotate
|
||||
pkill socat > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
|
@ -1,3 +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.
|
||||
*/
|
||||
package org.apache.cloudstack.network.contrail.management;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
@ -5,8 +23,8 @@ import org.springframework.context.annotation.Configuration;
|
|||
|
||||
@Configuration
|
||||
public class ProviderTestConfiguration {
|
||||
@Bean
|
||||
ServerDBSync getServerDBSync() {
|
||||
return new ServerDBSyncImpl();
|
||||
}
|
||||
@Bean
|
||||
ServerDBSync getServerDBSync() {
|
||||
return new ServerDBSyncImpl();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +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.
|
||||
*/
|
||||
package org.apache.cloudstack.network.contrail.management;
|
||||
|
||||
import org.mockito.Mockito;
|
||||
|
|
@ -6,8 +24,8 @@ import org.springframework.context.annotation.Configuration;
|
|||
|
||||
@Configuration
|
||||
public class PublicNetworkTestConfiguration {
|
||||
@Bean
|
||||
ServerDBSync getServerDBSync() {
|
||||
return Mockito.mock(ServerDBSync.class);
|
||||
}
|
||||
@Bean
|
||||
ServerDBSync getServerDBSync() {
|
||||
return Mockito.mock(ServerDBSync.class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
license agreements. See the NOTICE file distributed with this work for additional
|
||||
information regarding copyright ownership. The ASF licenses this file to
|
||||
you under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||
by applicable law or agreed to in writing, software distributed under the
|
||||
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the License. -->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
|
|
|
|||
|
|
@ -90,6 +90,40 @@
|
|||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.codehaus.gmaven
|
||||
</groupId>
|
||||
<artifactId>
|
||||
gmaven-plugin
|
||||
</artifactId>
|
||||
<versionRange>[1.3,)</versionRange>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -104,7 +138,6 @@
|
|||
<dependency> <!-- enables mocking of classes (in addition to interfaces) -->
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-nodep</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
1
pom.xml
1
pom.xml
|
|
@ -651,6 +651,7 @@
|
|||
<exclude>tools/marvin/marvin/sandbox/advanced/sandbox.cfg</exclude>
|
||||
<exclude>tools/ngui/static/bootstrap/*</exclude>
|
||||
<exclude>tools/ngui/static/js/lib/*</exclude>
|
||||
<exclude>**/.checkstyle</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
|
|
|||
|
|
@ -228,5 +228,38 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-antrun-plugin
|
||||
</artifactId>
|
||||
<versionRange>[1.7,)</versionRange>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ import com.cloud.storage.upload.UploadListener;
|
|||
import com.cloud.template.VirtualMachineTemplate;
|
||||
import com.cloud.utils.component.ComponentContext;
|
||||
import com.cloud.utils.component.ManagerBase;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
@Component
|
||||
@Local(value = { DownloadMonitor.class })
|
||||
|
|
@ -169,8 +170,9 @@ public class DownloadMonitorImpl extends ManagerBase implements DownloadMonitor
|
|||
}
|
||||
EndPoint ep = _epSelector.select(template);
|
||||
if (ep == null) {
|
||||
s_logger.warn("There is no secondary storage VM for downloading template to image store " + store.getName());
|
||||
return;
|
||||
String errMsg = "There is no secondary storage VM for downloading template to image store " + store.getName();
|
||||
s_logger.warn(errMsg);
|
||||
throw new CloudRuntimeException(errMsg);
|
||||
}
|
||||
DownloadListener dl = new DownloadListener(ep, store, template, _timer, this, dcmd,
|
||||
callback);
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
/var/log/cloud.log {
|
||||
rotate 4
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
postrotate
|
||||
pkill socat > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
|
@ -1137,6 +1137,8 @@ dictionary = {
|
|||
'label.use.vm.ip': '<fmt:message key="label.use.vm.ip" />',
|
||||
'label.value': '<fmt:message key="label.value" />',
|
||||
'label.vcdcname': '<fmt:message key="label.vcdcname" />',
|
||||
'label.vnet': '<fmt:message key="label.vnet" />',
|
||||
'label.vnet.id': '<fmt:message key="label.vnet.id" />',
|
||||
'label.vcenter.cluster': '<fmt:message key="label.vcenter.cluster" />',
|
||||
'label.vcenter.datacenter': '<fmt:message key="label.vcenter.datacenter" />',
|
||||
'label.vcenter.datastore': '<fmt:message key="label.vcenter.datastore" />',
|
||||
|
|
|
|||
|
|
@ -1151,7 +1151,7 @@
|
|||
}
|
||||
},
|
||||
vlan: {
|
||||
label: 'label.vlan.id'
|
||||
label: 'label.vnet.id'
|
||||
},
|
||||
|
||||
broadcasturi: {
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,7 @@
|
|||
label: 'label.state'
|
||||
},
|
||||
vlan: {
|
||||
label: 'VLAN Range(s)',
|
||||
label: 'VLAN/VNI Range(s)',
|
||||
isEditable: true
|
||||
},
|
||||
tags: {
|
||||
|
|
@ -1384,7 +1384,7 @@
|
|||
label: 'label.type'
|
||||
},
|
||||
vlan: {
|
||||
label: 'label.vlan.id'
|
||||
label: 'label.vnet.id'
|
||||
},
|
||||
broadcasturi: {
|
||||
label: 'broadcast URI'
|
||||
|
|
@ -1820,13 +1820,13 @@
|
|||
},
|
||||
|
||||
dedicatedGuestVlanRanges: {
|
||||
title: 'Dedicated VLAN Ranges',
|
||||
title: 'Dedicated VLAN/VNI Ranges',
|
||||
listView: {
|
||||
section: 'dedicatedGuestVlanRanges',
|
||||
id: 'dedicatedGuestVlanRanges',
|
||||
fields: {
|
||||
guestvlanrange: {
|
||||
label: 'VLAN Range(s)'
|
||||
label: 'VLAN/VNI Range(s)'
|
||||
},
|
||||
domain: {
|
||||
label: 'label.domain'
|
||||
|
|
@ -1851,17 +1851,17 @@
|
|||
},
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Dedicate VLAN Range',
|
||||
label: 'Dedicate VLAN/VNI Range',
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
return 'Dedicate VLAN Range';
|
||||
return 'Dedicate VLAN/VNI Range';
|
||||
}
|
||||
},
|
||||
createForm: {
|
||||
title: 'Dedicate VLAN Range',
|
||||
title: 'Dedicate VLAN/VNI Range',
|
||||
fields: {
|
||||
vlanrange: {
|
||||
label: 'VLAN Range',
|
||||
label: 'VLAN/VNI Range',
|
||||
/* select: function(args) {
|
||||
var items = [];
|
||||
if(args.context.physicalNetworks[0].vlan != null && args.context.physicalNetworks[0].vlan.length > 0) {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,39 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-antrun-plugin
|
||||
</artifactId>
|
||||
<versionRange>[1.7,)</versionRange>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
|
|
|
|||
Loading…
Reference in New Issue