Split rpc.callbacks interface into consumer and producer parts. Better terms are chosen for two RPC APIs we have: - pull when a component actively requests a new object state; - push when a component updates anyone interested about an object change. Also, for callback registration, the following terms are used: - subscribe when a component is registered in consumer registry; - provide when a component is registered in provider registry. Covered the registries with some unit tests. Lots of existing tests utilize the registries now, and need to be isolated from other tests that mess with the managers (that are singletons), so introduced a common qos base test class to mock the manager with per-test instance of it). Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com> Partially-Implements: blueprint quantum-qos-api Change-Id: I130cfbc8b78da6df4405b90ea1ab47899491ba41
22 lines
684 B
Python
22 lines
684 B
Python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
CREATED = 'created'
|
|
UPDATED = 'updated'
|
|
DELETED = 'deleted'
|
|
|
|
VALID = (
|
|
CREATED,
|
|
UPDATED,
|
|
DELETED
|
|
)
|