mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixup licenses and enfore the license check in this plugin
This commit is contained in:
parent
0069037573
commit
6c2acda5a3
@ -1,13 +1,23 @@
|
|||||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
<!--
|
||||||
license agreements. See the NOTICE file distributed with this work for additional
|
|
||||||
information regarding copyright ownership. The ASF licenses this file to
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
you under the Apache License, Version 2.0 (the "License"); you may not use
|
or more contributor license agreements. See the NOTICE file
|
||||||
this file except in compliance with the License. You may obtain a copy of
|
distributed with this work for additional information
|
||||||
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
regarding copyright ownership. The ASF licenses this file
|
||||||
by applicable law or agreed to in writing, software distributed under the
|
to you under the Apache License, Version 2.0 (the
|
||||||
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
"License"); you may not use this file except in compliance
|
||||||
OF ANY KIND, either express or implied. See the License for the specific
|
with the License. You may obtain a copy of the License at
|
||||||
language governing permissions and limitations under the License. -->
|
|
||||||
|
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"
|
<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/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@ -66,6 +76,19 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.mycila</groupId>
|
||||||
|
<artifactId>license-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>cloudstack-checklicence</id>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
#
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
# or more contributor license agreements. See the NOTICE file
|
# or more contributor license agreements. See the NOTICE file
|
||||||
# distributed with this work for additional information
|
# distributed with this work for additional information
|
||||||
@ -14,5 +15,7 @@
|
|||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#
|
||||||
|
|
||||||
name=storage-volume-cloudbyte
|
name=storage-volume-cloudbyte
|
||||||
parent=storage
|
parent=storage
|
||||||
@ -1,4 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
or more contributor license agreements. See the NOTICE file
|
or more contributor license agreements. See the NOTICE file
|
||||||
distributed with this work for additional information
|
distributed with this work for additional information
|
||||||
@ -15,6 +16,7 @@
|
|||||||
KIND, either express or implied. See the License for the
|
KIND, either express or implied. See the License for the
|
||||||
specific language governing permissions and limitations
|
specific language governing permissions and limitations
|
||||||
under the License.
|
under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|||||||
@ -1,27 +1,30 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.driver;
|
package org.apache.cloudstack.storage.datastore.driver;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
|
import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
|
import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
|
import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
|
||||||
@ -38,7 +41,6 @@ import org.apache.cloudstack.storage.datastore.util.ElastistorUtil;
|
|||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.FileSystem;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.FileSystem;
|
||||||
import org.apache.cloudstack.storage.to.SnapshotObjectTO;
|
import org.apache.cloudstack.storage.to.SnapshotObjectTO;
|
||||||
import org.apache.cloudstack.storage.volume.VolumeObject;
|
import org.apache.cloudstack.storage.volume.VolumeObject;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.cloud.agent.api.Answer;
|
import com.cloud.agent.api.Answer;
|
||||||
import com.cloud.agent.api.to.DataObjectType;
|
import com.cloud.agent.api.to.DataObjectType;
|
||||||
@ -91,6 +93,7 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void createAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CreateCmdResult> callback) {
|
public void createAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CreateCmdResult> callback) {
|
||||||
|
|
||||||
String iqn = null;
|
String iqn = null;
|
||||||
@ -134,7 +137,7 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore
|
|||||||
}
|
}
|
||||||
|
|
||||||
String protocoltype = null;
|
String protocoltype = null;
|
||||||
StoragePoolVO dataStoreVO = (StoragePoolVO) _storagePoolDao.findById(storagePoolId);
|
StoragePoolVO dataStoreVO = _storagePoolDao.findById(storagePoolId);
|
||||||
String desc = diskOffering.getDisplayText();
|
String desc = diskOffering.getDisplayText();
|
||||||
|
|
||||||
if (desc.toLowerCase().contains("iscsi")) {
|
if (desc.toLowerCase().contains("iscsi")) {
|
||||||
@ -197,6 +200,7 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore
|
|||||||
callback.complete(result);
|
callback.complete(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void deleteAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CommandResult> callback) {
|
public void deleteAsync(DataStore dataStore, DataObject dataObject, AsyncCompletionCallback<CommandResult> callback) {
|
||||||
|
|
||||||
String errMsg = null;
|
String errMsg = null;
|
||||||
@ -350,6 +354,7 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore
|
|||||||
return volumeSize;
|
return volumeSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ChapInfo getChapInfo(VolumeInfo volumeInfo) {
|
public ChapInfo getChapInfo(VolumeInfo volumeInfo) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.lifecycle;
|
package org.apache.cloudstack.storage.datastore.lifecycle;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -25,6 +26,8 @@ import java.util.StringTokenizer;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
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.ClusterScope;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
|
import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
|
||||||
@ -41,7 +44,6 @@ import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.Tsm;
|
|||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.UpdateTsmCmdResponse;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.UpdateTsmCmdResponse;
|
||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.UpdateTsmStorageCmdResponse;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.UpdateTsmStorageCmdResponse;
|
||||||
import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
|
import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.cloud.agent.AgentManager;
|
import com.cloud.agent.AgentManager;
|
||||||
import com.cloud.agent.api.Answer;
|
import com.cloud.agent.api.Answer;
|
||||||
|
|||||||
@ -1,3 +1,22 @@
|
|||||||
|
//
|
||||||
|
// 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
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.provider;
|
package org.apache.cloudstack.storage.datastore.provider;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -24,6 +25,9 @@ import java.util.Set;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
||||||
@ -35,8 +39,6 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
|||||||
import org.apache.cloudstack.storage.datastore.driver.ElastistorPrimaryDataStoreDriver;
|
import org.apache.cloudstack.storage.datastore.driver.ElastistorPrimaryDataStoreDriver;
|
||||||
import org.apache.cloudstack.storage.datastore.lifecycle.ElastistorPrimaryDataStoreLifeCycle;
|
import org.apache.cloudstack.storage.datastore.lifecycle.ElastistorPrimaryDataStoreLifeCycle;
|
||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import com.cloud.agent.AgentManager;
|
import com.cloud.agent.AgentManager;
|
||||||
import com.cloud.alert.AlertManager;
|
import com.cloud.alert.AlertManager;
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
@ -37,13 +37,9 @@ import javax.ws.rs.core.MediaType;
|
|||||||
import javax.ws.rs.core.MultivaluedMap;
|
import javax.ws.rs.core.MultivaluedMap;
|
||||||
import javax.ws.rs.core.UriBuilder;
|
import javax.ws.rs.core.UriBuilder;
|
||||||
|
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
|
|
||||||
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
|
||||||
import org.apache.http.auth.InvalidCredentialsException;
|
import org.apache.http.auth.InvalidCredentialsException;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.cloud.agent.api.Answer;
|
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.sun.jersey.api.client.Client;
|
import com.sun.jersey.api.client.Client;
|
||||||
@ -53,6 +49,11 @@ import com.sun.jersey.api.client.config.ClientConfig;
|
|||||||
import com.sun.jersey.api.client.config.DefaultClientConfig;
|
import com.sun.jersey.api.client.config.DefaultClientConfig;
|
||||||
import com.sun.jersey.core.util.MultivaluedMapImpl;
|
import com.sun.jersey.core.util.MultivaluedMapImpl;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
||||||
|
|
||||||
|
import com.cloud.agent.api.Answer;
|
||||||
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
public class ElastistorUtil {
|
public class ElastistorUtil {
|
||||||
|
|
||||||
private static final Logger s_logger = Logger.getLogger(ElastistorUtil.class);
|
private static final Logger s_logger = Logger.getLogger(ElastistorUtil.class);
|
||||||
@ -566,7 +567,6 @@ public class ElastistorUtil {
|
|||||||
|
|
||||||
ListiSCSIInitiatorResponse initiatorResponse = (ListiSCSIInitiatorResponse) getElastistorRestClient().executeCommand(initiatorCmd);
|
ListiSCSIInitiatorResponse initiatorResponse = (ListiSCSIInitiatorResponse) getElastistorRestClient().executeCommand(initiatorCmd);
|
||||||
|
|
||||||
String intiatorgroup;
|
|
||||||
String IG_Id;
|
String IG_Id;
|
||||||
if (initiatorResponse.getIInitiator().getInterface(0).getInitiatorgroup().equalsIgnoreCase("ALL")) {
|
if (initiatorResponse.getIInitiator().getInterface(0).getInitiatorgroup().equalsIgnoreCase("ALL")) {
|
||||||
IG_Id = initiatorResponse.getIInitiator().getInterface(0).getUuid();
|
IG_Id = initiatorResponse.getIInitiator().getInterface(0).getUuid();
|
||||||
@ -612,8 +612,6 @@ public class ElastistorUtil {
|
|||||||
s_logger.info("elastistor pool is NOT a managed storage , hence deleting the volume then tsm");
|
s_logger.info("elastistor pool is NOT a managed storage , hence deleting the volume then tsm");
|
||||||
|
|
||||||
String esvolumeid = null;
|
String esvolumeid = null;
|
||||||
String estsmid = null;
|
|
||||||
|
|
||||||
ListTsmsResponse listTsmsResponse = listTsm(tsmid);
|
ListTsmsResponse listTsmsResponse = listTsm(tsmid);
|
||||||
|
|
||||||
if (listTsmsResponse.getTsmsCount() != 0) {
|
if (listTsmsResponse.getTsmsCount() != 0) {
|
||||||
@ -923,14 +921,12 @@ public class ElastistorUtil {
|
|||||||
*/
|
*/
|
||||||
private static String convertCapacityBytes(Long capacityBytes) {
|
private static String convertCapacityBytes(Long capacityBytes) {
|
||||||
|
|
||||||
String quotasize;
|
|
||||||
|
|
||||||
if ((1099511627776L) > capacityBytes && (capacityBytes > (1073741824))) {
|
if ((1099511627776L) > capacityBytes && (capacityBytes > (1073741824))) {
|
||||||
return quotasize = (String.valueOf(capacityBytes / (1024 * 1024 * 1024)) + "G");
|
return (String.valueOf(capacityBytes / (1024 * 1024 * 1024)) + "G");
|
||||||
} else {
|
} else {
|
||||||
int temp1 = (int) (capacityBytes / (1024 * 1024 * 1024));
|
int temp1 = (int) (capacityBytes / (1024 * 1024 * 1024));
|
||||||
int temp2 = temp1 / 1024;
|
int temp2 = temp1 / 1024;
|
||||||
return quotasize = (String.valueOf(temp2) + "T");
|
return (String.valueOf(temp2) + "T");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1046,9 +1042,9 @@ public class ElastistorUtil {
|
|||||||
private String queryparamresponse = "response";
|
private String queryparamresponse = "response";
|
||||||
|
|
||||||
public ElastiCenterClient(String address, String key) throws InvalidCredentialsException, InvalidParameterException, SSLHandshakeException, ServiceUnavailableException {
|
public ElastiCenterClient(String address, String key) throws InvalidCredentialsException, InvalidParameterException, SSLHandshakeException, ServiceUnavailableException {
|
||||||
this.elastiCenterAddress = address;
|
elastiCenterAddress = address;
|
||||||
this.apiKey = key;
|
apiKey = key;
|
||||||
this.initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initialize() throws InvalidParameterException, SSLHandshakeException, InvalidCredentialsException, ServiceUnavailableException {
|
public void initialize() throws InvalidParameterException, SSLHandshakeException, InvalidCredentialsException, ServiceUnavailableException {
|
||||||
@ -1067,13 +1063,16 @@ public class ElastistorUtil {
|
|||||||
// Create a trust manager that does not validate certificate
|
// Create a trust manager that does not validate certificate
|
||||||
// chains
|
// chains
|
||||||
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
|
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
|
||||||
|
@Override
|
||||||
public X509Certificate[] getAcceptedIssuers() {
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void checkClientTrusted(X509Certificate[] certs, String authType) {
|
public void checkClientTrusted(X509Certificate[] certs, String authType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void checkServerTrusted(X509Certificate[] certs, String authType) {
|
public void checkServerTrusted(X509Certificate[] certs, String authType) {
|
||||||
}
|
}
|
||||||
} };
|
} };
|
||||||
@ -2415,7 +2414,6 @@ public class ElastistorUtil {
|
|||||||
|
|
||||||
public static Answer createElastistorVolumeSnapshot(String volumeId, String snapshotName) throws Throwable{
|
public static Answer createElastistorVolumeSnapshot(String volumeId, String snapshotName) throws Throwable{
|
||||||
|
|
||||||
CreateCmdResult result = null;
|
|
||||||
CreateStorageSnapshotCmd snapshotCmd = new CreateStorageSnapshotCmd();
|
CreateStorageSnapshotCmd snapshotCmd = new CreateStorageSnapshotCmd();
|
||||||
|
|
||||||
snapshotCmd.putCommandParameter("id", volumeId);
|
snapshotCmd.putCommandParameter("id", volumeId);
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.response.ListResponse;
|
import org.apache.cloudstack.api.response.ListResponse;
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
/*
|
//
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
*
|
//
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
//
|
||||||
* Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
* under the License.
|
// under the License.
|
||||||
*/
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -25,6 +26,9 @@ import java.util.Map;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.naming.ConfigurationException;
|
import javax.naming.ConfigurationException;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.response.ListResponse;
|
import org.apache.cloudstack.api.response.ListResponse;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
|
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
|
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
|
||||||
@ -33,8 +37,6 @@ import org.apache.cloudstack.storage.datastore.provider.ElastistorPrimaryDataSto
|
|||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.FileSystem;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.FileSystem;
|
||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.ListInterfacesResponse;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.ListInterfacesResponse;
|
||||||
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.ListPoolsResponse;
|
import org.apache.cloudstack.storage.datastore.util.ElastistorUtil.ListPoolsResponse;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import com.cloud.storage.dao.DiskOfferingDao;
|
import com.cloud.storage.dao.DiskOfferingDao;
|
||||||
import com.cloud.storage.dao.VolumeDao;
|
import com.cloud.storage.dao.VolumeDao;
|
||||||
|
|||||||
@ -1,4 +1,22 @@
|
|||||||
// Copyright 2012-2013 CloudByte Inc.
|
//
|
||||||
|
// 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.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
//
|
||||||
// Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
// or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
// distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
@ -14,6 +15,8 @@
|
|||||||
// KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
// specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
// under the License.
|
// under the License.
|
||||||
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.ApiConstants;
|
import org.apache.cloudstack.api.ApiConstants;
|
||||||
|
|||||||
@ -1,4 +1,22 @@
|
|||||||
// Copyright 2012-2013 CloudByte Inc.
|
//
|
||||||
|
// 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.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
//
|
||||||
// Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
// or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
// distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
@ -14,6 +15,8 @@
|
|||||||
// KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
// specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
// under the License.
|
// under the License.
|
||||||
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.ApiConstants;
|
import org.apache.cloudstack.api.ApiConstants;
|
||||||
|
|||||||
@ -1,4 +1,22 @@
|
|||||||
// Copyright 2012-2013 CloudByte Inc.
|
//
|
||||||
|
// 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.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
//
|
||||||
// Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
// or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
// distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
@ -14,6 +15,8 @@
|
|||||||
// KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
// specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
// under the License.
|
// under the License.
|
||||||
|
//
|
||||||
|
|
||||||
package org.apache.cloudstack.storage.datastore.util;
|
package org.apache.cloudstack.storage.datastore.util;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.ApiConstants;
|
import org.apache.cloudstack.api.ApiConstants;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user