Esempio n. 1
0
class Srvc(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    service_type = db.Column(
        db.Enum('1to1doubletag', '1to1singletag', 'mcast', 'nto1', 'pls',
                'tls'))
    address = db.Column(db.String(), default='')
    svid = db.Column(db.Integer(), default=None)
    stag_priority = db.Column(db.Enum('CoS0', 'CoS1', 'CoS2', 'CoS3', 'CoS4',
                                      'CoS5', 'CoS6', 'CoS7'),
                              default=None)
    vlan_handling = db.Column(db.Enum('Add', 'Transparent', 'Swap'),
                              default=None)
Esempio n. 2
0
class MgmtCard(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    subrack_id = db.Column(db.Integer, db.ForeignKey('subrack.id'))
    mgmt_ports = db.relationship('MgmtPort',
                                 backref='MgmtCard',
                                 lazy='dynamic')

    description = db.Column(db.String(), default='')
    admin_state = db.Column(db.Enum('0', '1'), default='0')
    operational_state = db.Column(db.Enum('0', '1'), default='0')
    board_name = db.Column(db.String(), default='')
    supplier_build_state = db.Column(db.Enum('R1G', 'R1D', 'R2B', 'R2A', 'R1K',
                                             'R1H', 'R2B', 'R1E', 'R3D', 'R1C',
                                             'R1A', ''),
                                     default='')
    board_id = db.Column(db.Enum('345', '332', '303', '308', '377', '356',
                                 '305', '307', '330', '0'),
                         default='0')
    hardware_key = db.Column(db.Integer(), default=0)
    software = db.Column(db.String(), default='')
    software_name = db.Column(db.String(), default='')
    software_revision = db.Column(db.String(), default='')
    state = db.Column(db.Enum('Ok', 'Empty'), default='Empty')
    serial_number = db.Column(db.String(), default='')
    manufacturer_name = db.Column(db.String(), default='')
    model_name = db.Column(db.String(), default='')
    short_text = db.Column(db.String(), default='')
    manufacturer_id = db.Column(db.String(), default='')
    manufacturer_part_number = db.Column(db.String(), default='')
    manufacturer_build_state = db.Column(db.String(), default='')
    customer_id = db.Column(db.String(), default='')
    customer_product_id = db.Column(db.String(), default='')
    boot_loader = db.Column(db.String(), default='')
    processor = db.Column(db.String(), default='')
    product = db.Column(db.Enum('mgmt'), nullable=False, default='mgmt')
Esempio n. 3
0
class ServicePort(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    admin_state = db.Column(
        db.Enum('0', '1', '2'), default='0'
    )  # Alcatel: 0 => down, 1 => up, 2 => not-appl; Huawei: 0 => down, 1 => up
    operational_state = db.Column(
        db.Enum('0', '1'),
        default='0')  # Alcatel: 0 => down, 1 => up; Huawei: 0 => down, 1 => up
    connected_id = db.Column(db.Integer(), nullable=False)
    connected_type = db.Column(db.Enum('port', 'ont', 'cpe'), nullable=False)

    # Alcatel data
    pvid = db.Column(db.Integer(), default=None, nullable=True)
    max_unicast_mac = db.Column(db.Integer(), default=None, nullable=True)
    qos_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    pvc = db.Column(db.Boolean(), default=False)

    # Huawei Data
    vpi = db.Column(db.String(), default='-')
    vci = db.Column(db.String(), default='-')
    flow_type = db.Column(db.Enum('vlan', 'encap', '-'), default='vlan')
    flow_para = db.Column(db.Enum('untag', 'pppoe', '-'), default='untag')
    rx = db.Column(db.Integer(), default=560)
    tx = db.Column(db.Integer(), default=520)
    rx_cttr = db.Column(db.String(), default='-')
    tx_cttr = db.Column(db.String(), default='-')
    max_mac_count = db.Column(db.Integer(), default=600)
    support_down_multicast_stream = db.Column(db.String(), default='disable')
    support_igmp_packet = db.Column(db.String(), default='disable')
    bytes_us = db.Column(db.Integer(), default=448203129)
    packets_us = db.Column(db.Integer(), default=6386689)
    bytes_ds = db.Column(db.Integer(), default=430667320)
    packets_ds = db.Column(db.Integer(), default=6493472)
    inbound_table_name = db.Column(db.String(), default='ip-traffic-table_520')
    outbound_table_name = db.Column(db.String(),
                                    default='ip-traffic-table_560')
    label = db.Column(db.String(), default='-')
    priority = db.Column(db.String(), default='-')
    pvc_bundle = db.Column(db.Enum('yes', 'no'), default='no')
    tag_transforms = db.Column(db.String(), default='default')
    description = db.Column(db.String(), nullable=True, default='')
    remote_description = db.Column(db.String(), nullable=True, default='')
    service_port_bundle = db.Column(db.String(), default='-')
    cos = db.Column(db.String(), default='-')
    static_mac = db.Column(db.String(), nullable=True, default='')
    ip_address = db.Column(db.String(), nullable=True, default='')
Esempio n. 4
0
class QosInterface(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    description = db.Column(db.String())
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    scheduler_node = db.Column(db.String(64), default='NGLT_Default')
    cac_profile = db.Column(db.String(64), default=None)
    ds_num_rem_queue = db.Column(db.String(64), default='not-applicable')
    us_num_queue = db.Column(db.String(64), default='not-applicable')
    oper_weight = db.Column(db.Integer, default=0)
    oper_rate = db.Column(db.Integer, default=0)
    mc_scheduler_node = db.Column(db.String(64), default=None)
    bc_scheduler_node = db.Column(db.String(64), default=None)
    ds_schedule_tag = db.Column(db.String(64), default='cvlanpbitbased')
    upstream_queue = db.Column(db.Integer, default=0)
    upstream_queue_bandwidth_profile = db.Column(db.String(64), default=None)
    upstream_queue_bandwidth_sharing = db.Column(db.Enum('uni-sharing'), default='uni-sharing')
    upstream_queue_priority = db.Column(db.Integer, default=0)
    upstream_queue_weight = db.Column(db.Integer, default=0)
Esempio n. 5
0
class Emu(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    number = db.Column(db.Integer(), nullable=False, unique=True)
    type = db.Column(db.Enum('FAN', 'H831PMU', 'H831VESC'), default='H831VESC')
    emu_state = db.Column(db.Enum('Normal', 'fail'), default='Normal')
    used = db.Column(db.Enum('Used', 'Not'), default='Used')
    frame_id = db.Column(db.Integer(), default=0)
    subnode = db.Column(db.Integer(), default=0)
    com_port = db.Column(db.Enum('RS232', 'RS485'), default='RS232')
    limit_state = db.Column(db.String(), default='No limit')
    charge_state = db.Column(db.Enum('Charged', 'Floating'),
                             default='Floating')
    charge_control = db.Column(db.Enum('Automatic control'),
                               default='Automatic control')
    module_number = db.Column(db.Integer(), default=1)
    module_0_address = db.Column(db.Integer(), default=0)
    module_0_type = db.Column(db.Enum('AC/DC'), default='AC/DC')
    module_0_current = db.Column(db.String(), default='1.20A')
    module_0_voltage = db.Column(db.String(), default='53.75V')
    battery_capacity = db.Column(db.Integer(), default=100)
    battery_0_current = db.Column(db.String(), default='0.00A')
    dc_voltage = db.Column(db.String(), default='52.91V')
Esempio n. 6
0
class Port(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    card_id = db.Column(db.Integer, db.ForeignKey('card.id'))
    onts = db.relationship('Ont', backref='Port', lazy='dynamic')
    cpes = db.relationship('Cpe', backref='Port', lazy='dynamic')

    # Alcatel data
    description = db.Column(db.String(), default='')
    type = db.Column(db.Enum('pon', 'ethernet-line'), default='pon')
    shutdown = db.Column(db.Boolean(), default=False)
    speed = db.Column(db.Enum('10M', '1G', '10G'), default='1G')
    operational_state = db.Column(
        db.Enum('0', '1', '2'), default='0'
    )  # Alcatel: 0 => down, 1 => up, 2 => not-appl; Huawei: 0 => deactivated, 1 => activated, 2 => activating; PBN: 0 => down, 1 => up
    admin_state = db.Column(
        db.Enum('0', '1', '2', '3'), default='0'
    )  # Alcatel: 0 => down, 1 => up, 2 => not-appl; Huawei: 0 => deactivated, 1 => activated, 2 => activating; KeyMile:  0 => down, 1 => up, 2 => locked, 3 => unlocked; PBN: 0 => down, 1 => up
    upstream = db.Column(db.Integer(), default=0)
    downstream = db.Column(db.Integer(), default=0)
    upstream_max = db.Column(db.String(), default="100000")
    downstream_max = db.Column(db.String(), default="100000")
    cur_init_state = db.Column(db.Enum('up', 'down', 'shutdown'),
                               default='down')
    auto_negotiation = db.Column(db.Boolean(), default=True)
    mtu = db.Column(db.Integer(), default=1500)
    noise_margin_up = db.Column(db.Integer(), default=0)
    noise_margin_down = db.Column(db.Integer(), default=0)
    tgt_noise_margin_up = db.Column(db.Integer(), default=0)
    tgt_noise_margin_down = db.Column(db.Integer(), default=0)
    attenuation_up = db.Column(db.Integer(), default=0)
    attenuation_down = db.Column(db.Integer(), default=0)
    attained_upstream = db.Column(db.Integer(), default=0)
    attained_downstream = db.Column(db.Integer(), default=0)
    threshold_upstream = db.Column(db.Integer(), default=0)
    threshold_downstream = db.Column(db.Integer(), default=0)
    max_delay_upstream = db.Column(db.Integer(), default=0)
    max_delay_downsteam = db.Column(db.Integer(), default=0)
    if_index = db.Column(db.Integer(), default=94502912)
    high_speed = db.Column(db.Integer(), default=0)
    connector_present = db.Column(db.Enum('not-applicable'),
                                  default='not-applicable')
    media = db.Column(db.FLOAT, default=0.0)
    largest_pkt_size = db.Column(db.Integer(), default=0)
    curr_bandwith = db.Column(db.Integer(), default=1244000000)
    phy_addr = db.Column(db.String(), default='')
    last_chg_opr_stat = db.Column(db.String(), default='352-02:55:19')
    pkts_unknown_proto = db.Column(db.Integer(), default=0)
    in_octets = db.Column(db.Integer(), default=0)
    out_octets = db.Column(db.Integer(), default=0)
    in_ucast_pkts = db.Column(db.Integer(), default=0)
    out_ucast_pkts = db.Column(db.Integer(), default=0)
    in_mcast_pkts = db.Column(db.Integer(), default=0)
    out_mcast_pkts = db.Column(db.Integer(), default=0)
    in_broadcast_pkts = db.Column(db.Integer(), default=0)
    out_broadcast_pkts = db.Column(db.Integer(), default=0)
    in_discard_pkts = db.Column(db.Integer(), default=0)
    out_discard_pkts = db.Column(db.Integer(), default=0)
    in_err_pkts = db.Column(db.Integer(), default=0)
    out_err_pkts = db.Column(db.Integer(), default=0)
    in_octets_hc = db.Column(db.Integer(), default=0)
    out_octets_hc = db.Column(db.Integer(), default=0)
    in_ucast_pkts_hc = db.Column(db.Integer(), default=0)
    out_ucast_pkts_hc = db.Column(db.Integer(), default=0)
    in_mcast_pkts_hc = db.Column(db.Integer(), default=0)
    out_mcast_pkts_hc = db.Column(db.Integer(), default=0)
    in_broadcast_pkts_hc = db.Column(db.Integer(), default=0)
    out_broadcast_pkts_hc = db.Column(db.Integer(), default=0)
    position = db.Column(db.String())
    diag_avail_status = db.Column(db.Enum('no-error'), default='no-error')
    los = db.Column(db.Enum('not-available'), default='not-available')
    tx_fault = db.Column(db.Enum('no-tx-fault'), default='no-tx-fault')
    tx_power = db.Column(db.String(), default='"3.85 dBm"')
    rx_power = db.Column(db.Enum('not-available'), default='not-available')
    tx_bias_current = db.Column(db.String(), default='"16.17 mA"')
    supply_voltage = db.Column(db.String(), default='"3.23 VDC"')
    temperature = db.Column(db.String(), default='"57.39 degrees Celsius"')
    temperature_tca = db.Column(db.Enum('normal-value'),
                                default='normal-value')
    voltage_tca = db.Column(db.Enum('normal-value'), default='normal-value')
    bias_current_tca = db.Column(db.Enum('normal-value'),
                                 default='normal-value')
    tx_power_tca = db.Column(db.Enum('normal-value'), default='normal-value')
    rx_power_tca = db.Column(db.Enum('normal-value'), default='normal-value')
    rssi_profile_id = db.Column(db.Integer, default=65535)
    rssi_state = db.Column(db.Enum('enable'), default='enable')
    inp_up = db.Column(db.Integer(), default=0)
    inp_dn = db.Column(db.Integer(), default=0)
    interl_us = db.Column(db.Integer(), default=0)
    interl_dn = db.Column(db.Integer(), default=0)
    cur_op_mode = db.Column(db.Enum('default'), default='default')
    rinit_1d = db.Column(db.Integer(), default=0)
    actual_tps_tc_mode = db.Column(db.Enum('ptm'), default='ptm')
    rtx_mode_up = db.Column(db.Enum('unknown'), default='unknown')
    rtx_mode_dn = db.Column(db.Enum('unknown'), default='unknown')
    total_reset_attempt = db.Column(db.Integer(), default=0)
    success_reset_attempt = db.Column(db.Integer(), default=0)
    service_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    spectrum_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    vect_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    dpbo_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    qos_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    inventory_status = db.Column(db.Enum('cage-empty', 'no-error'),
                                 default='cage-empty')
    alu_part_num = db.Column(db.String(), default='not-available')
    tx_wavelength = db.Column(db.String(), default='not-available')
    fiber_type = db.Column(db.Enum('not-available', 'single-mode'),
                           default='not-available')
    rssi_sfptype = db.Column(db.String(), default='not-available')
    mfg_name = db.Column(db.String(), default='NEOPHOTONICS')
    mfg_oui = db.Column(db.String(), default='000000')
    mfg_date = db.Column(db.String(), default='27/10/2016')
    egress_port = db.Column(db.Boolean(), default=False)

    # Huawei data
    ont_autofind = db.Column(db.Boolean(), default=False)
    loopback = db.Column(db.Enum('enable', 'disable'), default='disable')
    dynamic_profile = db.Column(db.Enum('Bind no dynamic-profile', ''),
                                default='')
    dynamic_profile_index = db.Column(db.String(), default='-')
    dynamic_profile_name = db.Column(db.String(), default='-')
    line_template = db.Column(db.String(), default='')
    line_template_num = db.Column(db.String(), nullable=True, default='-')
    alarm_template = db.Column(db.String(), default='No.1 DEFVAL')
    alarm_template_num = db.Column(db.Integer(), nullable=False, default=1)
    line_spectrum_profile = db.Column(db.String(), default='')
    spectrum_profile_num = db.Column(db.String(), nullable=True, default='-')
    upbo_profile = db.Column(db.String(), default='')
    upbo_profile_num = db.Column(db.String(), nullable=True, default='-')
    dpbo_profile = db.Column(db.String(), default='')
    dpbo_profile_num = db.Column(db.String(), nullable=True, default='-')
    rfi_profile = db.Column(db.String(), default='')
    rfi_profile_num = db.Column(db.String(), nullable=True, default='-')
    noise_margin_profile = db.Column(db.String(), default='')
    noise_margin_profile_num = db.Column(db.String(),
                                         nullable=True,
                                         default='-')
    virtual_noise_profile = db.Column(db.String(), default='')
    virtual_noise_profile_num = db.Column(db.String(),
                                          nullable=True,
                                          default='-')
    inm_profile = db.Column(db.String(), default='')
    inm_profile_num = db.Column(db.String(), nullable=True, default='-')
    sos_profile = db.Column(db.String(), default='')
    sos_profile_num = db.Column(db.String(), nullable=True, default='-')
    hardware = db.Column(db.Enum('XTU-C', 'ATU-C'), default='XTU-C')
    last_up_time = db.Column(db.String(), default='2019-09-17 11:46:10+01:00')
    last_down_time = db.Column(db.String(),
                               default='2019-09-17 11:45:24+01:00')
    show_time = db.Column(db.Integer(), nullable=False, default=0)
    nte_power_status = db.Column(db.Enum('on', 'off'), default='off')
    current_operational_mode = db.Column(db.String(),
                                         default='No Protocol Selected')
    total_count_of_line_training = db.Column(db.Integer(),
                                             nullable=False,
                                             default=0)
    result_last_initialization = db.Column(
        db.Enum('No failure'),
        default='No failure')  # Find corresponding value(s)
    total_bytes_us = db.Column(db.Integer(), default=448203129)
    total_packets_us = db.Column(db.Integer(), default=6386689)
    total_bytes_ds = db.Column(db.Integer(), default=430667320)
    total_packets_ds = db.Column(db.Integer(), default=6493472)
    total_discarded_packets_ds = db.Column(db.Integer(), default=0)
    channel_packets_discarded_ds = db.Column(db.Integer(), default=0)

    channel_ds_data_rate_profile = db.Column(db.String(), default='')
    channel_ds_data_rate_profile_num = db.Column(db.String(),
                                                 nullable=True,
                                                 default='-')
    channel_us_data_rate_profile = db.Column(db.String(), default='')
    channel_us_data_rate_profile_num = db.Column(db.String(),
                                                 nullable=True,
                                                 default='-')
    channel_inp_delay_profile = db.Column(db.String(), default='')
    channel_inp_data_rate_profile_num = db.Column(db.String(),
                                                  nullable=True,
                                                  default='-')
    channel_ds_rate_adapt_ratio = db.Column(db.String(),
                                            nullable=True,
                                            default='-')
    channel_us_rate_adapt_ratio = db.Column(db.String(),
                                            nullable=True,
                                            default='-')
    standard_port_in_training = db.Column(db.String(),
                                          default='G.993.2-Annex B')
    current_power_management_state = db.Column(db.String(),
                                               default='Full-on state')
    retransmission_used_us = db.Column(
        db.String(), default='Unused, retransmission mode is forbidden')
    retransmission_used_ds = db.Column(
        db.String(), default='Unused, retransmission mode is forbidden')
    signal_attenuation_ds_1 = db.Column(db.FLOAT(), default=3.9)
    signal_attenuation_us_1 = db.Column(db.FLOAT(), default=5.5)
    line_attenuation_ds_1 = db.Column(db.FLOAT(), default=3.9)
    line_attenuation_us_1 = db.Column(db.FLOAT(), default=5.5)
    act_line_rate_ds_1 = db.Column(db.Integer(), default=35584)
    act_line_rate_us_1 = db.Column(db.Integer(), default=4168)
    line_snr_margin_ds_1 = db.Column(db.FLOAT(), default=33.0)
    line_snr_margin_us_1 = db.Column(db.FLOAT(), default=39.2)
    vdsl_2_psd_class_mask = db.Column(db.String(), default='B998M2x')
    act_psd_ds = db.Column(db.String(), default='-')
    act_psd_us = db.Column(db.String(), default='-')
    act_klo_co = db.Column(db.String(), default='24')
    act_klo_cpe = db.Column(db.String(), default='30')
    us_1_band_act_klo_val = db.Column(db.String(), default='24')
    us_2_band_act_klo_val = db.Column(db.String(), default='24')
    us_3_band_act_klo_val = db.Column(db.String(), default='-')
    us_4_band_act_klo_val = db.Column(db.String(), default='-')
    ds_1_band_act_klo_val = db.Column(db.String(), default='-')
    ds_2_band_act_klo_val = db.Column(db.String(), default='-')
    ds_3_band_act_klo_val = db.Column(db.String(), default='-')
    ds_4_band_act_klo_val = db.Column(db.String(), default='-')
    receive_signal_threshhold_ds = db.Column(db.Integer(), default=-30)
    receive_signal_threshhold_us = db.Column(db.Integer(), default=-15)
    total_output_power_ds = db.Column(db.FLOAT(), default=10.8)
    total_output_power_us = db.Column(db.FLOAT(), default=-7.5)
    current_vdsl_2_profile = db.Column(db.String(), default='Profile17a')
    coding_gain_ds = db.Column(db.String(), default='-')
    coding_gain_us = db.Column(db.String(), default='-')
    power_cut_back_ds = db.Column(db.String(), default='-')
    signal_attenuation_ds_2 = db.Column(db.FLOAT(), default=7.1)
    line_attenuation_ds_2 = db.Column(db.FLOAT(), default=7.1)
    line_snr_margin_ds_2 = db.Column(db.FLOAT(), default=32.6)
    signal_attenuation_us_2 = db.Column(db.FLOAT(), default=7.3)
    line_attenuation_us_2 = db.Column(db.FLOAT(), default=79)
    line_snr_margin_us_2 = db.Column(db.FLOAT(), default=37.9)
    signal_attenuation_ds_3 = db.Column(db.FLOAT(), default=11.4)
    line_attenuation_ds_3 = db.Column(db.FLOAT(), default=11.3)
    line_snr_margin_ds_3 = db.Column(db.FLOAT(), default=34.0)
    actual_limit_psd_mask = db.Column(db.String(),
                                      default='AnnexB998ADE17-M2x-B(B8-12)')
    actual_transmit_rate_adapt_ds = db.Column(db.String(),
                                              default='AdaptAtStartup')
    actual_transmit_rate_adapt_us = db.Column(db.String(),
                                              default='AdaptAtStartup')
    actual_inp_of_roc_ds = db.Column(db.String(), default='-')
    actual_inp_of_roc_us = db.Column(db.String(), default='-')
    actual_snr_margin_of_roc_ds = db.Column(db.String(), default='-')
    actual_snr_margin_of_roc_us = db.Column(db.String(), default='-')
    trellis_mode_ds = db.Column(db.Enum('Enable', 'Disable'), default='Enable')
    trellis_mode_us = db.Column(db.Enum('Enable', 'Disable'), default='Enable')
    last_down_cause = db.Column(db.String(), default='LOS')
    port_energy_saving_flag = db.Column(db.Enum('Yes', 'No'), default='No')
    xpon_mac_chipset_state = db.Column(db.String(), default='Normal')
    signal_detect = db.Column(db.String(), default='Normal')
    available_bandwidth = db.Column(db.Integer(), default=1202323)
    illegal_rogue_ont = db.Column(db.String(), default='Inexistent')
    optical_module_status = db.Column(db.Enum('Online', 'Offline'),
                                      default='Online')
    laser_state = db.Column(db.String(), default='Normal')
    tx_fault_h = db.Column(db.String(), default='Normal')
    temperature_h = db.Column(db.FLOAT(), default=61)
    temperature_h_exact = db.Column(db.FLOAT(), default=61.505050)
    tx_bias_current_h = db.Column(db.FLOAT(), default=28)
    tx_bias_current_h_exact = db.Column(db.FLOAT(), default=28.000023)
    supply_voltage_h = db.Column(db.FLOAT(), default=3.20)
    supply_voltage_h_exact = db.Column(db.FLOAT(), default=3.200002)
    tx_power_h = db.Column(db.FLOAT(), default=3.67)
    tx_power_h_exact = db.Column(db.FLOAT(), default=3.670001)
    rx_power_h = db.Column(db.FLOAT(), default=-12.6)
    rx_power_h_exact = db.Column(db.FLOAT(), default=-12.680000)
    vendor_name = db.Column(db.String(), default='Hisense')
    vendor_rev = db.Column(db.FLOAT(), default=1.0)
    vendor_oui = db.Column(db.String(), default='Unspecified')
    vendor_pn = db.Column(db.String(), default='LTE3680M-BC+')
    vendor_sn = db.Column(db.String(), default='M5071013838')
    date_code = db.Column(db.String(), default='17-01-12')
    vendor_specific = db.Column(
        db.String(), default='00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00')
    module_type = db.Column(db.String(), default='GPON')
    module_sub_type = db.Column(db.String(), default='CLASS B+')
    used_type = db.Column(db.String(), default='OLT')
    encapsulation_time = db.Column(db.String(), default='SFP')
    sff_8472_compliance = db.Column(
        db.String(), default='Includes functionality described in Rev 9.5')
    min_distance = db.Column(db.Integer(), default=0)
    max_distance = db.Column(db.Integer(), default=30)
    max_rate = db.Column(db.Integer(), default=2500000)
    rate_identifier = db.Column(db.String(), default='Unspecified(0x0)')
    wave_length = db.Column(db.Integer(), default=1490)
    fiber_type_h = db.Column(db.String(), default='Single Mode')
    identifier = db.Column(db.String(), default='SFP or SFP Plus')
    ext_identifier = db.Column(
        db.String(),
        default='GBIC/SFP function is defined by two-wire interface ID only')
    connector = db.Column(db.String(), default='SC')
    encoding = db.Column(db.String(), default='NRZ')
    length_9_um = db.Column(db.String(), default='40.0')
    length_50_um = db.Column(db.String(), default='-')
    length_62_5_um = db.Column(db.String(), default='-')
    length_copper = db.Column(db.String(), default='-')
    length_50_um_om_3 = db.Column(db.String(), default='-')
    br_max = db.Column(db.String(), default='Unspecified')
    br_min = db.Column(db.String(), default='Unspecified')
    cc_base = db.Column(db.String(), default='0x4d(Correct)')
    cc_exit = db.Column(db.String(), default='0xb3(Correct)')
    rx_power_warning_threshold = db.Column(db.String(), default='[-29.2,-8.0]')
    rx_power_alarm_threshold = db.Column(db.String(), default='[-30.0,-7.0]')
    tx_power_warning_threshold = db.Column(db.String(), default='[1.0,5.0]')
    tx_power_alarm_threshold = db.Column(db.String(), default='[0.6,5.6]')
    tx_bias_warning_threshold = db.Column(db.String(),
                                          default='[0.000,70.000]')
    tx_bias_alarm_threshold = db.Column(db.String(), default='[0.000,90.000]')
    supply_voltage_warning_threshold = db.Column(db.String(),
                                                 default='[3.100,3.500]')
    supply_voltage_alarm_threshold = db.Column(db.String(),
                                               default='[3.000,3.600]')
    temperature_warning_threshold = db.Column(db.String(), default='[-8,75]')
    temperature_alarm_threshold = db.Column(db.String(), default='[-13,80]')
    optic_status = db.Column(db.Enum('normal', 'absence'), default='normal')
    native_vlan = db.Column(db.String(), default='-')
    mdi = db.Column(db.String(), default='-')
    speed_h = db.Column(db.Enum('100', '1000', '10000', '100000', 'auto_1000',
                                'auto'),
                        default='1000')
    duplex = db.Column(db.Enum('full', 'auto_full', 'auto'), default='full')
    flow_ctrl = db.Column(db.Enum('on', 'off'), default='off')
    active_state = db.Column(db.Enum('active', 'deactive'), default='deactive')
    link = db.Column(db.Enum('offline', 'online', 'failed'), default='offline')
    detecting_time = db.Column(db.String(), default='-')
    tx_state = db.Column(db.Enum('off', 'on'), default='off')
    resume_detect = db.Column(db.String(), default='-')
    detect_interval = db.Column(db.String(), default='-')
    resume_duration = db.Column(db.String(), default='-')
    auto_sensing = db.Column(db.Enum('enable', 'disable'), default='disable')
    alm_prof_15_min = db.Column(db.String(), default='-')
    warn_prof_15_min = db.Column(db.String(), default='-')
    alm_prof_24_hour = db.Column(db.String(), default='-')
    warn_prof_24_hour = db.Column(db.String(), default='-')
    combo_status = db.Column(db.Enum('-', 'optic', 'electric'),
                             default='optic')
    vlan_id = db.Column(db.Integer())
    vectoring_group = db.Column(db.Integer(), default=None)
    vectoring_profile_id = db.Column(db.Integer(), default=None)
    template_name = db.Column(db.String(), default=None)

    # KeyMile
    channels = db.relationship('Channel', backref='Port', lazy='dynamic')
    interfaces = db.relationship('Interface', backref='Port', lazy='dynamic')
    label1 = db.Column(db.String(), default='""')
    label2 = db.Column(db.String(), default='""')
    loopbacktest_state = db.Column(db.Enum('Failed', 'Passed', 'Running',
                                           'NoTestResult', 'Stopped',
                                           'Interrupted'),
                                   default='NoTestResult')
    melttest_state = db.Column(db.Enum('Failed', 'Passed', 'Running',
                                       'NotTested'),
                               default='NotTested')
    linetest_state = db.Column(db.Enum('Failed', 'Passed', 'Running',
                                       'NotTested'),
                               default='NotTested')
    mode = db.Column(db.String(), default='')
    flow_control = db.Column(db.String(), default='')
    # profiles
    profile1_enable = db.Column(db.Boolean(), default=False)
    profile1_name = db.Column(db.String(), default='')
    profile1_elength = db.Column(db.Integer, default=0)
    profile2_enable = db.Column(db.Boolean(), default=False)
    profile2_name = db.Column(db.String(), default='')
    profile2_elength = db.Column(db.Integer, default=0)
    profile3_enable = db.Column(db.Boolean(), default=False)
    profile3_name = db.Column(db.String(), default='')
    profile3_elength = db.Column(db.Integer, default=0)
    profile4_enable = db.Column(db.Boolean(), default=False)
    profile4_name = db.Column(db.String(), default='')
    profile_mode = db.Column(db.Enum('Priority', 'ElectricalLoopLength'),
                             default=None)

    # PBN
    spanning_tree_guard_root = db.Column(db.Boolean(), default=False)
    switchport_trunk_vlan_allowed = db.Column(db.String(), default=None)
    switchport_mode_trunk = db.Column(db.Boolean(), default=False)
    switchport_pvid = db.Column(db.Integer(), default=None)
    no_lldp_transmit = db.Column(db.Boolean(), default=False)
    pbn_speed = db.Column(db.Integer(), default=None)
    switchport_block_multicast = db.Column(db.Boolean(), default=False)
    switchport_rate_limit_egress = db.Column(db.Integer(), default=None)
    switchport_rate_limit_ingress = db.Column(db.Integer(), default=None)
    no_pdp_enable = db.Column(db.Boolean(), default=False)
    no_snmp_trap_link_status = db.Column(db.Boolean(), default=False)
    exclamation_mark = db.Column(db.Boolean(), default=False)
    switchport_protected = db.Column(db.Integer(), default=None)

    #Edgecore
    mac_address = db.Column(db.String(), default='A8-2B-B5-7F-E3-C0')
Esempio n. 7
0
class PortProfile(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    description = db.Column(db.String())
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    type = db.Column(db.Enum('service', 'spectrum', 'dpbo', 'rtx', 'vect', 'sos', 'ghs', 'qos', 'policer', 'vce',
                             'data-rate', 'noise-margin', 'inp-delay', 'mode-specific-psd'))

    # Alcatel Data
    up_policer = db.Column(db.String(), default=None, nullable=True)
    down_policer = db.Column(db.String(), default=None, nullable=True)
    committed_info_rate = db.Column(db.Integer(), default=0, nullable=False)
    committed_burst_size = db.Column(db.Integer(), default=0, nullable=False)
    logical_flow_type = db.Column(db.Enum('generic'), default='generic')

    # Huawei data
    maximum_bit_error_ratio = db.Column(db.Integer(), default=None)
    path_mode = db.Column(db.Integer(), default=None)
    rate = db.Column(db.String(), default=None)
    etr_max = db.Column(db.Integer(), default=None)
    etr_min = db.Column(db.Integer(), default=None)
    ndr_max = db.Column(db.Integer(), default=None)
    working_mode = db.Column(db.Integer(), default=None)
    eside_electrical_length = db.Column(db.String(), default=None)
    assumed_exchange_psd = db.Column(db.String(), default=None)
    eside_cable_model = db.Column(db.String(), default=None)
    min_usable_signal = db.Column(db.Integer(), default=None)
    span_frequency = db.Column(db.String(), default=None)
    dpbo_calculation = db.Column(db.Integer(), default=None)
    snr_margin = db.Column(db.String(), default=None)
    rate_adapt = db.Column(db.String(), default=None)
    snr_mode = db.Column(db.String(), default=None)
    inp_4khz = db.Column(db.String(), default=None)
    inp_8khz = db.Column(db.String(), default=None)
    interleaved_delay = db.Column(db.String(), default=None)
    delay_variation = db.Column(db.Integer(), default=None)
    channel_policy = db.Column(db.Integer(), default=None)
    nominal_transmit_PSD_ds = db.Column(db.Integer(), default=None)
    nominal_transmit_PSD_us = db.Column(db.Integer(), default=None)
    aggregate_transmit_power_ds = db.Column(db.Integer(), default=None)
    aggregate_transmit_power_us = db.Column(db.Integer(), default=None)
    aggregate_receive_power_us = db.Column(db.Integer(), default=None)
    upstream_psd_mask_selection = db.Column(db.Integer(), default=None)
    psd_class_mask = db.Column(db.Integer(), default=None)
    psd_limit_mask = db.Column(db.Integer(), default=None)
    l0_time = db.Column(db.Integer(), default=None)
    l2_time = db.Column(db.Integer(), default=None)
    l3_time = db.Column(db.Integer(), default=None)
    max_transmite_power_reduction = db.Column(db.Integer(), default=None)
    total_max_power_reduction = db.Column(db.Integer(), default=None)
    bit_swap_ds = db.Column(db.Integer(), default=None)
    bit_swap_us = db.Column(db.Integer(), default=None)
    overhead_datarate_us = db.Column(db.Integer(), default=None)
    overhead_datarate_ds = db.Column(db.Integer(), default=None)
    allow_transitions_to_idle = db.Column(db.Integer(), default=None)
    allow_transitions_to_lowpower = db.Column(db.Integer(), default=None)
    reference_clock = db.Column(db.String(), default=None)
    cyclic_extension_flag = db.Column(db.Integer(), default=None)
    force_inp_ds = db.Column(db.Integer(), default=None)
    force_inp_us = db.Column(db.Integer(), default=None)
    g_993_2_profile = db.Column(db.Integer(), default=None)
    mode_specific = db.Column(db.String(), default=None)
    transmode = db.Column(db.String(), default=None)
    T1_413 = db.Column(db.String(), default=None)
    G_992_1 = db.Column(db.String(), default=None)
    G_992_2 = db.Column(db.String(), default=None)
    G_992_3 = db.Column(db.String(), default=None)
    G_992_4 = db.Column(db.String(), default=None)
    G_992_5 = db.Column(db.String(), default=None)
    AnnexB_G_993_2 = db.Column(db.String(), default=None)
    ETSI = db.Column(db.String(), default=None)
    us0_psd_mask = db.Column(db.Integer(), default=None)
    vdsltoneblackout = db.Column(db.String(), default=None)
    internal_id = db.Column(db.Integer(), default=None)

    vmac_ipoe = db.Column(db.Enum('enable', 'disable'), default=None)
    vmac_pppoe = db.Column(db.Enum('enable', 'disable'), default=None)
    vmac_pppoa = db.Column(db.Enum('enable', 'disable'), default=None)
    vlan_mac = db.Column(db.Enum('forwarding', 'discard'), default=None)
    packet_policy_multicast = db.Column(db.Enum('forward', 'discard'), default=None)
    packet_policy_unicast = db.Column(db.Enum('forward', 'discard'), default=None)
    security_anti_ipspoofing = db.Column(db.Enum('enable', 'disable'), default=None)
    security_anti_macspoofing = db.Column(db.Enum('enable', 'disable'), default=None)
    igmp_mismatch = db.Column(db.Enum('transparent'), default=None)
    commit = db.Column(db.Boolean(), default=False)
    number = db.Column(db.Integer, default=None)
Esempio n. 8
0
class Card(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    subrack_id = db.Column(db.Integer, db.ForeignKey('subrack.id'))
    ports = db.relationship('Port', backref='Card', lazy='dynamic')
    ppc = db.Column(db.Enum('8', '16', '32', '48', '64'), default='32')
    product = db.Column(db.Enum('xdsl', 'vdsl', 'adsl', 'sdsl', 'ftth-pon',
                                'ftth', 'mgnt', 'analog', 'isdn'),
                        nullable=False,
                        default='vdsl')

    # Alcatel specific data
    description = db.Column(db.String(), default='""')
    position = db.Column(db.String())
    entry_vlan_number = db.Column(db.Integer())
    planned_type = db.Column(db.Enum('rdlt-c', 'rant-a', 'nant-a', 'nrnt-a',
                                     'fant-f', 'relt-a', 'nelt-b', 'fglt-b',
                                     'ngfc-f', 'empty'),
                             default='empty')
    dual_tag_mode = db.Column(db.Boolean(), default=False)
    actual_type = db.Column(db.Enum('rdlt-c', 'rant-a', 'nant-a', 'nrnt-a',
                                    'fant-f', 'relt-a', 'nelt-b', 'fglt-b',
                                    'ngfc-f', 'empty'),
                            default='empty')
    admin_state = db.Column(db.Enum('0', '1'),
                            default='0')  # Alcatel: 0 => disabled, 1 => unlock
    operational_state = db.Column(db.Enum(
        '0', '1'), default='0')  # Alcatel: 0 => disabled, 1 => enabled
    err_state = db.Column(db.Enum('no-error', 'error', 'type-mismatch'),
                          default='no-error')
    availability = db.Column(db.Enum('available', 'unavailable',
                                     'not-installed'),
                             default='available')
    alarm_profile = db.Column(db.Enum('none'), default='none')
    capab_profile = db.Column(db.Enum('32port_xDSL', 'fttu_lt',
                                      'not_applicable'),
                              default='32port_xDSL')
    manufacturer = db.Column(db.Enum('ALCL', ''), default='')
    mnemonic = db.Column(db.Enum('RDLT-C', 'FGLT-B', 'FANT-F', 'NGFC-F',
                                 'RANT-A', 'NANT-A', 'NRNT-A', 'RELT-A',
                                 'NELT-B', 'NGFC-F', ''),
                         default='')
    pba_code = db.Column(db.String(), default='')
    fpba_code = db.Column(db.String(), default='')
    fpba_ics = db.Column(db.String(), default='')
    clei_code = db.Column(db.String(), default='')
    serial_no = db.Column(db.String(), default='')
    failed_test = db.Column(db.String(), default='00:00:00:00')
    lt_restart_time = db.Column(db.String(), default='1970-01-01:00:00:00')
    lt_restart_cause = db.Column(db.Enum('poweron', 'poweroff', 'other'),
                                 default='poweron')
    lt_restart_num = db.Column(db.Integer(), default=0)
    mgnt_entity_oamipaddr = db.Column(db.String(), default='0.0.0.0')
    mgnt_entity_pairnum = db.Column(db.Integer(), default=0)
    dual_host_ip = db.Column(db.String(), default='0.0.0.0')
    dual_host_loc = db.Column(db.Enum('none'), default='none')
    sensor_id = db.Column(db.Integer(), default=0)
    act_temp = db.Column(db.Integer(), default=0)
    tca_low = db.Column(db.Integer(), default=0)
    tca_high = db.Column(db.Integer(), default=0)
    shut_low = db.Column(db.Integer(), default=0)
    shut_high = db.Column(db.Integer(), default=0)
    restrt_cnt = db.Column(db.Integer(), default=0)
    vce_profile_id = db.Column(db.Integer(), default=None, nullable=True)
    vplt_autodiscover = db.Column(db.Enum('enabled', 'disabled'),
                                  default='disabled')
    vect_fallback_spectrum_profile = db.Column(db.Integer(), default=None)
    vect_fallback_fb_vplt_com_fail = db.Column(db.Boolean, default=False)
    vect_fallback_fb_cpe_cap_mism = db.Column(db.Boolean, default=False)
    vect_fallback_fb_conf_not_feas = db.Column(db.Boolean, default=False)

    # Huawei specific data
    board_name = db.Column(db.String(), default='H83BVCMM')
    board_status = db.Column(db.Enum('Normal', 'Failed', 'Active_normal',
                                     'Standby_failed'),
                             default='Normal')
    sub_type_0 = db.Column(db.String(), default='')
    sub_type_1 = db.Column(db.String(), default='')
    power_status = db.Column(db.String(), default='POWER-ON')
    power_off_cause = db.Column(db.String(), default='-')
    power_off_time = db.Column(db.String(), default='-')
    temperature = db.Column(db.String(), default='68C')

    # Keymile specific data
    supplier_build_state = db.Column(db.Enum('R1G', 'R1D', 'R2B', 'R2A', 'R1K',
                                             'R1H', 'R2B', 'R1E', 'R3D', 'R1C',
                                             'R1A', ''),
                                     default='')
    board_id = db.Column(db.Enum('345', '332', '303', '308', '377', '356',
                                 '305', '307', '330', '0'),
                         default='0')
    hardware_key = db.Column(db.Integer(), default=0)
    software = db.Column(db.String(), default='')
    software_name = db.Column(db.String(), default='')
    software_revision = db.Column(db.String(), default='')
    state = db.Column(db.Enum('Ok', 'Empty'), default='Empty')
    serial_number = db.Column(db.String(), default='')
    manufacturer_name = db.Column(db.String(), default='')
    model_name = db.Column(db.String(), default='')
    short_text = db.Column(db.String(), default='')
    manufacturer_id = db.Column(db.String(), default='')
    manufacturer_part_number = db.Column(db.String(), default='')
    manufacturer_build_state = db.Column(db.String(), default='')
    customer_id = db.Column(db.String(), default='')
    customer_product_id = db.Column(db.String(), default='')
    boot_loader = db.Column(db.String(), default='')
    processor = db.Column(db.String(), default='')
    label1 = db.Column(db.String(), default='""')
    label2 = db.Column(db.String(), default='""')
    gateway_ipaddress = db.Column(db.String(), default='""')
    subnet_mask = db.Column(db.String(), default='""')
    default_gateway = db.Column(db.String(), default='""')

    # Keymile ipsx2/3 card SIP specifications
    gateway_name = db.Column(db.String(), default='""')
    home_domain = db.Column(db.String(), default='""')
    sip_port_number = db.Column(db.Integer(), default=0)
    country_code = db.Column(db.String(), default='')
    area_code = db.Column(db.String(), default='')
    retransmission_timer = db.Column(db.Integer(), default=0)
    max_retransmission_interval = db.Column(db.Integer(), default=0)
    sip_extension = db.Column(db.Boolean, default=False)
    asserted_id_mode = db.Column(db.Enum('Asserted', 'Preferred'),
                                 default=None)
    overlap_signalling = db.Column(db.Boolean, default=False)
    overlap_timer = db.Column(db.Integer(), default=0)
    uac_request_timer = db.Column(db.Boolean, default=False)
    uas_request_timer = db.Column(db.Boolean, default=False)
    session_expiration = db.Column(db.Integer(), default=0)
    # Keymile ipsx2/3 card Proxy specification
    proxy_mode = db.Column(db.Enum('PrimaryOnly', 'Revertive', 'NonRevertive',
                                   'DnsRfc3263'),
                           default='PrimaryOnly')
    proxy_address = db.Column(db.String(), default='""')
    proxy_port = db.Column(db.Integer(), default=5060)
    proxy_address_sec = db.Column(db.String(), default='""')
    proxy_port_sec = db.Column(db.Integer(), default=0)
    proxy_enable = db.Column(db.Boolean, default=True)
    proxy_method = db.Column(db.Enum('Options', 'Register'), default='Options')
    proxy_interval = db.Column(db.Integer(), default=10)
    # Keymile ipsx2/3 card Registrar specification
    registrar_adress = db.Column(db.String(), default='')
    registrar_port = db.Column(db.Integer(), default=5060)
    registration_mode = db.Column(db.Enum('NoRegistration',
                                          'OneByOneRegistration'),
                                  default='OneByOneRegistration')
    registration_expiration_time = db.Column(db.Integer(), default=100)

    # Keymile ipsx2/3 card digimap specification
    #digimap_uri_schema = db.Column(db.Enum('sip', 'tel'), default='sip')
    #digit_map = db.Column(db.String(), default='')
    #digimap_domain_phone_context = db.Column(db.String(), default='')
    #digimap_prestrip = db.Column(db.Integer(), default=0)
    #digimap_prepend = db.Column(db.String(), default='')

    #Edgecore
    mac_address = db.Column(db.String(), default='A8-2B-B5-7F-E3-C0')
Esempio n. 9
0
class Version(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    model_id = db.Column(db.Integer, db.ForeignKey('model.id'))
Esempio n. 10
0
class Ont(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    description = db.Column(db.String())
    admin_state = db.Column(
        db.Enum('0', '1'), default='0'
    )  # Alcatel: 0 => down, 1 => up; Huawei: 0 => offline, 1 => online
    operational_state = db.Column(
        db.Enum('0', '1'), default='0'
    )  # Alcatel: 0 => down, 1 => up; Huawei: 0 => offline, 1 => online
    vendor_id = db.Column(db.String(), default=None)
    version = db.Column(db.String(), default=None)

    box_id = db.Column(db.Integer, db.ForeignKey('box.id'))
    port_id = db.Column(db.Integer, db.ForeignKey('port.id'))
    ont_ports = db.relationship('OntPort', backref='Ont', lazy='dynamic')

    # Alcatel data
    index = db.Column(db.Integer(), nullable=False, default=1)
    type = db.Column(db.Enum('10gbaselr', '1000basebx10u', '100basetxfd',
                             '1000basebx10d', '100basebx10d', '1000baselx10'),
                     default='1000baselx10')
    basebx10d = db.Column(db.Enum('yes', 'no'), default='no')
    media_available = db.Column(db.Enum('available', 'not-available'),
                                default='not-available')
    jabber_state = db.Column(db.Enum('jabber', 'no-jabber'),
                             default='no-jabber')
    b100basefxfd = db.Column(db.Enum('yes', 'no'), default='no')
    b100baselx10 = db.Column(db.Enum('yes', 'no'), default='no')
    b100basebx10d = db.Column(db.Enum('yes', 'no'), default='no')
    b100basebx10u = db.Column(db.Enum('yes', 'no'), default='no')
    b100basetxfd = db.Column(db.Enum('yes', 'no'), default='no')
    b1000basetfd = db.Column(db.Enum('yes', 'no'), default='no')
    b10gbasetfd = db.Column(db.Enum('yes', 'no'), default='no')
    b1000basesxfd = db.Column(db.Enum('yes', 'no'), default='no')
    b1000baselx10 = db.Column(db.Enum('yes', 'no'), default='no')
    b1000baselxfd = db.Column(db.Enum('yes', 'no'), default='no')
    b1000basebx10u = db.Column(db.Enum('yes', 'no'), default='no')
    b1000basebx10d = db.Column(db.Enum('yes', 'no'), default='no')
    b10gbaser = db.Column(db.Enum('yes', 'no'), default='no')
    b10gbaselr = db.Column(db.Enum('yes', 'no'), default='no')
    b10gbaseer = db.Column(db.Enum('yes', 'no'), default='no')
    b2500basex = db.Column(db.Enum('yes', 'no'), default='no')
    auto_neg_supported = db.Column(db.Boolean(), default=False)
    auto_neg_status = db.Column(db.Enum('configuring', 'disabled', 'complete'),
                                default='disabled')
    cap100base_tfd = db.Column(db.Enum('yes', 'no'), default='no')
    cap1000base_xfd = db.Column(db.Enum('yes', 'no'), default='no')
    cap1000base_tfd = db.Column(db.Enum('yes', 'no'), default='no')
    cap10gbase_tfd = db.Column(db.Enum('yes', 'no'), default='no')
    act_num_data_ports = db.Column(db.Integer(), nullable=True)
    act_num_voice_ports = db.Column(db.Integer(), nullable=True)
    actual_card_type = db.Column(db.Enum('ethernet', 'pon'),
                                 default='ethernet')
    actual_ont_integ = db.Column(db.Enum('integrated'))
    actual_serial_num = db.Column(db.String(),
                                  nullable=False,
                                  default='123456789')
    actual_version_num = db.Column(db.String(),
                                   nullable=False,
                                   default='123456789')
    actual_vendorid = db.Column(db.String(),
                                nullable=False,
                                default='123456789')
    actual_cardid = db.Column(db.String(), nullable=False, default='123456789')
    state = db.Column(db.Enum('enabled'))
    provision = db.Column(db.Boolean(), default=False)
    sernum = db.Column(db.String(), nullable=False, default='123456789')
    subscriber_locid = db.Column(db.Enum('DEFAULT', '0000000000'),
                                 default='DEFAULT')
    loss_of_signal = db.Column(db.Enum('no'), default='no')
    loss_of_ack = db.Column(db.Enum('no'), default='no')
    loss_of_gem = db.Column(db.Enum('no'), default='no')
    physical_eqpt_err = db.Column(db.Enum('no'), default='no')
    startup_failure = db.Column(db.Enum('no'), default='no')
    signal_degrade = db.Column(db.Enum('no'), default='no')
    ont_disabled = db.Column(db.Enum('no'), default='no')
    msg_error_msg = db.Column(db.Enum('no'), default='no')
    inactive = db.Column(db.Enum('no'), default='no')
    loss_of_frame = db.Column(db.Enum('no'), default='no')
    signal_fail = db.Column(db.Enum('no'), default='no')
    dying_gasp = db.Column(db.Enum('no'), default='no')
    deactivate_fail = db.Column(db.Enum('no'), default='no')
    loss_of_ploam = db.Column(db.Enum('no'), default='no')
    drift_of_window = db.Column(db.Enum('no'), default='no')
    remote_defect_ind = db.Column(db.Enum('no'), default='no')
    loss_of_key_sync = db.Column(db.Enum('no'), default='no')
    rogue_ont_disabled = db.Column(db.Enum('no'), default='no')
    diff_reach = db.Column(db.Enum('no'), default='no')
    ont_olt_distance = db.Column(db.String(), default='12.4')
    eqpt_ver_num = db.Column(db.String(), default='3FE56389AEBA01')
    sw_ver_act = db.Column(db.String(), default='3FE56065AFGB89')
    sw_ver_psv = db.Column(db.String(), default='3FE56065AFBB48')
    equip_id = db.Column(db.String(), default='3FE56389AEBA01')
    actual_num_slots = db.Column(db.Integer(), default=1)
    num_tconts = db.Column(db.Integer(), default=32)
    num_trf_sched = db.Column(db.Integer(), default=32)
    num_prio_queues = db.Column(db.Integer(), default=124)
    auto_sw_planned_ver = db.Column(db.String(), default='3FE56065AFGB89')
    auto_sw_download_ver = db.Column(db.String(), default='3FE56065AFGB89')
    yp_serial_no = db.Column(db.String(), default='B1406AF0')
    oper_spec_ver = db.Column(db.Enum('unknown'), default='unknown')
    act_ont_type = db.Column(db.Enum('sfu'), default='sfu')
    act_txpower_ctrl = db.Column(db.Enum('tx-rx'), default='tx-rx')
    sn_bundle_status = db.Column(db.Enum('idle'), default='idle')
    cfgfile1_ver_act = db.Column(db.String(), default='')
    cfgfile1_ver_psv = db.Column(db.String(), default='')
    cfgfile2_ver_act = db.Column(db.String(), default='')
    cfgfile2_ver_psv = db.Column(db.String(), default='')
    rx_signal_level = db.Column(db.Float(), default=-14.788)
    tx_signal_level = db.Column(db.Float(), default=2.146)
    ont_temperature = db.Column(db.Float(), default=49.602)
    ont_voltage = db.Column(db.Float(), default=3.32)
    laser_bias_curr = db.Column(db.Float(), default=9950.0)
    olt_rx_sig_level = db.Column(db.Float(), default=-18.8)

    # Huawei data
    serial_number = db.Column(db.String(), default='485754433AD3209C')
    control_flag = db.Column(db.Enum('active'), default='active')
    config_state = db.Column(db.Enum('normal'), default='normal')
    match_state = db.Column(db.Enum('match'), default='match')
    protect_side = db.Column(db.Enum('no', 'yes'), default='no')
    dba_type = db.Column(db.String(), default='SR')
    ont_distance = db.Column(db.Integer(), default=2000)
    ont_last_distance = db.Column(db.Integer(), default=2000)
    ont_battery_state = db.Column(db.String(), default='not support')
    memory_occupation = db.Column(db.String())
    cpu_occupation = db.Column(db.String())
    temperature = db.Column(db.String(), default='50(C)')
    authentic_type = db.Column(db.String(), default='SN-auth')
    management_mode = db.Column(db.String(), default='OMCI')
    software_work_mode = db.Column(db.String(), default='normal')
    isolation_state = db.Column(db.String(), default='normal')
    ont_ip_zero_address_mask = db.Column(db.String(), default='-')
    last_down_cause = db.Column(db.String(), default='-')
    last_up_time = db.Column(db.String(), default='2020-01-01 00:00:00+01:00')
    last_down_time = db.Column(db.String(), default='-')
    last_dying_gasp = db.Column(db.String(), default='-')
    ont_online_duration = db.Column(db.String())
    type_c_support = db.Column(db.String(), default='Not support')
    interoperability_mode = db.Column(db.String(), default='ITU-T')
    power_reduction_status = db.Column(db.String(), default='-')
    fec_upstream_state = db.Column(db.String(), default='use-profile-config')

    port_number_pots = db.Column(db.Enum('adaptive', '0'), default='adaptive')
    max_adaptive_num_pots = db.Column(db.String, default='32')
    port_number_eth = db.Column(db.Enum('adaptive', '0'), default='adaptive')
    max_adaptive_num_eth = db.Column(db.String(), default='8')
    port_number_vdsl = db.Column(db.Enum('adaptive', '0'), default='0')
    max_adaptive_num_vdsl = db.Column(db.String(), default='-')
    lineprofile_id = db.Column(db.Integer(), nullable=True)
    srvprofile_id = db.Column(db.Integer(), nullable=True)
    software_version = db.Column(db.String(), default=None)

    # PBN data
    mac_address = db.Column(db.String(), default=None)
Esempio n. 11
0
class Model(db.Model):
    id = db.Column(db.Integer(), primary_key=True)
    name = db.Column(db.String(64))
    vendor_id = db.Column(db.Integer, db.ForeignKey('vendor.id'))
    versions = db.relationship('Version', backref='Model', lazy='dynamic')