Command to extract the source from fxs

Hi ,
For debugging, I would like to know the content present in fxs.
So can you please share the command to extract the source from fxs so that I can compare it with the yang.

Regards,
Biswajit

not a good/straightforward answer i guess, but…

confdc - complier can show some basic info about the fxs file, like:

$ confdc --get-info ./dhcp.fxs
fxs file
Confdc version:         "7.4_0" (current Confdc version = "7.4_0")
...
embedded YANG source:    dhcp@2019-02-14 (1099 bytes)
...

which can give a hint whether it is bundled inside.

Here, i would expect confdc to be able to extract it possibly, but it looks like this is not directly possible :frowning: Anyone else has other tips?

If you have full ConfD (not basic) - you could try running confd with that fxs, and use RESTCONF protocol to retrieve the yang source - a cumbersome approach compared to extracting directly from .fxs :frowning:

ConfD user guide - chapter - 24.9. Schema resource:

$ curl -v -u admin:admin --get 127.0.0.1:8008/restconf/tailf/modules/dhcp/2019-02-14
*   Trying 127.0.0.1:8008...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8008 (#0)
...
< HTTP/1.1 200 OK
...
<
module dhcp {
  namespace "http://yang-central.org/ns/example/dhcp";
  prefix dhcp;

  import ietf-yang-types {
    prefix yang;
...