コード例 #1
0
class User(base.Resource):
    """Represents a logical User resource"""

    id = base.Field('id')
    name = base.Field('name')
    status = base.Field('status')
    lock_status = base.Field('lock_status')
コード例 #2
0
class CpePort(base.Resource):
    """Represent physical cpe port resource."""

    id = base.Field('id')
    cpe_id = base.Field('cpe_id')
    name = base.Field('name')
    description = base.Field('description')
コード例 #3
0
class Vlan(base.Resource):
    """Represent a VLAN resource."""

    id = base.Field('id')
    number = base.Field('number')
    name = base.Field('name')
    description = base.Field('description')
    mtu = base.Field('mtu')
コード例 #4
0
class PortProfile(base.Resource):
    """Represent a port profile resource."""

    id = base.Field('id')
    name = base.Field('name')
    description = base.Field('description')
    type = base.Field('type')
    box_id = base.Field('box_id')
コード例 #5
0
class OntPort(base.Resource):
    """Represent physical ONT port resource."""

    id = base.Field('id')
    box_id = base.Field('box_id')
    ont_id = base.Field('ont_id')
    name = base.Field('name')
    description = base.Field('description')
コード例 #6
0
class AlcatelPortProfile(PortProfile):
    """Represent a PortProfile resource."""

    up_policer = base.Field('up_policer')
    down_policer = base.Field('down_policer')
    committed_info_rate = base.Field('committed_info_rate')
    committed_burst_size = base.Field('committed_burst_size')
    logical_flow_type = base.Field('logical_flow_type')
コード例 #7
0
class Credentials(base.Resource):
    """Represent user credentials."""

    id = base.Field('id')
    user_id = base.Field('user_id')
    protocol = base.Field('protocol')
    username = base.Field('username')
    password = base.Field('password')
コード例 #8
0
class EdgeCoreCard(Card):
    """Represent physical shelf resource."""

    mac_address = base.Field('mac_address')
    admin_state = base.Field('admin_state')
    operational_state = base.Field('operational_state')

    def set(self, field, value):
        mapping = {field: value}
        self.update(**mapping)
コード例 #9
0
class PBNUser(User):
    """Represents a logical User resource"""

    level = base.Field('level')
    profile = base.Field('profile')

    def set_online(self):
        self.update(status='online')

    def set_offline(self):
        self.update(status='offline')
コード例 #10
0
class EdgeCorePort(Port):
    """Represent physical port resource."""

    mac_address = base.Field('mac_address')

    def set(self, field, value):
        mapping = {field: value}
        self.update(**mapping)
コード例 #11
0
class HuaweiServiceVlan(ServiceVlan):
    """Represent logical service vlan resource."""

    tag = base.Field('tag')
    mode = base.Field('mode')

    def set_tag(self, tag):
        """Set the tag to given value."""
        self.update(tag=tag)

    def set_service_port_id(self, id):
        """Set the service port id to given id."""
        self.update(service_port_id=id)

    def set_mode(self, mode):
        """Set the mode to given vlaue."""
        self.update(mode=mode)
コード例 #12
0
class HuaweiRoute(Route):
    """Represents logical route resource."""

    sub_mask = base.Field('sub_mask')

    def set(self, field, value):
        mapping = {field: value}
        self.update(**mapping)
コード例 #13
0
class MgmtPort(base.Resource):
    """Represent physical port resource."""

    id = base.Field('id')
    name = base.Field('name')
    box_id = base.Field('box_id')
    card_id = base.Field('card_id')
    description = base.Field('description')
    admin_state = base.Field('admin_state')
    operational_state = base.Field('operational_state')

    def admin_up(self):
        """Set the admin port state to up"""
        self.update(admin_state='1')

    def admin_down(self):
        """Set the admin port state to down"""
        self.update(admin_state='0')

    def down(self):
        """Set the port state to down"""
        self.update(operational_state='0')

    def up(self):
        """Set the port state to up"""
        self.update(operational_state='1')
コード例 #14
0
class AlcatelServiceVlan(ServiceVlan):
    """Represent logical service vlan resource."""

    l2fwder_vlan = base.Field('l2fwder_vlan')
    scope = base.Field('scope')
    tag = base.Field('tag')

    def set_l2fwder_vlan(self, vlan_number):
        """Set the set_l2fwder_vlan to given vlan-number."""
        self.update(l2fwder_vlan=vlan_number)

    def set_scope(self, scope):
        """Set the scope to given value."""
        self.update(scope=scope)

    def set_tag(self, tag):
        """Set the tag to given value."""
        self.update(tag=tag)
コード例 #15
0
class ServiceVlan(base.Resource):
    """Represent logical service vlan resource."""

    id = base.Field('id')
    name = base.Field('name')
    vlan_id = base.Field('vlan_id')
    service_port_id = base.Field('service_port_id')
    qos_profile_id = base.Field('qos_profile_id')
    scope = base.Field('scope')
    tag = base.Field('tag')
    card_id = base.Field('card_id')
コード例 #16
0
class HuaweiCard(Card):
    """Represent physical shelf resource."""

    board_name = base.Field('board_name')
    board_status = base.Field('board_status')
    sub_type_0 = base.Field('sub_type_0')
    sub_type_1 = base.Field('sub_type_1')
    power_status = base.Field('power_status')
    power_off_cause = base.Field('power_off_cause')
    power_off_time = base.Field('power_off_time')
    temperature = base.Field('temperature')
コード例 #17
0
class AlcatelServicePort(ServicePort):
    """Represent logical service port resource."""

    pvid = base.Field('pvid')
    qos_profile_id = base.Field('qos_profile_id')
    max_unicast_mac = base.Field('max_unicast_mac')
    pvc = base.Field('pvc')

    def set_max_unicast_mac(self, value):
        """Set the max_unicast_mac value"""
        self.update(max_unicast_mac=value)

    def set_qos_profile(self, profile_id):
        """Set the qos_profile_id to given id."""
        self.update(qos_profile_id=profile_id)

    def set_pvid(self, value):
        """Set the pvid value to given val"""
        self.update(pvid=value)
コード例 #18
0
class EdgeCoreInterface(Interface):
    """Represent a VlanInterface resource."""

    port_id = base.Field('port_id')
    ingress_state = base.Field('ingress_state')
    ingress_rate = base.Field('ingress_rate')
    egress_state = base.Field('egress_state')
    egress_rate = base.Field('egress_rate')
    vlan_membership_mode = base.Field('vlan_membership_mode')
    native_vlan = base.Field('native_vlan')
    allowed_vlan = base.Field('allowed_vlan')
    mac_address = base.Field('mac_address')

    def set(self, field, value):
        mapping = {field: value}
        self.update(**mapping)
コード例 #19
0
class AlcatelOntPort(OntPort):
    """Represent physical ONT port resource."""

    admin_state = base.Field('admin_state')
    operational_state = base.Field('operational_state')
    uni_idx = base.Field('uni_idx')
    config_indicator = base.Field('config_indicator')
    link_status = base.Field('link_status')
    speed = base.Field('speed')

    def port_up(self):
        """Change ont port state to up."""
        self.update(operational_state='1')

    def port_down(self):
        """Change ont port state to down."""
        self.update(operational_state='0')

    def admin_up(self):
        """Change ont port admin state to up."""
        self.update(admin_state='1')

    def admin_down(self):
        """Change ont port admin state to down."""
        self.update(admin_state='0')

    def set_description(self, user):
        """Set the description of the ont port"""
        self.update(description=user)

    def set_speed(self, speed):
        """Set the speed of the ont port"""
        self.update(speed=speed)
コード例 #20
0
class Card(base.Resource):
    """Represent physical shelf resource."""
    id = base.Field('id')
    name = base.Field('name')
    box_id = base.Field('box_id')
    subrack_id = base.Field('subrack_id')
    product = base.Field('product')
    description = base.Field('description')
コード例 #21
0
class PBNOntPort(OntPort):
    """Represent physical ONT port resource."""
    operational_state = base.Field('operational_state')
    admin_state = base.Field('admin_state')
    flow_control = base.Field('flow_control')
    duplex = base.Field('duplex')
    speed = base.Field('speed')
    storm_control = base.Field('storm_control')
コード例 #22
0
class HuaweiUser(User):
    """Represents a logical User resource"""

    level = base.Field('level')
    profile = base.Field('profile')
    append_info = base.Field('append_info')
    reenter_num = base.Field('reenter_num')
    reenter_num_temp = base.Field('reenter_num_temp')

    def set_online(self):
        self.update(status='online')

    def set_offline(self):
        self.update(status='offline')

    def lock(self):
        self.update(lock_status='locked')

    def unlock(self):
        self.update(lock_status='unlocked')

    def set_reenter_num_temp(self, num):
        self.update(reenter_num_temp=num)
コード例 #23
0
class Cpe(base.Resource):
    """Represent physical cpe resource."""

    id = base.Field('id')
    port_id = base.Field('port_id')
    ont_port_id = base.Field('ont_port_id')
    name = base.Field('name')
    description = base.Field('description')
    serial_no = base.Field('serial_no')
    admin_state = base.Field('admin_state')
    mac = base.Field('mac')

    def down(self):
        """Change ont port admin state to down."""
        self.update(admin_state='0')

    def up(self):
        """Change ont port admin state to up."""
        self.update(admin_state='1')
コード例 #24
0
class KeyMileSrvc(base.Resource):
    """Represent logical srvc resource."""

    id = base.Field('id')
    name = base.Field('name')
    service_type = base.Field('service_type')
    address = base.Field('address')
    svid = base.Field('svid')
    stag_priority = base.Field('stag_priority')
    vlan_handling = base.Field('vlan_handling')

    def set_service(self, address, svid, stag_prio, vlan):
        self.update(address=address)
        self.update(svid=svid)
        self.update(stag_priority=stag_prio)
        self.update(vlan_handling=vlan)
コード例 #25
0
class Ont(base.Resource):
    """Represent physical shelf resource."""

    id = base.Field('id')
    box_id = base.Field('box_id')
    port_id = base.Field('port_id')
    name = base.Field('name')
    description = base.Field('description')
    admin_state = base.Field('admin_state')
    operational_state = base.Field('operational_state')

    def down(self):
        """Change ont port admin state to down."""
        self.update(admin_state='0')

    def up(self):
        """Change ont port admin state to up."""
        self.update(admin_state='1')
コード例 #26
0
class HuaweiVlan(Vlan):
    """Represent a VLAN resource."""

    type = base.Field('type')
    attribute = base.Field('attribute')
    bind_service_profile_id = base.Field('bind_service_profile_id')
    bind_RAIO_profile_index = base.Field('bind_RAIO_profile_index')
    priority = base.Field('priority')
    native_vlan = base.Field('native_vlan')
    tag = base.Field('tag')

    def set_tag(self, tag):
        """Set the tag to given value."""
        self.update(tag=tag)

    def set_type_smart(self):
        """Change the type to smart"""
        self.update(type="smart")

    def set_service_profile_id(self, id):
        """Set service profile_id"""
        self.update(bind_service_profile_id=id)
コード例 #27
0
class ServicePort(base.Resource):
    """Represent logical service port resource."""

    id = base.Field('id')
    name = base.Field('name')
    connected_id = base.Field('connected_id')
    connected_type = base.Field('connected_type')
    admin_state = base.Field('admin_state')
    operational_state = base.Field('operational_state')

    def set_admin_state(self, status):
        """Set the admin-status of the service_port"""
        self.update(admin_state=status)

    def set_connected_id(self, id):
        """Set the port id to given id."""
        self.update(connected_id=id)

    def set_connected_type(self, obj):
        """Set is_configured_on to the given value"""
        self.update(connected_type=obj)
コード例 #28
0
class KeyMileMgmtCard(MgmtCard):
    """Represent physical shelf resource."""

    board_name = base.Field('board_name')
    supplier_build_state = base.Field('supplier_build_state')
    board_id = base.Field('board_id')
    hardware_key = base.Field('hardware_key')
    software = base.Field('software')
    software_name = base.Field('software_name')
    software_revision = base.Field('software_revision')
    state = base.Field('state')
    serial_number = base.Field('serial_number')
    manufacturer_name = base.Field('manufacturer_name')
    model_name = base.Field('model_name')
    short_text = base.Field('short_text')
    manufacturer_id = base.Field('manufacturer_id')
    manufacturer_part_number = base.Field('manufacturer_part_number')
    manufacturer_build_state = base.Field('manufacturer_build_state')
    customer_id = base.Field('customer_id')
    customer_product_id = base.Field('customer_product_id')
    boot_loader = base.Field('boot_loader')
    processor = base.Field('processor')
    label1 = base.Field('label1')
    label2 = base.Field('label2')
    product = base.Field('product')

    def set_label(self, l1, l2, desc):
        self.update(label1=l1)
        self.update(label2=l2)
        self.update(description=desc)
コード例 #29
0
class HuaweiPort(Port):
    """Represent physical port resource."""

    cpes = base.Field('cpes')
    description = base.Field('description')
    loopback = base.Field('loopback')
    line_template = base.Field('line_template')
    alarm_template = base.Field('alarm_template')
    dynamic_profile_index = base.Field('dynamic_profile_index')
    dynamic_profile_name = base.Field('dynamic_profile_name')
    hardware = base.Field('hardware')
    last_up_time = base.Field('last_up_time')
    last_down_time = base.Field('last_down_time')
    show_time = base.Field('show_time')
    nte_power_status = base.Field('nte_power_status')
    current_operational_mode = base.Field('current_operational_mode')
    total_count_of_line_training = base.Field('total_count_of_line_training')
    result_last_initialization = base.Field('result_last_initialization')
    total_bytes_us = base.Field('total_bytes_us')
    total_packets_us = base.Field('total_packets_us')
    total_bytes_ds = base.Field('total_bytes_ds')
    total_packets_ds = base.Field('total_packets_ds')
    total_discarded_packets_ds = base.Field('total_discarded_packets_ds')
    channel_packets_discarded_ds = base.Field('channel_packets_discarded_ds')

    dynamic_profile = base.Field('dynamic_profile')
    line_template_num = base.Field('line_template_num')
    alarm_template_num = base.Field('alarm_template_num')
    line_spectrum_profile = base.Field('line_spectrum_profile')
    spectrum_profile_num = base.Field('spectrum_profile_num')
    upbo_profile = base.Field('upbo_profile')
    upbo_profile_num = base.Field('upbo_profile_num')
    dpbo_profile = base.Field('dpbo_profile')
    dpbo_profile_num = base.Field('dpbo_profile_num')
    rfi_profile = base.Field('rfi_profile')
    rfi_profile_num = base.Field('rfi_profile_num')
    noise_margin_profile = base.Field('noise_margin_profile')
    noise_margin_profile_num = base.Field('noise_margin_profile_num')
    virtual_noise_profile = base.Field('virtual_noise_profile')
    virtual_noise_profile_num = base.Field('virtual_noise_profile_num')
    inm_profile = base.Field('inm_profile')
    inm_profile_num = base.Field('inm_profile_num')
    sos_profile = base.Field('sos_profile')
    sos_profile_num = base.Field('sos_profile_num')
    channel_ds_data_rate_profile = base.Field('channel_ds_data_rate_profile')
    channel_ds_data_rate_profile_num = base.Field(
        'channel_ds_data_rate_profile_num')
    channel_us_data_rate_profile = base.Field('channel_us_data_rate_profile')
    channel_us_data_rate_profile_num = base.Field(
        'channel_us_data_rate_profile_num')
    channel_inp_delay_profile = base.Field('channel_inp_delay_profile')
    channel_inp_data_rate_profile_num = base.Field(
        'channel_inp_data_rate_profile_num')
    channel_ds_rate_adapt_ratio = base.Field('channel_ds_rate_adapt_ratio')
    channel_us_rate_adapt_ratio = base.Field('channel_us_rate_adapt_ratio')
    standard_port_in_training = base.Field('standard_port_in_training')
    current_power_management_state = base.Field(
        'current_power_management_state')
    retransmission_used_us = base.Field('retransmission_used_us')
    retransmission_used_ds = base.Field('retransmission_used_ds')
    signal_attenuation_ds_1 = base.Field('signal_attenuation_ds_1')
    signal_attenuation_us_1 = base.Field('signal_attenuation_us_1')
    line_attenuation_ds_1 = base.Field('line_attenuation_ds_1')
    line_attenuation_us_1 = base.Field('line_attenuation_us_1')
    act_line_rate_ds_1 = base.Field('act_line_rate_ds_1')
    act_line_rate_us_1 = base.Field('act_line_rate_us_1')
    line_snr_margin_ds_1 = base.Field('line_snr_margin_ds_1')
    line_snr_margin_us_1 = base.Field('line_snr_margin_us_1')
    vdsl_2_psd_class_mask = base.Field('vdsl_2_psd_class_mask')
    act_psd_ds = base.Field('act_psd_ds')
    act_psd_us = base.Field('act_psd_us')
    act_klo_co = base.Field('act_klo_co')
    act_klo_cpe = base.Field('act_klo_cpe')
    us_1_band_act_klo_val = base.Field('us_1_band_act_klo_val')
    us_2_band_act_klo_val = base.Field('us_2_band_act_klo_val')
    us_3_band_act_klo_val = base.Field('us_3_band_act_klo_val')
    us_4_band_act_klo_val = base.Field('us_4_band_act_klo_val')
    ds_1_band_act_klo_val = base.Field('ds_1_band_act_klo_val')
    ds_2_band_act_klo_val = base.Field('ds_2_band_act_klo_val')
    ds_3_band_act_klo_val = base.Field('ds_3_band_act_klo_val')
    ds_4_band_act_klo_val = base.Field('ds_4_band_act_klo_val')
    receive_signal_threshhold_ds = base.Field('receive_signal_threshhold_ds')
    receive_signal_threshhold_us = base.Field('receive_signal_threshhold_us')
    total_output_power_ds = base.Field('total_output_power_ds')
    total_output_power_us = base.Field('total_output_power_us')
    current_vdsl_2_profile = base.Field('current_vdsl_2_profile')
    coding_gain_ds = base.Field('coding_gain_ds')
    coding_gain_us = base.Field('coding_gain_us')
    power_cut_back_ds = base.Field('power_cut_back_ds')
    signal_attenuation_ds_2 = base.Field('signal_attenuation_ds_2')
    line_attenuation_ds_2 = base.Field('line_attenuation_ds_2')
    line_snr_margin_ds_2 = base.Field('line_snr_margin_ds_2')
    signal_attenuation_us_2 = base.Field('signal_attenuation_us_2')
    line_attenuation_us_2 = base.Field('line_attenuation_us_2')
    line_snr_margin_us_2 = base.Field('line_snr_margin_us_2')
    signal_attenuation_ds_3 = base.Field('signal_attenuation_ds_3')
    line_attenuation_ds_3 = base.Field('line_attenuation_ds_3')
    line_snr_margin_ds_3 = base.Field('line_snr_margin_ds_3')
    actual_limit_psd_mask = base.Field('actual_limit_psd_mask')
    actual_transmit_rate_adapt_ds = base.Field('actual_transmit_rate_adapt_ds')
    actual_transmit_rate_adapt_us = base.Field('actual_transmit_rate_adapt_us')
    actual_inp_of_roc_ds = base.Field('actual_inp_of_roc_ds')
    actual_inp_of_roc_us = base.Field('actual_inp_of_roc_us')
    actual_snr_margin_of_roc_ds = base.Field('actual_snr_margin_of_roc_ds')
    actual_snr_margin_of_roc_us = base.Field('actual_snr_margin_of_roc_us')
    trellis_mode_ds = base.Field('trellis_mode_ds')
    trellis_mode_us = base.Field('trellis_mode_us')
    last_down_cause = base.Field('last_down_cause')
    port_energy_saving_flag = base.Field('port_energy_saving_flag')
    xpon_mac_chipset_state = base.Field('xpon_mac_chipset_state')
    signal_detect = base.Field('signal_detect')
    available_bandwidth = base.Field('available_bandwidth')
    illegal_rogue_ont = base.Field('illegal_rogue_ont')
    optical_module_status = base.Field('optical_module_status')
    laser_state = base.Field('laser_state')
    tx_fault_h = base.Field('tx_fault_h')
    temperature_h = base.Field('temperature_h')
    tx_bias_current_h = base.Field('tx_bias_current_h')
    supply_voltage_h = base.Field('supply_voltage_h')
    tx_power_h = base.Field('tx_power_h')
    vendor_name = base.Field('vendor_name')
    vendor_rev = base.Field('vendor_rev')
    vendor_oui = base.Field('vendor_oui')
    vendor_pn = base.Field('vendor_pn')
    vendor_sn = base.Field('vendor_sn')
    date_code = base.Field('date_code')
    vendor_specific = base.Field('vendor_specific')
    module_type = base.Field('module_type')
    module_sub_type = base.Field('module_sub_type')
    used_type = base.Field('used_type')
    encapsulation_time = base.Field('encapsulation_time')
    sff_8472_compliance = base.Field('sff_8472_compliance')
    min_distance = base.Field('min_distance')
    max_distance = base.Field('max_distance')
    max_rate = base.Field('max_rate')
    rate_identifier = base.Field('rate_identifier')
    wave_length = base.Field('wave_length')
    fiber_type_h = base.Field('fiber_type_h')
    identifier = base.Field('identifier')
    ext_identifier = base.Field('ext_identifier')
    connector = base.Field('connector')
    encoding = base.Field('encoding')
    length_9_um = base.Field('length_9_um')
    length_50_um = base.Field('length_50_um')
    length_62_5_um = base.Field('length_62_5_um')
    length_copper = base.Field('length_copper')
    length_50_um_om_3 = base.Field('length_50_um_om_3')
    br_max = base.Field('br_max')
    br_min = base.Field('br_min')
    cc_base = base.Field('cc_base')
    cc_exit = base.Field('cc_exit')
    rx_power_warning_threshold = base.Field('rx_power_warning_threshold')
    rx_power_alarm_threshold = base.Field('rx_power_alarm_threshold')
    tx_power_warning_threshold = base.Field('tx_power_warning_threshold')
    tx_power_alarm_threshold = base.Field('tx_power_alarm_threshold')
    tx_bias_warning_threshold = base.Field('tx_bias_warning_threshold')
    tx_bias_alarm_threshold = base.Field('tx_bias_alarm_threshold')
    supply_voltage_warning_threshold = base.Field(
        'supply_voltage_warning_threshold')
    supply_voltage_alarm_threshold = base.Field(
        'supply_voltage_alarm_threshold')
    temperature_warning_threshold = base.Field('temperature_warning_threshold')
    temperature_alarm_threshold = base.Field('temperature_alarm_threshold')
    optic_status = base.Field('optic_status')
    native_vlan = base.Field('native_vlan')
    mdi = base.Field('mdi')
    speed_h = base.Field('speed_h')
    duplex = base.Field('duplex')
    flow_ctrl = base.Field('flow_ctrl')
    active_state = base.Field('active_state')
    link = base.Field('link')
    detecting_time = base.Field('detecting_time')
    tx_state = base.Field('tx_state')
    resume_detect = base.Field('resume_detect')
    detect_interval = base.Field('detect_interval')
    resume_duration = base.Field('resume_duration')
    auto_sensing = base.Field('auto_sensing')
    alm_prof_15_min = base.Field('alm_prof_15_min')
    warn_prof_15_min = base.Field('warn_prof_15_min')
    alm_prof_24_hour = base.Field('alm_prof_24_hour')
    warn_prof_24_hour = base.Field('warn_prof_24_hour')
    combo_status = base.Field('combo_status')

    temperature_h_exact = base.Field('temperature_h_exact')
    supply_voltage_h_exact = base.Field('supply_voltage_h_exact')
    tx_bias_current_h_exact = base.Field('tx_bias_current_h_exact')
    tx_power_h_exact = base.Field('tx_power_h_exact')
    rx_power_h_exact = base.Field('rx_power_h_exact')
    rx_power_h = base.Field('rx_power_h')
    vlan_id = base.Field('vlan_id')
    vectoring_group = base.Field('vectoring_group')
    vectoring_profile_id = base.Field('vectoring_profile_id')
    ont_autofind = base.Field('ont_autofind')
    template_name = base.Field('template_name')

    def admin_up(self):
        self.update(admin_state='2')

    def admin_down(self):
        self.update(admin_state='0')

    def port_downstream_set(self, ds_rate):
        self.update(downstream_max=ds_rate)

    def port_upstream_set(self, us_rate):
        self.update(upstream_max=us_rate)

    def set_vlan_id(self, id):
        self.update(vlan_id=id)

    def set_vectoring_group(self, group):
        self.update(vectoring_group=group)

    def enable_ont_autofind(self):
        self.update(ont_autofind=True)

    def disable_ont_autofind(self):
        self.update(ont_autofind=False)

    def set_template_name(self, template):
        self.update(template_name=template)

    def set_vectoring_profile_id(self, id):
        self.update(vectoring_profile_id=id)

    def set(self, field, value):
        mapping = {field: value}
        self.update(**mapping)
コード例 #30
0
class HuaweiEmu(base.Resource):
    """Represent logical emu resource."""

    #fields
    number = base.Field('number')
    name = base.Field('name')
    type = base.Field('type')
    emu_state = base.Field('emu_state')
    used = base.Field('used')
    frame_id = base.Field('frame_id')
    subnode = base.Field('subnode')
    com_port = base.Field('com_port')
    limit_state = base.Field('limit_state')
    charge_state = base.Field('charge_state')
    charge_control = base.Field('charge_control')
    module_number = base.Field('module_number')
    module_0_address = base.Field('module_0_address')
    module_0_type = base.Field('module_0_type')
    module_0_current = base.Field('module_0_current')
    module_0_voltage = base.Field('module_0_voltage')
    battery_capacity = base.Field('battery_capacity')
    battery_0_current = base.Field('battery_0_current')
    dc_voltage = base.Field('dc_voltage')