def handle(self, *args, **options): if len(args) != 1: raise CommandError("Please provide a port ID") port = common.get_port(args[0]) pprint.pprint_port(port, stdout=self.stdout) self.stdout.write('\n\n') pprint.pprint_port_ips(port, stdout=self.stdout) self.stdout.write('\n\n') pprint.pprint_port_in_ganeti(port, stdout=self.stdout)
def handle(self, *args, **options): if len(args) != 1: raise CommandError("Please provide a port ID") port = common.get_resource("port", args[0]) display_mails = options['displaymails'] pprint.pprint_port(port, display_mails=display_mails, stdout=self.stdout) self.stdout.write('\n\n') pprint.pprint_port_ips(port, stdout=self.stdout) self.stdout.write('\n\n') pprint.pprint_port_in_ganeti(port, stdout=self.stdout)