retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.67k stars 369 forks source link

Is IPv6 supported? #249

Open NicoDreamzZ opened 5 years ago

NicoDreamzZ commented 5 years ago

Hey there, i am using libvirt networks with also ipv6 adresses. When I try to load a network from webvirtcloud, wich contains an ipv6 configuration, this error is thrown:

Environment:

Request Method: GET
Request URL: http://localhost:80/computes/2/network/default/

Django Version: 1.11.21
Python Version: 2.7.15
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'computes',
 'console',
 'networks',
 'storages',
 'interfaces',
 'nwfilters',
 'instances',
 'secrets',
 'logs',
 'accounts',
 'create',
 'datasource')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.RemoteUserMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:

File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/srv/webvirtcloud/networks/views.py" in network
  89.         ipv4_network = conn.get_ipv4_network()

File "/srv/webvirtcloud/vrtManager/network.py" in get_ipv4_network
  133.             ret = IP(str(network) + "/" + netmaskStr)

File "/srv/webvirtcloud/vrtManager/IPy.py" in __init__
  253.             self._prefixlen = int(prefixlen)

Exception Type: ValueError at /computes/2/network/default/
Exception Value: invalid literal for int() with base 10: '::ffff:ffff:ffff:ffff:ffff:ffff'
catborise commented 5 years ago

i have never used ipv6. i think for now it is not supported. but we can add it. it requires some time... :)

NicoDreamzZ commented 5 years ago

@catborise Hey there, my company wanted to switch to proxmox, only for me you dont have to implement it. You can close the ticket, if it is not needed further.

aafanasyev commented 4 years ago

In my opinion still useful feature. It will be great to use it with SLAAC, DAD...

catborise commented 4 years ago

@aafanasyev i add ipv6 support. It works as expected for me. I do not have ipv6 infrastructure but libvirt provides support, i implement it. after merge you can try and feedback to me.. if you do not wait for try you can you my repo. (for now, you cannot create ipv6 network but only manage)