use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class ApiTest method deviceSetup.
private void deviceSetup() throws InterruptedException {
// Create a isilon device - file
StorageSystemRestRep isilonDevice = createIsilonDevice();
// Update the discovered Isilon storage ports to set the transport zone.
updateAllIsilonPorts(isilonDevice);
// Create a VNXBlock SMISProvider
SMISProviderRestRep provider = createSMISProvider();
// Update the discovered VNX/VMAX storage ports to set the transport zone.
updateAllVnxAndVmaxPorts(provider);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class SystemsMapper method map.
public static StorageSystemRestRep map(StorageSystem from) {
if (from == null) {
return null;
}
StorageSystemRestRep to = new StorageSystemRestRep();
mapDiscoveredSystemObjectFields(from, to);
to.setSerialNumber(from.getSerialNumber());
to.setMajorVersion(from.getMajorVersion());
to.setMinorVersion(from.getMinorVersion());
to.setIpAddress(from.getIpAddress());
to.setSecondaryIPs(from.getSecondaryIPs());
to.setPortNumber(from.getPortNumber());
to.setSmisProviderIP(from.getSmisProviderIP());
to.setSmisPortNumber(from.getSmisPortNumber());
to.setSmisUseSSL(from.getSmisUseSSL());
to.setSmisUserName(from.getSmisUserName());
to.setExportMasks(new StringMapAdapter().marshal(from.getExportMasks()));
to.setProtocols(from.getProtocols());
to.setReachableStatus(from.getReachableStatus());
to.setFirmwareVersion(from.getFirmwareVersion());
to.setSupportsSoftLimit(from.getSupportSoftLimit());
to.setSupportsNotificationLimit(from.getSupportNotificationLimit());
to.setActiveProvider(toRelatedResource(ResourceTypeEnum.SMIS_PROVIDER, from.getActiveProviderURI()));
if (from.getProviders() != null) {
for (String provider : from.getProviders()) {
to.getProviders().add(toRelatedResource(ResourceTypeEnum.SMIS_PROVIDER, URI.create(provider)));
}
}
to.setUsername(from.getUsername());
to.setModel(from.getModel());
to.setSupportedProvisioningType(from.getSupportedProvisioningType());
to.setSupportedAsynchronousActions(from.getSupportedAsynchronousActions());
to.setMaxResources(from.getMaxResources());
to.setRemotelyConnectedTo(from.getRemotelyConnectedTo());
to.setSupportedReplicationTypes(from.getSupportedReplicationTypes());
to.setAveragePortMetrics(from.getAveragePortMetrics());
to.setArrayAffinityJobStatus(from.getArrayAffinityStatus());
to.setLastArrayAffinityStatusMessage(from.getLastArrayAffinityStatusMessage());
to.setLastArrayAffinityRunTime(from.getLastArrayAffinityRunTime());
to.setNextArrayAffinityRunTime(from.getNextArrayAffinityRunTime());
to.setSuccessArrayAffinityTime(from.getSuccessArrayAffinityTime());
return to;
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class StorageSystemService method getStorageSystem.
/**
* Get information about the registered storage system with the passed id.
*
* @param id the URN of a ViPR storage system.
*
* @brief Show storage system
* @return A reference to a StorageSystemRestRep
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}")
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public StorageSystemRestRep getStorageSystem(@PathParam("id") URI id) {
ArgValidator.checkFieldUriType(id, StorageSystem.class, "id");
StorageSystem system = queryResource(id);
StorageSystemRestRep restRep = map(system);
restRep.setNumResources(getNumResources(system, _dbClient));
return restRep;
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenterProvider method getUnexportedIngestionMethod.
@Asset("unexportedIngestionMethod")
@AssetDependencies({ "unmanagedBlockStorageSystem" })
public List<AssetOption> getUnexportedIngestionMethod(AssetOptionsContext ctx, URI storageSystemId) {
ViPRCoreClient client = api(ctx);
StorageSystemRestRep storageSystemRestRep = client.storageSystems().get(storageSystemId);
List<AssetOption> options = Lists.newArrayList();
options.add(newAssetOption(IngestionMethodEnum.FULL.toString(), "unmanagedVolume.ingestMethod.full"));
if (BlockProviderUtils.isVplex(storageSystemRestRep)) {
options.add(newAssetOption(IngestionMethodEnum.VIRTUAL_VOLUMES_ONLY.toString(), "unmanagedVolume.ingestMethod.virtualVolumesOnly"));
}
return options;
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class CreateExport method isExportForHpuxOnVmax.
private boolean isExportForHpuxOnVmax() {
// get host list
List<HostRestRep> hosts = new ArrayList<HostRestRep>();
if (clusterId != null) {
hosts = ComputeUtils.getHostsInCluster(clusterId);
} else {
Host host = BlockStorageUtils.getHost(hostId);
HostRestRep hostRestRep = HostMapper.map(host);
hosts = Lists.newArrayList(hostRestRep);
}
// find if its a HPUX host
boolean hasHPUX = false;
for (HostRestRep host : hosts) {
if (host.getType() != null && (host.getType().equalsIgnoreCase(Host.HostType.HPUX.toString()))) {
hasHPUX = true;
break;
}
}
if (!hasHPUX) {
return false;
}
// VMAX
for (URI volumeId : volumeIds) {
BlockObjectRestRep volume = BlockStorageUtils.getVolume(volumeId);
URI storageURI = volume.getStorageController();
StorageSystemRestRep storageSystem = BlockStorageUtils.getStorageSystem(storageURI);
if (StringUtils.equals(VMAX, storageSystem.getSystemType())) {
return true;
}
}
return false;
}
Aggregations