Merge "Misc cleanpu, removed unmaintained tests and unused chef bits"

This commit is contained in:
Jenkins 2014-12-03 15:20:13 +00:00 committed by Gerrit Code Review
commit ab85b6291e
13 changed files with 3 additions and 353 deletions

View File

@ -1,14 +0,0 @@
{
"id" : "agent_plugin_config",
"mysql": {
"user": "root",
"password": "pass"
},
"rabbitmq": {
"user": "guest",
"password": "pass",
"nodes": "rabbit@devstack",
"queues": "conductor",
"exchanges": "nova,cinder,ceilometer,glance,keystone,neutron,heat,ironic,openstack"
}
}

View File

@ -42,6 +42,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.cpus = 4
end
ds.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.roles_path = "roles"
chef.add_role "Devstack-Build"
chef.arguments = '--force-formatter'

View File

@ -1,8 +1,3 @@
# Test notifications
- The api is currently rejecting alarms with no action specified, so expect an error defining that alarm.
- Setup alarms and Notifications
- run ./alarm_notification.py -e me@hp.com
- Run the jmeter tests
- `jmeter -t notification-jmeter.jmx &`
- The config is saved for a basic test that should create a notification on alarm and a hundred non-notification alarms. Change the thread
loop counts to try different combinations.
- run smoke.py from within the mini-mon vm for a full test of Monasca
- env.sh can be sourced to set the proper env for using the python-monascaclient

View File

@ -1,6 +0,0 @@
{
"description": "mini-mon cpu alarm",
"name": "compute.cpu",
"expression": "compute.cpu{hostname=vertica} >= 90",
"alarm_actions": [ ]
}

View File

@ -1,14 +0,0 @@
{
"description": "mini-mon cpu alarm",
"name": "compute.cpu",
"expression": "compute.cpu{hostname=kafka} >= 90",
"alarm_actions": [
"%s"
],
"ok_actions": [
"%s"
],
"undetermined_actions": [
"%s"
]
}

View File

@ -1,58 +0,0 @@
#!/usr/bin/env python
#
"""alarm_notification_setup
Sets up test alarms and notifications using the mon-api. Assumes the mini-mon setup.
"""
import argparse
from glob import glob
import httplib
import json
import sys
API_HOST = '192.168.10.4'
API_PORT = '8080'
HEADERS = {"Content-Type": "application/json",
"Accept": "application/json",
"X-Tenant-Id": "1"}
def post(conn, url, body):
conn.request("POST", url, body, HEADERS)
http_response = conn.getresponse()
response = http_response.read()
if http_response.status < 200 or http_response.status > 300:
print("\tError %d response: %s" % (http_response.status, response))
return response
def main():
parser = argparse.ArgumentParser(description='Setup Alarms and Notification via the api. Assumes mini-mon')
parser.add_argument('--email', '-e', required=True)
args = parser.parse_args()
conn = httplib.HTTPConnection(API_HOST, API_PORT)
with open('notification.json', 'r') as notification_file:
notification_json = notification_file.read() % args.email
print('Adding email notification.')
response = post(conn, '/v2.0/notification-methods', notification_json)
response_json = json.loads(response)
notification_method_id = response_json['id']
# Alarms with notification
for path in glob('alarms/*.json'):
with open(path, 'r') as alarm_file:
alarm_json = alarm_file.read() % (notification_method_id, notification_method_id, notification_method_id)
print('Adding Alarm %s' % path)
post(conn, '/v2.0/alarms', alarm_json)
# Alarms without notification
for path in glob('alarms-no-notification/*.json'):
print('Adding Alarm %s' % path)
with open(path, 'r') as alarm_file:
post(conn, '/v2.0/alarms', alarm_file.read())
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.5" jmeter="2.10 r1533061">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Mini-mon notification test" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">X-Tenant-Id</stringProp>
<stringProp name="Header.value">1</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">192.168.10.4</stringProp>
<stringProp name="HTTPSampler.port">8080</stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
</ConfigTestElement>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">1395693961000</longProp>
<longProp name="ThreadGroup.end_time">1395693961000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Notification Loop" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</LoopController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CPU Alarm metric" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&#xd;
&quot;name&quot;: &quot;compute.cpu&quot;,&#xd;
&quot;dimensions&quot;: {&#xd;
&quot;hostname&quot;: &quot;kafka&quot;&#xd;
},&#xd;
&quot;timestamp&quot;: &quot;${__javaScript(int(new Date().getTime()/1000);)}&quot;,&#xd;
&quot;value&quot;: &quot;95.0&quot;&#xd;
}&#xd;
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/v2.0/metrics</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
</ConstantTimer>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CPU Ok metric" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&#xd;
&quot;name&quot;: &quot;compute.cpu&quot;,&#xd;
&quot;dimensions&quot;: {&#xd;
&quot;hostname&quot;: &quot;kafka&quot;&#xd;
},&#xd;
&quot;timestamp&quot;: &quot;${__javaScript(int(new Date().getTime()/1000);)}&quot;,&#xd;
&quot;value&quot;: &quot;50.0&quot;&#xd;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/v2.0/metrics</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="No Notification Loop" enabled="false">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">100</stringProp>
</LoopController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CPU Alarm metric" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&#xd;
&quot;name&quot;: &quot;compute.cpu&quot;,&#xd;
&quot;dimensions&quot;: {&#xd;
&quot;hostname&quot;: &quot;vertica&quot;&#xd;
},&#xd;
&quot;timestamp&quot;: &quot;${__javaScript(int(new Date().getTime()/1000);)}&quot;,&#xd;
&quot;value&quot;: &quot;95.0&quot;&#xd;
}&#xd;
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/v2.0/metrics</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CPU Ok metric" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&#xd;
&quot;name&quot;: &quot;compute.cpu&quot;,&#xd;
&quot;dimensions&quot;: {&#xd;
&quot;hostname&quot;: &quot;vertica&quot;&#xd;
},&#xd;
&quot;timestamp&quot;: &quot;${__javaScript(int(new Date().getTime()/1000);)}&quot;,&#xd;
&quot;value&quot;: &quot;50.0&quot;&#xd;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/v2.0/metrics</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan>

View File

@ -1,5 +0,0 @@
{
"name": "mini-mon test",
"type": "EMAIL",
"address": "%s"
}