Skip to content

Commit 27fdc13

Browse files
author
Russell Haering
committed
out with the old, in with the new
1 parent b3ee1d8 commit 27fdc13

26 files changed

+91
-1808
lines changed

.gitignore

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
*.py[co]
2-
bin/*
3-
lib/*
4-
include/*
5-
local/*
62
src/*
73
build/*
8-
.ve
9-
_trial_temp/
10-
subunit-output.txt
11-
test-report.xml
12-
twisted/plugins/dropin.cache
13-
twistd.log
14-
.coverage
15-
_trial_coverage/
4+
AUTHORS
5+
ChangeLog
6+
*.egg-info
7+
*.egg
8+
.tox/*
9+
devenv/*

Makefile

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,3 @@
11
# teeth-agent
22

33
An agent for rebuilding and controlling Teeth chassis.
4-
5-
## Protocol
6-
7-
JSON. Line Delimitated. Bi-directional. Most messages contain:
8-
9-
* `version` Message Version - String
10-
* `id` Message ID - String
11-
12-
Commands contain:
13-
14-
* `method` Method - String
15-
* `params` Params - Hash of parameters to Method.
16-
17-
Success Responses contain:
18-
19-
* `id` Original Message ID from Command - String
20-
* `result` Result from Command - Hash
21-
22-
Error Responses contain:
23-
24-
* `id` Original Message ID from Command - String
25-
* `error` Result from Command - Hash, `.msg` contains human readable error. Other fields might come later.
26-
27-
Fatal Error:
28-
29-
* `fatal_error` - String - Fatal error message; Connection should be closed.
30-
31-
32-
## Builders
33-
34-
Teeth Agent master builder: https://jenkins.t.k1k.me/job/teeth-agent-master/
35-
Teeth Agent PR builder: https://jenkins.t.k1k.me/job/teeth-agent-pr/
36-
37-
Builds are automatically triggered on pushes to master, or upon opening a PR.
38-
39-
### Commands
40-
41-
#### All Protocol Implementations.
42-
43-
* `ping`: (All) Params are echo'ed back as results.
44-
45-
#### Agent specific Commands
46-
47-
* `log`: (Agent->Server) Log a structured message from the Agent.
48-
* `status`: (Server->Agent) Uptime, version, and other fields reported.
49-
* `task_status`: (Agent->Server) Update status of a task. Task has an `.task_id` which was previously designated. Task has a `.state`, which is `running`, `error` or `complete`. `running` will additionally contain `.eta` and `.percent`, a measure of how much work estimated to remain in seconds and how much work is done. Once `error` or `complete` is sent, no more updates will be sent. `error` state includes an additional human readable `.msg` field.
50-
51-
52-
#### Decommission
53-
54-
* `decom.disk_erase`: (Server->Agent) Erase all attached block devices securely. Takes a `task_id`.
55-
* `decom.firmware_secure`: (Server->Agent) Update Firmwares/BIOS versions and settings. Takes a `task_id`.
56-
* `decom.qc`: (Server->Agent) Run quality control checks on chassis model. Includes sending specifications of chassis (cpu types, disks, etc). Takes a `task_id`.
57-
58-
59-
#### Standbye
60-
61-
* `standbye.cache_images`: (Server->Agent) Cache an set of image UUID on local storage. Ordered in priority, chassis may only cache a subset depending on local storage. Takes a `task_id`.
62-
* `standbye.prepare_image`: (Server->Agent) Prepare a image UUID to be ran. Takes a `task_id`.
63-
* `standbye.run_image`: (Server->Agent) Run an image UUID. Must include Config Drive Settings. Agent will write config drive, and setup grub. If the Agent can detect a viable kexec target it will kexec into it, otherwise reboot. Takes a `task_id`.
64-
65-
66-
67-
68-

requirements.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
setuptools==1.1.6
2-
Twisted==13.1.0
3-
argparse==1.2.1
4-
wsgiref==0.1.2
5-
zope.interface==4.0.5
6-
structlog==0.3.0
7-
treq==0.2.0
1+
Werkzeug==0.9.4
2+
requests==2.0.0
3+
-e git+git@github.com:racker/teeth-rest.git@4d5d81833bad3c4235bdea6cf6d53a0a4defb275#egg=teeth_rest-master

scripts/bootstrap-virtualenv.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

scripts/python-lint.py

Lines changed: 0 additions & 139 deletions
This file was deleted.

setup.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[metadata]
2+
name = teeth-agent
3+
author = Rackspace
4+
author-email = teeth-dev@lists.rackspace.com
5+
summary = Teeth Host Agent
6+
license = Apache-2
7+
classifier =
8+
Development Status :: 4 - Beta
9+
Intended Audience :: Developers
10+
License :: OSI Approved :: Apache Software License
11+
Operating System :: OS Independent
12+
Programming Language :: Python
13+
[files]
14+
packages =
15+
teeth_agent
16+
17+
[entry_points]
18+
console_scripts =
19+
teeth-agent = teeth_agent.cmd.agent:run

setup.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,9 @@
1616
limitations under the License.
1717
"""
1818

19-
from setuptools import setup, find_packages
20-
import codecs
21-
import os
22-
import re
23-
24-
here = os.path.abspath(os.path.dirname(__file__))
25-
26-
27-
def read(*parts):
28-
return codecs.open(os.path.join(here, *parts), 'r').read()
29-
30-
31-
def find_version(*file_paths):
32-
version_file = read(*file_paths)
33-
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
34-
version_file, re.M)
35-
if version_match:
36-
return version_match.group(1)
37-
raise RuntimeError("Unable to find version string.")
19+
from setuptools import setup
3820

3921
setup(
40-
name='teeth-agent',
41-
version=find_version('teeth_agent', '__init__.py'),
42-
packages=find_packages(),
22+
setup_requires=['pbr'],
23+
pbr=True,
4324
)

teeth_agent/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
"""
16-
17-
__all__ = ["__version__"]
18-
19-
__version__ = "0.1-dev"

0 commit comments

Comments
 (0)