Merge lp:~hduran-8/juju-ci-tools/repository into lp:juju-ci-tools/repository

Proposed by Horacio Durán
Status: Merged
Merged at revision: 20
Proposed branch: lp:~hduran-8/juju-ci-tools/repository
Merge into: lp:juju-ci-tools/repository
Diff against target: 486 lines (+439/-0)
9 files modified
trusty/statusstresser/README.md (+52/-0)
trusty/statusstresser/copyright (+17/-0)
trusty/statusstresser/hooks/config-changed (+2/-0)
trusty/statusstresser/hooks/install (+3/-0)
trusty/statusstresser/icon.svg (+279/-0)
trusty/statusstresser/metadata.yaml (+7/-0)
trusty/statusstresser/revision (+1/-0)
trusty/statusstresser/tests/00-setup.sh (+7/-0)
trusty/statusstresser/tests/10-deploy-test.py (+71/-0)
To merge this branch: bzr merge lp:~hduran-8/juju-ci-tools/repository
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+262149@code.launchpad.net

Description of the change

statusstresser charm was added.

statusstresser charm is intended to use all possible features of status
now and in the upcoming update-status hook so we can stress test status
setting/getting including its interaction with leadership.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you. I will merge this.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'trusty/statusstresser'
2=== added file 'trusty/statusstresser/README.md'
3--- trusty/statusstresser/README.md 1970-01-01 00:00:00 +0000
4+++ trusty/statusstresser/README.md 2015-06-16 22:06:24 +0000
5@@ -0,0 +1,52 @@
6+# Overview
7+
8+This charm provides a blank [Ubuntu](http://ubuntu.com) image. It does not provide any services other than a blank cloud image for you to manage manually, it is intended for testing and development.
9+
10+# Usage
11+
12+Step by step instructions on using this charm:
13+
14+ juju deploy ubuntu
15+
16+You can then ssh to the instance with:
17+
18+ juju ssh ubuntu/0
19+
20+## Scale out Usage
21+
22+This charm is not designed to be used at scale since it does not have any relationships, however you can bulk add machines with `add-unit`:
23+
24+ juju add-unit ubuntu # Add one more
25+ juju add-unit -n5 ubuntu # Add 5 at a time
26+
27+
28+You can also alias names in order to organize a bunch of empty instances:
29+
30+ juju deploy ubuntu mytestmachine1
31+ juju deploy ubuntu mytestmachine2
32+
33+and so on.
34+
35+## Known Limitations and Issues
36+
37+This charm does not provide anything other than a blank server, so it does not relate to other charms.
38+
39+# Configuration
40+
41+This charm has no configuration options.
42+
43+# Contact Information
44+
45+
46+## Upstream Project Name
47+
48+- [Ubuntu](http://ubuntu.com)
49+- [Bug tracker](http://bugs.launchpad.net/ubuntu)
50+- [Ubuntu Server Mailing list](https://lists.ubuntu.com/archives/ubuntu-server/)
51+
52+## Charm Contact Information
53+
54+- Author: Juju Charm Community
55+- Report bugs at: [http://bugs.launchpad.net/charms/+source/ubuntu](http://bugs.launchpad.net/charms/+source/ubuntu)
56+- Location: [http://jujucharms.com/charms/precise/ubuntu](http://jujucharms.com/charms/precise/ubuntu)
57+
58
59=== added file 'trusty/statusstresser/copyright'
60--- trusty/statusstresser/copyright 1970-01-01 00:00:00 +0000
61+++ trusty/statusstresser/copyright 2015-06-16 22:06:24 +0000
62@@ -0,0 +1,17 @@
63+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
64+
65+Files: *
66+Copyright: Copyright 2012, Canonical Ltd., All Rights Reserved.
67+License: GPL-3
68+ This program is free software: you can redistribute it and/or modify
69+ it under the terms of the GNU General Public License as published by
70+ the Free Software Foundation, either version 3 of the License, or
71+ (at your option) any later version.
72+ .
73+ This program is distributed in the hope that it will be useful,
74+ but WITHOUT ANY WARRANTY; without even the implied warranty of
75+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76+ GNU General Public License for more details.
77+ .
78+ You should have received a copy of the GNU General Public License
79+ along with this program. If not, see <http://www.gnu.org/licenses/>.
80
81=== added directory 'trusty/statusstresser/hooks'
82=== added file 'trusty/statusstresser/hooks/config-changed'
83--- trusty/statusstresser/hooks/config-changed 1970-01-01 00:00:00 +0000
84+++ trusty/statusstresser/hooks/config-changed 2015-06-16 22:06:24 +0000
85@@ -0,0 +1,2 @@
86+#!/bin/bash
87+status-set "active" "called in config-changed hook"
88
89=== added file 'trusty/statusstresser/hooks/install'
90--- trusty/statusstresser/hooks/install 1970-01-01 00:00:00 +0000
91+++ trusty/statusstresser/hooks/install 2015-06-16 22:06:24 +0000
92@@ -0,0 +1,3 @@
93+#!/bin/bash
94+# Does nothing. - charm proof requires an install hook.
95+status-set "active" "called in install hook"
96
97=== added file 'trusty/statusstresser/icon.svg'
98--- trusty/statusstresser/icon.svg 1970-01-01 00:00:00 +0000
99+++ trusty/statusstresser/icon.svg 2015-06-16 22:06:24 +0000
100@@ -0,0 +1,279 @@
101+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
102+<!-- Created with Inkscape (http://www.inkscape.org/) -->
103+
104+<svg
105+ xmlns:dc="http://purl.org/dc/elements/1.1/"
106+ xmlns:cc="http://creativecommons.org/ns#"
107+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
108+ xmlns:svg="http://www.w3.org/2000/svg"
109+ xmlns="http://www.w3.org/2000/svg"
110+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
111+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
112+ width="96"
113+ height="96"
114+ id="svg6517"
115+ version="1.1"
116+ inkscape:version="0.48.4 r9939"
117+ sodipodi:docname="icon.svg">
118+ <defs
119+ id="defs6519">
120+ <linearGradient
121+ id="Background">
122+ <stop
123+ id="stop4178"
124+ offset="0"
125+ style="stop-color:#b8b8b8;stop-opacity:1" />
126+ <stop
127+ id="stop4180"
128+ offset="1"
129+ style="stop-color:#c9c9c9;stop-opacity:1" />
130+ </linearGradient>
131+ <filter
132+ style="color-interpolation-filters:sRGB;"
133+ inkscape:label="Inner Shadow"
134+ id="filter1121">
135+ <feFlood
136+ flood-opacity="0.59999999999999998"
137+ flood-color="rgb(0,0,0)"
138+ result="flood"
139+ id="feFlood1123" />
140+ <feComposite
141+ in="flood"
142+ in2="SourceGraphic"
143+ operator="out"
144+ result="composite1"
145+ id="feComposite1125" />
146+ <feGaussianBlur
147+ in="composite1"
148+ stdDeviation="1"
149+ result="blur"
150+ id="feGaussianBlur1127" />
151+ <feOffset
152+ dx="0"
153+ dy="2"
154+ result="offset"
155+ id="feOffset1129" />
156+ <feComposite
157+ in="offset"
158+ in2="SourceGraphic"
159+ operator="atop"
160+ result="composite2"
161+ id="feComposite1131" />
162+ </filter>
163+ <filter
164+ style="color-interpolation-filters:sRGB;"
165+ inkscape:label="Drop Shadow"
166+ id="filter950">
167+ <feFlood
168+ flood-opacity="0.25"
169+ flood-color="rgb(0,0,0)"
170+ result="flood"
171+ id="feFlood952" />
172+ <feComposite
173+ in="flood"
174+ in2="SourceGraphic"
175+ operator="in"
176+ result="composite1"
177+ id="feComposite954" />
178+ <feGaussianBlur
179+ in="composite1"
180+ stdDeviation="1"
181+ result="blur"
182+ id="feGaussianBlur956" />
183+ <feOffset
184+ dx="0"
185+ dy="1"
186+ result="offset"
187+ id="feOffset958" />
188+ <feComposite
189+ in="SourceGraphic"
190+ in2="offset"
191+ operator="over"
192+ result="composite2"
193+ id="feComposite960" />
194+ </filter>
195+ <clipPath
196+ clipPathUnits="userSpaceOnUse"
197+ id="clipPath873">
198+ <g
199+ transform="matrix(0,-0.66666667,0.66604479,0,-258.25992,677.00001)"
200+ id="g875"
201+ inkscape:label="Layer 1"
202+ style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline">
203+ <path
204+ style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline"
205+ d="m 46.702703,898.22775 50.594594,0 C 138.16216,898.22775 144,904.06497 144,944.92583 l 0,50.73846 c 0,40.86071 -5.83784,46.69791 -46.702703,46.69791 l -50.594594,0 C 5.8378378,1042.3622 0,1036.525 0,995.66429 L 0,944.92583 C 0,904.06497 5.8378378,898.22775 46.702703,898.22775 Z"
206+ id="path877"
207+ inkscape:connector-curvature="0"
208+ sodipodi:nodetypes="sssssssss" />
209+ </g>
210+ </clipPath>
211+ <filter
212+ inkscape:collect="always"
213+ id="filter891"
214+ inkscape:label="Badge Shadow">
215+ <feGaussianBlur
216+ inkscape:collect="always"
217+ stdDeviation="0.71999962"
218+ id="feGaussianBlur893" />
219+ </filter>
220+ </defs>
221+ <sodipodi:namedview
222+ id="base"
223+ pagecolor="#ffffff"
224+ bordercolor="#666666"
225+ borderopacity="1.0"
226+ inkscape:pageopacity="0.0"
227+ inkscape:pageshadow="2"
228+ inkscape:zoom="4.0745362"
229+ inkscape:cx="-28.607257"
230+ inkscape:cy="88.286442"
231+ inkscape:document-units="px"
232+ inkscape:current-layer="layer3"
233+ showgrid="true"
234+ fit-margin-top="0"
235+ fit-margin-left="0"
236+ fit-margin-right="0"
237+ fit-margin-bottom="0"
238+ inkscape:window-width="1680"
239+ inkscape:window-height="1026"
240+ inkscape:window-x="1920"
241+ inkscape:window-y="24"
242+ inkscape:window-maximized="1"
243+ showborder="true"
244+ showguides="true"
245+ inkscape:guide-bbox="true"
246+ inkscape:showpageshadow="false">
247+ <inkscape:grid
248+ type="xygrid"
249+ id="grid821" />
250+ <sodipodi:guide
251+ orientation="1,0"
252+ position="16,48"
253+ id="guide823" />
254+ <sodipodi:guide
255+ orientation="0,1"
256+ position="64,80"
257+ id="guide825" />
258+ <sodipodi:guide
259+ orientation="1,0"
260+ position="80,40"
261+ id="guide827" />
262+ <sodipodi:guide
263+ orientation="0,1"
264+ position="64,16"
265+ id="guide829" />
266+ </sodipodi:namedview>
267+ <metadata
268+ id="metadata6522">
269+ <rdf:RDF>
270+ <cc:Work
271+ rdf:about="">
272+ <dc:format>image/svg+xml</dc:format>
273+ <dc:type
274+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
275+ <dc:title></dc:title>
276+ </cc:Work>
277+ </rdf:RDF>
278+ </metadata>
279+ <g
280+ inkscape:label="BACKGROUND"
281+ inkscape:groupmode="layer"
282+ id="layer1"
283+ transform="translate(268,-635.29076)"
284+ style="display:inline">
285+ <path
286+ style="fill:#ffffff;fill-opacity:1;stroke:none;display:inline;filter:url(#filter1121)"
287+ d="m -268,700.15563 0,-33.72973 c 0,-27.24324 3.88785,-31.13513 31.10302,-31.13513 l 33.79408,0 c 27.21507,0 31.1029,3.89189 31.1029,31.13513 l 0,33.72973 c 0,27.24325 -3.88783,31.13514 -31.1029,31.13514 l -33.79408,0 C -264.11215,731.29077 -268,727.39888 -268,700.15563 Z"
288+ id="path6455"
289+ inkscape:connector-curvature="0"
290+ sodipodi:nodetypes="sssssssss" />
291+ </g>
292+ <g
293+ inkscape:groupmode="layer"
294+ id="layer3"
295+ inkscape:label="PLACE YOUR PICTOGRAM HERE"
296+ style="display:inline">
297+ <path
298+ style="fill:#dd4814"
299+ inkscape:connector-curvature="0"
300+ d="m 80.02465,48.074075 c 0,17.686843 -14.339141,32.025811 -32.0271,32.025811 -17.687958,0 -32.026421,-14.338743 -32.026421,-32.025811 0,-17.688199 14.338241,-32.026715 32.026195,-32.026715 17.68796,0 32.027326,14.338516 32.027326,32.026715 z"
301+ id="path4010" />
302+ <path
303+ style="fill:#ffffff"
304+ inkscape:connector-curvature="0"
305+ d="m 26.220054,43.798393 c -2.362021,0 -4.275962,1.913911 -4.275962,4.275907 0,2.361093 1.913941,4.275231 4.275962,4.275231 2.361119,0 4.275282,-1.914138 4.275282,-4.275231 0,-2.362222 -1.913941,-4.275907 -4.275282,-4.275907 z m 30.529623,19.433315 c -2.045225,1.18066 -2.745267,3.794605 -1.565046,5.838898 1.1809,2.045195 3.794652,2.745681 5.839872,1.565023 2.044543,-1.180434 2.74504,-3.79438 1.564365,-5.839349 -1.180448,-2.044293 -3.794653,-2.745006 -5.839191,-1.564572 z M 35.507719,48.073623 c 0,-4.225745 2.099906,-7.958209 5.311109,-10.218297 l -3.126015,-5.236253 c -3.742,2.500061 -6.52546,6.322008 -7.681724,10.798345 1.350601,1.100895 2.213568,2.777317 2.213568,4.656657 0,1.878886 -0.862967,3.55531 -2.21379,4.655978 1.156042,4.47679 3.93971,8.298736 7.681724,10.798571 L 40.818828,58.29192 C 37.607625,56.032284 35.507719,52.300044 35.507719,48.073623 z M 47.998001,35.583488 c 6.525227,0 11.877689,5.003059 12.438766,11.382461 l 6.093858,-0.08903 c -0.29986,-4.709984 -2.357282,-8.939569 -5.519227,-12.048149 -1.625601,0.614168 -3.503606,0.521072 -5.126722,-0.416225 -1.625149,-0.938201 -2.644935,-2.52085 -2.924231,-4.238398 -1.579953,-0.437239 -3.242841,-0.67563 -4.962218,-0.67563 -2.956999,0 -5.750608,0.694159 -8.232178,1.9234 l 2.970551,5.323701 c 1.599166,-0.744098 3.381133,-1.162131 5.261401,-1.162131 z m 0,24.980495 c -1.88049,0 -3.662235,-0.418033 -5.261623,-1.162131 l -2.971009,5.324152 c 2.481792,1.22879 5.275637,1.923176 8.232632,1.923176 1.719377,0 3.382263,-0.238391 4.962444,-0.67563 0.279296,-1.71755 1.299306,-3.300198 2.924683,-4.239076 1.623114,-0.936846 3.501122,-1.029942 5.126723,-0.415548 3.16172,-3.108806 5.219142,-7.338391 5.518545,-12.048375 l -6.093857,-0.08903 c -0.560621,6.380306 -5.913311,11.382461 -12.438538,11.382461 z m 8.750994,-27.648671 c 2.044997,1.18111 4.6592,0.480398 5.83942,-1.563894 1.1809,-2.045197 0.480858,-4.659142 -1.564362,-5.840027 -2.04477,-1.180434 -4.658747,-0.479947 -5.839647,1.565249 -1.180448,2.044291 -0.479954,4.658463 1.564589,5.838672 z"
306+ id="path4012" />
307+ </g>
308+ <g
309+ inkscape:groupmode="layer"
310+ id="layer2"
311+ inkscape:label="BADGE"
312+ style="display:none"
313+ sodipodi:insensitive="true">
314+ <g
315+ style="display:inline"
316+ transform="translate(-340.00001,-581)"
317+ id="g4394"
318+ clip-path="none">
319+ <g
320+ id="g855">
321+ <g
322+ inkscape:groupmode="maskhelper"
323+ id="g870"
324+ clip-path="url(#clipPath873)"
325+ style="opacity:0.6;filter:url(#filter891)">
326+ <path
327+ transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-237.54282)"
328+ d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
329+ sodipodi:ry="12"
330+ sodipodi:rx="12"
331+ sodipodi:cy="552.36218"
332+ sodipodi:cx="252"
333+ id="path844"
334+ style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
335+ sodipodi:type="arc" />
336+ </g>
337+ <g
338+ id="g862">
339+ <path
340+ sodipodi:type="arc"
341+ style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
342+ id="path4398"
343+ sodipodi:cx="252"
344+ sodipodi:cy="552.36218"
345+ sodipodi:rx="12"
346+ sodipodi:ry="12"
347+ d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
348+ transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-238.54282)" />
349+ <path
350+ transform="matrix(1.25,0,0,1.25,33,-100.45273)"
351+ d="m 264,552.36218 c 0,6.62742 -5.37258,12 -12,12 -6.62742,0 -12,-5.37258 -12,-12 0,-6.62741 5.37258,-12 12,-12 6.62742,0 12,5.37259 12,12 z"
352+ sodipodi:ry="12"
353+ sodipodi:rx="12"
354+ sodipodi:cy="552.36218"
355+ sodipodi:cx="252"
356+ id="path4400"
357+ style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
358+ sodipodi:type="arc" />
359+ <path
360+ sodipodi:type="star"
361+ style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
362+ id="path4459"
363+ sodipodi:sides="5"
364+ sodipodi:cx="666.19574"
365+ sodipodi:cy="589.50385"
366+ sodipodi:r1="7.2431178"
367+ sodipodi:r2="4.3458705"
368+ sodipodi:arg1="1.0471976"
369+ sodipodi:arg2="1.6755161"
370+ inkscape:flatsided="false"
371+ inkscape:rounded="0.1"
372+ inkscape:randomized="0"
373+ d="m 669.8173,595.77657 c -0.39132,0.22593 -3.62645,-1.90343 -4.07583,-1.95066 -0.44938,-0.0472 -4.05653,1.36297 -4.39232,1.06062 -0.3358,-0.30235 0.68963,-4.03715 0.59569,-4.47913 -0.0939,-0.44198 -2.5498,-3.43681 -2.36602,-3.8496 0.18379,-0.41279 4.05267,-0.59166 4.44398,-0.81759 0.39132,-0.22593 2.48067,-3.48704 2.93005,-3.4398 0.44938,0.0472 1.81505,3.67147 2.15084,3.97382 0.3358,0.30236 4.08294,1.2817 4.17689,1.72369 0.0939,0.44198 -2.9309,2.86076 -3.11469,3.27355 -0.18379,0.41279 0.0427,4.27917 -0.34859,4.5051 z"
374+ transform="matrix(1.511423,-0.16366377,0.16366377,1.511423,-755.37346,-191.93651)" />
375+ </g>
376+ </g>
377+ </g>
378+ </g>
379+</svg>
380
381=== added file 'trusty/statusstresser/metadata.yaml'
382--- trusty/statusstresser/metadata.yaml 1970-01-01 00:00:00 +0000
383+++ trusty/statusstresser/metadata.yaml 2015-06-16 22:06:24 +0000
384@@ -0,0 +1,7 @@
385+name: statusstresser
386+summary: A pristine Ubuntu Server that has a lot of status calls
387+maintainer: Charmers <juju@lists.ubuntu.com>
388+description: |
389+ This simply deploys Ubuntu Server calling a lot of set-status in the hooks.
390+categories:
391+ - misc
392
393=== added file 'trusty/statusstresser/revision'
394--- trusty/statusstresser/revision 1970-01-01 00:00:00 +0000
395+++ trusty/statusstresser/revision 2015-06-16 22:06:24 +0000
396@@ -0,0 +1,1 @@
397+1
398
399=== added directory 'trusty/statusstresser/tests'
400=== added file 'trusty/statusstresser/tests/00-setup.sh'
401--- trusty/statusstresser/tests/00-setup.sh 1970-01-01 00:00:00 +0000
402+++ trusty/statusstresser/tests/00-setup.sh 2015-06-16 22:06:24 +0000
403@@ -0,0 +1,7 @@
404+#!/bin/sh
405+
406+# Install Amulet testing harness as it is not on the
407+# default cloud image. Amulet should pull in its dependencies.
408+sudo add-apt-repository -y ppa:juju/stable
409+sudo apt-get update
410+sudo apt-get install -y amulet
411
412=== added file 'trusty/statusstresser/tests/10-deploy-test.py'
413--- trusty/statusstresser/tests/10-deploy-test.py 1970-01-01 00:00:00 +0000
414+++ trusty/statusstresser/tests/10-deploy-test.py 2015-06-16 22:06:24 +0000
415@@ -0,0 +1,71 @@
416+#!/usr/bin/python3
417+
418+# This Amulet based tests
419+# The goal is to ensure the Ubuntu charm
420+# sucessfully deploys and can be accessed.
421+# Note the Ubuntu charm does not have any
422+# relations or config options.
423+
424+import amulet
425+#import os
426+#import requests
427+
428+# Timeout value, in seconds to deploy the environment
429+seconds = 900
430+
431+# Set up the deployer module to interact and set up the environment.
432+d = amulet.Deployment()
433+
434+# Define the environment in terms of charms, their config, and relations.
435+
436+# Add the Ubuntu charm to the deployment.
437+d.add('ubuntu')
438+
439+# Deploy the environment currently defined
440+try:
441+ # Wait the defined about amount of time to deploy the environment.
442+ # Setup makes sure the services are deployed, related, and in a
443+ # "started" state.
444+ d.setup(timeout=seconds)
445+ # Use a sentry to ensure there are no remaining hooks being execute
446+ # on any of the nodes
447+## d.sentry.wait()
448+except amulet.helpers.TimeoutError:
449+ # Pending the configuration the test will fail or be skipped
450+ # if not deployed properly.
451+ error_message = 'The environment did not deploy in %d seconds.' % seconds
452+ amulet.raise_status(amulet.SKIP, msg=error_message)
453+except:
454+ # Something else has gone wrong, raise the error so we can see it and this
455+ # will automatically "FAIL" the test.
456+ raise
457+
458+# Access the Ubuntu instance to ensure it has been deployed correctly
459+
460+# Define the commands to be ran
461+lsb_release_command = 'cat /etc/lsb-release'
462+uname_command = 'uname -a'
463+
464+# Cat the release information
465+output, code = d.sentry.unit['ubuntu/0'].run(lsb_release_command)
466+# Confirm the lsb-release command was ran successfully
467+if (code != 0):
468+ error_message = 'The ' + lsb_release_command + ' did not return the expected return code of 0.'
469+ print(output)
470+ amulet.raise_status(amulet.FAIL, msg=error_message)
471+else:
472+ message = 'The lsb-release command successfully executed.'
473+ print(output)
474+ print(message)
475+
476+# Get the uname -a output
477+output, code = d.sentry.unit['ubuntu/0'].run(uname_command)
478+# Confirm the uname command was ran successfully
479+if (code != 0):
480+ error_message = 'The ' + uname_command + ' did not return the expected return code of 0.'
481+ print(output)
482+ amulet.raise_status(amulet.FAIL, msg=error_message)
483+else:
484+ message = 'The uname command successfully executed.'
485+ print(output)
486+ print(message)

Subscribers

People subscribed via source and target branches