Dont include plugin definition in cmd checks
The ep for the openstack.cli.extension plugin definition was being included in the command dict: 'orchestration': ['heatclient.osc.plugin'] Since this is not a command, should be pruned. This was causing false positives in the overlap checking. Change-Id: I56ec1c5d55d0efc75f59c10a44e367e330c42def
This commit is contained in:
parent
dce3fc54fe
commit
0f50436547
@ -71,6 +71,13 @@ def find_duplicates():
|
||||
# Iterate over all entry points
|
||||
for ep in pkg_resources.iter_entry_points(module):
|
||||
|
||||
# Check for a colon, since valid entrypoints will have one, for
|
||||
# example: quota_show = openstackclient.common.quota:ShowQuota
|
||||
# and plugin entrypoints will not, for
|
||||
# example: orchestration = heatclient.osc.plugin
|
||||
if not ':' in str(ep):
|
||||
continue
|
||||
|
||||
# cliff does a mapping between spaces and underscores
|
||||
ep_name = ep.name.replace(' ', '_')
|
||||
|
||||
@ -102,7 +109,7 @@ def find_duplicates():
|
||||
# Safely return False here with the full set of commands
|
||||
print("Final set of commands...")
|
||||
print(valid_cmds)
|
||||
print("Found no duplicate commands, OK to merge!")
|
||||
print("Found no duplicate or overlapping commands, OK to merge!")
|
||||
return False
|
||||
|
||||
|
||||
@ -118,9 +125,6 @@ def _check_command_overlap(valid_cmds):
|
||||
for ep_name, ep_mods in valid_cmds.iteritems():
|
||||
# Skip openstack.cli.base client entry points
|
||||
for ep_mod in ep_mods:
|
||||
if ep_mod.endswith('.client'):
|
||||
break
|
||||
else:
|
||||
for ep_name_search in valid_cmds.keys():
|
||||
if ep_name_search.startswith(ep_name + "_"):
|
||||
overlap_cmds.setdefault(ep_name, []).append(ep_name_search)
|
||||
|
Loading…
Reference in New Issue
Block a user