Merge lp:~xavi-garcia-mena/go-unityscopes/list-all-scopes-metadata into lp:go-unityscopes/v2
Status: | Merged |
---|---|
Approved by: | James Henstridge |
Approved revision: | 72 |
Merged at revision: | 69 |
Proposed branch: | lp:~xavi-garcia-mena/go-unityscopes/list-all-scopes-metadata |
Merge into: | lp:go-unityscopes/v2 |
Diff against target: |
252 lines (+148/-0) 8 files modified
export_test.go (+13/-0) metadata.cpp (+10/-0) metadata.go (+43/-0) metadata_test.go (+27/-0) shim.cpp (+15/-0) shim.h (+6/-0) tests/goscope/goscope.go (+12/-0) unityscope.go (+22/-0) |
To merge this branch: | bzr merge lp:~xavi-garcia-mena/go-unityscopes/list-all-scopes-metadata |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Henstridge | Approve | ||
Review via email:
|
Commit message
I've added the ScopeMetadata to the go-bindings in order to implement the method that lists all the existing scopes in the registry. ListRegistrySco
Description of the change
I've added the ScopeMetadata to the go-bindings in order to implement the method that lists all the existing scopes in the registry. ListRegistrySco
The idea would be to keep a pointer to the C++ ScopeMetadata when we need it to implement "find_child_scopes" as there is no way to create a new instance of the C++ ScopeMetadata using the public API. The C++ ScopeMetadata holds a pointer to the Middleware.
For the rest of attributes of ScopeMetadata I've created a copy in the go space to avoid making a C_go call every time we need to query for something.
This would be the base for the rest of the implementation for supporting aggregated scopes, so I'm moving to MP so it gets reviewed first.
There is a very basic test on the test scope that prints out the metadata obtained to stdout. That test should be removed when we have a more reliable way of testing this (using scope-harness possibly).
The idea would be to add next the ChildScope class, which holds the ScopeMetadata along with other attributes and implement the "clild_scopes" method in ScopeBase as well as the "find_child_scopes"
This looks pretty good. I've left a few inline comments for some small issues I noticed. It looks like you're on the right track.