Hi Keong,

I cleaned my setup and now the AAI resource service is coming up
fine. However, i am not able to send PUT request to create a NewWidget
resource.

I am not sure, what has gone wrong. The only change is that i included the
following line under "*cloud-infrastructure*" .

<xml-element java-attribute="newWidgets" name="new-widgets"
type="inventory.aai.onap.org.v16.NewWidgets" />

Could you please refer the below log snippets and let me know what is wrong
with the XML payload.

*XML Payload*

<new-widget xmlns="http://org.onap.aai.inventory/v16";>
<new-widget-name>example-new-widget-name-val-43832</new-widget-name>
<new-widget-type>example-new-widget-type-val-75449</new-widget-type>
<model-invariant-id>example-model-invariant-id-val-76504</model-invariant-id>
<model-version-id>example-model-version-id-val-30141</model-version-id>
<new-widget-id>example-new-widget-id-val-51753</new-widget-id>
</new-widget>

*HTTP Response Error*

            <variables>
                <variable>PUT</variable>

<variable>v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-id-val-51753</variable>
                <variable>Invalid input performing %1 on %2:uri and payload
keys don't match</variable>
                <variable>ERR.5.2.3000</variable>
            </variables>


*AAI Resources Java process error*

2019-07-17 16:59:41.801 ERROR 6190 --- [qtp798393859-39]
org.onap.aai.logging.ErrorLogHelper      : uri and payload keys don't match
ex=org.onap.aai.exceptions.AAIException: uri and payload keys don't match
ClassName- org.onap.aai.restcore.RESTAPI :LineNumber- 248 :MethodName-
validateIntrospector ClassName- org.onap.aai.rest.LegacyMoxyConsumer
:LineNumber- 696 :MethodName- handleWrites ClassName-
org.onap.aai.rest.LegacyMoxyConsumer :LineNumber- 114 :MethodName- update
ClassName- sun.reflect.GeneratedMethodAccessor100 :LineNumber- -1
:MethodName- invoke ClassName- sun.reflect.DelegatingMethodAccessorImpl
:LineNumber- 43 :MethodName- invoke ClassName- java.lang.reflect.Method
:LineNumber- 498 :MethodName- invoke ClassName-
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1
:LineNumber- 81 :MethodName- invoke ClassName-
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1
:LineNumber- 144 :MethodName- run ClassName-
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher
:LineNumber- 161 :MethodName- invoke ClassName-
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker
:LineNumber- 160 :MethodName- doDispatch


*CURL Command*

$ curl -k -v -X PUT \
>
https://127.0.0.1:8447/aai/v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-id-val-51753
\
> -u "AAI:AAI" \
> -H 'Cache-Control: no-cache' -H 'Content-Type: application/xml' \
> -H "X-TransactionId:test-001" -H "X-FromAppId:AAI" \
> --data '
> <new-widget xmlns="http://org.onap.aai.inventory/v16";>
> <new-widget-name>example-new-widget-name-val-43832</new-widget-name>
> <new-widget-type>example-new-widget-type-val-75449</new-widget-type>
>
<model-invariant-id>example-model-invariant-id-val-76504</model-invariant-id>
> <model-version-id>example-model-version-id-val-30141</model-version-id>
> <new-widget-id>example-new-widget-id-val-51753</new-widget-id>
> </new-widget>'
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8447 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification SKIPPED
* server certificate status verification SKIPPED
* common name: aai.api.simpledemo.onap.org (does not match '127.0.0.1')
* server certificate expiration date FAILED
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=US,O=ONAP,[email protected],OU=OSAAF,CN=
aai.api.simpledemo.onap.org
* start date: Fri, 13 Apr 2018 21:25:59 GMT
* expire date: Mon, 08 Apr 2019 21:25:59 GMT
* issuer: C=US,O=ONAP,OU=OSAAF,CN=intermediateCA_1
* compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user 'AAI'
> PUT
/aai/v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-id-val-51753
HTTP/1.1
> Host: 127.0.0.1:8447
> Authorization: Basic QUFJOkFBSQ==
> User-Agent: curl/7.47.0
> Accept: */*
> Cache-Control: no-cache
> Content-Type: application/xml
> X-TransactionId:test-001
> X-FromAppId:AAI
> Content-Length: 420
>
* upload completely sent off: 420 out of 420 bytes
< HTTP/1.1 400 Bad Request
< Date: Wed, 17 Jul 2019 16:59:41 GMT
< Content-Type: application/json
< X-AAI-TXID: 0-aai-vivek-01-190717-16:59:41:782-36580
< Content-Length: 647
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Fault>
    <requestError>
        <serviceException>
            <messageId>SVC3000</messageId>
            <text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>
            <variables>
                <variable>PUT</variable>

<variable>v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-id-val-51753</variable>
                <variable>Invalid input performing %1 on %2:uri and payload
keys don't match</variable>
                <variable>ERR.5.2.3000</variable>
            </variables>
        </serviceException>
    </requestError>
</Fault>
* Connection #0 to host 127.0.0.1 left intact

*Changing the last part of the URL with widget-name is also failed*

$ curl -k -v -X PUT \
>
https://127.0.0.1:8447/aai/v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-name-val-43832
\
> -u "AAI:AAI" \
> -H 'Cache-Control: no-cache' -H 'Content-Type: application/xml' \
> -H "X-TransactionId:test-001" -H "X-FromAppId:AAI" \
> --data '
> <new-widget xmlns="http://org.onap.aai.inventory/v16";>
> <new-widget-name>example-new-widget-name-val-43832</new-widget-name>
> <new-widget-type>example-new-widget-type-val-75449</new-widget-type>
>
<model-invariant-id>example-model-invariant-id-val-76504</model-invariant-id>
> <model-version-id>example-model-version-id-val-30141</model-version-id>
> <new-widget-id>example-new-widget-id-val-51753</new-widget-id>
> </new-widget>'
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8447 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification SKIPPED
* server certificate status verification SKIPPED
* common name: aai.api.simpledemo.onap.org (does not match '127.0.0.1')
* server certificate expiration date FAILED
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=US,O=ONAP,[email protected],OU=OSAAF,CN=
aai.api.simpledemo.onap.org
* start date: Fri, 13 Apr 2018 21:25:59 GMT
* expire date: Mon, 08 Apr 2019 21:25:59 GMT
* issuer: C=US,O=ONAP,OU=OSAAF,CN=intermediateCA_1
* compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user 'AAI'
> PUT
/aai/v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-name-val-43832
HTTP/1.1
> Host: 127.0.0.1:8447
> Authorization: Basic QUFJOkFBSQ==
> User-Agent: curl/7.47.0
> Accept: */*
> Cache-Control: no-cache
> Content-Type: application/xml
> X-TransactionId:test-001
> X-FromAppId:AAI
> Content-Length: 420
>
* upload completely sent off: 420 out of 420 bytes
< HTTP/1.1 400 Bad Request
< Date: Wed, 17 Jul 2019 17:06:12 GMT
< Content-Type: application/json
< X-AAI-TXID: 0-aai-vivek-01-190717-17:06:12:940-15471
< Content-Length: 649
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Fault>
    <requestError>
        <serviceException>
            <messageId>SVC3000</messageId>
            <text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>
            <variables>
                <variable>PUT</variable>

<variable>v16/cloud-infrastructure/new-widgets/new-widget/example-new-widget-name-val-43832</variable>
                <variable>Invalid input performing %1 on %2:uri and payload
keys don't match</variable>
                <variable>ERR.5.2.3000</variable>
            </variables>
        </serviceException>
    </requestError>
</Fault>
* Connection #0 to host 127.0.0.1 left intact


On Wed, Jul 17, 2019 at 6:42 AM Keong Lim <[email protected]> wrote:

> Hi Vivek,
>
> On Tue, Jul 16, 2019 at 05:57 PM, Vivekanandan Muthukrishnan wrote:
> > Could you help me understand, what does the *Step.8* means "*Run
> GenTester,
> > using the target dir under aai-resources:*" ?
>
> Sorry, this is an old reference to the Beijing version of ONAP because
> that tool was previously under the aai-resources microservice, but it is
> now under the aai-graphadmin microservice. The description is wrong for
> that page since it should be referring only to Dublin release, but the
> shell command shown should be correct.
>
> > On Tue, Jul 16, 2019 at 10:24 PM Vivekanandan Muthukrishnan via
> > Lists.Onap.Org <[email protected]> wrote:
> > > *$ curl -s -k -X GET
> > > https://localhost:8447/aai/v11/cloud-infrastructure/cloud-regions/
> > > <https://localhost:8447/aai/v11/cloud-infrastructure/cloud-regions/>
> -u
> > > "AAI:AAI" -H X-TransactionId:test-001 -H X-FromAppId:AAI -H
> > > Content-Type:application/json -H Accept:application/json | python -m
> > > json.tool *
> > > {
> > >     "requestError": {
> > >         "serviceException": {
> > >             "messageId": "SVC3001",
> > >             "text": "Resource not found for %1 using id %2 (msg=%3)
> > > (ec=%4)",
> > >             "variables": [
> > >                 "GET",
> > >                 "cloud-infrastructure/cloud-regions/",
> > >                 "Node Not Found:No Node of type cloud-region found at:
> > > cloud-infrastructure/cloud-regions/",
> > >                 "ERR.5.4.6114"
> > >             ]
> > >         }
> > >     }
> > > }
>
> Your curl command from the previous message seems to show a correctly
> functioning system that has no data for cloud-regions.
> Before you run the schema change tutorial, could you please try a PUT and
> GET on the cloud-regions to confirm that those operations are successful?
> If so, it means the Cassandra schema is setup correctly.
>
> see also step 11 on
> https://wiki.onap.org/display/DW/AAI+Developer+Environment+Setup+-+Dublin
>
> Then before attempting the schema changes, please clear out the old log
> files, in case they are confusing the issue.
>
>
> Keong
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#18146): https://lists.onap.org/g/onap-discuss/message/18146
Mute This Topic: https://lists.onap.org/mt/32488645/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to