堕落不振功业废,勤耕不辍日月新

OpenStack之执行openstack security group list出现Invalid query params: fields错误的解决办法

C/C++ hailen 12℃
[lookback@LookdeMacBook-Pro ~/OpenStack]$ openstack security group list
Invalid query params: fields

[lookback@LookdeMacBook-Pro ~/OpenStack]$ openstack --verbose --debug security group list
START with options: --verbose --debug security group list
options: Namespace(access_token='***', access_token_endpoint='', access_token_type='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_methods='', auth_type='', auth_url='https://portal-hkg1.dtops.cc:5000/v3', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', insecure=None, interface='public', key='', log_file=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_loadbalancer_api_version='2.0', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', project_domain_id='default', project_domain_name='', project_id='5df4e0c1c68647ef800e7904d455b58d', project_name='admin', protocol='', redirect_uri='', region_name='RegionOne', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', service_provider='', system_scope='', timing=False, token='***', trust_id='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_id': 'default', 'project_id': '5df4e0c1c68647ef800e7904d455b58d', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'https://portal-hkg1.dtops.cc:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'loadbalancer_api_version': '2.0', 'dns_api_version': '2', 'key_manager_api_version': '1', 'auth_type': 'password', 'networks': []}
defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'baremetal_introspection_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_id': 'default', 'project_id': '5df4e0c1c68647ef800e7904d455b58d', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'https://portal-hkg1.dtops.cc:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'loadbalancer_api_version': '2.0', 'dns_api_version': '2', 'key_manager_api_version': '1', 'auth_type': 'password', 'networks': []}
compute API version 2.1, cmd group openstack.compute.v2
identity API version 3, cmd group openstack.identity.v3
image API version 2, cmd group openstack.image.v2
network API version 2, cmd group openstack.network.v2
object_store API version 1, cmd group openstack.object_store.v1
volume API version 3, cmd group openstack.volume.v3
load_balancer API version 2.0, cmd group openstack.load_balancer.v2
neutronclient API version 2, cmd group openstack.neutronclient.v2
dns API version 2, cmd group openstack.dns.v2
key_manager API version 1, cmd group openstack.key_manager.v1
command: security group list -> openstackclient.network.v2.security_group.ListSecurityGroup (auth=True)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_id': 'default', 'project_id': '5df4e0c1c68647ef800e7904d455b58d', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '2.0.0')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': 'https://portal-hkg1.dtops.cc:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'loadbalancer_api_version': '2.0', 'dns_api_version': '2', 'key_manager_api_version': '1', 'auth_type': 'password', 'networks': []}
Using auth plugin: password
Using parameters {'auth_url': 'https://portal-hkg1.dtops.cc:5000/v3', 'project_id': '5df4e0c1c68647ef800e7904d455b58d', 'project_name': 'admin', 'project_domain_id': 'default', 'username': 'admin', 'user_domain_name': 'Default', 'password': '***'}
Get auth_ref
REQ: curl -g -i -X GET https://portal-hkg1.dtops.cc:5000/v3 -H "Accept: application/json" -H "User-Agent: openstacksdk/0.39.0 keystoneauth1/3.18.0 python-requests/2.22.0 CPython/3.7.7"
Starting new HTTPS connection (1): portal-hkg1.dtops.cc:5000
https://portal-hkg1.dtops.cc:5000 "GET /v3 HTTP/1.1" 200 261
RESP: [200] Connection: close Content-Length: 261 Content-Security-Policy: default-src 'self' https: wss:; Content-Type: application/json Date: Fri, 31 Jul 2020 07:47:57 GMT Server: nginx/1.14.0 (Ubuntu) Vary: X-Auth-Token X-Content-Type-Options: nosniff X-Frame-Options: DENY X-XSS-Protection: 1; mode=block x-openstack-request-id: req-cb8f3ea6-ebf2-4389-96b7-4ea6f3520e69
RESP BODY: {"version": {"status": "stable", "updated": "2019-01-22T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.12", "links": [{"href": "https://portal-hkg1.dtops.cc:5000/v3/", "rel": "self"}]}}
GET call to https://portal-hkg1.dtops.cc:5000/v3 used request id req-cb8f3ea6-ebf2-4389-96b7-4ea6f3520e69
Making authentication request to https://portal-hkg1.dtops.cc:5000/v3/auth/tokens
Resetting dropped connection: portal-hkg1.dtops.cc
https://portal-hkg1.dtops.cc:5000 "POST /v3/auth/tokens HTTP/1.1" 201 8142
{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "d24200cd131c4f07a0b79dd770fe668d", "name": "reader"}, {"id": "477f879c55f54b6e9c983ae4f9a1dc41", "name": "admin"}, {"id": "ef6ac3fcc5dc4fceaaa0ec7b6467a6c0", "name": "load-balancer_observer"}, {"id": "a247ac6ae1fb4c5ba40fb6dde53db743", "name": "member"}], "expires_at": "2020-07-31T19:47:58.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "5df4e0c1c68647ef800e7904d455b58d", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "056bba3ed40b40dba51498ac77916417"}, {"url": "https://portal-hkg1.dtops.cc:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9d6b0b719d91477dbef48a7d45e563e2"}, {"url": "http://internalapi-hkg1.dtops.cc:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e2c8b862db0e46049d62ccab3dac7c02"}], "type": "image", "id": "333925eb29dc425b88e87928a1321c03", "name": "glance"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "1fb4aa796b2b452c9c48f19678a09284"}, {"url": "http://internalapi-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "51bd1018e7044db6a697372a9e313d2b"}, {"url": "http://internalapi-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "661f5aea760a4eb8aef966669cd96b16"}], "type": "orchestration", "id": "4609a6eaa8c74d78b8ce22a67628e94b", "name": "heat"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:5000", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "1c3da2b4a6154ddbad6b1c4d7a2858c5"}, {"url": "http://internalapi-hkg1.dtops.cc:5000", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "263849ece87a48f79fbfe16abe799e96"}, {"url": "https://portal-hkg1.dtops.cc:5000", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "c25c10cb76a74caf873ca6e869396015"}], "type": "identity", "id": "51c35f7090324cf9b44c442bdb6dd9ad", "name": "keystone"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8000/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5dfd9c78786a4fb992223efdda03c033"}, {"url": "http://internalapi-hkg1.dtops.cc:8000/v1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "688637263ceb4ab8a2252a4a13cbcec8"}, {"url": "https://portal-hkg1.dtops.cc:8000/v1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "95841a514c33406faebd83b65357c875"}], "type": "cloudformation", "id": "7224d10288944e6995781d758024dd41", "name": "heat-cfn"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:9876", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "30115577346a460581029caca045009e"}, {"url": "http://internalapi-hkg1.dtops.cc:9876", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "6c1083f8aac64662a05c8b733c8ec830"}, {"url": "http://internalapi-hkg1.dtops.cc:9876", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "eb2ca000854f4a5ba5061bf3fddac0e3"}], "type": "load-balancer", "id": "8a72ef9f810d45568fa7cd6d6659c2f8", "name": "octavia"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:9696", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a0c92a86d87a48dabfba23fb06c7a66d"}, {"url": "http://internalapi-hkg1.dtops.cc:9696", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ef09e67f70dc430cb927f55e99f35d5d"}, {"url": "http://internalapi-hkg1.dtops.cc:9696", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "f4b926af710945869830299eba66fbf8"}], "type": "network", "id": "96cf70d247164ba5a0e797a5543dedd9", "name": "neutron"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:6385", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "693e3a283a7d4c05b659cc49f77a3d23"}, {"url": "https://portal-hkg1.dtops.cc:6385", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9e31bdb8c79e4346a3579974bc9f1ed0"}, {"url": "http://internalapi-hkg1.dtops.cc:6385/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a4296b386a0540a59f8fce64d43084e2"}], "type": "baremetal", "id": "af6925d7dce34e54872bafd652720df8", "name": "ironic"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:9001", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "02f8e2e404ac41439588c28c1a69099c"}, {"url": "https://portal-hkg1.dtops.cc:9001", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8ca6a9fded304f22b3602b68460a9db3"}, {"url": "http://internalapi-hkg1.dtops.cc:9001", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "b076ca34585642eaa86613f736f012fa"}], "type": "dns", "id": "b2dda96f9624455fa5e95948451eef24", "name": "designate"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8774/v2.1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "16464844bf454aaeb4c481343af056da"}, {"url": "http://internalapi-hkg1.dtops.cc:8774/v2.1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "674c7e3196ef4bfb9f9e1a05e61a3e95"}, {"url": "https://portal-hkg1.dtops.cc:8774/v2.1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d26c42ce83de484e9c810c1519364b26"}], "type": "compute", "id": "b4e0c2d5db1e471ea3720599796b534e", "name": "nova"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8780", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "33525fd0461348beaa264e12a2fe70ef"}, {"url": "https://portal-hkg1.dtops.cc:8780", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "365986dd78b949c9ba6ec1410888b54d"}, {"url": "http://internalapi-hkg1.dtops.cc:8780", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "3ae9db8fac8246ec97fe616b11f296aa"}], "type": "placement", "id": "baaab1f1c4e54b48842a337cea383c49", "name": "placement"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "2984ecfe09ea45a399b19a60c376d00e"}, {"url": "https://portal-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "b8d119400a6449df966ff28e8a0f7eeb"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "deebc77817f14cc8a4da752186b1c944"}], "type": "volumev2", "id": "c91c6339046b4ddd9e19bb91f1b017d1", "name": "cinderv2"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "305a9c02965e40f18d01359316bda5af"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a0229ba547af4a8da0f3f444e9c226d6"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "e9564a4f7ae7466983c6e39b24d4a175"}], "type": "volumev3", "id": "cbcd4a1bbfaf4b0ca608654b8633bb56", "name": "cinderv3"}], "user": {"password_expires_at": null, "domain": {"id": "default", "name": "Default"}, "id": "e885c093b3144cc6abcd19ff1c300730", "name": "admin"}, "audit_ids": ["nScPhRaLRASsyqXKi-_MbA"], "issued_at": "2020-07-31T07:47:58.000000Z"}}
get_parser(openstack security group list)
common parser: ArgumentParser(prog='openstack security group list', usage=None, description='List security groups', formatter_class=<class 'cliff._argparse.SmartHelpFormatter'>, conflict_handler='ignore', add_help=True)
network endpoint in service catalog
run(Namespace(all_projects=False, any_tags=None, columns=[], fit_width=False, formatter='table', max_width=0, noindent=False, not_any_tags=None, not_tags=None, print_empty=False, project=None, project_domain=None, quote_mode='nonnumeric', sort_columns=[], tags=None))
Making authentication request to https://portal-hkg1.dtops.cc:5000/v3/auth/tokens
Resetting dropped connection: portal-hkg1.dtops.cc
https://portal-hkg1.dtops.cc:5000 "POST /v3/auth/tokens HTTP/1.1" 201 8142
{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "d24200cd131c4f07a0b79dd770fe668d", "name": "reader"}, {"id": "477f879c55f54b6e9c983ae4f9a1dc41", "name": "admin"}, {"id": "ef6ac3fcc5dc4fceaaa0ec7b6467a6c0", "name": "load-balancer_observer"}, {"id": "a247ac6ae1fb4c5ba40fb6dde53db743", "name": "member"}], "expires_at": "2020-07-31T19:47:58.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "5df4e0c1c68647ef800e7904d455b58d", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "056bba3ed40b40dba51498ac77916417"}, {"url": "https://portal-hkg1.dtops.cc:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9d6b0b719d91477dbef48a7d45e563e2"}, {"url": "http://internalapi-hkg1.dtops.cc:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e2c8b862db0e46049d62ccab3dac7c02"}], "type": "image", "id": "333925eb29dc425b88e87928a1321c03", "name": "glance"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "1fb4aa796b2b452c9c48f19678a09284"}, {"url": "http://internalapi-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "51bd1018e7044db6a697372a9e313d2b"}, {"url": "http://internalapi-hkg1.dtops.cc:8004/v1/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "661f5aea760a4eb8aef966669cd96b16"}], "type": "orchestration", "id": "4609a6eaa8c74d78b8ce22a67628e94b", "name": "heat"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:5000", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "1c3da2b4a6154ddbad6b1c4d7a2858c5"}, {"url": "http://internalapi-hkg1.dtops.cc:5000", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "263849ece87a48f79fbfe16abe799e96"}, {"url": "https://portal-hkg1.dtops.cc:5000", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "c25c10cb76a74caf873ca6e869396015"}], "type": "identity", "id": "51c35f7090324cf9b44c442bdb6dd9ad", "name": "keystone"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8000/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5dfd9c78786a4fb992223efdda03c033"}, {"url": "http://internalapi-hkg1.dtops.cc:8000/v1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "688637263ceb4ab8a2252a4a13cbcec8"}, {"url": "https://portal-hkg1.dtops.cc:8000/v1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "95841a514c33406faebd83b65357c875"}], "type": "cloudformation", "id": "7224d10288944e6995781d758024dd41", "name": "heat-cfn"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:9876", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "30115577346a460581029caca045009e"}, {"url": "http://internalapi-hkg1.dtops.cc:9876", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "6c1083f8aac64662a05c8b733c8ec830"}, {"url": "http://internalapi-hkg1.dtops.cc:9876", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "eb2ca000854f4a5ba5061bf3fddac0e3"}], "type": "load-balancer", "id": "8a72ef9f810d45568fa7cd6d6659c2f8", "name": "octavia"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:9696", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a0c92a86d87a48dabfba23fb06c7a66d"}, {"url": "http://internalapi-hkg1.dtops.cc:9696", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ef09e67f70dc430cb927f55e99f35d5d"}, {"url": "http://internalapi-hkg1.dtops.cc:9696", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "f4b926af710945869830299eba66fbf8"}], "type": "network", "id": "96cf70d247164ba5a0e797a5543dedd9", "name": "neutron"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:6385", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "693e3a283a7d4c05b659cc49f77a3d23"}, {"url": "https://portal-hkg1.dtops.cc:6385", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9e31bdb8c79e4346a3579974bc9f1ed0"}, {"url": "http://internalapi-hkg1.dtops.cc:6385/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a4296b386a0540a59f8fce64d43084e2"}], "type": "baremetal", "id": "af6925d7dce34e54872bafd652720df8", "name": "ironic"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:9001", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "02f8e2e404ac41439588c28c1a69099c"}, {"url": "https://portal-hkg1.dtops.cc:9001", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8ca6a9fded304f22b3602b68460a9db3"}, {"url": "http://internalapi-hkg1.dtops.cc:9001", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "b076ca34585642eaa86613f736f012fa"}], "type": "dns", "id": "b2dda96f9624455fa5e95948451eef24", "name": "designate"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8774/v2.1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "16464844bf454aaeb4c481343af056da"}, {"url": "http://internalapi-hkg1.dtops.cc:8774/v2.1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "674c7e3196ef4bfb9f9e1a05e61a3e95"}, {"url": "https://portal-hkg1.dtops.cc:8774/v2.1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d26c42ce83de484e9c810c1519364b26"}], "type": "compute", "id": "b4e0c2d5db1e471ea3720599796b534e", "name": "nova"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8780", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "33525fd0461348beaa264e12a2fe70ef"}, {"url": "https://portal-hkg1.dtops.cc:8780", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "365986dd78b949c9ba6ec1410888b54d"}, {"url": "http://internalapi-hkg1.dtops.cc:8780", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "3ae9db8fac8246ec97fe616b11f296aa"}], "type": "placement", "id": "baaab1f1c4e54b48842a337cea383c49", "name": "placement"}, {"endpoints": [{"url": "http://internalapi-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "2984ecfe09ea45a399b19a60c376d00e"}, {"url": "https://portal-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "b8d119400a6449df966ff28e8a0f7eeb"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v2/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "deebc77817f14cc8a4da752186b1c944"}], "type": "volumev2", "id": "c91c6339046b4ddd9e19bb91f1b017d1", "name": "cinderv2"}, {"endpoints": [{"url": "https://portal-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "305a9c02965e40f18d01359316bda5af"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a0229ba547af4a8da0f3f444e9c226d6"}, {"url": "http://internalapi-hkg1.dtops.cc:8776/v3/5df4e0c1c68647ef800e7904d455b58d", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "e9564a4f7ae7466983c6e39b24d4a175"}], "type": "volumev3", "id": "cbcd4a1bbfaf4b0ca608654b8633bb56", "name": "cinderv3"}], "user": {"password_expires_at": null, "domain": {"id": "default", "name": "Default"}, "id": "e885c093b3144cc6abcd19ff1c300730", "name": "admin"}, "audit_ids": ["L62MCv2IQa65KBY_anTkxA"], "issued_at": "2020-07-31T07:47:58.000000Z"}}
Network client initialized using OpenStack SDK: <openstack.network.v2._proxy.Proxy object at 0x10fc4eed0>
Invalid query params: fields
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python3.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python3.7/site-packages/cliff/display.py", line 120, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/local/lib/python3.7/site-packages/cliff/lister.py", line 82, in produce_output
    parsed_args,
  File "/usr/local/lib/python3.7/site-packages/cliff/formatters/table.py", line 101, in emit_list
    self.add_rows(x, column_names, data)
  File "/usr/local/lib/python3.7/site-packages/cliff/formatters/table.py", line 80, in add_rows
    first_row = next(data_iter)
  File "/usr/local/lib/python3.7/site-packages/openstackclient/network/v2/security_group.py", line 273, in <genexpr>
    (utils.get_item_properties(
  File "/usr/local/lib/python3.7/site-packages/openstack/resource.py", line 1584, in list
    allow_unknown_params=allow_unknown_params)
  File "/usr/local/lib/python3.7/site-packages/openstack/resource.py", line 321, in _validate
    extra_data=invalid_keys)
openstack.exceptions.InvalidResourceQuery: Invalid query params: fields
clean_up ListSecurityGroup: Invalid query params: fields
END return value: 1
[lookback@LookdeMacBook-Pro ~/OpenStack]$

解决办法 升级python-openstackclient就行了
参考: https://bugs.launchpad.net/ubuntu/+source/python-openstackclient/+bug/1880019

[lookback@LookdeMacBook-Pro ~/OpenStack]$ pip3 install --upgrade python-openstackclient
Collecting python-openstackclient
  Downloading python_openstackclient-5.3.1-py3-none-any.whl (884 kB)
     |████████████████████████████████| 884 kB 630 kB/s 
Requirement already satisfied, skipping upgrade: oslo.i18n>=3.15.3 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (3.25.1)
Requirement already satisfied, skipping upgrade: oslo.utils>=3.33.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (3.42.1)
Requirement already satisfied, skipping upgrade: pbr!=2.1.0,>=2.0.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (5.4.4)
Requirement already satisfied, skipping upgrade: python-cinderclient>=3.3.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (5.0.0)
Requirement already satisfied, skipping upgrade: python-novaclient>=15.1.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (17.0.0)
Requirement already satisfied, skipping upgrade: cliff!=2.9.0,>=2.8.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (2.18.0)
Collecting openstacksdk>=0.48.0
  Downloading openstacksdk-0.48.0-py3-none-any.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 3.8 MB/s 
Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (1.14.0)
Requirement already satisfied, skipping upgrade: python-keystoneclient>=3.22.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (3.22.0)
Requirement already satisfied, skipping upgrade: osc-lib>=2.0.0 in /usr/local/lib/python3.7/site-packages (from python-openstackclient) (2.0.0)
Collecting stevedore>=2.0.1
  Downloading stevedore-3.2.0-py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 2.7 MB/s 
Requirement already satisfied, skipping upgrade: Babel!=2.4.0,>=2.3.4 in /usr/local/lib/python3.7/site-packages (from oslo.i18n>=3.15.3->python-openstackclient) (2.8.0)
Requirement already satisfied, skipping upgrade: debtcollector>=1.2.0 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (1.22.0)
Requirement already satisfied, skipping upgrade: pytz>=2013.6 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (2019.3)
Requirement already satisfied, skipping upgrade: netaddr>=0.7.18 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (0.7.19)
Requirement already satisfied, skipping upgrade: pyparsing>=2.1.0 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (2.4.6)
Requirement already satisfied, skipping upgrade: netifaces>=0.10.4 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (0.10.9)
Requirement already satisfied, skipping upgrade: iso8601>=0.1.11 in /usr/local/lib/python3.7/site-packages (from oslo.utils>=3.33.0->python-openstackclient) (0.1.12)
Requirement already satisfied, skipping upgrade: simplejson>=3.5.1 in /usr/local/lib/python3.7/site-packages (from python-cinderclient>=3.3.0->python-openstackclient) (3.17.0)
Requirement already satisfied, skipping upgrade: keystoneauth1>=3.4.0 in /usr/local/lib/python3.7/site-packages (from python-cinderclient>=3.3.0->python-openstackclient) (3.18.0)
Requirement already satisfied, skipping upgrade: requests!=2.20.0,>=2.14.2 in /usr/local/lib/python3.7/site-packages (from python-cinderclient>=3.3.0->python-openstackclient) (2.22.0)
Requirement already satisfied, skipping upgrade: PrettyTable<0.8,>=0.7.1 in /usr/local/lib/python3.7/site-packages (from python-cinderclient>=3.3.0->python-openstackclient) (0.7.2)
Requirement already satisfied, skipping upgrade: oslo.serialization!=2.19.1,>=2.18.0 in /usr/local/lib/python3.7/site-packages (from python-novaclient>=15.1.0->python-openstackclient) (2.29.2)
Requirement already satisfied, skipping upgrade: cmd2!=0.8.3,<0.9.0,>=0.8.0 in /usr/local/lib/python3.7/site-packages (from cliff!=2.9.0,>=2.8.0->python-openstackclient) (0.8.9)
Requirement already satisfied, skipping upgrade: PyYAML>=3.12 in /usr/local/lib/python3.7/site-packages (from cliff!=2.9.0,>=2.8.0->python-openstackclient) (5.3)
Requirement already satisfied, skipping upgrade: cryptography>=2.1 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (2.8)
Requirement already satisfied, skipping upgrade: os-service-types>=1.7.0 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (1.7.0)
Requirement already satisfied, skipping upgrade: appdirs>=1.3.0 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (1.4.3)
Requirement already satisfied, skipping upgrade: requestsexceptions>=1.2.0 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (1.4.0)
Requirement already satisfied, skipping upgrade: jsonpatch!=1.20,>=1.16 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (1.24)
Requirement already satisfied, skipping upgrade: decorator>=4.4.1 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (4.4.1)
Requirement already satisfied, skipping upgrade: jmespath>=0.9.0 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (0.9.4)
Requirement already satisfied, skipping upgrade: munch>=2.1.0 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (2.5.0)
Requirement already satisfied, skipping upgrade: dogpile.cache>=0.6.5 in /usr/local/lib/python3.7/site-packages (from openstacksdk>=0.48.0->python-openstackclient) (0.9.0)
Requirement already satisfied, skipping upgrade: oslo.config>=5.2.0 in /usr/local/lib/python3.7/site-packages (from python-keystoneclient>=3.22.0->python-openstackclient) (7.0.0)
Collecting importlib-metadata>=1.7.0; python_version < "3.8"
  Downloading importlib_metadata-1.7.0-py2.py3-none-any.whl (31 kB)
Requirement already satisfied, skipping upgrade: wrapt>=1.7.0 in /usr/local/lib/python3.7/site-packages (from debtcollector>=1.2.0->oslo.utils>=3.33.0->python-openstackclient) (1.11.2)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests!=2.20.0,>=2.14.2->python-cinderclient>=3.3.0->python-openstackclient) (2.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests!=2.20.0,>=2.14.2->python-cinderclient>=3.3.0->python-openstackclient) (2019.9.11)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests!=2.20.0,>=2.14.2->python-cinderclient>=3.3.0->python-openstackclient) (1.25.6)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests!=2.20.0,>=2.14.2->python-cinderclient>=3.3.0->python-openstackclient) (3.0.4)
Requirement already satisfied, skipping upgrade: msgpack>=0.5.2 in /usr/local/lib/python3.7/site-packages (from oslo.serialization!=2.19.1,>=2.18.0->python-novaclient>=15.1.0->python-openstackclient) (0.6.2)
Requirement already satisfied, skipping upgrade: wcwidth; sys_platform != "win32" in /usr/local/lib/python3.7/site-packages (from cmd2!=0.8.3,<0.9.0,>=0.8.0->cliff!=2.9.0,>=2.8.0->python-openstackclient) (0.1.8)
Requirement already satisfied, skipping upgrade: pyperclip in /usr/local/lib/python3.7/site-packages (from cmd2!=0.8.3,<0.9.0,>=0.8.0->cliff!=2.9.0,>=2.8.0->python-openstackclient) (1.7.0)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.7/site-packages (from cryptography>=2.1->openstacksdk>=0.48.0->python-openstackclient) (1.13.2)
Requirement already satisfied, skipping upgrade: jsonpointer>=1.9 in /usr/local/lib/python3.7/site-packages (from jsonpatch!=1.20,>=1.16->openstacksdk>=0.48.0->python-openstackclient) (2.0)
Requirement already satisfied, skipping upgrade: rfc3986>=1.2.0 in /usr/local/lib/python3.7/site-packages (from oslo.config>=5.2.0->python-keystoneclient>=3.22.0->python-openstackclient) (1.3.2)
Requirement already satisfied, skipping upgrade: zipp>=0.5 in /usr/local/lib/python3.7/site-packages (from importlib-metadata>=1.7.0; python_version < "3.8"->stevedore>=2.0.1->python-openstackclient) (2.0.0)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.1->openstacksdk>=0.48.0->python-openstackclient) (2.19)
Requirement already satisfied, skipping upgrade: more-itertools in /usr/local/lib/python3.7/site-packages (from zipp>=0.5->importlib-metadata>=1.7.0; python_version < "3.8"->stevedore>=2.0.1->python-openstackclient) (8.1.0)
Installing collected packages: openstacksdk, importlib-metadata, stevedore, python-openstackclient
  Attempting uninstall: openstacksdk
    Found existing installation: openstacksdk 0.39.0
    Uninstalling openstacksdk-0.39.0:
      Successfully uninstalled openstacksdk-0.39.0
  Attempting uninstall: importlib-metadata
    Found existing installation: importlib-metadata 1.4.0
    Uninstalling importlib-metadata-1.4.0:
      Successfully uninstalled importlib-metadata-1.4.0
  Attempting uninstall: stevedore
    Found existing installation: stevedore 1.31.0
    Uninstalling stevedore-1.31.0:
      Successfully uninstalled stevedore-1.31.0
  Attempting uninstall: python-openstackclient
    Found existing installation: python-openstackclient 5.2.0
    Uninstalling python-openstackclient-5.2.0:
      Successfully uninstalled python-openstackclient-5.2.0
Successfully installed importlib-metadata-1.7.0 openstacksdk-0.48.0 python-openstackclient-5.3.1 stevedore-3.2.0
[lookback@LookdeMacBook-Pro ~/OpenStack]$

转载请注明:我是IT » OpenStack之执行openstack security group list出现Invalid query params: fields错误的解决办法

喜欢 (0)or分享 (0)