mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Move previous AncientImageDataStore provider and DefaultImageDataStore
provider code into plugins.
This commit is contained in:
parent
b0cbe260f9
commit
a5416797ab
@ -121,7 +121,7 @@ public class StorageAllocatorTest {
|
|||||||
cluster = clusterDao.persist(cluster);
|
cluster = clusterDao.persist(cluster);
|
||||||
clusterId = cluster.getId();
|
clusterId = cluster.getId();
|
||||||
|
|
||||||
DataStoreProvider provider = providerMgr.getDataStoreProvider("ancient primary data store provider");
|
DataStoreProvider provider = providerMgr.getDataStoreProvider("cloudstack primary data store provider");
|
||||||
storage = new StoragePoolVO();
|
storage = new StoragePoolVO();
|
||||||
storage.setDataCenterId(dcId);
|
storage.setDataCenterId(dcId);
|
||||||
storage.setPodId(podId);
|
storage.setPodId(podId);
|
||||||
@ -164,7 +164,7 @@ public class StorageAllocatorTest {
|
|||||||
try {
|
try {
|
||||||
createDb();
|
createDb();
|
||||||
|
|
||||||
DataStoreProvider provider = providerMgr.getDataStoreProvider("ancient primary data store provider");
|
DataStoreProvider provider = providerMgr.getDataStoreProvider("cloudstack primary data store provider");
|
||||||
storage = new StoragePoolVO();
|
storage = new StoragePoolVO();
|
||||||
storage.setDataCenterId(dcId);
|
storage.setDataCenterId(dcId);
|
||||||
storage.setPodId(podId);
|
storage.setPodId(podId);
|
||||||
|
|||||||
@ -262,7 +262,7 @@ public class volumeServiceTest extends CloudStackTestNGBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreatePrimaryStorage() {
|
public void testCreatePrimaryStorage() {
|
||||||
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default primary data store provider");
|
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("sample primary data store provider");
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
URI uri = null;
|
URI uri = null;
|
||||||
try {
|
try {
|
||||||
@ -290,7 +290,7 @@ public class volumeServiceTest extends CloudStackTestNGBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private DataStore createImageStore() {
|
private DataStore createImageStore() {
|
||||||
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default image data store");
|
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("sample image data store provider");
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
String name = UUID.randomUUID().toString();
|
String name = UUID.randomUUID().toString();
|
||||||
params.put("name", name);
|
params.put("name", name);
|
||||||
@ -310,7 +310,7 @@ public class volumeServiceTest extends CloudStackTestNGBase {
|
|||||||
|
|
||||||
public DataStore createPrimaryDataStore() {
|
public DataStore createPrimaryDataStore() {
|
||||||
try {
|
try {
|
||||||
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default primary data store provider");
|
DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("sample primary data store provider");
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
URI uri = new URI(this.getPrimaryStorageUrl());
|
URI uri = new URI(this.getPrimaryStorageUrl());
|
||||||
params.put("url", this.getPrimaryStorageUrl());
|
params.put("url", this.getPrimaryStorageUrl());
|
||||||
@ -331,7 +331,7 @@ public class volumeServiceTest extends CloudStackTestNGBase {
|
|||||||
lifeCycle.attachCluster(store, scope);
|
lifeCycle.attachCluster(store, scope);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PrimaryDataStoreProvider provider = primaryDataStoreProviderMgr.getDataStoreProvider("default primary data store provider");
|
PrimaryDataStoreProvider provider = primaryDataStoreProviderMgr.getDataStoreProvider("sample primary data store provider");
|
||||||
primaryDataStoreProviderMgr.configure("primary data store mgr", new HashMap<String, Object>());
|
primaryDataStoreProviderMgr.configure("primary data store mgr", new HashMap<String, Object>());
|
||||||
|
|
||||||
List<PrimaryDataStoreVO> ds = primaryStoreDao.findPoolByName(this.primaryName);
|
List<PrimaryDataStoreVO> ds = primaryStoreDao.findPoolByName(this.primaryName);
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataStoreProvider getDefaultPrimaryDataStoreProvider() {
|
public DataStoreProvider getDefaultPrimaryDataStoreProvider() {
|
||||||
return this.getDataStoreProvider("ancient primary data store provider");
|
return this.getDataStoreProvider("cloudstack primary data store provider");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -79,12 +79,12 @@ public class ConfiguratorTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getProvider() {
|
public void getProvider() {
|
||||||
// assertNotNull(providerMgr.getDataStoreProvider("default primary data store provider"));
|
// assertNotNull(providerMgr.getDataStoreProvider("sample primary data store provider"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createDataStore() {
|
public void createDataStore() {
|
||||||
/*PrimaryDataStoreProvider provider = providerMgr.getDataStoreProvider("default primary data store provider");
|
/*PrimaryDataStoreProvider provider = providerMgr.getDataStoreProvider("sample primary data store provider");
|
||||||
Map<String, String> params = new HashMap<String, String>();
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
params.put("url", "nfs://localhost/mnt");
|
params.put("url", "nfs://localhost/mnt");
|
||||||
params.put("clusterId", "1");
|
params.put("clusterId", "1");
|
||||||
|
|||||||
@ -58,8 +58,11 @@
|
|||||||
<module>user-authenticators/sha256salted</module>
|
<module>user-authenticators/sha256salted</module>
|
||||||
<module>network-elements/dns-notifier</module>
|
<module>network-elements/dns-notifier</module>
|
||||||
<module>storage/image/s3</module>
|
<module>storage/image/s3</module>
|
||||||
|
<module>storage/image/default</module>
|
||||||
|
<module>storage/image/sample</module>
|
||||||
<module>storage/volume/solidfire</module>
|
<module>storage/volume/solidfire</module>
|
||||||
<module>storage/volume/default</module>
|
<module>storage/volume/default</module>
|
||||||
|
<module>storage/volume/sample</module>
|
||||||
<module>alert-handlers/snmp-alerts</module>
|
<module>alert-handlers/snmp-alerts</module>
|
||||||
<module>alert-handlers/syslog-alerts</module>
|
<module>alert-handlers/syslog-alerts</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|||||||
56
plugins/storage/image/default/pom.xml
Normal file
56
plugins/storage/image/default/pom.xml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
|
license agreements. See the NOTICE file distributed with this work for additional
|
||||||
|
information regarding copyright ownership. The ASF licenses this file to
|
||||||
|
you under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of
|
||||||
|
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||||
|
by applicable law or agreed to in writing, software distributed under the
|
||||||
|
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||||
|
OF ANY KIND, either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the License. -->
|
||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>cloud-plugin-storage-image-default</artifactId>
|
||||||
|
<name>Apache CloudStack Plugin - Storage Image default provider</name>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloudstack-plugins</artifactId>
|
||||||
|
<version>4.2.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-engine-storage-image</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${cs.mysql.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<defaultGoal>install</defaultGoal>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
<testSourceDirectory>test</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.storage.image.driver;
|
package org.apache.cloudstack.storage.datastore.driver;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -64,9 +64,9 @@ import com.cloud.storage.snapshot.SnapshotManager;
|
|||||||
import com.cloud.storage.swift.SwiftManager;
|
import com.cloud.storage.swift.SwiftManager;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
public class AncientImageDataStoreDriverImpl implements ImageDataStoreDriver {
|
public class CloudStackImageDataStoreDriverImpl implements ImageDataStoreDriver {
|
||||||
private static final Logger s_logger = Logger
|
private static final Logger s_logger = Logger
|
||||||
.getLogger(AncientImageDataStoreDriverImpl.class);
|
.getLogger(CloudStackImageDataStoreDriverImpl.class);
|
||||||
@Inject
|
@Inject
|
||||||
VMTemplateZoneDao templateZoneDao;
|
VMTemplateZoneDao templateZoneDao;
|
||||||
@Inject
|
@Inject
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
// 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.lifecycle;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
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.HostScope;
|
||||||
|
import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
|
||||||
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper;
|
||||||
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
||||||
|
import org.apache.cloudstack.storage.image.db.ImageDataStoreDao;
|
||||||
|
import org.apache.cloudstack.storage.image.db.ImageDataStoreVO;
|
||||||
|
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
||||||
|
|
||||||
|
import com.cloud.agent.api.StoragePoolInfo;
|
||||||
|
|
||||||
|
public class CloudStackImageDataStoreLifeCycle implements ImageDataStoreLifeCycle {
|
||||||
|
@Inject
|
||||||
|
protected ImageDataStoreDao imageStoreDao;
|
||||||
|
@Inject
|
||||||
|
ImageDataStoreHelper imageStoreHelper;
|
||||||
|
@Inject
|
||||||
|
ImageDataStoreManager imageStoreMgr;
|
||||||
|
public CloudStackImageDataStoreLifeCycle() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataStore initialize(Map<String, Object> dsInfos) {
|
||||||
|
ImageDataStoreVO ids = imageStoreHelper.createImageDataStore(dsInfos);
|
||||||
|
return imageStoreMgr.getImageDataStore(ids.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean attachCluster(DataStore store, ClusterScope scope) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean attachHost(DataStore store, HostScope scope,
|
||||||
|
StoragePoolInfo existingInfo) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean attachZone(DataStore dataStore, ZoneScope scope) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dettach() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean unmanaged() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean maintain(DataStore store) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean cancelMaintain(DataStore store) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteDataStore(DataStore store) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.storage.image.store;
|
package org.apache.cloudstack.storage.datastore.provider;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -31,20 +31,20 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
|
|||||||
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider;
|
import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType;
|
import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType;
|
||||||
|
import org.apache.cloudstack.storage.datastore.driver.CloudStackImageDataStoreDriverImpl;
|
||||||
|
import org.apache.cloudstack.storage.datastore.lifecycle.CloudStackImageDataStoreLifeCycle;
|
||||||
import org.apache.cloudstack.storage.image.ImageDataStoreDriver;
|
import org.apache.cloudstack.storage.image.ImageDataStoreDriver;
|
||||||
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper;
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper;
|
||||||
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
||||||
import org.apache.cloudstack.storage.image.driver.AncientImageDataStoreDriverImpl;
|
|
||||||
import org.apache.cloudstack.storage.image.store.lifecycle.DefaultImageDataStoreLifeCycle;
|
|
||||||
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.cloud.utils.component.ComponentContext;
|
import com.cloud.utils.component.ComponentContext;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class AncientImageDataStoreProvider implements ImageDataStoreProvider {
|
public class CloudStackImageDataStoreProvider implements ImageDataStoreProvider {
|
||||||
|
|
||||||
private final String name = "ancient image data store";
|
private final String name = "cloudstack image data store provider";
|
||||||
protected ImageDataStoreLifeCycle lifeCycle;
|
protected ImageDataStoreLifeCycle lifeCycle;
|
||||||
protected ImageDataStoreDriver driver;
|
protected ImageDataStoreDriver driver;
|
||||||
@Inject
|
@Inject
|
||||||
@ -64,11 +64,11 @@ public class AncientImageDataStoreProvider implements ImageDataStoreProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean configure(Map<String, Object> params) {
|
public boolean configure(Map<String, Object> params) {
|
||||||
lifeCycle = ComponentContext.inject(DefaultImageDataStoreLifeCycle.class);
|
lifeCycle = ComponentContext.inject(CloudStackImageDataStoreLifeCycle.class);
|
||||||
driver = ComponentContext.inject(AncientImageDataStoreDriverImpl.class);
|
driver = ComponentContext.inject(CloudStackImageDataStoreDriverImpl.class);
|
||||||
|
|
||||||
storeMgr.registerDriver(this.getName(), driver);
|
storeMgr.registerDriver(this.getName(), driver);
|
||||||
|
|
||||||
Map<String, Object> infos = new HashMap<String, Object>();
|
Map<String, Object> infos = new HashMap<String, Object>();
|
||||||
String dataStoreName = UUID.nameUUIDFromBytes(this.name.getBytes()).toString();
|
String dataStoreName = UUID.nameUUIDFromBytes(this.name.getBytes()).toString();
|
||||||
infos.put("name", dataStoreName);
|
infos.put("name", dataStoreName);
|
||||||
56
plugins/storage/image/sample/pom.xml
Normal file
56
plugins/storage/image/sample/pom.xml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
|
license agreements. See the NOTICE file distributed with this work for additional
|
||||||
|
information regarding copyright ownership. The ASF licenses this file to
|
||||||
|
you under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of
|
||||||
|
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||||
|
by applicable law or agreed to in writing, software distributed under the
|
||||||
|
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||||
|
OF ANY KIND, either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the License. -->
|
||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>cloud-plugin-storage-image-sample</artifactId>
|
||||||
|
<name>Apache CloudStack Plugin - Storage Image sample provider</name>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloudstack-plugins</artifactId>
|
||||||
|
<version>4.2.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-engine-storage-image</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${cs.mysql.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<defaultGoal>install</defaultGoal>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
<testSourceDirectory>test</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.storage.image.driver;
|
package org.apache.cloudstack.storage.datastore.driver;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -38,12 +38,12 @@ import org.apache.cloudstack.storage.image.ImageDataStoreDriver;
|
|||||||
import com.cloud.storage.dao.VMTemplateDao;
|
import com.cloud.storage.dao.VMTemplateDao;
|
||||||
|
|
||||||
//http-read-only based image store
|
//http-read-only based image store
|
||||||
public class DefaultImageDataStoreDriverImpl implements ImageDataStoreDriver {
|
public class SampleImageDataStoreDriverImpl implements ImageDataStoreDriver {
|
||||||
@Inject
|
@Inject
|
||||||
EndPointSelector selector;
|
EndPointSelector selector;
|
||||||
@Inject
|
@Inject
|
||||||
VMTemplateDao imageDataDao;
|
VMTemplateDao imageDataDao;
|
||||||
public DefaultImageDataStoreDriverImpl() {
|
public SampleImageDataStoreDriverImpl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -14,7 +14,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.
|
||||||
package org.apache.cloudstack.storage.image.store.lifecycle;
|
package org.apache.cloudstack.storage.datastore.lifecycle;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -28,17 +28,18 @@ import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper;
|
|||||||
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
||||||
import org.apache.cloudstack.storage.image.db.ImageDataStoreDao;
|
import org.apache.cloudstack.storage.image.db.ImageDataStoreDao;
|
||||||
import org.apache.cloudstack.storage.image.db.ImageDataStoreVO;
|
import org.apache.cloudstack.storage.image.db.ImageDataStoreVO;
|
||||||
|
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
||||||
|
|
||||||
import com.cloud.agent.api.StoragePoolInfo;
|
import com.cloud.agent.api.StoragePoolInfo;
|
||||||
|
|
||||||
public class DefaultImageDataStoreLifeCycle implements ImageDataStoreLifeCycle {
|
public class SampleImageDataStoreLifeCycle implements ImageDataStoreLifeCycle {
|
||||||
@Inject
|
@Inject
|
||||||
protected ImageDataStoreDao imageStoreDao;
|
protected ImageDataStoreDao imageStoreDao;
|
||||||
@Inject
|
@Inject
|
||||||
ImageDataStoreHelper imageStoreHelper;
|
ImageDataStoreHelper imageStoreHelper;
|
||||||
@Inject
|
@Inject
|
||||||
ImageDataStoreManager imageStoreMgr;
|
ImageDataStoreManager imageStoreMgr;
|
||||||
public DefaultImageDataStoreLifeCycle() {
|
public SampleImageDataStoreLifeCycle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.storage.image.store;
|
package org.apache.cloudstack.storage.datastore.provider;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -28,16 +28,16 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
|
|||||||
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.HypervisorHostListener;
|
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider;
|
import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider;
|
||||||
|
import org.apache.cloudstack.storage.datastore.driver.SampleImageDataStoreDriverImpl;
|
||||||
|
import org.apache.cloudstack.storage.datastore.lifecycle.SampleImageDataStoreLifeCycle;
|
||||||
import org.apache.cloudstack.storage.image.ImageDataStoreDriver;
|
import org.apache.cloudstack.storage.image.ImageDataStoreDriver;
|
||||||
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager;
|
||||||
import org.apache.cloudstack.storage.image.driver.DefaultImageDataStoreDriverImpl;
|
|
||||||
import org.apache.cloudstack.storage.image.store.lifecycle.DefaultImageDataStoreLifeCycle;
|
|
||||||
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle;
|
||||||
|
|
||||||
import com.cloud.utils.component.ComponentContext;
|
import com.cloud.utils.component.ComponentContext;
|
||||||
|
|
||||||
public class DefaultImageDataStoreProvider implements ImageDataStoreProvider {
|
public class SampleImageDataStoreProvider implements ImageDataStoreProvider {
|
||||||
private final String name = "default image data store";
|
private final String name = "sample image data store provider";
|
||||||
protected ImageDataStoreLifeCycle lifeCycle;
|
protected ImageDataStoreLifeCycle lifeCycle;
|
||||||
protected ImageDataStoreDriver driver;
|
protected ImageDataStoreDriver driver;
|
||||||
@Inject
|
@Inject
|
||||||
@ -56,8 +56,8 @@ public class DefaultImageDataStoreProvider implements ImageDataStoreProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean configure(Map<String, Object> params) {
|
public boolean configure(Map<String, Object> params) {
|
||||||
lifeCycle = ComponentContext.inject(DefaultImageDataStoreLifeCycle.class);
|
lifeCycle = ComponentContext.inject(SampleImageDataStoreLifeCycle.class);
|
||||||
driver = ComponentContext.inject(DefaultImageDataStoreDriverImpl.class);
|
driver = ComponentContext.inject(SampleImageDataStoreDriverImpl.class);
|
||||||
|
|
||||||
storeMgr.registerDriver(this.getName(), driver);
|
storeMgr.registerDriver(this.getName(), driver);
|
||||||
return true;
|
return true;
|
||||||
@ -34,15 +34,15 @@ import com.cloud.utils.component.ComponentContext;
|
|||||||
public class CloudStackPrimaryDataStoreProviderImpl implements
|
public class CloudStackPrimaryDataStoreProviderImpl implements
|
||||||
PrimaryDataStoreProvider {
|
PrimaryDataStoreProvider {
|
||||||
|
|
||||||
private final String providerName = "ancient primary data store provider";
|
private final String providerName = "cloudstack primary data store provider";
|
||||||
protected PrimaryDataStoreDriver driver;
|
protected PrimaryDataStoreDriver driver;
|
||||||
protected HypervisorHostListener listener;
|
protected HypervisorHostListener listener;
|
||||||
protected DataStoreLifeCycle lifecyle;
|
protected DataStoreLifeCycle lifecyle;
|
||||||
|
|
||||||
CloudStackPrimaryDataStoreProviderImpl() {
|
CloudStackPrimaryDataStoreProviderImpl() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return providerName;
|
return providerName;
|
||||||
@ -70,7 +70,7 @@ public class CloudStackPrimaryDataStoreProviderImpl implements
|
|||||||
public HypervisorHostListener getHostListener() {
|
public HypervisorHostListener getHostListener() {
|
||||||
return this.listener;
|
return this.listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<DataStoreProviderType> getTypes() {
|
public Set<DataStoreProviderType> getTypes() {
|
||||||
Set<DataStoreProviderType> types = new HashSet<DataStoreProviderType>();
|
Set<DataStoreProviderType> types = new HashSet<DataStoreProviderType>();
|
||||||
|
|||||||
56
plugins/storage/volume/sample/pom.xml
Normal file
56
plugins/storage/volume/sample/pom.xml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
|
license agreements. See the NOTICE file distributed with this work for additional
|
||||||
|
information regarding copyright ownership. The ASF licenses this file to
|
||||||
|
you under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
|
this file except in compliance with the License. You may obtain a copy of
|
||||||
|
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
|
||||||
|
by applicable law or agreed to in writing, software distributed under the
|
||||||
|
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||||
|
OF ANY KIND, either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the License. -->
|
||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>cloud-plugin-storage-volume-sample</artifactId>
|
||||||
|
<name>Apache CloudStack Plugin - Storage Volume sample provider</name>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloudstack-plugins</artifactId>
|
||||||
|
<version>4.2.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
|
<artifactId>cloud-engine-storage-volume</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${cs.mysql.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<defaultGoal>install</defaultGoal>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
<testSourceDirectory>test</testSourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@ -46,15 +46,15 @@ import com.cloud.utils.storage.encoding.DecodedDataObject;
|
|||||||
import com.cloud.utils.storage.encoding.Decoder;
|
import com.cloud.utils.storage.encoding.Decoder;
|
||||||
|
|
||||||
|
|
||||||
public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver {
|
public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver {
|
||||||
private static final Logger s_logger = Logger.getLogger(DefaultPrimaryDataStoreDriverImpl.class);
|
private static final Logger s_logger = Logger.getLogger(SamplePrimaryDataStoreDriverImpl.class);
|
||||||
@Inject
|
@Inject
|
||||||
EndPointSelector selector;
|
EndPointSelector selector;
|
||||||
@Inject
|
@Inject
|
||||||
StoragePoolHostDao storeHostDao;
|
StoragePoolHostDao storeHostDao;
|
||||||
@Inject
|
@Inject
|
||||||
DataObjectManager dataObjMgr;
|
DataObjectManager dataObjMgr;
|
||||||
public DefaultPrimaryDataStoreDriverImpl() {
|
public SamplePrimaryDataStoreDriverImpl() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Void createAsyncCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
|
public Void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
|
||||||
CreateCmdResult result = null;
|
CreateCmdResult result = null;
|
||||||
CreateObjectAnswer volAnswer = (CreateObjectAnswer) callback.getResult();
|
CreateObjectAnswer volAnswer = (CreateObjectAnswer) callback.getResult();
|
||||||
if (volAnswer.getResult()) {
|
if (volAnswer.getResult()) {
|
||||||
@ -94,13 +94,13 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||||||
|
|
||||||
EndPoint ep = selector.select(vo);
|
EndPoint ep = selector.select(vo);
|
||||||
AsyncRpcConext<CommandResult> context = new AsyncRpcConext<CommandResult>(callback);
|
AsyncRpcConext<CommandResult> context = new AsyncRpcConext<CommandResult>(callback);
|
||||||
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
|
AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
|
||||||
caller.setCallback(caller.getTarget().deleteCallback(null, null))
|
caller.setCallback(caller.getTarget().deleteCallback(null, null))
|
||||||
.setContext(context);
|
.setContext(context);
|
||||||
ep.sendMessageAsync(cmd, caller);
|
ep.sendMessageAsync(cmd, caller);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Void deleteCallback(AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> callback, AsyncRpcConext<CommandResult> context) {
|
public Void deleteCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, AsyncRpcConext<CommandResult> context) {
|
||||||
CommandResult result = new CommandResult();
|
CommandResult result = new CommandResult();
|
||||||
Answer answer = callback.getResult();
|
Answer answer = callback.getResult();
|
||||||
if (!answer.getResult()) {
|
if (!answer.getResult()) {
|
||||||
@ -165,7 +165,7 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||||||
CreateObjectCommand createCmd = new CreateObjectCommand(vol.getUri());
|
CreateObjectCommand createCmd = new CreateObjectCommand(vol.getUri());
|
||||||
|
|
||||||
CreateVolumeContext<CreateCmdResult> context = new CreateVolumeContext<CreateCmdResult>(callback, vol);
|
CreateVolumeContext<CreateCmdResult> context = new CreateVolumeContext<CreateCmdResult>(callback, vol);
|
||||||
AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
|
AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
|
||||||
caller.setContext(context)
|
caller.setContext(context)
|
||||||
.setCallback(caller.getTarget().createAsyncCallback(null, null));
|
.setCallback(caller.getTarget().createAsyncCallback(null, null));
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ import com.cloud.host.dao.HostDao;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.storage.StoragePoolStatus;
|
import com.cloud.storage.StoragePoolStatus;
|
||||||
|
|
||||||
public class DefaultPrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
|
public class SamplePrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle {
|
||||||
@Inject
|
@Inject
|
||||||
EndPointSelector selector;
|
EndPointSelector selector;
|
||||||
@Inject
|
@Inject
|
||||||
@ -54,7 +54,7 @@ public class DefaultPrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLif
|
|||||||
PrimaryDataStoreHelper primaryStoreHelper;
|
PrimaryDataStoreHelper primaryStoreHelper;
|
||||||
@Inject
|
@Inject
|
||||||
PrimaryDataStoreProviderManager providerMgr;
|
PrimaryDataStoreProviderManager providerMgr;
|
||||||
public DefaultPrimaryDataStoreLifeCycleImpl() {
|
public SamplePrimaryDataStoreLifeCycleImpl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -29,14 +29,14 @@ import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver
|
|||||||
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider;
|
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType;
|
||||||
import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager;
|
import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager;
|
||||||
import org.apache.cloudstack.storage.datastore.driver.DefaultPrimaryDataStoreDriverImpl;
|
import org.apache.cloudstack.storage.datastore.driver.SamplePrimaryDataStoreDriverImpl;
|
||||||
import org.apache.cloudstack.storage.datastore.lifecycle.DefaultPrimaryDataStoreLifeCycleImpl;
|
import org.apache.cloudstack.storage.datastore.lifecycle.SamplePrimaryDataStoreLifeCycleImpl;
|
||||||
|
|
||||||
import com.cloud.utils.component.ComponentContext;
|
import com.cloud.utils.component.ComponentContext;
|
||||||
|
|
||||||
|
|
||||||
public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProvider {
|
public class SamplePrimaryDatastoreProviderImpl implements PrimaryDataStoreProvider {
|
||||||
private final String providerName = "default primary data store provider";
|
private final String providerName = "sample primary data store provider";
|
||||||
protected PrimaryDataStoreDriver driver;
|
protected PrimaryDataStoreDriver driver;
|
||||||
protected HypervisorHostListener listener;
|
protected HypervisorHostListener listener;
|
||||||
@Inject
|
@Inject
|
||||||
@ -57,8 +57,8 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean configure(Map<String, Object> params) {
|
public boolean configure(Map<String, Object> params) {
|
||||||
lifecyle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class);
|
lifecyle = ComponentContext.inject(SamplePrimaryDataStoreLifeCycleImpl.class);
|
||||||
driver = ComponentContext.inject(DefaultPrimaryDataStoreDriverImpl.class);
|
driver = ComponentContext.inject(SamplePrimaryDataStoreDriverImpl.class);
|
||||||
listener = ComponentContext.inject(DefaultHostListener.class);
|
listener = ComponentContext.inject(DefaultHostListener.class);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
|
|||||||
public HypervisorHostListener getHostListener() {
|
public HypervisorHostListener getHostListener() {
|
||||||
return this.listener;
|
return this.listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<DataStoreProviderType> getTypes() {
|
public Set<DataStoreProviderType> getTypes() {
|
||||||
Set<DataStoreProviderType> types = new HashSet<DataStoreProviderType>();
|
Set<DataStoreProviderType> types = new HashSet<DataStoreProviderType>();
|
||||||
@ -16,24 +16,60 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package org.apache.cloudstack.storage.datastore.provider;
|
package org.apache.cloudstack.storage.datastore.provider;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
|
||||||
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
|
||||||
|
import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
|
||||||
|
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class SolidfirePrimaryDataStoreProvider extends
|
public class SolidfirePrimaryDataStoreProvider implements PrimaryDataStoreProvider {
|
||||||
DefaultPrimaryDatastoreProviderImpl {
|
private final String name = "Solidfire Primary Data Store Provider";
|
||||||
private final String name = "Solidfre Primary Data Store Provider";
|
|
||||||
|
|
||||||
|
|
||||||
public SolidfirePrimaryDataStoreProvider() {
|
public SolidfirePrimaryDataStoreProvider() {
|
||||||
|
|
||||||
|
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataStoreLifeCycle getDataStoreLifeCycle() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataStoreDriver getDataStoreDriver() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HypervisorHostListener getHostListener() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean configure(Map<String, Object> params) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<DataStoreProviderType> getTypes() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user