cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
442
Views
1
Helpful
2
Replies

How access services metadata (refcount etc) from Java/Python/API

cnicasio
Level 1
Level 1

Currently is there a way to access/read service metadata from Java/Python APIs?

We have to find service instances that are not fully reconciliated, from a large list of service instances.

Any suggestions?

1 Accepted Solution

Accepted Solutions

alex-filippov
Level 1
Level 1

get_attrs in Erlang API does work.

The equivalent in Python API is _ncs.maapi.get_attrs.

View solution in original post

2 Replies 2

alex-filippov
Level 1
Level 1

get_attrs in Erlang API does work.

The equivalent in Python API is _ncs.maapi.get_attrs.

cnicasio
Level 1
Level 1

Thanks! that works, here is an example:

import ncs.maapi as maapi
import ncs.maagic as maagic
m = maapi.Maapi()
m.start_user_session('admin','system')
t = m.start_write_trans()
root = maagic.get_root(t)

val = _ncs.maapi.get_attrs(m.msock, t.th, [0x80000002], '/devices/device{DEV}/config/xpon:interface/gpon-onu{1 3 6 50}')
refcount = val[0].v.as_pyval()