summaryrefslogtreecommitdiff
path: root/src/caas/forms.py
blob: d485ee613037abf1f360c9021ad6891fe56c44f3 (plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
from django import forms


class CiqUploadForm(forms.Form):
    filehandle = forms.FileField(label = "CIQ (in CSV format with header rows deleted)")
    assign_parent = forms.BooleanField(label = "Assign subclouds to central controllers?", required = False)


class CiqUpload2Form(forms.Form):
    filehandle = forms.FileField(label = "CIQ (in CSV format, servers over CC capacity will be not be assigned parents, servers with parents won't be affected)")


class CiqAssignOrphanSubcloudsForm(forms.Form):
    filehandle = forms.FileField(label = "CIQ (in CSV format, servers without parents will be assigned to new controllers if any)")


class PasswordUploadForm(forms.Form):
    filehandle = forms.FileField(label = "Password CSV (with header rows deleted)")


class SerialNumberForm(forms.Form):
    vendor = forms.CharField(label = "Vendor")
    serial_number = forms.CharField(label = "Serial number")
    ilo_host_address = forms.CharField(label = "BMC IP address")


class AutoremediateForm(forms.Form):
    ilo_host_address_list = forms.CharField(label = "BMC IP addresses separated by space")


class DnsForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")


class QueueCustomForm(forms.Form):
    key = forms.CharField(label = "key")
    playbook_key = forms.CharField(label = "playbook_key")
    target = forms.CharField(label = "target")
    cluster_name = forms.CharField(label = "cluster-name (optional)")


class MacAddressForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")
    pxe_mac_address = forms.CharField(label = "BMC MAC address")
    intel_nic_firmware_version = forms.CharField(label = "Intel NIC firmware version")


class AdminPasswordForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")
    icinga_poll_status = forms.CharField(label = "Icinga poll status")


class NicFirmwareVersionForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")
    nic_firmware_version = forms.CharField(label = "NIC firmware version")


class NicFirmwareUpgradeForm(forms.Form):
    ilo_host_address_list = forms.CharField(label = "BMC IP addresses separated by space")


class NicFirmwareUpgradeNowForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")
    icinga_poll_status = forms.CharField(label = "Icinga poll status")


class WrInstallForm(forms.Form):
    ilo_host_address_list = forms.CharField(label = "BMC IP addresses separated by space")


class WrInstallNowForm(forms.Form):
    ilo_host_address = forms.CharField(label = "BMC IP address")
    icinga_poll_status = forms.CharField(label = "Icinga poll status")


class PushButtonForm(forms.Form):
    pass


class WrRemediateForm(forms.Form):
    cluster_name_list = forms.CharField(label = "Cluster names separated by space")
    playbook = forms.ChoiceField(label = "Playbook dict key in settings.py",
                                 choices = (("wr", "wr"),
                                            ("wr_remediate", "wr_remediate"),
                                            ("wr_wipedisk", "wr_wipedisk"),
                                            ("wr_ptp", "wr_ptp"),
                                            ("wr_ptp_config", "wr_ptp_config"),
                                            ("wr_unlock", "wr_unlock"),
                                            ("wr_reboot", "wr_reboot"),
                                            ("wr_wrap", "wr_wrap")))


class WrRebootForm(forms.Form):
    namespace_name_list = forms.CharField(label = "Namespace names separated by space")


#created Oct30 2020 for Raj reboot testing delete later - Soda
class MockWrRebootForm(forms.Form):
    namespace_name_list = forms.CharField(label = "Mock namespace names separated by space")


class PlaybookReportForm(forms.Form):
    git = forms.CharField(label = "git remote")
    playbook = forms.CharField(label = "Playbook dict key in settings.py")
    target = forms.CharField(label = "Target")
    failed = forms.CharField(label = "Failed count (0 or 1)")


class SubcloudForm(forms.Form):
    fuze_id = forms.CharField(label = "FUZE ID")