Skip to content

Commit

Permalink
add validators module
Browse files Browse the repository at this point in the history
Provides new base class called Validator. This mostly serves as an
interface definition for now.
  • Loading branch information
jtriley committed Jul 19, 2012
1 parent accf6c1 commit a52e01e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions starcluster/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"plugins", "plugins",
"balancers", "balancers",
"managers", "managers",
"validators",
"image", "image",
"volume", "volume",
"awsutils", "awsutils",
Expand Down
15 changes: 15 additions & 0 deletions starcluster/validators.py
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,15 @@
class Validator(object):
"""
Base class for all validating classes
"""
def validate(self):
"""
Raises an exception if any validation tests fail
"""
pass

def is_valid(self):
"""
Returns False if any validation tests fail, otherwise returns True
"""
pass

0 comments on commit a52e01e

Please sign in to comment.