how the service found it`s instance?

13 views
Skip to first unread message

wu ares

unread,
Oct 6, 2020, 4:50:41 AM10/6/20
to CORD Discuss
What is the service and instance discovery mechanism?
how can I get my service to discover an existing instance which belongs to the service and display the relationship in the GUI. just like the base-kubernetes service, it found a lot instance that existing before the base-kubernetes installed.

Matteo Scandolo

unread,
Oct 6, 2020, 2:01:11 PM10/6/20
to wu ares, CORD Discuss
Hello Wu,
when a service needs to create a ServiceInstance it calls https://github.com/opencord/xos/blob/5c2ea23b7d2f0a01fc75f37db83f03580fb0ed4f/lib/xos-api/xosapi/convenience/service.py#L69-L90 (note that this method can be overridden by services).

In the case of the kubernetes-service there is a pull_step (that is invoked periodically) that creates the instances by fetching the kubernetes API: https://github.com/opencord/kubernetes-service/blob/master/xos/synchronizer/pull_steps/pull_pods.py#L267-L275

--
You received this message because you are subscribed to the Google Groups "CORD Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cord-discuss...@opencord.org.
To view this discussion on the web visit https://groups.google.com/a/opencord.org/d/msgid/cord-discuss/81cbb83b-499c-4b97-96e2-88a1b5232f7en%40opencord.org.


--
Matteo Scandolo
Member of Technical Staff
--
ONF
Reply all
Reply to author
Forward
0 new messages