GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — clixon-controller/src at main · clicon/clixon-controller

Expand file tree

/

src

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

src

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Makefile.in
Makefile.in
 
 
README.md
README.md
 
 
autocli.xml
autocli.xml
 
 
controller.h
controller.h
 
 
controller.xml.in
controller.xml.in
 
 
controller_backend.c
controller_backend.c
 
 
controller_cli.c
controller_cli.c
 
 
controller_cli_callbacks.c
controller_cli_callbacks.c
 
 
controller_cli_callbacks.h
controller_cli_callbacks.h
 
 
controller_configure.cli
controller_configure.cli
 
 
controller_device_handle.c
controller_device_handle.c
 
 
controller_device_handle.h
controller_device_handle.h
 
 
controller_device_recv.c
controller_device_recv.c
 
 
controller_device_recv.h
controller_device_recv.h
 
 
controller_device_send.c
controller_device_send.c
 
 
controller_device_send.h
controller_device_send.h
 
 
controller_device_state.c
controller_device_state.c
 
 
controller_device_state.h
controller_device_state.h
 
 
controller_lib.c
controller_lib.c
 
 
controller_lib.h
controller_lib.h
 
 
controller_netconf.c
controller_netconf.c
 
 
controller_netconf.h
controller_netconf.h
 
 
controller_operation.cli
controller_operation.cli
 
 
controller_pipe.cli
controller_pipe.cli
 
 
controller_pipe_show.cli
controller_pipe_show.cli
 
 
controller_restconf.c
controller_restconf.c
 
 
controller_rpc.c
controller_rpc.c
 
 
controller_rpc.h
controller_rpc.h
 
 
controller_rpc_std.c
controller_rpc_std.c
 
 
controller_rpc_std.h
controller_rpc_std.h
 
 
controller_rpc_template_vars.cli
controller_rpc_template_vars.cli
 
 
controller_show_devices.cli
controller_show_devices.cli
 
 
controller_template_vars.cli
controller_template_vars.cli
 
 
controller_transaction.c
controller_transaction.c
 
 
controller_transaction.h
controller_transaction.h
 
 

README.md

Outline

Clixon controller native setup

  • Content
  • Compile and run
  • Using the CLI
  • Netconf
  • Restconf

Content

This directory contains the Clixon controller. It contains the following files:

  • controller.xml the XML configuration file
  • controller_backend_plugin.c: a backend plugin
  • controller_cli.cli: the CLIgen spec
  • Makefile.in: where plugins are built and installed

Compile and run

Before you start,

  • Install cligen and clixon
  • Create groups groups
    make && sudo make install

Start backend in the background:

    sudo clixon_backend -f /usr/local/etc/clixon/controller.xml

Note: use -s init instead if you want to start Clixon without the preconfigured restconf daemon

Start cli:

    clixon_cli -f /usr/local/etc/clixon/controller.xml

Using the CLI

The example CLI allows you to modify and view the data model using set, delete and show via generated code.

The following example shows how to add a very simple configuration hello world using the generated CLI. The config is added to the candidate database, shown, committed to running, and then deleted.

   olof@vandal> clixon_cli -f /usr/local/etc/clixon/controller.xml
cli> q

Netconf

Clixon also provides a Netconf interface. The following example starts a netconf client form the shell, adds the hello world config, commits it, and shows it:

olof@vandal> clixon_netconf -qf /usr/local/etc/clixon/controller.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <capabilities><capability>urn:ietf:params:netconf:base:1.1</capability></capabilities>
   </hello>]]>]]>
  <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-config><source><running/></source></get-config></rpc>]]>]]>
  <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data>...
olof@vandal>

Restconf

Clixon also provides a Restconf interface. See documentation on RESTCONF.

Send restconf commands (using Curl):

  $ curl -X GET http://localhost:8080/restconf/data/
{
  ...
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.