Add network wrapper method checks
The pep8 rules T110/T111 check the method names of service clients, but the rules could not find violations on network clients because these clients use some wrapper methods. This patch adds some checks for covering network clients. Partially implements blueprint consistent-service-method-names Change-Id: I4aede28261626a27a3a857ba05c1a0fdcc3cac5b
This commit is contained in:
parent
4fd3ddb1fd
commit
f878e6e36d
|
@ -185,7 +185,8 @@ def get_resources_on_service_clients(logical_line, physical_line, filename,
|
|||
# the end of a method
|
||||
return
|
||||
|
||||
if 'self.get(' not in line:
|
||||
if 'self.get(' not in line and ('self.show_resource(' not in line and
|
||||
'self.list_resources(' not in line):
|
||||
continue
|
||||
|
||||
if METHOD_GET_RESOURCE.match(logical_line):
|
||||
|
@ -211,7 +212,7 @@ def delete_resources_on_service_clients(logical_line, physical_line, filename,
|
|||
# the end of a method
|
||||
return
|
||||
|
||||
if 'self.delete(' not in line:
|
||||
if 'self.delete(' not in line and 'self.delete_resource(' not in line:
|
||||
continue
|
||||
|
||||
if METHOD_DELETE_RESOURCE.match(logical_line):
|
||||
|
|
|
@ -6,3 +6,4 @@
|
|||
./tempest/services/volume/base/base_qos_client.py
|
||||
./tempest/services/volume/base/base_backups_client.py
|
||||
./tempest/services/baremetal/base.py
|
||||
./tempest/services/network/json/network_client.py
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
./tempest/services/baremetal/base.py
|
||||
./tempest/services/network/json/agents_client.py
|
||||
./tempest/services/network/json/quotas_client.py
|
||||
|
|
Loading…
Reference in New Issue