Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F118306147
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Makefile b/Makefile
index 66b1e8bb7..2ff72cb21 100644
--- a/Makefile
+++ b/Makefile
@@ -1,134 +1,135 @@
TMPL_DIR := templates-cfg
OP_TMPL_DIR := templates-op
BUILD_DIR := build
DATA_DIR := data
SHIM_DIR := src/shim
XDP_DIR := src/xdp
CC := gcc
LIBS := -lzmq
CFLAGS :=
config_xml_src = $(wildcard interface-definitions/*.xml.in)
config_xml_obj = $(config_xml_src:.xml.in=.xml)
op_xml_src = $(wildcard op-mode-definitions/*.xml.in)
op_xml_obj = $(op_xml_src:.xml.in=.xml)
%.xml: %.xml.in
@echo Generating $(BUILD_DIR)/$@ from $<
# -ansi This turns off certain features of GCC that are incompatible
# with ISO C90. Without this regexes containing '/' as in an URL
# won't work
# -x c By default GCC guesses the input language from its file extension,
# thus XML is unknown. Force it to C language
# -E Stop after the preprocessing stage
# -undef Do not predefine any system-specific or GCC-specific macros.
# -nostdinc Do not search the standard system directories for header files
# -P Inhibit generation of linemarkers in the output from the
# preprocessor
mkdir -p $(BUILD_DIR)/$(dir $@)
@$(CC) -x c-header -E -undef -nostdinc -P -I$(CURDIR)/$(dir $<) -o $(BUILD_DIR)/$@ -c $<
.PHONY: interface_definitions
.ONESHELL:
interface_definitions: $(config_xml_obj)
mkdir -p $(TMPL_DIR)
$(CURDIR)/scripts/override-default $(BUILD_DIR)/interface-definitions
find $(BUILD_DIR)/interface-definitions -type f -name "*.xml" | xargs -I {} $(CURDIR)/scripts/build-command-templates {} $(CURDIR)/schema/interface_definition.rng $(TMPL_DIR) || exit 1
# XXX: delete top level node.def's that now live in other packages
rm -f $(TMPL_DIR)/firewall/node.def
rm -f $(TMPL_DIR)/interfaces/node.def
rm -f $(TMPL_DIR)/protocols/node.def
rm -f $(TMPL_DIR)/protocols/static/node.def
rm -f $(TMPL_DIR)/policy/node.def
rm -f $(TMPL_DIR)/system/node.def
rm -f $(TMPL_DIR)/vpn/node.def
rm -f $(TMPL_DIR)/vpn/ipsec/node.def
rm -rf $(TMPL_DIR)/vpn/nipsec
+ rm -rf $(TMPL_DIR)/protocols/nrpki
# XXX: required until OSPF and RIP is migrated from vyatta-cfg-quagga to vyos-1x
mkdir $(TMPL_DIR)/interfaces/loopback/node.tag/ipv6
mkdir $(TMPL_DIR)/interfaces/dummy/node.tag/ipv6
mkdir $(TMPL_DIR)/interfaces/openvpn/node.tag/ip
mkdir -p $(TMPL_DIR)/interfaces/vti/node.tag/ip
mkdir -p $(TMPL_DIR)/interfaces/vti/node.tag/ipv6
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ipv6/node.def $(TMPL_DIR)/interfaces/loopback/node.tag/ipv6
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ipv6/node.def $(TMPL_DIR)/interfaces/dummy/node.tag/ipv6
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ip/node.def $(TMPL_DIR)/interfaces/openvpn/node.tag/ip
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ip/node.def $(TMPL_DIR)/interfaces/vti/node.tag/ip
cp $(TMPL_DIR)/interfaces/ethernet/node.tag/ipv6/node.def $(TMPL_DIR)/interfaces/vti/node.tag/ipv6
.PHONY: op_mode_definitions
.ONESHELL:
op_mode_definitions: $(op_xml_obj)
mkdir -p $(OP_TMPL_DIR)
find $(BUILD_DIR)/op-mode-definitions/ -type f -name "*.xml" | xargs -I {} $(CURDIR)/scripts/build-command-op-templates {} $(CURDIR)/schema/op-mode-definition.rng $(OP_TMPL_DIR) || exit 1
# XXX: delete top level op mode node.def's that now live in other packages
rm -f $(OP_TMPL_DIR)/add/node.def
rm -f $(OP_TMPL_DIR)/clear/interfaces/node.def
rm -f $(OP_TMPL_DIR)/clear/node.def
rm -f $(OP_TMPL_DIR)/delete/node.def
rm -f $(OP_TMPL_DIR)/generate/node.def
rm -f $(OP_TMPL_DIR)/monitor/node.def
rm -f $(OP_TMPL_DIR)/reset/vpn/node.def
rm -f $(OP_TMPL_DIR)/set/node.def
rm -f $(OP_TMPL_DIR)/show/interfaces/node.def
rm -f $(OP_TMPL_DIR)/show/node.def
rm -f $(OP_TMPL_DIR)/show/system/node.def
rm -f $(OP_TMPL_DIR)/show/vpn/node.def
# XXX: ping must be able to recursivly call itself as the
# options are provided from the script itself
ln -s ../node.tag $(OP_TMPL_DIR)/ping/node.tag/node.tag/
.PHONY: component_versions
.ONESHELL:
component_versions: interface_definitions
$(CURDIR)/scripts/build-component-versions $(BUILD_DIR)/interface-definitions $(DATA_DIR)
.PHONY: vyshim
vyshim:
$(MAKE) -C $(SHIM_DIR)
.PHONY: vyxdp
vyxdp:
$(MAKE) -C $(XDP_DIR)
.PHONY: all
all: clean interface_definitions op_mode_definitions component_versions vyshim vyxdp
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
rm -rf $(TMPL_DIR)
rm -rf $(OP_TMPL_DIR)
$(MAKE) -C $(SHIM_DIR) clean
$(MAKE) -C $(XDP_DIR) clean
.PHONY: test
test:
set -e; python3 -m compileall -q .
PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators,src/tests --verbose
.PHONY: sonar
sonar:
sonar-scanner -X -Dsonar.login=${SONAR_TOKEN}
.PHONY: docs
.ONESHELL:
docs:
sphinx-apidoc -o sphinx/source/ python/
cd sphinx/
PYTHONPATH=../python make html
deb:
dpkg-buildpackage -uc -us -tc -b
.PHONY: schema
schema:
trang -I rnc -O rng schema/interface_definition.rnc schema/interface_definition.rng
trang -I rnc -O rng schema/op-mode-definition.rnc schema/op-mode-definition.rng
diff --git a/interface-definitions/protocols-rpki.xml.in b/interface-definitions/protocols-rpki.xml.in
new file mode 100644
index 000000000..b8db49e36
--- /dev/null
+++ b/interface-definitions/protocols-rpki.xml.in
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Protocol RPKI configuration -->
+<interfaceDefinition>
+ <node name="protocols">
+ <children>
+ <node name="nrpki" owner="${vyos_conf_scripts_dir}/protocols_rpki.py">
+ <properties>
+ <help>BGP prefix origin validation</help>
+ </properties>
+ <children>
+ <tagNode name="cache">
+ <properties>
+ <help>RPKI cache server instance</help>
+ </properties>
+ <children>
+ <leafNode name="address">
+ <properties>
+ <help>RPKI cache server address</help>
+ </properties>
+ </leafNode>
+ <leafNode name="port">
+ <properties>
+ <help>TCP port number</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>TCP port number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <node name="ssh">
+ <properties>
+ <help>RPKI SSH connection settings</help>
+ </properties>
+ <children>
+ <leafNode name="known-hosts-file">
+ <properties>
+ <help>RPKI SSH known hosts file</help>
+ <constraint>
+ <validator name="file-exists"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="private-key-file">
+ <properties>
+ <help>RPKI SSH private key file</help>
+ <constraint>
+ <validator name="file-exists"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="public-key-file">
+ <properties>
+ <help>RPKI SSH public key file path</help>
+ <constraint>
+ <validator name="file-exists"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="username">
+ <properties>
+ <help>RPKI SSH username</help>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ <leafNode name="initial-synchronization-timeout">
+ <properties>
+ <help>Initial RPKI cache synchronization timeout</help>
+ <valueHelp>
+ <format>u32:0-4294967295</format>
+ <description>Initial RPKI cache synchronization timeout</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="polling-period">
+ <properties>
+ <help>RPKI cache polling period</help>
+ <valueHelp>
+ <format>u32:1-1300</format>
+ <description>Polling period</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-1300"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="preference">
+ <properties>
+ <help>RPKI cache preference</help>
+ <valueHelp>
+ <format>u32:0-4294967295</format>
+ <description>RPKI cache preference</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="timeout">
+ <properties>
+ <help>RPKI cache reply timeout</help>
+ <valueHelp>
+ <format>u32:0-4294967295</format>
+ <description>RPKI cache reply timeout</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 17, 12:12 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4416460
Default Alt Text
(9 KB)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment