-
-
Save almusil/696ae7f51624bcf9e5e00c4de8323c32 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
from neutronclient.v2_0 import client | |
URL = 'ovn-engine' | |
credentials = { | |
'username': 'admin@internal', | |
'password': '123456', | |
'auth_url': f'https://{URL}:35357/v2.0', | |
'endpoint_url': f'https://{URL}:9696', | |
'insecure': True, | |
} | |
net_body = {'network': {'name': 'ovn_net'}} | |
def clear(neutron): | |
for net in neutron.list_networks()['networks']: | |
neutron.delete_network(net['id']) | |
def reproduce(neutron): | |
neutron.list_networks() | |
neutron.create_network(net_body) | |
if __name__ == '__main__': | |
neutron = client.Client(**credentials) | |
# clear(neutron) | |
reproduce(neutron) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment