# Path: cmdb/models.py
# class ConfigurationItem(models.Model):
#     Hostname = models.CharField(max_length=255)
#     Rack = models.ForeignKey('DataCentreRack')
#     Asset = models.CharField(max_length=128)
#     SupportTag = models.CharField(max_length=128)
#     Class = models.ForeignKey(ConfigurationItemClass)
#     Owner = models.ForeignKey(User)
#     NetworkInterface = models.ManyToManyField(NetworkInterface)
#     Profile = models.ForeignKey(ConfigurationItemProfile)
#     VMImagePath = models.CharField(max_length=255,blank=True,null=True,verbose_name='Path for Virtual Images')
#     IsVirtual = models.BooleanField()
#     BuildOnNextBoot = models.BooleanField(verbose_name="PXE Build",help_text="Should this box be rebuilt the next time it is booted?")
#     IsVMHost = models.BooleanField()
#     rootpwhash = models.CharField(max_length=255)
# 
#     def __unicode__(self):
#         return self.Hostname
#     
#     class Meta:
#         #permissions = ()
#         verbose_name = 'Configuration Item'
#         verbose_name_plural = 'Configuration Items'
#         ordering = ['Hostname']


from django.db import models
from django.contrib.auth.models import User
from cmdb.models import ConfigurationItem
# This file is part of the Edison Project.
# Please refer to the LICENSE document that was supplied with this software for information on how it can be used.

# Models for Orchestration App

# The model for orchestration classes (puppet/Chef etc)
class OrchestraClass(models.Model):
	Name = models.CharField(max_length=255)
	Creator = models.ForeignKey(User)
	Notes = models.TextField()

# Path: cmdb/models.py
# class ConfigurationItem(models.Model):
#     Hostname = models.CharField(max_length=255)
#     Rack = models.ForeignKey('DataCentreRack')
#     Asset = models.CharField(max_length=128)
#     SupportTag = models.CharField(max_length=128)
#     Class = models.ForeignKey(ConfigurationItemClass)
#     Owner = models.ForeignKey(User)
#     NetworkInterface = models.ManyToManyField(NetworkInterface)
#     Profile = models.ForeignKey(ConfigurationItemProfile)
#     VMImagePath = models.CharField(max_length=255,blank=True,null=True,verbose_name='Path for Virtual Images')
#     IsVirtual = models.BooleanField()
#     BuildOnNextBoot = models.BooleanField(verbose_name="PXE Build",help_text="Should this box be rebuilt the next time it is booted?")
#     IsVMHost = models.BooleanField()
#     rootpwhash = models.CharField(max_length=255)
# 
#     def __unicode__(self):
#         return self.Hostname
#     
#     class Meta:
#         #permissions = ()
#         verbose_name = 'Configuration Item'
#         verbose_name_plural = 'Configuration Items'
#         ordering = ['Hostname']


# Path: orchestra/models.py
from django.db import models
from django.contrib.auth.models import User
from cmdb.models import ConfigurationItem

# This file is part of the Edison Project.
# Please refer to the LICENSE document that was supplied with this software for information on how it can be used.

# Models for Orchestration App

# The model for orchestration classes (puppet/Chef etc)
class OrchestraClass(models.Model):
	Name = models.CharField(max_length=255)
	Creator = models.ForeignKey(User)
	Notes = models.TextField()

	AffectedItems = models.ManyToManyField(ConfigurationItem)