Skip to content

Instantly share code, notes, and snippets.

View jtomasek's full-sized avatar

Jiri Tomasek jtomasek

  • SUSE
  • Usti nad Orlici, Czech Republic
View GitHub Profile
@jtomasek
jtomasek / gist:7303213
Created November 4, 2013 14:25
Bootstrap 3 lesscpy compilation
(.venv)→ ../Lesscpy/bin/lesscpy openstack_dashboard/static/bootstrap/less/bootstrap.less -g -V
Generating LALR tables
WARNING: 192 shift/reduce conflicts
Compiling target: openstack_dashboard/static/bootstrap/less/bootstrap.less
PLY: PARSE DEBUG START
State : 0
Stack : . LexToken(css_import,'@import',12,254)
Action : Shift and goto state 26
FAIL: test_detail_invalid_port_range (openstack_dashboard.dashboards.project.access_and_security.security_groups.tests.SecurityGroupsViewTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jtomasek/horizon/openstack_dashboard/test/helpers.py", line 83, in instance_stub_out
return fn(self)
File "/home/jtomasek/horizon/openstack_dashboard/dashboards/project/access_and_security/security_groups/tests.py", line 356, in test_detail_invalid_port_range
self.assertContains(res, "greater than or equal to")
File "/home/jtomasek/horizon/.venv/lib/python2.7/site-packages/django/test/testcases.py", line 664, in assertContains
msg_prefix + "Couldn't find %s in response" % text_repr)
AssertionError: Couldn't find 'greater than or equal to' in response
@jtomasek
jtomasek / gist:6636825
Created September 20, 2013 12:37
media.less
/*
CSS media groups
*/
@media screen, projection {
html {
background: #fffef0;
color: #300;
}
body {
max-width: 35em;
in test/less/media.less
@variable: 768px;
@media (min-width: @variable) {
aside { float: left; }
}
in test/css/media.css
@media (min-width: 768px) {
@jtomasek
jtomasek / gist:6579648
Created September 16, 2013 11:46
test output
fedora18vm: ~/tuskar-ui
→ ./run_tests.sh
Checking environment.
Environment is up to date.
Running Tuskar-UI application tests
nosetests tuskar_ui --nocapture --nologcapture --cover-package=openstack_dashboard --cover-inclusive --all-modules --verbosity=1
Creating test database for alias 'default'...
........................Problem instantiating action class.
Traceback (most recent call last):
File "/home/jtomasek/tuskar-ui/.venv/src/horizon/horizon/workflows/base.py", line 373, in action
@jtomasek
jtomasek / gist:6366303
Created August 28, 2013 13:55
compiling bootstrap 3 with lesscpy
lesscpy bootstrap.less -V
Compiling target: bootstrap.less
Compiling target: /home/jtomasek/bootstrap/less/variables.less
E: /home/jtomasek/bootstrap/less/variables.less line: 157, Syntax Error, token: `t_popen`, `(`
Compiling target: /home/jtomasek/bootstrap/less/mixins.less
E: /home/jtomasek/bootstrap/less/mixins.less line: 47, Syntax Error, token: `;`, `;`
E: /home/jtomasek/bootstrap/less/mixins.less line: 52, Syntax Error, token: `;`, `;`
E: /home/jtomasek/bootstrap/less/mixins.less line: 161, Syntax Error, token: `;`, `;`
E: /home/jtomasek/bootstrap/less/mixins.less line: 166, Syntax Error, token: `;`, `;`
E: /home/jtomasek/bootstrap/less/mixins.less line: 171, Syntax Error, token: `;`, `;`
@jtomasek
jtomasek / gist:6088262
Created July 26, 2013 11:46
resource class capacities property
@property
def capacities(self):
if not hasattr(self, '_capacities'):
# racks = self.list_racks
capacities = [rack.capacities for rack in self.list_racks]
def add_capacities(c1, c2):
return [Capacity({'name': a.name,
'value': int(a.value) + int(b.value),
'unit': a.unit}) for a, b in zip(c1, c2)]
@jtomasek
jtomasek / gist:6087164
Created July 26, 2013 08:16
sample data mx_vms
diff --git a/tools/sample_data.py b/tools/sample_data.py
index 6298ca5..1f3c4c4 100644
--- a/tools/sample_data.py
+++ b/tools/sample_data.py
@@ -210,7 +210,8 @@ def generate_data():
dict(name='cpu', value='4', unit='count'),
dict(name='memory', value='15', unit='GB'),
dict(name='storage', value='1680', unit='GB'),
- ]),
+ ],
@jtomasek
jtomasek / gist:6029221
Created July 18, 2013 13:17
./run_tests.sh
Successfully installed django-compressor django-openstack-auth iso8601 netaddr python-cinderclient python-glanceclient python-keystoneclient python-novaclient python-quantumclient python-swiftclient pytz python-tuskarclient lockfile django-appconf prettytable requests simplejson pyOpenSSL warlock six oslo.config cliff httplib2 pyparsing jsonschema jsonpatch cmd2 jsonpointer
Cleaning up...
Installing horizon module in development mode...
warning: no files found matching '*.css_t' under directory 'doc'
warning: no files found matching '*.csv' under directory 'horizon'
warning: no files found matching '*.template' under directory 'horizon'
warning: no files found matching '*.js' under directory 'openstack_dashboard'
warning: no files found matching 'AUTHORS'
warning: no files found matching 'ChangeLog'
warning: no previously-included files found matching 'openstack_dashboard/local/local_settings.py'
@jtomasek
jtomasek / gist:5531292
Last active December 17, 2015 01:49
devstack/localrc
# sample for this file is in samples/localrc
# http://fedoraproject.org/wiki/OpenStack_devstack
# http://devstack.org/localrc.html
DEST=$HOME/src/openstack
DATA_DIR=$DEST/data
LOGFILE=$DATA_DIR/logs/stack.log
SCREEN_LOGDIR=$DATA_DIR/logs
VERBOSE=False