Initial Commit

This commit is contained in:
2023-09-08 19:05:37 +03:00
commit 7e60195cb7
185 changed files with 27107 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
from sqlalchemy import (
Column,
String,
Integer,
Float,
ForeignKey
)
from models.common.base import BaseModel
class sharedNetwork(BaseModel):
"""
description: Shared Networks report model
"""
__tablename__ = "tvrsn_report"
_s_collection_name = "sharedNetworks"
id = Column(Integer, primary_key=True, autoincrement=True, index=True)
vrf = Column(String(64), nullable=False)
vrfId = Column(Integer, nullable=False, index=True)
subnet = Column(String(15), nullable=False)
subnetId = Column(Integer, nullable=False, unique=True, index=True)
subnetMask = Column(Integer, nullable=False)
requestsID = Column(String(32))
bussinessLine = Column(String(32))
subnetManager = Column(String(32), index=True)
virtSubnetName = Column(String(32))
virtSubnetUUID = Column(String(32))
freeIPPercent = Column(Float, nullable=False)
cluster_id = Column(
Integer,
ForeignKey("tvc_clusters.id"),
nullable=True,
index=True
)
def __init__(self, *args, **kwargs):
platform = kwargs.pop("platform", None) # noqa
BaseModel.__init__(self, **kwargs)
def to_dict(self):
result = BaseModel.to_dict(self)
result["platform"] = "vmware"
return result