We're updating the issue view to help you get more done. 

Validate Get Network

Description

When attempting to use `use_external_resource` with network `resource_config:name`, the desired network is not found:

2018-11-15 13:34:51.291 CFY <test14> [example-external_network_pu5w8r.create] Task failed 'openstacksdk_plugin.resources.network.network.create' -> Failure while trying to request Openstack API: No Network found for GATEWAY_NET
Causes (most recent cause last):
--------------------------------
Traceback (most recent call last):
File "/Users/macos/Public/Projects/PyCharm/cloudify-openstacksdk-plugin/openstacksdk_plugin/decorators.py", line 94, in wrapper_inner
resource = resource.get()
File "/Users/macos/Public/Projects/PyCharm/cloudify-openstacksdk-plugin/openstack_sdk/resources/networks.py", line 36, in get
self.name if not self.resource_id else self.resource_id)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/network/v2/_proxy.py", line 1134, in get_network
return self._get(_network.Network, network)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/proxy.py", line 37, in check
return method(self, expected, actual, *args, **kwargs)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/proxy.py", line 229, in _get
resource_type=resource_type._name_, value=value))
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/resource.py", line 1082, in fetch
self._translate_response(response, **kwargs)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/resource.py", line 905, in _translate_response
exceptions.raise_from_response(response, error_message=error_message)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/openstack/exceptions.py", line 227, in raise_from_response
http_status=http_status, request_id=request_id
ResourceNotFound: No Network found for GATEWAY_NET: Client Error for url: https://rackspace-api.cloudify.co:9696/v2.0/networks/GATEWAY_NET, 404 Not Found: The resource could not be found.
--------------------------------
Traceback (most recent call last):
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/cloudify/workflows/tasks.py", line 581, in local_task_wrapper
result = self.local_task(**self.kwargs)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/cloudify/dispatch.py", line 670, in dispatch
return handler.handle_or_dispatch_to_subprocess_if_remote()
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/cloudify/dispatch.py", line 155, in handle_or_dispatch_to_subprocess_if_remote
return self.handle()
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/cloudify/dispatch.py", line 392, in handle
result = self._run_operation_func(ctx, kwargs)
File "/Users/macos/.virtualenvs/cloudify-openstacksdk-plugin/lib/python2.7/site-packages/cloudify/dispatch.py", line 413, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/Users/macos/Public/Projects/PyCharm/cloudify-openstacksdk-plugin/openstacksdk_plugin/decorators.py", line 100, in wrapper_inner
causes=[exception_to_error_cause(error, tb)])
NonRecoverableError: Failure while trying to request Openstack API: No Network found for GATEWAY_NET

Should we allow lookup by network name? Is it expected?

Steps to Reproduce

Environment:
OS (CLI), HA cluster, cloud provider
------------------------------------

Steps to reproduce:
------------------
1.
2.
3.

Expected result:
---------------

Actual result:
-------------

Why Propose Close?

None

Status

Assignee

Mohammed Abuaisha

Reporter

Trammell -

Labels

None

Severity

Medium

Target Version

4.5.5

Premium Only

no

Found In Version

4.4

QA Owner

Mohammed Abuaisha
Trammell -

Bug Type

new feature bug

Customer Encountered

No

Customer Name

None

Release Notes

yes

Priority

Medium

Epic Link

Sprint

None

Fix versions

Priority

Medium