These are chat archives for allegro/ralph

14th
Sep 2018
chrispineL
@chrispineL
Sep 14 2018 04:58

Trying to add Virtual Servers but encountering this error:

AttributeError at /virtual/virtualserver/
'ServiceEnvironment' object has no attribute 'hostname'
Request Method: GET
Request URL: http://172.30.0.221:8000/virtual/virtualserver/
Django Version: 1.8.18
Exception Type: AttributeError
Exception Value:
'ServiceEnvironment' object has no attribute 'hostname'
Exception Location: /opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/virtual/admin.py in get_parent, line 168
Python Executable: /opt/ralph/ralph-core/bin/python
Python Version: 3.4.3
Python Path:
['/opt/ralph/ralph-core/bin',
'/opt/ralph/ralph-core/lib/python3.4',
'/opt/ralph/ralph-core/lib/python3.4/plat-x86_64-linux-gnu',
'/opt/ralph/ralph-core/lib/python3.4/lib-dynload',
'/usr/lib/python3.4',
'/usr/lib/python3.4/plat-x86_64-linux-gnu',
'/opt/ralph/ralph-core/lib/python3.4/site-packages',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf',
'/opt/ralph/ralph-core/lib/python3.4/site-packages/odf']
Server time: Fri, 14 Sep 2018 06:52:51 +0200

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

Marek Bleschke
@MarekBleschke
Sep 14 2018 05:29
Hi @chrispineL, probably you have ServiceEnvironment selected in Hypervisor field which is not correct for this field. This was fixed in allegro/ralph#3284 so that only valid hypervisor can be selected for Virtual Server.
chrispineL
@chrispineL
Sep 14 2018 05:55
@MarekBleschke , I have changed to valid hypervisor as pointed out and all is working now. Solved. Thanks
Dopsterinho
@Dopsterinho
Sep 14 2018 07:56
@vi4m This would be really awesome, and I would be one of the greatfulls :-)
Dopsterinho
@Dopsterinho
Sep 14 2018 08:05
What I am really interested in, is adding a couple of additional fields/colums. Can anyone point me in the right direction ?
And those should be linked to User, and not Asset - so that when i edit the User, he should have those fields available.
THX !
Dopsterinho
@Dopsterinho
Sep 14 2018 13:24
I managed to add a Field in the Database, but do not know how to make it visible as a field. :-?
Dopsterinho
@Dopsterinho
Sep 14 2018 14:20
I managed to add a Field in the Database, but do not know how to make it visible as a field. :-?
It#s OK....i've managed it by myself