2015-10-21
- jennifer
- martym
--- a/src/qemu/qemu_migration.c | |
+++ b/src/qemu/qemu_migration.c | |
@@ -2109,6 +2109,13 @@ | |
VIR_STRDUP(def->os.machine, "pc-1.0-precise") < 0) | |
goto cleanup; | |
} | |
+ if (STREQ_NULLABLE(vm->def->os.machine, "pc-i440fx-1.5")) { | |
+ VIR_FREE(vm->def->os.machine); | |
+ VIR_FREE(def->os.machine); | |
+ if (VIR_STRDUP(vm->def->os.machine, "pc-i440fx-1.5-saucy") < 0 || |
EXAMPLE: | |
(keystone-v3-setup.sh script will perform first few steps using role 'admin') | |
# Create a domain named d1 (note use of --os-url and --os-token to manage keystone) | |
anc@u128:~$ openstack --os-url http://u132.localdomain:5000/v3 --os-identity-api-version 3 --os-token=ADMIN domain create d1 | |
+---------+----------------------------------------------------------------------------------------+ | |
| Field | Value | | |
+---------+----------------------------------------------------------------------------------------+ |
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
output = {} | |
s_json = JSON.parse(Net::HTTP.get_response(URI.parse('http://localhost:8500/v1/catalog/services')).body) | |
services = s_json.keys.reject{|k| k == 'consul'} | |
services.each do |srv| |
Let's say you have a Bash shell script, and you need to run a series of operations on another system (such as via ssh). There are a couple of ways to do this.
First, you can stage a child script on the remote system, then call it, passing along appropriate parameters. The problem with this is you will need to manually keep the remote script updated whenever you change it -- could be a bit of a challenge when you have something to execute on a number of remote servers (i.e., you have a backup script running on a central host, and it needs to put remote databases in hot backup mode before backing them up).
Another option is to embed the commands you want to run remotely within the ssh command line. But then you run into issues with escaping special characters, quoting, etc. This is ok if you only have a couple commands to run, but if it is a complex piece of Bash code, it can get a bit unwieldy.
So, to solve this, you can use a technique called rpcsh -- rpc in shell script, as follows:
First, place th
OS_AUTH_URL=http://162.242.242.161:5000/v2.0/ | |
OS_REGION_NAME=RegionOne | |
OS_USERNAME=admin | |
OS_TENANT_NAME=admin | |
OS_PASSWORD=devstack | |
NET_NAME="test1-net" | |
IP_CIDR=192.168.0.0/24 | |
IP_START=192.168.0.10 | |
IP_END=192.168.0.20 |
#!/bin/bash | |
echo -n "loading ipv4 packet filter... " | |
### clear tables | |
iptables --flush | |
iptables --delete-chain | |
iptables --table mangle --flush | |
iptables --table mangle --delete-chain |
#!/usr/bin/env ruby | |
# | |
# this is a special meta-check. It runs ping checks against all hosts in | |
# the /endpoints API and sends individual results directly to sensu-client via | |
# the udp/3030 client socket. this is different from the normal sensu check model | |
# where individual scripts run and their exit status and output is used to create | |
# a single event. | |
# | |
# the reason for this check is to be able to dynamically ping a list of hosts | |
# without the race conditions and timing issues involved with creating individual |
#!/bin/bash | |
set -e | |
FETCHCOMMAND='wget -t 3 -T 5 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"' | |
RESUMECOMMAND='wget -c -t 3 -T 5 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"' | |
export FETCHCOMMAND RESUMECOMMAND | |
emerge --usepkg --buildpkg --update \ | |
app-emulation/qemu \ | |
net-misc/curl \ | |
sys-block/parted \ | |
sys-fs/multipath-tools |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 2"` |