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 automaton.converters import pydot | |
from ironic.common import states | |
def edge_attrs_cb(start_state, on_event, end_state): | |
edge_attrs = {} | |
edge_attrs['label'] = on_event.replace("_", " ").strip() | |
if 'reverted' in on_event: | |
edge_attrs['fontcolor'] = 'darkorange' | |
if 'fail' in on_event: |
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
# diff -u a/networking_ovn/agent/metadata/agent.py b/networking_ovn/agent/metadata/agent.py | |
--- a/networking_ovn/agent/metadata/agent.py 2017-07-14 19:58:10.000000000 +0900 | |
+++ b/networking_ovn/agent/metadata/agent.py 2017-08-06 18:41:39.129119566 +0900 | |
@@ -248,8 +248,7 @@ | |
# addresses, then tear the namespace down if needed. This might happen | |
# when there are no subnets yet created so metadata port doesn't have | |
# an IP address. | |
- if not (port and port.mac and | |
- port.external_ids.get(ovn_const.OVN_CIDRS_EXT_ID_KEY, None)): | |
+ if not (port and port.mac): |
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/python | |
import pprint | |
import re | |
import sys | |
RE = re.compile(r"{{ *(.*?) *}}") | |
VARS = {} | |
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/python | |
import requests | |
import yaml | |
URL = ("https://git.openstack.org/cgit/openstack/" | |
"governance/plain/reference/projects.yaml") | |
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
BEGIN:VCALENDAR | |
DTSTART:20170507T080000 | |
SUMMARY:OpenStack Summit Boston 2017 | |
BEGIN:VEVENT | |
SUMMARY:Upstream Institute Sponsored by Lenovo - Day 1 (RSVP Required) | |
DTSTART;VALUE=DATE-TIME:20171104T030000Z | |
DTEND;VALUE=DATE-TIME:20171104T070000Z | |
UID:20363@openstacksummitboston2017 | |
DESCRIPTION:OpenStack Upstream Institute is an intensive program designed | |
to share knowledge about the different ways of contributing to OpenStack l |
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 | |
USER=admin | |
PASSWORD=password | |
SYSTEM_USER=sysuser | |
SYSTEM_PASSWORD=nomoresecret | |
SECRET_KEY=secrete | |
FQDN="awx.example.com" | |
AWX_HTTPS_PORT=443 |
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
diff --git a/monasca_api/conf/types.py b/monasca_api/conf/types.py | |
index 5edc56b..a5180e4 100644 | |
--- a/monasca_api/conf/types.py | |
+++ b/monasca_api/conf/types.py | |
@@ -36,7 +36,7 @@ class HostAddressPortType(types.HostAddress): | |
super(HostAddressPortType, self).__init__(version, type_name=type_name) | |
def __call__(self, value): | |
- addr, port = value.split(':') | |
+ addr, port = value.rsplit(':', 1) |
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/python | |
# usage: gen_cert [-h] [-C COUNTRY] [-ST STATE] [-L LOCALITY] [-O ORGANIZATION] | |
# [-OU ORGANIZATION_UNIT] [-CN COMMON_NAME] [-E EMAIL_ADDRESS] | |
# [-p PERIOD] [-d DNS] [-i IP] [-s SERIAL] | |
# certfile keyfile | |
# | |
# Generate X509 Certificate and Private Key | |
# | |
# positional arguments: | |
# certfile |
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 sys | |
MAZE = [ | |
"--------", | |
"-○○◎■□□ア", | |
"-□□×□△◎-", | |
"-■□□××△-", |
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 codecs | |
import json | |
import re | |
import string | |
CHO_ON_PATTERN = re.compile(r"[ア-ンー・]+[アカガサザタダナハバパマヤラワァィゥェォ][^ア-ン]") | |
ILLEGAL_CHARACTERS = re.compile("[ ({【『[)}】』]”’,.・0123456789:/-]") | |
ILLEGAL_KANJI_PATTERN = re.compile("(下さい|無し|為|する事)") |