class DBCmdbADUser(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'ad_user' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) name = db_cmdb.Column(db_cmdb.String(255)) initial_pwd = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, name, initial_pwd): self.name = name self.initial_pwd = initial_pwd
class DBCmdbKvmProject(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'kvm_vs_project' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) kvm_vs_id = db_cmdb.Column(db_cmdb.Integer) kvm_vs_hostname = db_cmdb.Column(db_cmdb.String(255)) project_id = db_cmdb.Column(db_cmdb.Integer) project_name = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, kvm_vs_id, kvm_vs_hostname, project_id, project_name): self.kvm_vs_id = kvm_vs_id self.kvm_vs_hostname = kvm_vs_hostname self.project_id = project_id self.project_name = project_name
class DBCmdbPhysicalServerProject(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'physical_server_project' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) physical_server_id = db_cmdb.Column(db_cmdb.Integer) physical_server_hostname = db_cmdb.Column(db_cmdb.String(255)) project_id = db_cmdb.Column(db_cmdb.Integer) project_name = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, physical_server_id, physical_server_hostname, project_id, project_name): self.physical_server_id = physical_server_id self.physical_server_hostname = physical_server_hostname self.project_id = project_id self.project_name = project_name
class DBCmdbProjectUser(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'project_cmdb_user' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) project_id = db_cmdb.Column(db_cmdb.Integer) project_name = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_id = db_cmdb.Column(db_cmdb.Integer) cmdb_user_name = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_cname = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, project_id, project_name, cmdb_user_id, cmdb_user_name, cmdb_user_cname): self.project_id = project_id self.project_name = project_name self.cmdb_user_id = cmdb_user_id self.cmdb_user_name = cmdb_user_name self.cmdb_user_cname = cmdb_user_cname
class DBCmdbPhysicsServerUser(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'physical_server_cmdb_user' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) physical_server_id = db_cmdb.Column(db_cmdb.Integer) physical_server_hostname = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_id = db_cmdb.Column(db_cmdb.Integer) cmdb_user_name = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_cname = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, physical_server_id, physical_server_hostname, cmdb_user_id, cmdb_user_name, cmdb_user_cname): self.physical_server_id = physical_server_id self.physical_server_hostname = physical_server_hostname self.cmdb_user_id = cmdb_user_id self.cmdb_user_name = cmdb_user_name self.cmdb_user_cname = cmdb_user_cname
class DBCmdbCloudUser(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'cloud_vs_cmdb_user' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) cloud_vs_id = db_cmdb.Column(db_cmdb.Integer) cloud_vs_hostname = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_id = db_cmdb.Column(db_cmdb.Integer) cmdb_user_name = db_cmdb.Column(db_cmdb.String(255)) cmdb_user_cname = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, cloud_vs_id, cloud_vs_hostname, cmdb_user_id, cmdb_user_name, cmdb_user_cname): self.cloud_vs_id = cloud_vs_id self.cloud_vs_hostname = cloud_vs_hostname self.cmdb_user_id = cmdb_user_id self.cmdb_user_name = cmdb_user_name self.cmdb_user_cname = cmdb_user_cname
class WanIP(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'wanip' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) ip = db_cmdb.Column(db_cmdb.String(255), index=True) broadband_type = db_cmdb.Column(db_cmdb.String(255)) buy_time = db_cmdb.Column(db_cmdb.DateTime) mask = db_cmdb.Column(db_cmdb.String(255)) gateway = db_cmdb.Column(db_cmdb.String(255)) ip_range = db_cmdb.Column(db_cmdb.String(255)) used = db_cmdb.Column(db_cmdb.Integer) hostname = db_cmdb.Column(db_cmdb.String(255)) remark = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, ip, broadband_type, buy_time, mask, gateway, ip_range, used, hostname, remark): self.ip = ip self.broadband_type = broadband_type self.hostname = hostname self.buy_time = buy_time self.mask = mask self.gateway = gateway self.ip_range = ip_range self.used = used self.hostname = hostname self.remark = remark
class DBCmdbCloudVirtualServer(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'cloud_virtual_server' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) hostname = db_cmdb.Column(db_cmdb.String(255), index=True) create_time = db_cmdb.Column(db_cmdb.DateTime) cpu = db_cmdb.Column(db_cmdb.Integer) memory = db_cmdb.Column(db_cmdb.Integer) disk = db_cmdb.Column(db_cmdb.Integer) wanip = db_cmdb.Column(db_cmdb.String(255)) wanip_alternate = db_cmdb.Column(db_cmdb.String(255)) broadband_type = db_cmdb.Column(db_cmdb.String(255)) lanip = db_cmdb.Column(db_cmdb.String(255)) os = db_cmdb.Column(db_cmdb.String(255)) os_version = db_cmdb.Column(db_cmdb.String(255)) location = db_cmdb.Column(db_cmdb.String(255)) group = db_cmdb.Column(db_cmdb.String(255)) remark = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, hostname, create_time, cpu, memory, disk, wanip, wanip_alternate, broadband_type, lanip, os, os_version, location, group, remark): self.hostname = hostname self.create_time = create_time self.cpu = cpu self.memory = memory self.disk = disk self.wanip = wanip self.wanip_alternate = wanip_alternate self.broadband_type = broadband_type self.lanip = lanip self.os = os self.os_version = os_version self.location = location self.group = group self.remark = remark
class DBCmdbPhysicalServer(db_cmdb.Model): __bind_key__ = 'cmdb' __tablename__ = 'physical_server' id = db_cmdb.Column(db_cmdb.Integer, primary_key=True, autoincrement=True) hostname = db_cmdb.Column(db_cmdb.String(255), index=True) buy_time = db_cmdb.Column(db_cmdb.DateTime) create_time = db_cmdb.Column(db_cmdb.DateTime) company = db_cmdb.Column(db_cmdb.String(255)) service_no = db_cmdb.Column(db_cmdb.String(255)) cpu = db_cmdb.Column(db_cmdb.Integer) cpu_physical_num = db_cmdb.Column(db_cmdb.Integer) cpu_details = db_cmdb.Column(db_cmdb.String(255)) memory = db_cmdb.Column(db_cmdb.Integer) memory_physical_num = db_cmdb.Column(db_cmdb.Integer) memory_details = db_cmdb.Column(db_cmdb.String(255)) disk = db_cmdb.Column(db_cmdb.Integer) disk_physical_num = db_cmdb.Column(db_cmdb.Integer) disk_details = db_cmdb.Column(db_cmdb.String(255)) raid_level = db_cmdb.Column(db_cmdb.Integer) raid_details = db_cmdb.Column(db_cmdb.String(255)) power_physical_num = db_cmdb.Column(db_cmdb.Integer) power_details = db_cmdb.Column(db_cmdb.String(255)) nic_physical_num = db_cmdb.Column(db_cmdb.Integer) nic_details = db_cmdb.Column(db_cmdb.String(255)) idrac = db_cmdb.Column(db_cmdb.String(255)) wanip = db_cmdb.Column(db_cmdb.String(255)) wanip_alternate = db_cmdb.Column(db_cmdb.String(255)) broadband_type = db_cmdb.Column(db_cmdb.String(255)) lanip = db_cmdb.Column(db_cmdb.String(255)) manageip = db_cmdb.Column(db_cmdb.String(255)) os = db_cmdb.Column(db_cmdb.String(255)) os_version = db_cmdb.Column(db_cmdb.String(255)) location = db_cmdb.Column(db_cmdb.String(255)) group = db_cmdb.Column(db_cmdb.String(255)) remark = db_cmdb.Column(db_cmdb.String(255)) def __init__(self, hostname, buy_time, create_time, company, service_no, cpu, cpu_physical_num, cpu_details, memory, memory_physical_num, memory_details, disk, disk_physical_num, disk_details, raid_level, raid_details, power_physical_num, power_details, nic_physical_num, nic_details, idrac, wanip, wanip_alternate, broadband_type, lanip, manageip, os, os_version, location, group, remark): self.hostname = hostname self.buy_time = buy_time self.create_time = create_time self.company = company self.service_no = service_no self.cpu = cpu self.cpu_physical_num = cpu_physical_num self.cpu_details = cpu_details self.memory = memory self.memory_physical_num = memory_physical_num self.memory_details = memory_details self.disk = disk self.disk_physical_num = disk_physical_num self.disk_details = disk_details self.raid_level = raid_level self.raid_details = raid_details self.power_physical_num = power_physical_num self.power_details = power_details self.nic_physical_num = nic_physical_num self.nic_details = nic_details self.idrac = idrac self.wanip = wanip self.wanip_alternate = wanip_alternate self.broadband_type = broadband_type self.lanip = lanip self.manageip = manageip self.os = os self.os_version = os_version self.location = location self.group = group self.remark = remark