Initial Commit
This commit is contained in:
40
api/app/models/nutanix/core/pcentral.py
Normal file
40
api/app/models/nutanix/core/pcentral.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from sqlalchemy import (
|
||||
Column,
|
||||
String,
|
||||
Integer,
|
||||
ForeignKey
|
||||
)
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from models.common.base import BaseModel
|
||||
|
||||
|
||||
class pcentral(BaseModel):
|
||||
"""
|
||||
description: Nutanix prism central model
|
||||
"""
|
||||
__tablename__ = "tnc_pcentrals"
|
||||
_s_collection_name = "pcentrals"
|
||||
_s_class_name = "pcentral"
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True, index=True)
|
||||
name = Column(String(32), unique=True, index=True, nullable=False)
|
||||
hostname = Column(String(64), unique=True, index=True, nullable=True)
|
||||
ncc_version = Column(String(16), index=True, nullable=False)
|
||||
aos_version = Column(String(16), index=True, nullable=False)
|
||||
|
||||
contour_id = Column(Integer, ForeignKey("tcc_contours.id"))
|
||||
contour = relationship("contour", back_populates="pcentral")
|
||||
|
||||
npcreport = relationship(
|
||||
"npcreport",
|
||||
backref="pcentral",
|
||||
cascade="save-update, delete",
|
||||
lazy="dynamic"
|
||||
)
|
||||
pelement = relationship(
|
||||
"pelement",
|
||||
backref="pcentral",
|
||||
cascade="save-update, delete",
|
||||
lazy="dynamic"
|
||||
)
|
||||
Reference in New Issue
Block a user