Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
idna / lib / python2.7 / site-packages / os_vif / __init__.pyc
Size: Mime:
ó
̍EYc@s‡ddlmZddlmZddlZddlZddlZda
ejeƒZ
ed„Zd„Zd„Zdd„ZdS(iÿÿÿÿ(tlog(t	extensionNcCs×td	krtjjƒn|s.td	krÓtjdddtƒag}xhtjƒD]Z}t|j	}|j
|ƒ}tjdi|d6|d6ƒ|j
|ƒ|t|_qYWtjddj|ƒƒnd	S(
s
    Loads all os_vif plugins and initializes them with a dictionary of
    configuration options. These configuration options are passed as-is
    to the individual VIF plugins that are loaded via stevedore.

    :param reset: Recreate and load the VIF plugin extensions.

    t	namespacetos_viftinvoke_on_loads=Loaded VIF plugin class '%(cls)s' with name '%(plugin_name)s'tclstplugin_namesLoaded VIF plugins: %ss, N(t_EXT_MANAGERtNoneRtobjectstregister_allRtExtensionManagertFalsetnamestplugintloadtLOGtdebugtappendtobjtinfotjoin(tresettloaded_pluginsRRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/os_vif/__init__.pyt
initializes
	
	
cCsçtdkrtjjƒ‚n|j}yt|j}Wn&tk
r`tjjd|ƒ‚nXy4t	j
d|ƒ|j||ƒt	jd|ƒWnKt
k
râ}t	jdi|d6dtƒtjjd|d|ƒ‚nXdS(	s*
    Given a model of a VIF, perform operations to plug the VIF properly.

    :param vif: `os_vif.objects.VIF` object.
    :param instance_info: `os_vif.objects.InstanceInfo` object.
    :raises `exception.LibraryNotInitialized` if the user of the library
            did not call os_vif.initialize(**config) before trying to
            plug a VIF.
    :raises `exception.NoMatchingPlugin` if there is no plugin for the
            type of VIF supplied.
    :raises `exception.PlugException` if anything fails during unplug
            operations.
    RsPlugging vif %ssSuccessfully plugged vif %ssFailed to plug vif %(vif)stviftexc_infoterrN(RRRt	exceptiontLibraryNotInitializedRRtKeyErrortNoMatchingPluginRRtplugRt	ExceptionterrortTruet
PlugException(Rt
instance_infoRRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/os_vif/__init__.pyR 4s	
	cCsçtdkrtjjƒ‚n|j}yt|j}Wn&tk
r`tjjd|ƒ‚nXy4t	j
d|ƒ|j||ƒt	jd|ƒWnKt
k
râ}t	jdi|d6dtƒtjjd|d|ƒ‚nXdS(	s.
    Given a model of a VIF, perform operations to unplug the VIF properly.

    :param vif: `os_vif.objects.VIF` object.
    :param instance_info: `os_vif.objects.InstanceInfo` object.
    :raises `exception.LibraryNotInitialized` if the user of the library
            did not call os_vif.initialize(**config) before trying to
            plug a VIF.
    :raises `exception.NoMatchingPlugin` if there is no plugin for the
            type of VIF supplied.
    :raises `exception.UnplugException` if anything fails during unplug
            operations.
    RsUnplugging vif %ssSuccessfully unplugged vif %ssFailed to unplug vif %(vif)sRRRN(RRRRRRRRRRRtunplugRR!R"R#tUnplugException(RR%RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/os_vif/__init__.pyR&Us	
	cCsˆtdkrtjjƒ‚ngttjƒƒD]}t|jjƒ^q1}tj	j
jd|ƒ}|dk	r„|j|ƒn|S(s¤
    :param permitted_vif_type_names: list of VIF object names

    Get information about the host platform configuration to be
    provided to the network manager. This will include information
    about what plugins are installed in the host

    If permitted_vif_type_names is not None, the returned HostInfo
    will be filtered such that it only includes plugins which
    support one of the listed VIF types. This allows the caller
    to filter out impls which are not compatible with the current
    usage configuration. For example, to remove VIFVHostUser if
    the guest does not support shared memory.

    :returns: a os_vif.host_info.HostInfo class instance
    tplugin_infoN(
RRRRRtsortedR
RtdescribeR	t	host_infotHostInfotfilter_vif_types(tpermitted_vif_type_namestnametpluginsR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/os_vif/__init__.pyR+vs/(toslo_logRtloggingt	stevedoreRtos_vif.exceptionRtos_vif.i18ntos_vif.objectsRRt	getLoggert__name__RRRR R&R+(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/os_vif/__init__.pyt<module>
s	!	!