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