Commit ed351d66 by Dudás Ádám

vm: add tags to nodes and VMs

parent 91c65106
...@@ -224,6 +224,7 @@ THIRD_PARTY_APPS = ( ...@@ -224,6 +224,7 @@ THIRD_PARTY_APPS = (
'crispy_forms', 'crispy_forms',
'djcelery', 'djcelery',
'sizefield', 'sizefield',
'taggit',
) )
# Apps specific for this project go here. # Apps specific for this project go here.
......
...@@ -14,6 +14,7 @@ from django.utils import timezone ...@@ -14,6 +14,7 @@ from django.utils import timezone
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
from taggit.managers import TaggableManager
from common.models import ActivityModel, activitycontextimpl from common.models import ActivityModel, activitycontextimpl
from firewall.models import Vlan, Host from firewall.models import Vlan, Host
...@@ -76,6 +77,7 @@ class VirtualMachineDescModel(BaseResourceConfigModel): ...@@ -76,6 +77,7 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
'Show boot device selection menu on boot.')) 'Show boot device selection menu on boot.'))
raw_data = TextField(verbose_name=_('raw_data'), blank=True, help_text=_( raw_data = TextField(verbose_name=_('raw_data'), blank=True, help_text=_(
'Additional libvirt domain parameters in XML format.')) 'Additional libvirt domain parameters in XML format.'))
tags = TaggableManager()
class Meta: class Meta:
abstract = True abstract = True
...@@ -100,6 +102,7 @@ class Node(TimeStampedModel): ...@@ -100,6 +102,7 @@ class Node(TimeStampedModel):
enabled = BooleanField(verbose_name=_('enabled'), default=False, enabled = BooleanField(verbose_name=_('enabled'), default=False,
help_text=_('Indicates whether the node can ' help_text=_('Indicates whether the node can '
'be used for hosting.')) 'be used for hosting.'))
tags = TaggableManager()
class Meta: class Meta:
permissions = () permissions = ()
......
...@@ -7,7 +7,7 @@ django-crispy-forms==1.4.0 ...@@ -7,7 +7,7 @@ django-crispy-forms==1.4.0
django-model-utils==1.4.0 django-model-utils==1.4.0
django-sizefield==0.4 django-sizefield==0.4
django-tables2==0.14.0 django-tables2==0.14.0
django-taggit==0.10a1 django-taggit==0.10
logutils==0.3.3 logutils==0.3.3
netaddr==0.7.10 netaddr==0.7.10
South==0.8.1 South==0.8.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment