コード例 #1
0
    def get_prefix_and_id(self, ns_name):
        """Get the prefix and id from the namespace name.

        :param ns_name: The name of the namespace
        :returns: tuple with prefix and id or None if no prefix matches
        """
        prefix = namespaces.get_prefix_from_ns_name(ns_name)
        if prefix in self.ns_prefix_to_class_map:
            identifier = namespaces.get_id_from_ns_name(ns_name)
            return (prefix, identifier)
コード例 #2
0
ファイル: namespace_manager.py プロジェクト: zlzlnet/neutron
    def get_prefix_and_id(self, ns_name):
        """Get the prefix and id from the namespace name.

        :param ns_name: The name of the namespace
        :returns: tuple with prefix and id or None if no prefix matches
        """
        prefix = namespaces.get_prefix_from_ns_name(ns_name)
        if prefix in (namespaces.NS_PREFIX, dvr_snat_ns.SNAT_NS_PREFIX):
            identifier = namespaces.get_id_from_ns_name(ns_name)
            return (prefix, identifier)
コード例 #3
0
ファイル: namespace_manager.py プロジェクト: 21atlas/neutron
    def get_prefix_and_id(self, ns_name):
        """Get the prefix and id from the namespace name.

        :param ns_name: The name of the namespace
        :returns: tuple with prefix and id or None if no prefix matches
        """
        prefix = namespaces.get_prefix_from_ns_name(ns_name)
        if prefix in self.ns_prefix_to_class_map:
            identifier = namespaces.get_id_from_ns_name(ns_name)
            return (prefix, identifier)
コード例 #4
0
 def _destroy_fip_namespace(self, ns):
     ex_net_id = namespaces.get_id_from_ns_name(ns)
     fip_ns = self.get_fip_ns(ex_net_id)
     fip_ns.delete()