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 | |
set -euo pipefail | |
help() { | |
cat <<EOM >&2 | |
Usage: ${0} [-e staging] [-k APIKEY] [-p .] | |
-e env Choose the environment to submit to. Either "production" or "staging". Default: staging. | |
-k APIKEY Use the specified API key. Default: \${CONTENT_STORE_APIKEY}. |
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 os | |
import time | |
from libcloud.loadbalancer.types import State, Provider, MemberCondition | |
from libcloud.loadbalancer.providers import get_driver | |
username = os.environ['RACKSPACE_USERNAME'] | |
apikey = os.environ['RACKSPACE_APIKEY'] | |
region = os.environ['RACKSPACE_REGION'] |
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
// Updating the condition of an existing load balancer node with pkgcloud. | |
var pkgcloud = require('pkgcloud'); | |
var client = pkgcloud.loadbalancer.createClient({ | |
provider: 'rackspace', | |
username: process.env.RACKSPACE_USERNAME, | |
apiKey: process.env.RACKSPACE_APIKEY, | |
region: process.env.RACKSPACE_REGION | |
}); |
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
// User code: | |
// "Extract" still has return type "os.GetHeader, err" | |
c, err := containers.Get(client, "foo").Extract() | |
if err != nil { | |
if gophercloud.HasErrorCode(err, gophercloud.ErrNotFound) { | |
// ... | |
} |
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
--- | |
- name: Rackspace Cloud Monitoring test playbook | |
hosts: all | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: Entity | |
rax_mon_entity: | |
credentials: .credentials |
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/env ruby | |
require 'find' | |
def convert(path) | |
content = File.read(path) | |
ncontent = [] | |
line_no = 1 | |
in_req = false |
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 ( | |
"github.com/rackspace/gophercloud/openstack/compute/v2/servers" | |
bfw "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume" | |
dc "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig" | |
) | |
// 1. Base CreateOpts | |
baseOpts := servers.CreateOpts{ | |
Name: "servername", |
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
require 'pp' | |
storage = Fog::Storage.new( | |
provider: :rackspace, | |
rackspace_username: ENV['RAX_USERNAME'], | |
rackspace_api_key: ENV['RAX_API_KEY'], | |
rackspace_region: :dfw | |
) | |
d = storage.directories.get('big-container') |
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
# Assumptions: | |
# | |
# * After the merge is complete, the directory should exist in the target repository and not exist in the source | |
# repository. In other words, this is a move, not a cross-reference: we never want to be able to push commits | |
# back to the source repository, or merge further changes from the source repository. If you want to do that | |
# instead, a subtree merge is what you're looking for. | |
# | |
# * The directory doesn't exist in the target repository yet. | |
# | |
# In this example, we're moving the "/openstack-swift/" directory from jclouds/jclouds-labs-openstack to |
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
// This is a proposal for an alternative approach to client interactions with Gophercloud. | |
import ( | |
"time" | |
"github.com/rackspace/gophercloud" | |
"github.com/rackspace/gophercloud/rackspace" | |
) | |
// Provider adheres to a common gophercloud.Client interface. |