fix transformer for get all
Change-Id: I89af46551af0eb6ed26f9c31486b122d7205451b
This commit is contained in:
parent
7532b56694
commit
b0f0976d2d
@ -17,11 +17,11 @@ from oslo_config import cfg
|
||||
from vitrage.synchronizer.plugins.aodh import AODH_PLUGIN
|
||||
from vitrage.synchronizer.plugins.cinder.volume import CINDER_VOLUME_PLUGIN
|
||||
from vitrage.synchronizer.plugins.nagios import NAGIOS_PLUGIN
|
||||
from vitrage.synchronizer.plugins.neutron.network import NEUTRON_NETWORK_PLUGIN
|
||||
from vitrage.synchronizer.plugins.nova.host import NOVA_HOST_PLUGIN
|
||||
from vitrage.synchronizer.plugins.nova.instance import NOVA_INSTANCE_PLUGIN
|
||||
from vitrage.synchronizer.plugins.nova.zone import NOVA_ZONE_PLUGIN
|
||||
from vitrage.synchronizer.plugins.static_physical import STATIC_PHYSICAL_PLUGIN
|
||||
|
||||
OPENSTACK_NODE = 'openstack.node'
|
||||
|
||||
# Register options for the service
|
||||
@ -34,7 +34,8 @@ OPTS = [
|
||||
NAGIOS_PLUGIN,
|
||||
STATIC_PHYSICAL_PLUGIN,
|
||||
AODH_PLUGIN,
|
||||
CINDER_VOLUME_PLUGIN],
|
||||
CINDER_VOLUME_PLUGIN,
|
||||
NEUTRON_NETWORK_PLUGIN],
|
||||
help='Names of supported plugins'),
|
||||
cfg.ListOpt('plugin_path',
|
||||
default=['vitrage.synchronizer.plugins'],
|
||||
|
@ -20,7 +20,7 @@ class NetworkSynchronizer(NeutronBase):
|
||||
|
||||
@staticmethod
|
||||
def get_skipped_event_types():
|
||||
pass
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def get_topic(conf):
|
||||
@ -28,18 +28,14 @@ class NetworkSynchronizer(NeutronBase):
|
||||
|
||||
@staticmethod
|
||||
def get_event_types(conf):
|
||||
pass
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def enrich_event(event, event_type):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def extract(networks):
|
||||
return [network.__dict__ for network in networks]
|
||||
|
||||
def get_all(self, sync_mode):
|
||||
return self.make_pickleable(
|
||||
self.extract(self.client.list_networks()),
|
||||
self.client.list_networks()['networks'],
|
||||
NEUTRON_NETWORK_PLUGIN,
|
||||
sync_mode)
|
||||
|
@ -12,12 +12,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from synchronizer.plugins.neutron.network import NEUTRON_NETWORK_PLUGIN
|
||||
from vitrage.common.constants import EntityCategory
|
||||
from vitrage.common.constants import SynchronizerProperties as SyncProps
|
||||
from vitrage.common.constants import VertexProperties as VProps
|
||||
from vitrage.synchronizer.plugins.base.resource.transformer import \
|
||||
BaseResourceTransformer
|
||||
from vitrage.synchronizer.plugins.neutron.network import NEUTRON_NETWORK_PLUGIN
|
||||
from vitrage.synchronizer.plugins import transformer_base as tbase
|
||||
from vitrage.synchronizer.plugins.transformer_base import extract_field_value
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user