-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
Problem Description
When running the show state xpath /ietf-interfaces:interfaces command, interfaces have configured IP addresses, but the output does not include any related IP address information.
Steps to Reproduce
- Configure an IPv4 or IPv6 address on an interface.
- Run
show state xpath /ietf-interfaces:interfacesto check the state. - The output shows only the basic interface fields (like name), but no IP address fields.
Expected Behavior
The state output should contain all configured IPv4/IPv6 addresses for each interface.
Preliminary Analysis
- The code (
holo-interface/src/northbound/state.rs) only implements state callbacks for basic fields (interface name). State callbacks for IP addresses are not registered or implemented, so IP addresses are missing from the state output. - The
holo-interface/src/interface.rsstruct includes anaddressesfield; so the data does exist. - It's recommended to refer to the northbound state implementations in OSPF/ISIS modules, and add state callbacks for
/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/addressand/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address.
Relevant Code Snippet
// Only returns name
.get_object(|_master, args| {
use interfaces::interface:: Interface;
let iface = args.list_entry.as_interface().unwrap();
Box::new(Interface {
name: Cow::Borrowed(&iface.name),
// No ip-related data returned
})
})Suggested Fix
- Add state callback iterators and getters for interface IP addresses to the northbound state code.
- Support both IPv4 and IPv6.
- Ensure the
show statecommand shows the correct interface IP addresses.
Reactions are currently unavailable