Black lint all the things
This commit is contained in:
@ -12,8 +12,8 @@ from lemur.policies import service as policy_service
|
||||
manager = Manager(usage="Handles all policy related tasks.")
|
||||
|
||||
|
||||
@manager.option('-d', '--days', dest='days', help='Number of days before expiration.')
|
||||
@manager.option('-n', '--name', dest='name', help='Policy name.')
|
||||
@manager.option("-d", "--days", dest="days", help="Number of days before expiration.")
|
||||
@manager.option("-n", "--name", dest="name", help="Policy name.")
|
||||
def create(days, name):
|
||||
"""
|
||||
Create a new certificate rotation policy
|
||||
|
@ -12,10 +12,12 @@ from lemur.database import db
|
||||
|
||||
|
||||
class RotationPolicy(db.Model):
|
||||
__tablename__ = 'rotation_policies'
|
||||
__tablename__ = "rotation_policies"
|
||||
id = Column(Integer, primary_key=True)
|
||||
name = Column(String)
|
||||
days = Column(Integer)
|
||||
|
||||
def __repr__(self):
|
||||
return "RotationPolicy(days={days}, name={name})".format(days=self.days, name=self.name)
|
||||
return "RotationPolicy(days={days}, name={name})".format(
|
||||
days=self.days, name=self.name
|
||||
)
|
||||
|
@ -24,7 +24,7 @@ def get_by_name(policy_name):
|
||||
:param policy_name:
|
||||
:return:
|
||||
"""
|
||||
return database.get_all(RotationPolicy, policy_name, field='name').all()
|
||||
return database.get_all(RotationPolicy, policy_name, field="name").all()
|
||||
|
||||
|
||||
def delete(policy_id):
|
||||
|
Reference in New Issue
Block a user