Skip to content

Instantly share code, notes, and snippets.

@pedro-r-marques
pedro-r-marques / aws_config_download.py
Created May 25, 2023 14:13
Download the AWS config resource config and evaluation results
import argparse
import datetime
import json
import os
from typing import Any, Callable, Generator, TextIO
import sys
import boto3
# virtual-network guestbook
curl http://localhost:8082/virtual-network/f630dfa7-9f58-4317-9f1c-94537e1d0d61 | python -mjson.tool
"display_name": "guestbook",
"fq_name": [
"default-domain",
"default",
"guestbook"
],
"href": "http://localhost:8082/virtual-network/f630dfa7-9f58-4317-9f1c-94537e1d0d61",
---
- name: inventory, task variables and facts
hosts:
- test
tasks:
- name: example task
command: hostname
register: hostname_var
[test]
localhost flag_a="foo"
[test:vars]
flag_b="bar"
time->Fri Sep 11 21:14:44 2015
type=AVC msg=audit(1442006084.392:13970): avc: denied { create } for pid=19771 comm="java" name="system" scontext=system_u:system_r:svirt_lxc_net_t:s0:c322,c661 tcontext=system_u:object_r:docker_var_lib_t:s0 tclass=dir permissive=0
----
time->Fri Sep 11 21:15:21 2015
type=AVC msg=audit(1442006121.441:13971): avc: denied { write } for pid=19826 comm="ifmap-server" name="ifmap-server" dev="vda1" ino=640066 scontext=system_u:system_r:svirt_lxc_net_t:s0:c715,c817 tcontext=system_u:object_r:docker_log_t:s0 tclass=dir permissive=0
heat_template_version: 2013-05-23
description: Web Service Stack
parameters:
lb_pool_name:
type: string
description: Name of the loadbalancer
server01_name:
type: string
description: Name of the server01 - instance/volume
server02_name:
import getopt
import pycassa
import subprocess
import sys
from pycassa.pool import ConnectionPool
from pycassa.columnfamily import ColumnFamily
def query_typename(column, typename):
data = column.get(typename.replace('-', '_'))
import socket
from vnc_api.vnc_api import *
class NetworkProvisioner(object):
def __init__(self):
self._client = VncApi()
self._network_name = "default-domain:default-project:Public"
self._rtarget = "target:64514:1"
def update(self):
auto eth4.50
iface eth4.50 inet static
address 0.0.0.0
up ifconfig $IFACE up
down ifconfig $IFACE down
auto vhost0
iface vhost0 inet static
pre-up vif --create vhost0 --mac $(cat /sys/class/net/eth4/address)
pre-up vif --add vhost0 --mac $(cat /sys/class/net/eth4/address) --vrf 0 --mode x --type vhost
@pedro-r-marques
pedro-r-marques / agent.conf
Last active January 4, 2016 08:09
vrouter agent configuration file
<?xml version="1.0" encoding="utf-8"?>
<config>
<agent>
<!-- Physical ports connecting to IP Fabric -->
<vhost>
<name>vhost0</name>
<ip-address>10.34.2.16</ip-address>
<gateway></gateway>
</vhost>
<eth-port>