<s> from django . db import models <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from ralph . assets . models . base import BaseObject <EOL> from ralph . lib . mixins . fields import BaseObjectForeignKey <EOL> from ralph . lib . mixins . models import NamedMixin <EOL> class Database ( BaseObject ) : <EOL> class Meta : <EOL> verbose_name = _ ( '<STR_LIT>' ) <EOL> verbose_name_plural = _ ( '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' . format ( self . service_env ) <EOL> class VIP ( BaseObject ) : <EOL> class Meta : <EOL> verbose_name = _ ( '<STR_LIT>' ) <EOL> verbose_name_plural = _ ( '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' . format ( self . service_env ) <EOL> class ClusterType ( NamedMixin , models . Model ) : <EOL> pass <EOL> class Cluster ( BaseObject , NamedMixin , models . Model ) : <EOL> type = models . ForeignKey ( ClusterType ) <EOL> base_objects = models . ManyToManyField ( <EOL> BaseObject , <EOL> verbose_name = _ ( '<STR_LIT>' ) , <EOL> through = '<STR_LIT>' , <EOL> related_name = '<STR_LIT:+>' , <EOL> ) <EOL> class BaseObjectCluster ( models . Model ) : <EOL> cluster = models . ForeignKey ( Cluster ) <EOL> base_object = BaseObjectForeignKey ( <EOL> BaseObject , <EOL> related_name = '<STR_LIT>' , <EOL> limit_models = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] <EOL> ) <EOL> is_master = models . BooleanField ( default = False ) <EOL> class Meta : <EOL> unique_together = ( '<STR_LIT>' , '<STR_LIT>' ) </s>
