From f20e40368fa73dc7951044e05c6fd39a06bf86f5 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 19 Oct 2018 04:33:21 -0500 Subject: GUI fixes Issue-ID: AAF-578,AAF-579 Change-Id: I579876777815b2e9f0693e08cc57e5b17c74cf9b Signed-off-by: Instrumental --- .../java/org/onap/aaf/auth/gui/pages/NsDetail.java | 2 +- .../org/onap/aaf/cadi/aaf/client/Examples.java | 24 +++++++++---- docs/sections/installation/client_vol.rst | 42 ++++++++++++---------- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java index c7515e00..6d7fa207 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/NsDetail.java @@ -79,7 +79,7 @@ public class NsDetail extends Page { if (gw_url==null) { gw_url=""; } else { - gw_url+="/aaf/2.0"; + gw_url+="/aaf/"+Config.AAF_DEFAULT_VERSION; } } diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java index 70ca577a..7f419433 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java @@ -99,16 +99,26 @@ public class Examples { version = "v2_0"; } - Class cls; - try { - cls = Examples.class.getClassLoader().loadClass("aaf."+version+'.'+className); - } catch (ClassNotFoundException e) { - throw new APIException(e); - } + Class cls=null; + int minorIdx = version.indexOf('_'); + if(minorIdx<0) { + throw new APIException("Invalid Interface Version " + version); + } + int minor = Integer.parseInt(version.substring(minorIdx+1)); + String vprefix=version.substring(0, minorIdx+1); + while(cls==null && minor>=0) { + try { + cls = Examples.class.getClassLoader().loadClass("aaf."+vprefix+minor+'.'+className); + } catch (ClassNotFoundException e) { + if(--minor<0) { + throw new APIException("No Example for Version " + version + " found."); + } + } + } Method meth; try { - meth = Examples.class.getDeclaredMethod("new"+cls.getSimpleName()+version,boolean.class); + meth = Examples.class.getDeclaredMethod("new"+cls.getSimpleName()+vprefix+minor,boolean.class); } catch (Exception e) { throw new APIException("ERROR: " + cls.getName() + " does not have an Example in Code. Request from AAF Developers"); } diff --git a/docs/sections/installation/client_vol.rst b/docs/sections/installation/client_vol.rst index 0c52c7ca..4d999e9f 100644 --- a/docs/sections/installation/client_vol.rst +++ b/docs/sections/installation/client_vol.rst @@ -37,9 +37,11 @@ Choose the directory you wish to start in... If you don't want to clone all of AAF, just get the "agent.sh" from a Browser: https://gerrit.onap.org/r/gitweb?p=aaf/authz.git;a=blob_plain;f=auth/docker/agent.sh;hb=HEAD + + rename file "auth-docker-agent.sh" to "agent.sh" (named because of subdirectory in which it is found) - Note: curl/wget get html, instead of text - | You might have to mv, and rename it to "agent.sh", but avoids full clone +Note: curl/wget returns an html, instead of text. This cannot be used! + | You have to mv, and rename it to "agent.sh", but avoids full clone... ------------------------- Run Script @@ -95,23 +97,25 @@ Typical ONAP Entity Info in AAF ============================= =========================== ======================= ============================================== ONAP Namespaces APP FQI APP FQDN OOM APP FQDN HEAT ============================= =========================== ======================= ============================================== -org.osaaf.aaf aaf@aaf.osaaf.org aaf aaf.api.simpledemo.onap.org -org.onap.aaf-sms aaf-sms@aaf-sms.onap.org aaf-sms aaf-sms.api.simpledemo.onap.org -org.onap.aai aai@aai.onap.org aai aai.api.simpledemo.onap.org -org.onap.appc appc@appc.onap.org appc appc.api.simpledemo.onap.org -org.onap.clamp clamp@clamp.onap.org clamp clamp.api.simpledemo.onap.org -org.onap.dcae dcae@dcae.onap.org dcae dcae.api.simpledemo.onap.org -org.onap.dmaap-bc dmaap-bc@dmaap-bc.onap.org dmaap-bc dmaap-bc.api.simpledemo.onap.org -org.onap.dmaap-mr dmaap-mr@dmaap-mr.onap.org dmaap-mr dmaap-mr.api.simpledemo.onap.org -org.onap.oof oof@oof.onap.org oof oof.api.simpledemo.onap.org -org.onap.policy policy@policy.onap.org policy policy.api.simpledemo.onap.org -org.onap.pomba pomba@pomba.onap.org pomba pomba.api.simpledemo.onap.org -org.onap.portal portal@portal.onap.org portal portal.api.simpledemo.onap.org -org.onap.sdc sdc@sdc.onap.org sdc sdc.api.simpledemo.onap.org -org.onap.so so@so.onap.org so so.api.simpledemo.onap.org -org.onap.sdnc sdnc@sdnc.onap.org sdnc sdnc.api.simpledemo.onap.org -org.onap.vfc vfc@vfc.onap.org vfc vfc.api.simpledemo.onap.org -org.onap.vid vid@vid.onap.org vid vid.api.simpledemo.onap.org +org.osaaf.aaf aaf@aaf.osaaf.org aaf.onap aaf.api.simpledemo.onap.org +org.onap.aaf-sms aaf-sms@aaf-sms.onap.org aaf-sms.onap aaf-sms.api.simpledemo.onap.org +org.onap.aai aai@aai.onap.org aai.onap aai.api.simpledemo.onap.org +org.onap.appc appc@appc.onap.org appc.onap appc.api.simpledemo.onap.org +org.onap.clamp clamp@clamp.onap.org clamp.onap clamp.api.simpledemo.onap.org +org.onap.dcae dcae@dcae.onap.org dcae.onap dcae.api.simpledemo.onap.org +org.onap.dmaap dmaap@dmaap.onap.org dmaap.onap dmaap.api.simpledemo.onap.org +org.onap.dmaap-bc dmaap-bc@dmaap-bc.onap.org dmaap-bc.onap dmaap-bc.api.simpledemo.onap.org +org.onap.dmaap-dr dmaap-bc@dmaap-dr.onap.org dmaap-dr.onap dmaap-dr.api.simpledemo.onap.org +org.onap.dmaap-mr dmaap-mr@dmaap-mr.onap.org dmaap-mr.onap dmaap-mr.api.simpledemo.onap.org +org.onap.oof oof@oof.onap.org oof.onap oof.api.simpledemo.onap.org +org.onap.policy policy@policy.onap.org policy.onap policy.api.simpledemo.onap.org +org.onap.pomba pomba@pomba.onap.org pomba.onap pomba.api.simpledemo.onap.org +org.onap.portal portal@portal.onap.org portal.onap portal.api.simpledemo.onap.org +org.onap.sdc sdc@sdc.onap.org sdc.onap sdc.api.simpledemo.onap.org +org.onap.sdnc sdnc@sdnc.onap.org sdnc.onap sdnc.api.simpledemo.onap.org +org.onap.so so@so.onap.org so.onap so.api.simpledemo.onap.org +org.onap.vfc vfc@vfc.onap.org vfc.onap vfc.api.simpledemo.onap.org +org.onap.vid vid@vid.onap.org vid.onap vid.api.simpledemo.onap.org ============================= =========================== ======================= ============================================== *Note 1: FQDNs are set in AAF's Credential Artifact data, accessible in "Cred Details" from Namespace Page* -- cgit 1.2.3-korg