summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorInstrumental <jgonap@stl.gathman.org>2020-01-24 14:47:48 -0600
committerInstrumental <jgonap@stl.gathman.org>2020-01-24 14:47:54 -0600
commitbe1edcb6830745015f5de72e820f40f36dd571ad (patch)
tree65d10e1d54042c072d958cbb00b048553a60f893 /cadi
parent165e298554f06ecd0545df604e11736ebf71566d (diff)
Fix Agent and CM Issues
Issue-ID: AAF-1067 Signed-off-by: Instrumental <jgonap@stl.gathman.org> Change-Id: I5508edec3d63b4831d0caddd8303126956bd05a0
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLocator.java2
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java9
2 files changed, 7 insertions, 4 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLocator.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLocator.java
index 06e2c62d..a6b7da80 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLocator.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLocator.java
@@ -237,7 +237,7 @@ public abstract class AbsAAFLocator<TRANS extends Trans> implements Locator<URI>
public Item best() throws LocatorException {
if (!hasItems()) {
throw new LocatorException(String.format("No Entries found for '%s/%s:%s'",
- (aaf_locator_uri==null?aaf_locator_host:aaf_locator_uri.toString()),
+ (aaf_locator_uri==null?(aaf_locator_host+"/locate"):aaf_locator_uri.toString()),
name,
version));
}
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
index 48109e47..74f0916d 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
@@ -28,7 +28,6 @@ import java.io.IOException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.InetAddress;
-import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.security.KeyPair;
@@ -251,7 +250,7 @@ public class Agent {
System.out.println(" update <FQI> [<machine>]");
System.out.println(" delete <FQI> [<machine>]");
System.out.println(" copy <FQI> <machine> <newmachine>[,<newmachine>]*");
- System.out.println(" place <FQI> [<machine>]");
+ System.out.println(" place <FQI> [<machine>[,<san>]*");
System.out.println(" showpass <FQI> [<machine>]");
System.out.println(" check <FQI> [<machine>]");
System.out.println(" keypairgen <FQI>");
@@ -712,6 +711,7 @@ public class Agent {
machine = fqdns[1];
} else {
key = machine;
+ fqdns = machines(cmds);
}
TimeTaken tt = trans.start("Place Artifact", Env.REMOTE);
@@ -728,8 +728,11 @@ public class Agent {
CertificateRequest cr = new CertificateRequest();
cr.setMechid(a.getMechid());
cr.setSponsor(a.getSponsor());
+ cr.getFqdns().add(machine);
for (int i=0;i<fqdns.length;++i) {
- cr.getFqdns().add(fqdns[i]);
+ if(!machine.equals(fqdns[i])) {
+ cr.getFqdns().add(fqdns[i]);
+ }
}
Future<String> f = aafcon.client(CM_VER)
.updateRespondString("/cert/" + a.getCa()+"?withTrust",reqDF, cr);