summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main/java/org
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2020-01-29 17:25:21 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-04-19 16:35:32 +0000
commitcd6f933375c412c2f79a12e909821322d58a8499 (patch)
tree758ff2e742b514169bbc84a8433d68fe221ef5c9 /asdctool/src/main/java/org
parentdc56692a4a307f378c827f017d2efbf754c223e0 (diff)
Configure a new Artifact Type
Centralizes artifact configuration in one yaml entry. Allow the configuration of a new artifact type without the need of code changes. The configuration file now is used as a source of artifacts types instead the artifact type enum. The enum will be used as a source of base artifact types and also in hard coded business rules. Change-Id: Id0383d9fca9bce0519a4d52a4ecb3a68c8713f0f Issue-ID: SDC-2754 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'asdctool/src/main/java/org')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java
index 4ad90b884c..e21594db46 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ArtifactUuidFix.java
@@ -358,7 +358,7 @@ public class ArtifactUuidFix {
List<VfModuleArtifactPayloadEx> vfModules = null;
if(isCheckVFModules){
Optional<ArtifactDefinition> optionalVfModuleArtifact = deploymentArtifacts.values().stream()
- .filter(p -> p.getArtifactType().equals(ArtifactTypeEnum.VF_MODULES_METADATA.name())).findAny();
+ .filter(p -> p.getArtifactType().equals(ArtifactTypeEnum.VF_MODULES_METADATA.getType())).findAny();
if(!optionalVfModuleArtifact.isPresent())
return true;
@@ -436,7 +436,7 @@ public class ArtifactUuidFix {
resourceName);
return true;
}
- ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifactDefinition.getArtifactType());
+ ArtifactTypeEnum artifactType = ArtifactTypeEnum.parse(artifactDefinition.getArtifactType());
if (artifactType != ArtifactTypeEnum.HEAT_ENV) {
if (!artifactId.equals(artifactDefinition.getUniqueId())) {
log.info(
@@ -520,7 +520,7 @@ public class ArtifactUuidFix {
servicename);
return true;
}
- ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifactDefinition.getArtifactType());
+ ArtifactTypeEnum artifactType = ArtifactTypeEnum.parse(artifactDefinition.getArtifactType());
if (artifactType != ArtifactTypeEnum.HEAT_ENV) {
if (!artifactId.equals(artifactDefinition.getUniqueId())) {
log.info(
@@ -856,7 +856,7 @@ public class ArtifactUuidFix {
}
Optional<ArtifactDefinition> optionalVfModuleArtifact = artifactsMap.values().stream()
- .filter(p -> p.getArtifactType().equals(ArtifactTypeEnum.VF_MODULES_METADATA.name())).findAny();
+ .filter(p -> p.getArtifactType().equals(ArtifactTypeEnum.VF_MODULES_METADATA.getType())).findAny();
ArtifactDefinition vfModuleArtifact;
if(!optionalVfModuleArtifact.isPresent()){
vfModuleArtifact = createVfModuleArtifact(instance, service);
@@ -925,7 +925,7 @@ public class ArtifactUuidFix {
group.getName(), artifactId, artifactlabel);
if (!artifactlabel.isEmpty() && artifactsMap.containsKey(artifactlabel)) {
ArtifactDefinition artifact = artifactsMap.get(artifactlabel);
- ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifact.getArtifactType());
+ ArtifactTypeEnum artifactType = ArtifactTypeEnum.parse(artifact.getArtifactType());
String correctArtifactId = artifact.getUniqueId();
String correctArtifactUUID = artifact.getArtifactUUID();
if (artifactType != ArtifactTypeEnum.HEAT_ENV) {
@@ -1018,7 +1018,7 @@ public class ArtifactUuidFix {
String correctArtifactUUID = artifact.getArtifactUUID();
boolean isAddToGroup = true;
if (groupArtifacts.size() == 1) {
- ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifact.getArtifactType());
+ ArtifactTypeEnum artifactType = ArtifactTypeEnum.parse(artifact.getArtifactType());
if (artifactType == ArtifactTypeEnum.HEAT_ARTIFACT) {
isAddToGroup = false;
artifact.setArtifactType(ArtifactTypeEnum.OTHER.getType());
a> 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533