Hi,
the VM network network is the default one, so in order to create
different network type you have to pass what you need explicitly,
for example:
network = networks_service.add(
types.Network(
name='mynetwork',
data_center=types.DataCenter(
name='mydatacenter'
),
usages=[
types.NetworkUsage.MANAGEMENT,
],
),
)
Will create management network.
Other options are:
DISPLAY,
MIGRATION,
VM
So just past explicitly what you need.
Ondra
On 09/22/2016 03:15 PM, knarra wrote:
Hi,
I am trying to create a non vm network using the following code, but
it still go a head and creates vm network. Can some one please help me
to resolve this? Or can you let me know in case i am missing some
parameter to add here?
def create_gluster_network(network_name):
networks_service = connection.system_service().networks_service()
network = networks_service.add(types.Network(name=network_name,
data_center=types.DataCenter(name='Default'), description='new gluster
network' ))
Thanks
kasturi