In this post we’ll see how to work with Jinja2 in your Python projects, to easily create and modify templates.
Jinja2 is widely used and you probably already noticed it if you used projects such as Flask and Ansible or even if you simply searched for a robust templating engine.I can describe its greatness for a couple of minutes if not hours, but the
I can describe its greatness for a couple of minutes if not hours, but the official doc does it much better, so I recommend to go over them to get an idea on what you can achieve by using it. This post is mainly for those who are looking for a quickstart guide.
We have the following table which is populated with data, using Ajax
Now, let’s say you want to color the table rows, based on the second column status after, the table is already filled with data:
- UNSTABLE -> Yellow
- SUCCESS -> Green
- Failure -> Red
This post is a dummy walkthrough of neutron services code. I recommend being familiar with the following modules (not a hard requirement, but will help you avoid jumping between this post and other docs):
I created the following drawing to make it easier to track several of the files and classes mentioned in this post.
Deploying and testing OpenStack is very easy
If you read the headline and your eyebrows raised, you are at the right place. I believe that most of us, who experienced at least one deployment of OpenStack, will agree that deploying OpenStack can be a quite frustrating experience. It doesn’t matter if you are using it for debugging your code or it’s an integral part of your CI environment, deploying OpenStack often with changes, can be complex. Let’s stop for a minute and think why it’s like that.
You run ‘openstack overcloud deploy’ and after a couple of minutes you find out it failed and if that’s not enough, then you open the deployment log just to find a very (very!) long output that doesn’t give you an clue as to why the deployment failed. In the following sections we’ll see how can we get to the root of the problem.