Welcome to RAX-AutoScaler’s documentation!

RAX-AutoScaler use the rackspace APIs to allow for scaling based on aggregate metrics across a cluster. Can be used and installed on the auto-scale group members or on a dedicated management instance.



This function checks if file exists and is readable.

Parameters:fname – file name
Returns:file name with absolute path

This function prints error message and exit with error.

Parameters:msg – error message
Returns:1 (int) – the return code
common.get_auth_value(args, config, key)[source]
This function returns value associated with the key if its available in
user arguments else in json config file.
  • args – user arguments
  • config – json configuration data
  • key – key name

value associated with key


This function read and returns jsons configuration data

Parameters:config_file – json configuration file name
Returns:json data

This function instantiate the logger.


This function will search for the server’s UUID and return it.

First it searches in a rax-autoscaler cache, followed by cloud-init cache. If it cannot find a cached UUID, it will get the details of each server in the scaling group in turn and attempt to match the local IP address with that of the server object returned from the API

Parameters:scaling_group – raxas.scaling_group.ScalingGroup object
Returns:None if no UUID could be matched against a cache file or the API. UUID as a string

It gets Cloud server object by server_id


It checks if address is valid IP v4

class auth.Auth(username, apikey, region, identity_type='rackspace', token_filename='/home/docs/.rax-autoscaler-token')[source]

This class implements Rackspace cloud account authentication


This method loads a token from a file, authenticate with it, and if it fails then tries to authenticate with credentials

Returns:True or False (Boolean)

This method try to authenticate with available credentials

Returns:True or False (Boolean)

This authenticate with Rackspace cloud using existing token.

Returns:True or False (Boolean)

This unauthenticate and delete token file


This loads token from a file

Returns:True or False (Boolean)

This saves token to a file

Returns:True or False (Boolean)
static status()[source]

This queries pyrax for values

Returns:list – the return value

This returns token filename

class colouredconsolehandler.ColouredConsoleHandler(stream=None)[source]

console handler with ANSI colours support Usage example:

def white_bold_underlined(self, msg):
return self.decorate(self.BOLD + self.UNDERLINE +
self.COLOR[‘white’], msg)

ref: http://cwoebker.com/posts/ansi-escape-codes

Indices and tables


Copyright 2014 Rackspace US, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.