[Starlingx-discuss] API requests: stx-ha

Qian, Bin Bin.Qian at windriver.com
Wed Nov 14 14:31:48 UTC 2018


There are 2 parts of the api. The ones in the API document (services, nodes, and service_groups) are open for customers to develop their own 3 party applications. Note that servicegroup in the document should be "service_groups", and servicenodes should be nodes, the document is incorrect.
Then there are 2 extra internal APIs: nodes, and sm_sda, these two are used internally by other StarlingX services, to provide important function, such as swact, lock controller, etc. We didn't want the customer to use such APIs, that's why they are not in the API document as they don't represent a full function. If they want swact or lock node, they should use sysinv-api functions instead.
Above is a little background.

For the questions,
? Should we target an update to the documentation in terms of number
   of services? 
A: I think we should keep the current internal APIs out from the document for the customers.

? Should we include the matching of names?
   e.g. servicegroup > service_group
A: yes, we should update the document to change servicegroup ->service_groups. We should also update the document to change servicenode to nodes. servicenode is a valid but internal use only REST api.

? Anything we are not considering to have these differences as valid?
A: See the background info.

? I am assuming the correct information is from documentation since it was modified and
   the source code needs to be updated, is this a correct assumption?
A: The document is not correct. The source code version is accurate.

? Any special treatment / call for this service?
A: servicenode is a post request, it require multiple parameters for different functions, such as swact-precheck and lock-precheck

? Is this not available in Simplex configuration? This is the actual con"figuration I am
   requesting information to.
A: it is available in all configurations, include simplex

Regards,

Bin
________________________________________
From: Arce Moreno, Abraham [abraham.arce.moreno at intel.com]
Sent: Tuesday, November 13, 2018 6:06 PM
To: starlingx-discuss at lists.starlingx.io
Subject: [Starlingx-discuss] API requests: stx-ha

stx-ha team,

Based in some time spent within stx-ha, I found some mismatches between
documentation and source code so I am kindly requesting your comments for
questions "?" under each section [ Section ].

Let's assume the require X-Auth-Token is in place to authenticate, only URLs
are shown.

[ v1/ ]

API documentation [0] includes the following services:
- services
- servicenodes
- servicegroup

And API queries shows those services plus additional ones:
- servicenode
- services
- sm_sda
- nodes
- service_groups

? Should we target an update to the documentation in terms of number
   of services? 
? Should we include the matching of names?
   e.g. servicegroup > service_group
? Anything we are not considering to have these differences as valid?

Additionally, when we look at the name and description reported out by
    curl -i http://10.10.10.2:7777/
there is a mismatch between documentation [0] and source code [1] ?

        Documentation
         "description":"STX-HA Services API allows for the management of HA Services
          running on the Controller Cluster. This includes inventory collection and
          configuration of hosts, ports, interfaces, CPUs, disk, memory, and system
          configuration.  The API also supports the configuration of the cloud's SNMP interface. ",
        "name":"STX-HA Services API"

        Source Code
        root.name = "System Management API"
        root.description = "System Management API from Wind River"

? I am assuming the correct information is from documentation since it was modified and
   the source code needs to be updated, is this a correct assumption?

[ v1/servicenode]

This specific service is the only one not available sending API requests but available in code [2]:
$ curl -i http://10.10.10.2:7777/v1/servicenode
<not available>

? Any special treatment / call for this service?
? Is this not available in Simplex configuration? This is the actual configuration I am
   requesting information to.

Thanks for your initial support.

[0] https://docs.starlingx.io/api-ref/stx-ha/
[1] https://git.openstack.org/cgit/openstack/stx-ha/tree/service-mgmt-api/sm-api/sm_api/api/controllers/root.py
[2] https://git.openstack.org/cgit/openstack/stx-ha/tree/service-mgmt-api/sm-api/sm_api/api/controllers/v1


_______________________________________________
Starlingx-discuss mailing list
Starlingx-discuss at lists.starlingx.io
http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss



More information about the Starlingx-discuss mailing list