Skip to content

Instantly share code, notes, and snippets.

View rm-you's full-sized avatar

Adam Harwell rm-you

  • Yahoo!
  • Bellingham, WA
View GitHub Profile
@rm-you
rm-you / gist:e1c2bf33aa570e310b1cdc7ebdd5dc2e
Last active February 8, 2017 20:31 — forked from anonymous/gist:f59d96918f3103ad5651
octavia curl command help
MYTOKEN=$(openstack token issue | awk '/ id / { print $4 }')
MYPROJECT=$(openstack token issue | awk '/ project_id / { print $4 }')
DEFAULT_NETWORK=$(openstack subnet list | awk '/ private-subnet / {print $2}')
# Create a loadbalancer:
LB_ID=$(curl -X POST -H Content-type:application/json -H "X-Auth-Token:$MYTOKEN" -d '{"name": "test_lb", "vip": {"subnet_id": "'$DEFAULT_NETWORK'"}, "project_id": "'$MYPROJECT'"}' http://localhost:9876/v1/loadbalancers | python -m json.tool | awk '/"id"/ { print $2 }' | cut -d '"' -f 2)
# Get loadbalancer (do this until pending create is no longer pending...):
curl -H "X-Auth-Token:$MYTOKEN" http://localhost:9876/v1/loadbalancers/${LB_ID} | python -m json.tool
@rm-you
rm-you / devstack-setup.sh
Last active August 29, 2015 14:17 — forked from fnaval/devstack-setup.sh
Devstack setup script for Neutron-LBaaS and Barbican (New)
#!/bin/bash
# Set up the packages we need
apt-get update
apt-get install git vim -y
# Clone the repos we need
git clone https://github.com/openstack-dev/devstack.git /tmp/devstack
cat <<EOF > /tmp/devstack/localrc