These are chat archives for allegro/ralph

21st
Aug 2017
Paweł
@ziompaul
Aug 21 2017 06:07
how to make a DC virtualisation on blade flex: https://www.markiiisys.com/monkeewrench/files/products/IBM-Flex.jpg which is 2 cols & 7 rows?
Mateusz Kurek
@mkurek
Aug 21 2017 06:18
@ziompaul it will be necessary to add this layout in source code: https://github.com/allegro/ralph/blob/ng/src/ralph/assets/models/choices.py#L33 (remember about running ralph makemigrations, if you'll be doing PR with it :))
Paweł
@ziompaul
Aug 21 2017 06:19
PR?
Mateusz Kurek
@mkurek
Aug 21 2017 06:21
pull request
@ostrochovsky this issue was for Ralph2. Ralph3 should support postgres out of the box - you'll just need to configure db connection properly: https://docs.djangoproject.com/en/1.11/ref/settings/#databases (especially 'ENGINE')
Paweł
@ziompaul
Aug 21 2017 06:24
@mkurek are you shure it should be assets/models or a data_center/models ?
Mateusz Kurek
@mkurek
Aug 21 2017 06:26
I'm sure - assets is base app (base models etc) for data center (as well as back office)
@rudy500 which __init__.py did you change (to get es translations)?
Mateusz Kurek
@mkurek
Aug 21 2017 06:32
@ziompaul about VMware DRS - I'd suggest to create cluster (http://your-ralph-address/data_center/cluster/) with data center assets attached and then select this cluster as hypervisor for virtual servers
Paweł
@ziompaul
Aug 21 2017 06:39
i'll check i later
layout_7x2 = _('2 rows x 7 columns').extra(css_class='rows-2 cols-7')
do I have to make a css cols-7
?
Paweł
@ziompaul
Aug 21 2017 06:50
from ralph.assets.models.choices import (
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/assets/models/choices.py", line 47
layout7x2 = ('7 rows x 2 columns').extra(css_class='rows-7 cols-2')
^
TabError: inconsistent use of tabs and spaces in indentation
root@skierlp01:~#
this is an error while making make migrations
Mateusz Kurek
@mkurek
Aug 21 2017 06:53
use spaces to indent this line (you've probably use tab)
Paweł
@ziompaul
Aug 21 2017 06:54
yes
Paweł
@ziompaul
Aug 21 2017 07:04
new slot configuration did not apperar ;-(
an now I have an error while multiadding hardware
ValueError at /data_center/datacenterasset/51/multiadd/
'MultiForm' has no field named 'slot_no'.
Request Method:    POST
Request URL:    http://itdocs.rovese.net/data_center/datacenterasset/51/multiadd/
Django Version:    1.8.17
Exception Type:    ValueError
Exception Value:    
'MultiForm' has no field named 'slot_no'.
Exception Location:    /opt/ralph/ralph-core/lib/python3.4/site-packages/django/forms/forms.py in add_error, line 360
Python Executable:    /usr/bin/uwsgi-core
Python Version:    3.4.3
Python Path:    
['.',
 '',
 '/opt/ralph/ralph-core/lib/python3.4/site-packages',
 '/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']
Server time:    Mon, 21 Aug 2017 09:02:56 +0200
Mateusz Kurek
@mkurek
Aug 21 2017 07:08
by now you mean "after you changes in source code"?
Paweł
@ziompaul
Aug 21 2017 07:09
I had no such error before
Mateusz Kurek
@mkurek
Aug 21 2017 07:11
could you make a pull request with you changes (or at least push them to github) so we can see what did you change exactly?
Paweł
@ziompaul
Aug 21 2017 07:12
hm it is not those changes fault
I think it is a problem with multiadding a hardware, where Slot field is not empty
Mateusz Kurek
@mkurek
Aug 21 2017 07:18
ok, so it's (in general) bug in ralph. Could you create issue with steps how to reproduce it?
Paweł
@ziompaul
Aug 21 2017 07:18
ok
Paweł
@ziompaul
Aug 21 2017 07:31
Multiadd error #3145
Rudy Pinochet
@rudy500
Aug 21 2017 13:14
Hi @mkurek

This files addicionally
vim /opt/ralph/ralph-core/lib/python3.4/site-packages/django/conf/global_settings.py

vim /opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/settings/base.py

Paweł
@ziompaul
Aug 21 2017 14:51

ok, so to make a new hardware visualisation layout it is not enough to:

  • adding a new line: layout_7x2 = _('7 rows x 2 columns').extra(css_class='rows-7 cols-2') to choices.py
  • run ralph makemigrations
  • add a new css to rack.css

News layout does not appear in new hardware add form.

I see that all CSS are similar to each other - it divides $device-width / $cols, so 4 rows 2 cols and 2 rows 2 cols, 1 row 2 cols and 7 rows 2 cols are exacly the same.

7 rows of blade servers does not fit 10 unit Blade Center

image.png
It would be fine to change HTML/CSS to make a slot number to the left and description to the right - everything in one line
and the last think - there is no possibility to place 1 hardware (blade server) in both 2 slots ;-)