| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 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 |