# limitations under the License.
import logging
-import six
-
from neutronclient.common.exceptions import NotFound, Unauthorized
from snaps.config.router import RouterConfig
:param sub_config:
:return:
"""
- if isinstance(sub_config, six.text_type):
- return neutron_utils.get_subnet_by_name(
- self._neutron, self._keystone,
- subnet_name=sub_config)
if isinstance(sub_config, dict):
sub_dict = sub_config['subnet']
network = neutron_utils.get_network(
return neutron_utils.get_subnet(
self._neutron, network,
subnet_name=sub_dict['subnet_name'])
+ else:
+ return neutron_utils.get_subnet_by_name(
+ self._neutron, self._keystone,
+ subnet_name=sub_config)
def clean(self):
"""