Debian Codegraph @

vif_plug_noop/noop.py

raw symbols SCIP
1 # Copyright (C) 2011 Midokura KK
2 # Copyright (C) 2011 Nicira, Inc
3 # Copyright 2011 OpenStack Foundation
4 # Copyright 2018 Intel Corporation
5 # All Rights Reserved.
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License"); you may
8 # not use this file except in compliance with the License. You may obtain
9 # a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 # License for the specific language governing permissions and limitations
17 # under the License.
18
19 from os_vif import objects
20 from os_vif import plugin
21
22
23 class NoOpPlugin(plugin.PluginBase):
24 """A no op plugin
25
26 The no op plugin can be used for any vif type that requires
27 no action to be performed on the backend network when a vif
28 is plugged. Currently only the VIFVHostUser VIF type is supported.
29 This pluggin allows for the use of generic vhost user without ovs.
30
31 """
32
33 def describe(self):
34 return objects.host_info.HostPluginInfo(
35 plugin_name="noop",
36 vif_info=[
37 objects.host_info.HostVIFInfo(
38 vif_object_name=objects.vif.VIFVHostUser.__name__,
39 min_version="1.0",
40 max_version="1.0",
41 supported_port_profiles=[])
42 ])
43
44 def plug(self, vif, instance_info):
45 pass
46
47 def unplug(self, vif, instance_info):
48 pass