Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How to retrieve current list of xNF functions from A&AI?

Send Get GET request to this endpoint

Example curl command you can use to retrieve inventory from any pod within the cluster in which AAI is deployed to.

...

The above command returns a list of all the pnfs. 

Example of the data that is returned by the curl command.

JSON Viewer
width500
height380
{"pnf":[{"pnf-name":"dummyTest15","pnf-name2":"dummypnf-1597953056126","pnf-id":"927b2580-36d9-4f13-8421-3c9d43b7a75e","equip-type":"example-equip-type-val-20348","equip-vendor":"example-equip-vendor-val-52182","equip-model":"example-equip-model-val-8370","management-option":"example-management-option-val-72881","orchestration-status":"Active","ipaddress-v4-oam":"100.10.20.20","in-maint":false,"ipaddress-v6-oam":"","spare-equipment-indicator":false,"resource-version":"1622041203064"}]}


Proof of Concept code:

The below is Proof Of Concept code and it is not production ready. With this code, we are able to retrieve list of network functions from A&AI.

...

  •  User Story to implement One way SSL communication needed to make Https calls.
    • Currently the project is not set up to make HTTPS calls. For the POC the following code was added to workaround this issue.

...

Code Block
languagejava
themeEclipse
firstline1
titleCode to retrieve xNF functions from A&AI
linenumberstrue
collapsetrue
		String nfData = "";
        final String aaiNetworkEndPoint = getAaiServiceUrlHttps();
        final URL url;
        try {
            url = new URL(aaiNetworkEndPoint);
            final HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
            conn.setRequestProperty("Authorization", "Basic QUFJOkFBSQ==");
            conn.setRequestProperty("accept", "application/json");
            conn.setRequestProperty("conntent-type", "application/json");
            conn.setRequestProperty("x-fromappid", "cps-ncmp");
            conn.setRequestProperty("X-TransactionId", "get_aai_subscr");
            conn.connect();
            nfData = responseReader(conn);

        } catch (final IOException e) {
            e.printStackTrace();
        }

Spike Presentation to the Team:

View file
nameCPS-392 A&AI Inventory List Spike Review-20210527_163153-Meeting Recording.mp4
height250