PK RI caso-0.3.3/objects.inv# Sphinx inventory version 2
# Project: caso
# Version:
# The remainder of this file is compressed using zlib.
xKOKIP(.IILJQ5THe(+x\)XT$}SJsRS3P@Ġ!
S D1PK RIm$! caso-0.3.3/.buildinfo# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config:
tags:
PK RI@SSW SW caso-0.3.3/index.html
cASO is a pluggable extractor of Cloud Accounting Usage Records
from an OpenStack installation. cASO gets usage information from nova or
ceilometer APIs and can generate valid output for Apel SSM or logstash.
If you are planning to use cASO for generating accounting records for EGI,
you will need a valid APEL/SSM configuration. Follow the documentation
available at the EGI FedCloud wiki
The [DEFAULT] section configures the basic behavior of cASO. The sample
config file (/etc/caso/caso.conf.sample) includes a description
of every option. You should check at least the following options:
extractor (default value: nova), specifies which extractor to use for
getting the data. The following APIs are supported: ceilomenter and
nova. Both should generate equivalent information.
site_name (default value: <None>). Name of the site as defined in
GOCDB.
tenants (list value, default empty). List of the tenants to extract
records from.
messengers (list, default: caso.messenger.noop.NoopMessenger). List
of the messengers to publish data to. APEL messenger is:
caso.messenger.ssm.SsmMessager, LogStash is
caso.messenger.logstash.LogstashMessenger
This section specifies the configuration of the extractor (mainly the
credentials to connect to the API). Check the following:
user (default: accounting), name of the user. This user needs proper
permission to query the API for the tenant usages.
password (default: None), password of the user.
endpoint (default: None), keystone endpoint to authenticate with.
mapping_file (default: /etc/caso/voms.json). File containing the
mapping from VOs to local tenants as configured in Keystone-VOMS, in the
form:
{"VO":{"tenants":["foo","bar"],}}
insecure (default: False), wether to check or not the server’s
certificate.
Important
Your should not use insecure=True in production! If you get a SSL
error ( CERTIFICATE_VERIFY_FAILED), this is probably due to the fact
that the request module CA bundle does not contain the CA of your server.
If you are using the request module of your distribution package, it is
normally patched to use the system’s default CA bundle
(/etc/ssl/certs/ca-certificates.crt from the ca-certificates
package on Debian systems and /etc/pki/tls/certs/ca-bundle.crt from the
``ca-certificates``on RH systems). Check the packages documentation to add a
new CA to those bundles.
If you are not installing request through the distribution packages (e.g.
via pip), it uses its own vendorized CA bundle, located in the distribution
directory (i.e. requests/cacert.pem). It should be enough to append the
correct certificates to the end of the cacert.pem file. In a virtualenv,
the bundle should be located at
$VIRTUAL_ENV/lib/python2.7/site-packages/requests/
Options defined here configure the SSM messenger. There is only one option
at the moment:
output_path (default: /var/spool/apel/outgoing/openstack), directory
to put the generated SSM records. APEL/SSM should be configured to take
records from that directory.
The user configured in the previous section has to be a member of each of the
tenants (another option is to convert that user in an administrator, but the
former option is a safer approach) for which it is extracting the accounting.
Otherwise, cASO will not be able to get the usages and will fail:
keystone role-create --name accounting
keystone user-create --name accounting --pass <password>
# For each of the tenants, add the user with the accounting role
keystone user-role-add --user accounting --role accounting --tenant <tenant>
Also, this user needs access to Keystone so as to extract the users
information.
If you are using the V2 identity API, you have to give admin rights to the
accounting user, editing the /etc/keystone/policy.json file and
replacing the line:
"admin_required": "role:admin or is_admin:1 or",
with:
"admin_required": "role:admin or is_admin:1 or role:accounting",
If you are using the V3 identity API you can grant the user just the rights
for listing the users adding the appropriate rules in the
/etc/keystone/policy.json.
cASO provides the caso-extract command to generate new records from
your OpenStack deployment.
caso-extract-h will show a complete list of available arguments.
Use the --extract_from argument to specify the date from when the records
should be extracted. If no value is set, then cASO will extract the records
from the last run. If equal to “None”, then extract records from the beggining
of time. If not time zone is specified, UTC will be used.
Important
If you are running an OpenStack Nova version lower than Kilo there is a
bug in its API, making
impossible to paginate over deleted results.
Since nova is limiting the results to 1000 by default, if you are expecting
more than 1000 results you will get just the last 1000. This is important
if you are publishing data for the first time, or if you are republishing
all your accounting). If this is your case, adjust the osapi_max_limit to
a larger value in /etc/nova/nova.conf.
If you had a previous installation of osssm, you can migrate to cASO
following these steps:
Remove the previous osssm installation (e.g. remove apel-ssm-openstack rpm).
Remove any cron jobs related to osssm.extract or osssm.push, a single
cron job as described above is enough. You should keep the cron job that executes
ssmsend, this is still needed to send the records to the accounting database.
PK RITCŬI I ! caso-0.3.3/_static/searchtools.js/*
* searchtools.js_t
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
/**
* Search Module
*/
var Search = {
_index : null,
_queued_query : null,
_pulse_status : -1,
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null,
dataType: "script", cache: true,
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
},
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex : function() {
return this._index !== null;
},
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse : function() {
this._pulse_status = 0;
},
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
}
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch : function(query) {
// create the required interface elements
this.out = $('#search-results');
this.title = $('