Skip to content
Snippets Groups Projects
Commit ea17cded authored by Ubuntu's avatar Ubuntu Committed by Neda Moeini
Browse files

NAT-243: added reserve interface command

parent 867552b3
No related branches found
No related tags found
1 merge request!77Netbox integration including intial CLI for populating base data and ...
......@@ -158,5 +158,23 @@ def interface(fqdn: str, iface: str, lag: str):
attach.add_command(interface)
# The reserve command
@cli.group()
def reserve():
pass
@reserve.command()
@click.option('--fqdn', help='Device name where to get interface to reserve')
@click.option('--iface', help='Interface name to reserve')
def interface(fqdn: str, iface: str):
click.echo(f"Reserving interface: device ={fqdn}, interface name={iface}")
reserved_iface = nc.reserve_interface(nbclient, fqdn, iface)
print(reserved_iface )
reserve.add_command(interface)
if __name__ == '__main__':
cli()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment