2020-03-16 13:59:45 +00:00
|
|
|
from django.db.models import Model, CharField, IntegerField
|
2020-06-12 11:46:17 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2015-02-27 08:53:51 +00:00
|
|
|
|
2020-06-15 06:57:17 +00:00
|
|
|
|
2020-03-16 13:59:45 +00:00
|
|
|
class Compute(Model):
|
2020-06-12 11:46:17 +00:00
|
|
|
name = CharField(_('name'), max_length=64, unique=True)
|
|
|
|
hostname = CharField(_('hostname'), max_length=64)
|
|
|
|
login = CharField(_('login'), max_length=20)
|
|
|
|
password = CharField(_('password'), max_length=14, blank=True, null=True)
|
|
|
|
details = CharField(_('details'), max_length=64, null=True, blank=True)
|
2020-03-16 13:59:45 +00:00
|
|
|
type = IntegerField()
|
2015-02-27 08:53:51 +00:00
|
|
|
|
2020-06-15 06:57:17 +00:00
|
|
|
def __str__(self):
|
2015-03-27 15:12:15 +00:00
|
|
|
return self.hostname
|