36 Commits

Author SHA1 Message Date
Mark Hamzy
57160823d4 Start testing the example usage for CI: test_hook_mi_ipmiblob.py
test_hook_mi_ipmiblob.py is the provided sample for a CI team to
use to allocate a MoltenIron instance before running tests.

Change-Id: I217b8e3ba14cb3c4358d71be40ad9ca80aca32e1
2016-12-16 10:48:22 -06:00
Mark Hamzy
06277f2de9 createDB.py should live under utils
Change-Id: I4aebcf46cb620833749952d9ac516b7d0c3147c7
2016-11-27 15:43:34 -06:00
Jenkins
e6c743573b Merge "Add some more debugging to Database:__init__" 2016-11-14 16:57:35 +00:00
Jenkins
3bb1283829 Merge "Fix clean installation README.rst documentation" 2016-11-14 14:07:39 +00:00
Mark Hamzy
c17149fa65 Provide a script to setup MoltenIron on a clean Ubuntu 16.04
Change-Id: I262a1ba2d8b854b4a52cd8f182f0a05cc5ce904a
2016-11-13 16:39:45 -06:00
Mark Hamzy
ffb2c3380f Add some more debugging to Database:__init__
Preserve some history as to why this code is like what it is.

Change-Id: I49e023348996a1ebdf46aeda030511e92efc6223
2016-11-09 16:26:34 -06:00
Mark Hamzy
354018451a Fix clean installation README.rst documentation
Change-Id: I23ecc9f7ac8beeeb80ced2e006975252744ec266
2016-11-09 14:35:03 -06:00
Mark Hamzy
5f009133dd Fix Python3's sending bytes versus strings
Change-Id: Ie2557766ad110c1a3fb4721e902a41aa88cd7272
2016-11-08 13:21:55 -06:00
Tony Breeds
caa3cb7710 [WiP] Switch to PyMySQL
I couldn't get the tests to run locally so wasting gate resources

Change-Id: I983a2d3788fade3fef67feaa94c29b02dfbdf8c0
2016-11-08 12:53:35 -06:00
Mark Hamzy
952d4b133f Switch to using a blob of JSON encoded data
- ipmi_user VARCHAR(50),
- ipmi_password VARCHAR(50),
- port_hwaddr VARCHAR(50),
- cpu_arch VARCHAR(50),
- cpus INTEGER,
- ram_mb INTEGER,
- disk_gb INTEGER,
+ blob VARCHAR(2000),

Change-Id: I7a329d8137f877f111213af4332f50b1d8ff7295
2016-11-03 12:08:12 -05:00
Mark Hamzy
24bf07c892 Fix --output=json so that it prints out JSON
The program was actually printing out a Python map variable
instead.

Change-Id: I6802bdac30a915f9643164fe6bbb5136844900e7
2016-11-01 14:00:34 -05:00
Mark Hamzy
dfe2cf5496 Add help text to the subcommands
Change-Id: I87957673436c2249fa7523aa89796d32aa5eb3ce
2016-10-30 14:28:30 -05:00
Mark Hamzy
9952754ce4 Add result parameter which will only printout the result contents
Change-Id: Ia033695472de42a1808bbecd2183ef790e6548f6
2016-10-30 13:44:05 -05:00
Mark Hamzy
f6be130863 Add type parameter for the status command
Where type can be human (the default) or csv

Change-Id: I35f8944bced8ba85972a66a31ac98d04bd3aa984
2016-10-30 13:18:38 -05:00
Mark Hamzy
fd5aec447c Update documentation for how to configure your machine for a clean install
Change-Id: I6e19c8cce8a28ffe2445f6e4fcf1857a994922b3
2016-10-29 19:35:15 -05:00
Mark Hamzy
7d7dc9bda1 Update CI usage sample to use the new repo and changes
Change-Id: If955a01d57ddbbaf14a9130fec1d88f2b2e83721
2016-10-28 16:04:51 -05:00
Mark Hamzy
538cc1d5d8 Don't use letter and ) in table
It turns into a list

Change-Id: Ia58e96e788b520baf2925b99a778f524cbda8eb1
2016-10-28 10:30:51 -05:00
Mark Hamzy
93f275a7a6 Fix up the tables and one example
Change-Id: Icda00a84c8c10f24615616fedcb63c96c1e10be1
2016-10-28 10:18:09 -05:00
Mark Hamzy
c6e60848aa Use RST document coding conventions
Change-Id: I98f8b006a614b827129d41ae808efb6ccced716b
2016-10-28 09:53:32 -05:00
Mark Hamzy
512fa17501 Enable testcases
Change-Id: I6db9f7ee5e0f2d65c96974d52f887302b4727bc3
2016-10-28 07:44:13 -05:00
Mark Hamzy
7efb4ae83a Even more pep8 fixes that the gate is catching
Change-Id: I825621d82bdc4e30a024b639f34e8be0d8593c17
2016-10-27 12:08:57 -05:00
Mark Hamzy
0b641d436e Support both Python 2.x and Python 3.x
Change-Id: If2b02553859345a4322e0a2fd56ce1f7436c08ca
2016-10-27 10:45:29 -05:00
Mark Hamzy
d9afc4be46 Add files that were created running Python's cookiecutter program
Change-Id: Iac06fc379d11972601c362619b0d02e7839449d5
2016-10-27 10:18:47 -05:00
Mark Hamzy
ae3df717de Fix PEP8 issues
Change-Id: I6cfebccba269c21e752307966093cfb216b81c2c
2016-10-25 09:28:39 -05:00
Mark Hamzy
cf0635f306 Fix command line help
Setting up Python's argument parser was broken here.  Everything
needed rewriting...

Change-Id: I210cc1217bfa6ffd74c89974d0587934a9e1a726
2016-10-24 19:57:23 -05:00
Mark Hamzy
af2b0c097f Create _setup_response()
This function will move http and json processing into a new
function done on demand after class initialization.

Change-Id: Ibf57f1e23912f7878287c6f85efd9ea93c7f13a1
2016-10-24 19:45:11 -05:00
Jenkins
93ca5b19a3 Merge "Add .gitreview file" 2016-10-25 00:33:58 +00:00
Mark Hamzy
707f272eb8 Add more debugging when moltenirond-helper fails
Added custom Exception classes and raised them in get_moltenirond_pid.

Added log_error to log to stderr and a logfile
called /tmp/MoltenIron-error-logfile.

Change-Id: I2855cf832c2a1a8f5ef9df34cf96706eb5406276
2016-10-24 14:07:19 -05:00
Mark Hamzy
8f4f0a8f37 Add .gitreview file
Change-Id: I729304ceb4313b9b80317d2d21280dc17c7c6270
2016-10-21 13:28:39 +00:00
Mark Hamzy
eadfe8ec0f Add missing tox environments
This is needed for pep8 and docs gates.

Change-Id: I3114c9a28e3dc459489f24f0d6d4d47f53fbc4ac
2016-10-21 08:16:39 -05:00
Mark Hamzy
7ccb031845 Fix log directory handling 2016-10-19 14:33:06 -05:00
Mark Hamzy
b7b4678183 Add Continuous Integration (CI) example
Add an example of how to use Molten Iron inside of a
Continuous Integration environment.

Change-Id: If4e2bc50ae475bf77d7fd933ae253e1439cb758d
2016-10-13 10:28:40 -05:00
Mark Hamzy
7ead3dd0ef Add a bunch of new testcases for molteniron
Add tests for adding a BM node, for allocating a BM node, for
culling BM nodes, for deallocating a BM node, for deallocating
a node's owner, for cleaning the database, for getting a field
of a node, for getting the IPs of a node, and for removing a
BM node.

Change-Id: I666747656948e19d4817327b33017c4f01752baa
2016-10-05 17:01:46 -05:00
Mark Hamzy
dcd5fc4279 Add support for installation and testing
Moved files to a new directory to support the installation
of the molteniron package.  Renamed one file to be a
command line tool and added a new file to start/stop
the daemon.

Added tox support for testing.  This needed the ability
to start and stop the daemon.  And it also needed the
ability to delete the database entries to ensure a clean
test run.

Change-Id: I1b0fadd68b9598b715c639b962cf8586f4db5da8
2016-09-15 13:05:00 -05:00
Mark Hamzy
1535754268 add testcase for allocateBM
Change-Id: I83bbdf85dd7280028e9a6b43087a251a3831ea6b
2016-09-07 14:53:09 -05:00
Mike
c3b10dc8d4 Initial commit of MoltenIron
MoltenIron is a tool to manage a pool of baremetal nodes that
are to be used as test targets in a baremetal CI environment,
instead of VM guests.

MoltenIron allows you to add, allocate, and release nodes from
it's pool using the following methods:

add - Add a node to the pool

allocate - checkout a baremetal node from the pool, returning
the required info in json format to the requester. It then
marks the node as in use so that no other VM will check it out.

release - return the baremetal node to the pool, allowing another
VM to eventually allocate it.

Change-Id: I8d276d677d9b09bc34032f46c825320d5d83e756
2016-05-23 18:09:44 -05:00