use of com.emc.storageos.db.client.model.StorageSystemType.META_TYPE in project coprhd-controller by CoprHD.
the class StorageSystemTypesInitUtils method insertStorageSystemTypes.
private void insertStorageSystemTypes() {
for (Map.Entry<META_TYPE, List<String>> entry : SYSTEMS_AND_PROVIDERS.entrySet()) {
META_TYPE metaType = entry.getKey();
List<String> systems = entry.getValue();
for (String system : systems) {
if (!PlatformUtils.isOssBuild() && system.equals(CEPH)) {
log.info("Skip inserting ceph meta data in non-oss build");
continue;
}
StorageSystemType type = new StorageSystemType();
URI uri = URIUtil.createId(StorageSystemType.class);
type.setId(uri);
type.setStorageTypeId(uri.toString());
type.setStorageTypeName(system);
type.setStorageTypeDispName(DISPLAY_NAME_MAP.get(system));
type.setMetaType(mapType(metaType));
type.setDriverClassName(metaType.toString().toLowerCase());
type.setIsSmiProvider(metaType.isProvider());
type.setIsDefaultSsl(SSL_ENABLE_TYPE_LIST.contains(system));
type.setIsDefaultMDM(MDM_ENABLE_LIST.contains(system));
type.setIsOnlyMDM(ONLY_MDM_LIST.contains(system));
type.setIsElementMgr(ELEMENT_MANAGER_LIST.contains(system));
type.setIsSecretKey(SECREAT_KEY_ENABLE_LIST.contains(system));
type.setSslPort(SSL_PORT_MAP.get(system));
type.setNonSslPort(NON_SSL_PORT_MAP.get(system));
type.setIsNative(true);
if (alreadyExists(type)) {
log.info("Meta data for {} already exist", type.getStorageTypeName());
continue;
}
log.info("Meta data for {} don't exist or have changed, update", type.getStorageTypeName());
dbClient.createObject(type);
}
}
}
Aggregations