summaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2018-04-30 19:06:20 +0300
committerYuli Shlosberg <ys9693@att.com>2018-05-01 11:31:43 +0000
commit2ef3886c9b0223f4813ac1385318d6f2e600a4a8 (patch)
tree7d03279f2302ddd7e36d23a1d501df296c6a4a60 /catalog-model/src
parent4e1599dabb55107466892405bb856396522ff132 (diff)
Remove dead code asdctool
Change-Id: I467f70b442a02a15b8a18b160309bac9a8ab3f9a Issue-ID: SDC-1270 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java68
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java31
3 files changed, 0 insertions, 101 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
index 776012ac43..e5a743af8f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GraphLockOperation.java
@@ -50,9 +50,7 @@ public class GraphLockOperation implements IGraphLockOperation {
log.info("lock resource with id {}", componentId);
TitanOperationStatus lockElementStatus = null;
try {
-
lockElementStatus = titanGenericDao.lockElement(componentId, nodeType);
-
} catch (Exception e) {
lockElementStatus = TitanOperationStatus.ALREADY_LOCKED;
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
index 662e2ecf70..3b7b5def2e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
@@ -432,7 +432,6 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
}
-
/**
* update value of attribute on resource instance
*
@@ -661,73 +660,6 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
}
}
- private Either<GroupInstance, TitanOperationStatus> getGroupInstanceFromGraph(String uniqueId, boolean skipProperties, boolean skipArtifacts) {
-
- Either<GroupInstance, TitanOperationStatus> result = null;
-
- Either<GroupInstanceData, TitanOperationStatus> groupInstRes = titanGenericDao.getNode(UniqueIdBuilder.getKeyByNodeType(NodeTypeEnum.GroupInstance), uniqueId, GroupInstanceData.class);
- if (groupInstRes.isRight()) {
- TitanOperationStatus status = groupInstRes.right().value();
- log.debug("Failed to retrieve group {} from graph. Status is {}", uniqueId, status);
- BeEcompErrorManager.getInstance().logBeFailedRetrieveNodeError("Fetch Group", uniqueId, String.valueOf(status));
- result = Either.right(status);
- return result;
- }
-
- GroupInstanceData groupInstData = groupInstRes.left().value();
-
- GroupInstance groupInstance = new GroupInstance(groupInstData.getGroupDataDefinition());
- String instOriginGroupId = groupInstance.getGroupUid();
- Either<GroupDefinition, TitanOperationStatus> groupRes = groupOperation.getGroupFromGraph(instOriginGroupId, false, true, false);
-
- if (groupRes.isRight()) {
- TitanOperationStatus status = groupRes.right().value();
- result = Either.right(status);
-
- }
- GroupDefinition groupDefinition = groupRes.left().value();
- Either<Map<String, PropertyValueData>, TitanOperationStatus> groupInstancePropertyValuesRes = getAllGroupInstancePropertyValuesData(groupInstData);
- if(groupInstancePropertyValuesRes.isRight()){
- result = Either.right(groupInstancePropertyValuesRes.right().value());
- }
- buildGroupInstanceFromGroup(groupInstance, groupDefinition, groupInstancePropertyValuesRes.left().value());
-
- /*
- * if (false == skipProperties) { Either<List<GroupProperty>, TitanOperationStatus> propertiesRes = getGroupProperties(uniqueId); if (propertiesRes.isRight()) { TitanOperationStatus status = propertiesRes.right().value(); if (status !=
- * TitanOperationStatus.OK) { result = Either.right(status); return result; } } else { List<GroupProperty> properties = propertiesRes.left().value(); groupDefinition.setProperties(properties); } }
- */
-
- if (false == skipArtifacts) {
- Either<List<ImmutablePair<String, String>>, TitanOperationStatus> artifactsRes = getGroupArtifactsPairs(uniqueId);
- if (artifactsRes.isRight()) {
- TitanOperationStatus status = artifactsRes.right().value();
- if (status != TitanOperationStatus.OK) {
- result = Either.right(status);
- return result;
- }
- } else {
- List<String> artifactsUid = new ArrayList<>();
- List<String> artifactsUUID = new ArrayList<>();
-
- List<ImmutablePair<String, String>> list = artifactsRes.left().value();
- if (list != null) {
- for (ImmutablePair<String, String> pair : list) {
- String uid = pair.left;
- String UUID = pair.right;
- artifactsUid.add(uid);
- artifactsUUID.add(UUID);
- }
- groupInstance.setGroupInstanceArtifacts(artifactsUid);
- groupInstance.setGroupInstanceArtifactsUuid(artifactsUUID);
- }
- }
- }
- result = Either.left(groupInstance);
-
- return result;
-
- }
-
private void buildGroupInstanceFromGroup(GroupInstance groupInstance, GroupDefinition groupDefinition, Map<String, PropertyValueData> groupInstancePropertyValues) {
groupInstance.setGroupName(groupDefinition.getName());
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
index a2996ac152..f0d0b514ab 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
@@ -1297,37 +1297,6 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
}
- private Either<Map<String, DataTypeDefinition>, TitanOperationStatus> findAllDataTypeDefinition(DataTypeDefinition dataTypeDefinition) {
-
- Map<String, DataTypeDefinition> nameToDataTypeDef = new HashMap<>();
-
- DataTypeDefinition typeDefinition = dataTypeDefinition;
-
- while (typeDefinition != null) {
-
- List<PropertyDefinition> properties = typeDefinition.getProperties();
- if (properties != null) {
- for (PropertyDefinition propertyDefinition : properties) {
- String type = propertyDefinition.getType();
- Either<DataTypeDefinition, TitanOperationStatus> dataTypeByName = this.getDataTypeUsingName(type);
- if (dataTypeByName.isRight()) {
- return Either.right(dataTypeByName.right().value());
- } else {
- DataTypeDefinition value = dataTypeByName.left().value();
- if (false == nameToDataTypeDef.containsKey(type)) {
- nameToDataTypeDef.put(type, value);
- }
- }
-
- }
- }
-
- typeDefinition = typeDefinition.getDerivedFrom();
- }
-
- return Either.left(nameToDataTypeDef);
- }
-
public Either<List<ComponentInstanceProperty>, TitanOperationStatus> getAllPropertiesOfResourceInstanceOnlyPropertyDefId(String resourceInstanceUid, NodeTypeEnum instanceNodeType) {
Either<TitanVertex, TitanOperationStatus> findResInstanceRes = titanGenericDao.getVertexByProperty(UniqueIdBuilder.getKeyByNodeType(instanceNodeType), resourceInstanceUid);