forked from eda-labs/openapi-example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
24 lines (18 loc) · 620 Bytes
/
main.py
File metadata and controls
24 lines (18 loc) · 620 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from src.banner import banner
from src.client import EDAClient
from src.interface import interface
from src.logging import setup_logging
setup_logging()
def main():
my_banner = banner(
ns="clab-vlan",
name="my-banner",
motd_text="Let's have some model driven automation going on!",
)
my_interface = interface(ns="clab-vlan", name="my-interface")
eda = EDAClient(base_url="https://devbox.panda-cobra.ts.net")
eda.add_to_transaction_replace(my_banner)
eda.add_to_transaction_replace(my_interface)
_ = eda.commit_transaction()
if __name__ == "__main__":
main()