Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Feb 26, 2021
2 parents eaede7a + 4902eb2 commit 0c1c30c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 103 deletions.
Expand Up @@ -12,7 +12,7 @@
import java.util.Arrays;

/**
*
* TODO reconsider usefulness of this class
*/
public enum ProvisioningOperation {

Expand All @@ -38,4 +38,8 @@ public static ProvisioningOperation find(String name) {
.findFirst()
.orElse(null);
}

public String getName() {
return name;
}
}
Expand Up @@ -70,7 +70,7 @@ public synchronized void recordProvisioningOperation(String resourceOid, String
.resourceRef(resourceRef)
.objectClass(objectClassName)
.beginOperation()
.operation(operation.name())
.operation(operation.getName())
.status(success ? OperationResultStatusType.SUCCESS : OperationResultStatusType.FATAL_ERROR)
.count(count)
.totalTime(duration)
Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -36,7 +36,8 @@ public interface StatisticsCollector {

void recordState(String message);

void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName, ProvisioningOperation operation, boolean success, int count, long duration);
void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName,
ProvisioningOperation operation, boolean success, int count, long duration);

void recordNotificationOperation(String transportName, boolean success, long duration);

Expand Down
Expand Up @@ -166,7 +166,7 @@ public void test110AddDummyGreenAccountMancomb() throws Exception {
assertThat(provisioningStatistics.getEntry()).hasSize(1);
assertThat(provisioningStatistics.getEntry().get(0).getResourceRef().getOid()).isEqualTo(RESOURCE_DUMMY_GREEN_OID);
assertThat(getOrig(provisioningStatistics.getEntry().get(0).getResourceRef().getTargetName())).isEqualTo("Dummy Resource Green");
assertThat(provisioningStatistics.getEntry().get(0).getOperation()).hasSize(2); // get + search
assertThat(provisioningStatistics.getEntry().get(0).getOperation()).isNotEmpty(); // search and sometimes get
}

// notifications
Expand Down
Expand Up @@ -161,7 +161,8 @@ public void recordIcfOperationEnd(ProvisioningOperation operation, ObjectClassCo
}

private void reportNoTask(String resourceOid, ProvisioningOperation operation) {
LOGGER.warn("Couldn't report execution of ICF operation {} on resource {} because there is no task assigned.", operation, resourceOid);
LOGGER.warn("Couldn't report execution of ICF operation {} on resource {} because there is no task assigned.",
operation, resourceOid);
}

private void recordState(String message) {
Expand Down
Expand Up @@ -544,7 +544,8 @@ public void recordState(String message) {
}

@Override
public void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName, ProvisioningOperation operation, boolean success, int count, long duration) {
public void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName,
ProvisioningOperation operation, boolean success, int count, long duration) {
}

@Override
Expand Down

0 comments on commit 0c1c30c

Please sign in to comment.