-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathforms.py
60 lines (40 loc) · 2.42 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField, FileField
from wtforms.validators import DataRequired
from wtforms import validators
class tenantForm(Form):
tenant_name = StringField('Tenant Name', [validators.Regexp('^.*_TN$', message='Must Contain "_TN" at the end of the Tenant Name')])
submit = SubmitField('Create a Tenant')
class bdForm(Form):
tenant_name = StringField('Tenant name', validators=[DataRequired()])
bd_name = StringField('BD name', validators=[DataRequired()])
vrf_name = StringField('VRF name', validators=[DataRequired()])
bd_subnet = StringField('BD subnet', validators=[DataRequired()])
submit = SubmitField('Create Bridge Domain')
class aepForm(Form):
aep_name = StringField('AEP name', [validators.Regexp('^.*_AEP$', message='Must Contain"_AEP" at the end of the name')])
phy_name = StringField('PHY name', [validators.Regexp('^.*_PHY$', message='Must Contain"_PHY" at the end of the name')])
submit = SubmitField('Create AEP')
class appForm(Form):
app_name = StringField('APP name', [validators.Regexp('^.*_AP$', message='Must Contain"_AP" at the end of the name')])
tenant_name = StringField('Tenant Name', [validators.Regexp('^.*_TN$', message='Must Contain "_TN" at the end of the Tenant Name')])
submit = SubmitField('Create APP')
class epgForm(Form):
app_name = StringField('AEP name', [validators.Regexp('^.*_AEP$', message='Must Contain"_AEP" at the end of the name')])
tenant_name = StringField('Tenant Name', [validators.Regexp('^.*_TN$', message='Must Contain "_TN" at the end of the Tenant Name')])
bd_name = StringField('BD name', validators=[DataRequired()])
epg_name = StringField('AEP name', [validators.Regexp('^.*_EPG$', message='Must Contain"_EPG" at the end of the name')])
class SignupForm(Form):
first_name = StringField('First name', validators=[DataRequired()])
last_name = StringField('Last name', validators=[DataRequired()])
email = StringField('Email', validators=[DataRequired()])
password = PasswordField('Password')
submit = SubmitField('Sign Up')
class dmvpnForm(Form):
dev_prod = StringField('Prod of Dev', validators=[DataRequired()])
data_center = StringField('Data Center')
service_type = StringField('In/Out of Service')
submit = SubmitField('Submit')
class csvForm(Form):
csv_file = FileField(u'CSV File')
submit = SubmitField('Upload CSV')