Surround top-level function and class definitions with two blank lines.

This commit is contained in:
Joren Vrancken 2018-07-29 13:46:06 +02:00 committed by Toshio Kuratomi
commit b954917761
373 changed files with 408 additions and 28 deletions

View file

@ -344,5 +344,6 @@ class LibcloudInventory(object):
def main():
LibcloudInventory()
if __name__ == '__main__':
main()

View file

@ -583,6 +583,7 @@ class AosInventory(object):
for key, value in device.value['status'].items():
self.add_var_to_host(device.name, key, value)
# Run the script
if __name__ == '__main__':
AosInventory()

View file

@ -482,4 +482,5 @@ class CloudFormsInventory(object):
else:
return json.dumps(data)
CloudFormsInventory()

View file

@ -312,4 +312,5 @@ class CobblerInventory(object):
else:
return json.dumps(data)
CobblerInventory()

View file

@ -528,4 +528,5 @@ class ConsulConfig(dict):
token = 'anonymous'
return consul.Consul(host=host, port=port, token=token, scheme=scheme)
ConsulInventory()

View file

@ -889,4 +889,5 @@ def main():
DockerInventory().run()
main()

View file

@ -436,5 +436,6 @@ class ForemanInventory(object):
self._print_data()
return True
if __name__ == '__main__':
sys.exit(not ForemanInventory().run())

View file

@ -534,6 +534,7 @@ class GceInventory(object):
else:
return json.dumps(data)
# Run the script
if __name__ == '__main__':
GceInventory()

View file

@ -65,5 +65,6 @@ def main(argv):
else:
print("Need an argument, either --list or --host <host>", file=sys.stderr)
if __name__ == '__main__':
main(sys.argv)

View file

@ -129,6 +129,7 @@ class MDTInventory(object):
parser.add_argument('--host', action='store', help='Get all the variables about a specific instance')
self.args = parser.parse_args()
if __name__ == "__main__":
# Run the script
MDTInventory()

View file

@ -173,4 +173,5 @@ class NagiosLivestatusInventory(object):
else:
sys.exit("usage: --list or --host HOSTNAME [--pretty]")
NagiosLivestatusInventory()

View file

@ -105,4 +105,5 @@ class NagiosNDOInventory(object):
else:
sys.exit("Error: Database configuration is missing. See nagios_ndo.ini.")
NagiosNDOInventory()

View file

@ -339,5 +339,6 @@ def main():
elif args.host:
print(client.do_host(args.host))
if __name__ == '__main__':
main()

View file

@ -288,5 +288,6 @@ class OVirtInventory(object):
else:
return json.dumps(data)
# Run the script
OVirtInventory()

View file

@ -258,5 +258,6 @@ def main():
)
)
if __name__ == '__main__':
main()

View file

@ -185,7 +185,6 @@ def load_config_file():
return None
else:
return p
p = load_config_file()
def rax_slugify(value):
@ -469,5 +468,6 @@ def main():
sys.exit(0)
p = load_config_file()
if __name__ == '__main__':
main()

View file

@ -294,5 +294,6 @@ class RudderInventory(object):
return re.sub(r'[^A-Za-z0-9\_]', '_', word)
# Run the script
RudderInventory()

View file

@ -198,4 +198,5 @@ class SoftLayerInventory(object):
self.get_virtual_servers()
self.get_physical_servers()
SoftLayerInventory()

View file

@ -30,6 +30,7 @@ class SetEncoder(json.JSONEncoder):
return list(obj)
return json.JSONEncoder.default(self, obj)
VBOX = "VBoxManage"

View file

@ -152,4 +152,5 @@ class ZabbixInventory(object):
print("Error: Configuration of server and credentials are required. See zabbix.ini.", file=sys.stderr)
sys.exit(1)
ZabbixInventory()