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 argparse | |
class _SubParsersAction(argparse._SubParsersAction): | |
def __init__(self, *args, **kwargs): | |
super(_SubParsersAction, self).__init__(*args, **kwargs) | |
self._other_actions = [] | |
def add_parser(self, name, **kwargs): |
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
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
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
class gen(): | |
def __enter__(self): | |
print('enter') | |
def __exit__(self, exc_type, exc_val, exc_tb): | |
print('exit') | |
def test(): | |
with gen(): | |
for i in range(10): |
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
[[local|localrc]] | |
ADMIN_PASSWORD=devstack | |
MYSQL_PASSWORD=devstack | |
RABBIT_PASSWORD=devstack | |
SERVICE_PASSWORD=$ADMIN_PASSWORD | |
SERVICE_TOKEN=devstack | |
# Neutron ML2 with OpenVSwitch | |
Q_PLUGIN=ml2 | |
Q_AGENT=openvswitch |
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 | |
VM_NAME="ubuntu-server-14.04.3" | |
MEMORY=512 | |
VCPU=1 | |
CDROM=/path/to/iso | |
DKSK=/path/to/disk/image | |
DISK_FORMAT=qcow2 | |
OS_VARIANT=ubuntutrusty | |
GRAPHICS=spice |
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 | |
NAME=fuel-master | |
MEMORY=2048 | |
CPU=1 | |
CPU_TYPE=host | |
CDROM="/mnt/data/images/_fuel/fuel-current.iso" | |
#DISK_1="path=/dev/vg0/fuel-master,bus=virtio,format=raw" |
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
<domain type='kvm'> | |
<name>{{ vm_name }}</name> | |
<memory>{{ vm_memory_KB }}</memory> | |
<currentMemory>{{ vm_memory_KB }}</currentMemory> | |
<vcpu>{{ vm_cpu }}</vcpu> | |
<os> | |
<type arch='x86_64'>hvm</type> | |
<boot dev='cdrom'/> | |
<boot dev='hd'/> | |
</os> |
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
default virtserver | |
label virtserver | |
menu label Install ^Virtual Server | |
kernel /install/vmlinuz | |
append file=/cdrom/preseed/virtual-server.seed debian-installer/locale=en_US.UTF-8 keyboard-configuration/layoutcode=us vga=788 initrd=/install/initrd.gz quiet -- | |
label install | |
menu label ^Install Ubuntu Server | |
kernel /install/vmlinuz | |
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet -- | |
label cloud |
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 six | |
import yaml | |
class YamlMetadata(object): | |
def __init__(self, mark): | |
self.mark = mark | |
@property | |
def line(self): |
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
# Create this manifest using kubectl to deploy | |
# the Calico policy controller on Kubernetes. | |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: calico-policy-controller | |
namespace: kube-system | |
labels: | |
k8s-app: calico-policy | |
kubernetes.io/cluster-service: "true" |
OlderNewer