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.
- GitHub repository: https://github.com/boxidau/rax-autoscaler
- PyPI package: https://pypi.python.org/pypi/rax-autoscaler
- Stories in Ready: https://badge.waffle.io/boxidau/rax-autoscaler.svg?label=ready&title=Ready)](http://waffle.io/boxidau/rax-autoscaler
Contents:
- common.check_file(fname)[source]¶
This function checks if file exists and is readable.
Parameters: fname – file name Returns: file name with absolute path
- common.exit_with_error(msg)[source]¶
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.
Parameters: - args – user arguments
- config – json configuration data
- key – key name
Returns: value associated with key
- common.get_config(config_file)[source]¶
This function read and returns jsons configuration data
Parameters: config_file – json configuration file name Returns: json data
- common.get_machine_uuid(scaling_group)[source]¶
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
- class auth.Auth(username, apikey, region, identity_type='rackspace', token_filename='/home/docs/.rax-autoscaler-token')[source]¶
This class implements Rackspace cloud account authentication
- authenticate()[source]¶
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)
- authenticate_credentials()[source]¶
This method try to authenticate with available credentials
Returns: True or False (Boolean)
Indices and tables¶
License¶
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.