This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[stack@localhost ~]$ cat nova.log | |
Dec 16 16:42:59 localhost nova-api[32737]: 2013-12-16 16:42:59,196.196 32748 DEBUG nova.api.openstack.wsgi [req-0ca85637-afa8-4dba-9515-00a68df13082 b7ba3cf575c148e09ec7c3a56f7de071 d356acee69364d6391c0f88c0f605a5c] No Content-Type provided in request get_body /opt/stack/venvs/nova/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:849 | |
Dec 16 16:42:59 localhost nova-api[32737]: 2013-12-16 16:42:59,197.197 32748 DEBUG nova.api.openstack.wsgi [req-0ca85637-afa8-4dba-9515-00a68df13082 b7ba3cf575c148e09ec7c3a56f7de071 d356acee69364d6391c0f88c0f605a5c] Calling method <bound method KeypairController.index of <nova.api.openstack.compute.contrib.keypairs.KeypairController object at 0x4336310>> _process_stack /opt/stack/venvs/nova/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:976 | |
Dec 16 16:42:59 localhost nova-api[32737]: 2013-12-16 16:42:59,207.207 32748 DEBUG nova.api.openstack.wsgi [req-4358e5e7-4ccc-48b4-8982-ddacd586aab6 b7ba3cf575c148e09ec7c3a56f7de071 d356acee6936 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
set -o pipefail | |
exec_ids=$(mistral execution-list | awk -F "| " '{print $2; }') | |
for exec_id in $exec_ids; do | |
if [ ! $exec_id = "ID" ]; then | |
mistral execution-delete $exec_id | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import click | |
import os | |
from pprint import pprint | |
import sys | |
from pygerrit.rest import GerritRestAPI | |
@click.command() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2016 Red Hat, Inc. | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
neutron subnet-update $(neutron subnet-list | grep "-" | awk '{print $2}') --dns-nameserver 8.8.8.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2.0" | |
wf: | |
input: | |
- username | |
secret: | |
- password | |
tasks: | |
taskA: | |
action: my_action | |
publish: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mistral_lib import actions | |
from mistral_lib.security import secret | |
class MyCustomAction(actions.Action): | |
@secret(['password']) | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base | |
class MyCustomAction(base.Action): | |
def run(self): | |
return "I ran" | |
class MyAsyncAction(base.AsyncAction): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
class Action(object): | |
@abc.abstractmethod | |
def run(self): | |
pass | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check for board existence | |
board = [b for b in trello_api.list_boards() if b.name == board_name][0] | |
# if no board, print error and exit | |
if not board: | |
click.echo("Trello board not found!") | |
sys.exit(1) | |
# create board context | |
context = {'board': board} |