pub trait Olt: Send + 'static {
Show 26 methods
// Required methods
fn connect(
host: &str,
port: i32,
user: &str,
pass: &str,
) -> Result<Self, Error>
where Self: Sized;
fn list_unprovisioned_onts(
&mut self,
) -> Result<Vec<UnprovisionedOnt>, Error>;
fn find_onts_by_description(
&mut self,
description: &str,
) -> Result<Vec<OntInfoByDesc>, Error>;
fn get_ont_by_sn(&mut self, serial_number: &str) -> Result<OntInfo, Error>;
fn get_ont_summary(
&mut self,
scope: &OntSummaryScope,
) -> Result<Vec<OntSummaryPort>, Error>;
fn list_line_profiles(&mut self) -> Result<Vec<LineProfile>, Error>;
fn get_line_profile(&mut self, id: u32) -> Result<LineProfileDetail, Error>;
fn list_service_profiles(&mut self) -> Result<Vec<SrvProfile>, Error>;
fn get_ont_optical_info(
&mut self,
fsp: &Fsp,
ont_id: u32,
) -> Result<OntOpticalInfo, Error>;
fn ont_add(&mut self, request: &OntAddRequest) -> Result<u32, Error>;
fn ont_delete_all(&mut self, fsp: &Fsp) -> Result<(), Error>;
fn ont_port_native_vlan(
&mut self,
request: &OntPortNativeVlanRequest,
) -> Result<(), Error>;
fn list_alarms_detail(&mut self) -> Result<Vec<AlarmDetail>, Error>;
fn list_alarms(&mut self) -> Result<Vec<AlarmListEntry>, Error>;
fn list_service_ports(&mut self) -> Result<Vec<ServicePort>, Error>;
fn get_service_port(&mut self, id: u32) -> Result<ServicePortDetail, Error>;
fn list_service_ports_by_port(
&mut self,
fsp: &Fsp,
) -> Result<Vec<ServicePort>, Error>;
fn list_service_ports_by_ont(
&mut self,
fsp: &Fsp,
ont_id: u32,
) -> Result<Vec<ServicePort>, Error>;
fn service_port_add(
&mut self,
request: &ServicePortAddRequest,
) -> Result<(), Error>;
fn service_port_undo(&mut self, id: u32) -> Result<(), Error>;
fn list_vlans(&mut self) -> Result<Vec<Vlan>, Error>;
fn get_vlan(&mut self, id: u32) -> Result<VlanDetail, Error>;
fn create_vlan(&mut self, id: u32, vlan_type: VlanType) -> Result<(), Error>;
fn delete_vlan(&mut self, id: u32) -> Result<(), Error>;
fn ping(&mut self) -> Result<(), Error>;
fn quit(&mut self) -> Result<(), Error>;
}Expand description
Vendor-neutral interface for interacting with an OLT device.
Each OLT model (e.g. Huawei MA5800-X7, ZTE ZXA-C6xx) implements this trait, mapping domain operations to vendor-specific CLI commands internally.
Required Methods§
Sourcefn connect(host: &str, port: i32, user: &str, pass: &str) -> Result<Self, Error>where
Self: Sized,
fn connect(host: &str, port: i32, user: &str, pass: &str) -> Result<Self, Error>where
Self: Sized,
Establish an SSH connection to the OLT device.
Sourcefn list_unprovisioned_onts(&mut self) -> Result<Vec<UnprovisionedOnt>, Error>
fn list_unprovisioned_onts(&mut self) -> Result<Vec<UnprovisionedOnt>, Error>
List ONTs that have been discovered but not yet provisioned.
Sourcefn find_onts_by_description(
&mut self,
description: &str,
) -> Result<Vec<OntInfoByDesc>, Error>
fn find_onts_by_description( &mut self, description: &str, ) -> Result<Vec<OntInfoByDesc>, Error>
Search for ONTs whose description matches the given text.
Sourcefn get_ont_by_sn(&mut self, serial_number: &str) -> Result<OntInfo, Error>
fn get_ont_by_sn(&mut self, serial_number: &str) -> Result<OntInfo, Error>
Get detailed ONT information by serial number.
Sourcefn get_ont_summary(
&mut self,
scope: &OntSummaryScope,
) -> Result<Vec<OntSummaryPort>, Error>
fn get_ont_summary( &mut self, scope: &OntSummaryScope, ) -> Result<Vec<OntSummaryPort>, Error>
Get ONT summary for a frame, slot, or specific port.
Sourcefn list_line_profiles(&mut self) -> Result<Vec<LineProfile>, Error>
fn list_line_profiles(&mut self) -> Result<Vec<LineProfile>, Error>
List all GPON line profiles.
Sourcefn get_line_profile(&mut self, id: u32) -> Result<LineProfileDetail, Error>
fn get_line_profile(&mut self, id: u32) -> Result<LineProfileDetail, Error>
Get details of a specific GPON line profile.
Sourcefn list_service_profiles(&mut self) -> Result<Vec<SrvProfile>, Error>
fn list_service_profiles(&mut self) -> Result<Vec<SrvProfile>, Error>
List all GPON service profiles.
Sourcefn get_ont_optical_info(
&mut self,
fsp: &Fsp,
ont_id: u32,
) -> Result<OntOpticalInfo, Error>
fn get_ont_optical_info( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<OntOpticalInfo, Error>
Get optical information for a specific ONT.
Sourcefn ont_add(&mut self, request: &OntAddRequest) -> Result<u32, Error>
fn ont_add(&mut self, request: &OntAddRequest) -> Result<u32, Error>
Add an ONT on a GPON port and return the allocated ONT ID.
Sourcefn ont_delete_all(&mut self, fsp: &Fsp) -> Result<(), Error>
fn ont_delete_all(&mut self, fsp: &Fsp) -> Result<(), Error>
Delete all ONTs provisioned on a GPON port.
Sourcefn ont_port_native_vlan(
&mut self,
request: &OntPortNativeVlanRequest,
) -> Result<(), Error>
fn ont_port_native_vlan( &mut self, request: &OntPortNativeVlanRequest, ) -> Result<(), Error>
Configure the native VLAN on an ONT port.
Sourcefn list_alarms_detail(&mut self) -> Result<Vec<AlarmDetail>, Error>
fn list_alarms_detail(&mut self) -> Result<Vec<AlarmDetail>, Error>
List all active alarms with full detail.
Sourcefn list_alarms(&mut self) -> Result<Vec<AlarmListEntry>, Error>
fn list_alarms(&mut self) -> Result<Vec<AlarmListEntry>, Error>
List all active alarms in compact form.
Sourcefn list_service_ports(&mut self) -> Result<Vec<ServicePort>, Error>
fn list_service_ports(&mut self) -> Result<Vec<ServicePort>, Error>
List all service ports.
Sourcefn get_service_port(&mut self, id: u32) -> Result<ServicePortDetail, Error>
fn get_service_port(&mut self, id: u32) -> Result<ServicePortDetail, Error>
Get details of a specific service port by index.
Sourcefn list_service_ports_by_port(
&mut self,
fsp: &Fsp,
) -> Result<Vec<ServicePort>, Error>
fn list_service_ports_by_port( &mut self, fsp: &Fsp, ) -> Result<Vec<ServicePort>, Error>
List service ports on a specific physical port.
Sourcefn list_service_ports_by_ont(
&mut self,
fsp: &Fsp,
ont_id: u32,
) -> Result<Vec<ServicePort>, Error>
fn list_service_ports_by_ont( &mut self, fsp: &Fsp, ont_id: u32, ) -> Result<Vec<ServicePort>, Error>
List service ports for a specific ONT on a port.
Sourcefn service_port_add(
&mut self,
request: &ServicePortAddRequest,
) -> Result<(), Error>
fn service_port_add( &mut self, request: &ServicePortAddRequest, ) -> Result<(), Error>
Create a service port.