Created
March 5, 2013 21:10
-
-
Save parthaa/5094305 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pylint shows | |
4********* Running Pylint ************************ | |
1715RUNNING: PYTHONPATH=src/ pylint --rcfile=./etc/spacewalk-pylint.rc --additional-builtins=_ katello | |
1716************* Module katello.client.main | |
1717W0622: 19,0: Redefining built-in 'filter' | |
1718************* Module katello.client.api.filter | |
1719C0301: 28,0: Line too long (121/120) | |
1720C0301: 38,0: Line too long (121/120) | |
1721W0613: 22,37:FilterAPI.filters_by_cvd_and_org: Unused argument 'definition' | |
1722W0613: 22,49:FilterAPI.filters_by_cvd_and_org: Unused argument 'org_id' | |
1723W0613: 27,43:FilterAPI.get_filter_info: Unused argument 'definition' | |
1724W0613: 27,30:FilterAPI.get_filter_info: Unused argument 'filter_name' | |
1725W0613: 27,55:FilterAPI.get_filter_info: Unused argument 'org_id' | |
1726W0613: 32,34:FilterAPI.create: Unused argument 'definition' | |
1727W0613: 32,46:FilterAPI.create: Unused argument 'org_id' | |
1728W0613: 37,34:FilterAPI.delete: Unused argument 'definition' | |
1729W0613: 37,21:FilterAPI.delete: Unused argument 'filter_name' | |
1730W0613: 37,46:FilterAPI.delete: Unused argument 'org_id' | |
For the following lines of code | |
class FilterAPI(KatelloAPI): | |
""" | |
Connection class to access content view filter calls | |
""" | |
def filters_by_cvd_and_org(self, definition, org_id): | |
path = "/api/organizations/%(org_id)s/content_view_definitions/%(definition)s/filters" % locals() | |
defs = self.server.GET(path)[1] | |
return defs | |
def get_filter_info(self, filter_name, definition, org_id): | |
path = "/api/organizations/%(org_id)s/content_view_definitions/%(definition)s/filters/%(filter_name)s" % locals() | |
filter_def = self.server.GET(path)[1] | |
return filter_def | |
def create(self, filter_name, definition, org_id): | |
path = "/api/organizations/%(org_id)s/content_view_definitions/%(definition)s/filters" % locals() | |
params = {"filter": filter_name} | |
return self.server.POST(path, params)[1] | |
def delete(self, filter_name, definition, org_id): | |
path = "/api/organizations/%(org_id)s/content_view_definitions/%(definition)s/filters/%(filter_name)s" % locals() | |
return self.server.DELETE(path)[1] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment