Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v5.9.4 fix query param collision and describe Ziti-backed resource types #41

Merged
merged 4 commits into from
May 2, 2022

Conversation

qrkourier
Copy link
Member

calling network.find_resources(type='service-policy', **params) raised TypeError when params: {'type': 'Dial'} because two keyword args 'type' are present.

This patch adds 'params' keyword arg to nest arbitrary query params so they do not collide with function params.

@qrkourier
Copy link
Member Author

Also added a constant that contains the resource spec for all types that are backed 1:1 by a zitiId. I omtted app-wans in this case because it they are currently a subset of service-policies (type=Dial only) and being phased out.

❯ python -c 'from netfoundry.utility import ZITI_NET_RESOURCES;print(ZITI_NET_RESOURCES.keys());'
dict_keys(['endpoints', 'edge-routers', 'services', 'service-policies', 'service-edge-router-policies', 'posture-checks', 'certificate-authorities', 'config-types', 'configs', 'terminators'])

❯ python -c 'from netfoundry.utility import ZITI_NET_RESOURCES;print(ZITI_NET_RESOURCES["endpoints"]);'
ResourceType(name='endpoints', domain='network', mutable=True, embeddable=True, parent='', status='status', _embedded='endpointList', create_responses=['ACCEPTED'], no_update_props=[], create_template={'attributes': [], 'enrollmentMethod': {'ott': True}, 'name': 'Name'}, abbreviation='e', status_symbols={'complete': 'PROVISIONED', 'progress': ('NEW', 'PROVISIONING', 'UPDATING', 'REPLACING', 'OK'), 'error': ('ERROR', 'SUSPENDED', 'NOT_FOUND'), 'deleting': ('DELETING',), 'deleted': ('DELETED', 'NOT_FOUND')}, host=False, ziti=True)

@qrkourier qrkourier changed the title Release v5.9.4 avoid collisions between HTTP query params and Python function params Release v5.9.4 fix query param collision and describe Ziti-backed resource types Apr 29, 2022
@qrkourier qrkourier merged commit 7c8a5c1 into main May 2, 2022
@qrkourier qrkourier deleted the release-v5.9.4 branch May 2, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant