In a fresh Opendaylight installation, the following query fails:
In [42]: url
Out[42]: '/restconf/operational/bgp-rib:bgp-rib'
In [43]: requests.get('http://{}:{}{}'.format(odl['api']['ipaddr'],odl['api']['port'],url), auth=auth).text
Out[43]: '{"errors":{"error":[{"error-type":"application","error-tag":"data-missing","error-message":"Request could not be completed because the relevant data model content does not exist "}]}}'
Given that the following BGP-related features are installed
opendaylight-user#root>feature:list | grep bgp
odl-bgpcep-pcep-topology │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-topology │ OpenDaylight :: PCEP :: Topology
odl-bgpcep-pcep-cli │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-cli │ OpenDaylight :: PCEP :: Topology Cli
odl-bgpcep-pcep-stateful07 │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-stateful07 │ OpenDaylight :: PCEP :: Stateful 07
odl-bgpcep-data-change-counter │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-data-change-counter │ ODL :: Bgpcep :: odl-bgpcep-data-change-counter
odl-bgpcep-bgp-flowspec │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-flowspec │ OpenDaylight :: BGP :: Flowspec
odl-bgpcep-pcep-api │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-api │ OpenDaylight :: PCEP :: Api
odl-bgpcep-extras-dependencies │ 0.9.2 │ │ Started │ odl-bgpcep-extras-dependencies │ OpenDaylight :: Extras :: Dependencies
odl-bgpcep-config-loader-spi │ 0.9.2 │ │ Started │ odl-bgpcep-config-loader-spi │ OpenDaylight :: BGPCEP :: SPI Config Loader
odl-bgpcep-pcep-topology-stats │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-topology-stats │ OpenDaylight :: PCEP :: Topology Stats
odl-bgpcep-bgp-rib-api │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-rib-api │ OpenDaylight :: BGP :: RIB Api
odl-bgpcep-bgp-labeled-unicast │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-labeled-unicast │ OpenDaylight :: BGP :: Labeled Unicast
odl-bgpcep-bgp-parser-api │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-parser-api │ OpenDaylight :: BGP :: Parser :: API
odl-bgpcep-bgp-path-selection-mode │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-path-selection-mode │ OpenDaylight :: BGP :: Path Selection
odl-bgpcep-programming-impl │ 0.9.2 │ │ Started │ odl-bgpcep-programming-impl │ OpenDaylight :: PCEP :: Programming Impl
odl-bgpcep-rsvp-api │ 0.9.2 │ │ Started │ odl-bgpcep-rsvp-api │ OpenDaylight :: RSVP :: API
odl-bgpcep-bgp-dependencies │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-dependencies-0.9.2 │ OpenDaylight :: BGP :: Dependencies
odl-bgpcep-bgp-inet │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-inet │ OpenDaylight :: BGP :: Inet
odl-bgpcep-pcep-auto-bandwidth │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-auto-bandwidth │ OpenDaylight :: PCEP :: Auto Bandwidth
odl-bgpcep-bmp-config-example │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-0.9.2 │ OpenDaylight :: BMP :: Config files example
odl-bgpcep-bgp-config-example │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-0.9.2 │ OpenDaylight :: Configuration Example Files
odl-bgpcep-pcep-config-example │ 0.9.2 │ │ Started │ odl-bgpcep-0.9.2 │ OpenDaylight :: Pcep Configuration Example Files
odl-bgpcep-topology-api │ 0.9.2 │ │ Started │ odl-bgpcep-topology-api │ OpenDaylight :: BGPCEP :: Topology :: Api
odl-bgpcep-concepts │ 0.9.2 │ │ Started │ odl-bgpcep-concepts │ OpenDaylight :: BGPCEP :: Concepts
odl-bgpcep-bgp-cli │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-cli │ OpenDaylight :: BGP :: Cli
odl-bgpcep-bgp-topology │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-topology │ OpenDaylight :: BGP :: Topology
odl-bgpcep-bmp-api │ 0.9.2 │ │ Started │ odl-bgpcep-bmp-api │ OpenDaylight :: BMP :: API
odl-bgpcep-bgp-rib-impl │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-rib-impl │ OpenDaylight :: BGP :: RIB Impl
odl-bgpcep-pcep │ 0.9.2 │ x │ Started │ odl-bgpcep-pcep │ OpenDaylight :: PCEP
odl-bgpcep-bmp-config-loader │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-bmp-config-loader │ OpenDaylight :: BGPCEP :: BMP Config Loader
odl-bgpcep-pcep-impl │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-impl │ OpenDaylight :: PCEP :: Impl
odl-bgpcep-bgp-openconfig │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-openconfig │ OpenDaylight :: BGP :: Openconfig
features-bgpcep-extras │ 0.9.2 │ │ Uninstalled │ features-bgpcep-extras │ features-bgpcep-extras
odl-bgpcep-bgp-benchmark │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-bgp-benchmark │ OpenDaylight :: BGP :: Benchmark
odl-bgpcep-pcep-topology-provider │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-topology-provider │ OpenDaylight :: PCEP :: Topology Provider
odl-bgpcep-pcep-tunnel-provider │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-tunnel-provider │ OpenDaylight :: PCEP :: Tunnel Provider
odl-bgpcep-programming-api │ 0.9.2 │ │ Started │ odl-bgpcep-programming-api │ OpenDaylight :: PCEP :: Programming Api
odl-bgpcep-pcep-segment-routing │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-segment-routing │ OpenDaylight :: PCEP :: Segment Routing
odl-bgpcep-bmp │ 0.9.2 │ │ Uninstalled │ odl-bgpcep-bmp │ OpenDaylight :: BMP
odl-bgpcep-pcep-base-parser │ 0.9.2 │ │ Started │ odl-bgpcep-pcep-base-parser │ OpenDaylight :: PCEP :: Base Parser
odl-bgpcep-topology-config-loader │ 0.9.2 │ │ Started │ odl-bgpcep-topology-config-loader │ OpenDaylight :: BGPCEP :: Topology Config Loader
features-bgp │ 0.9.2 │ │ Uninstalled │ features-bgp │ features-bgp
odl-bgpcep-rsvp │ 0.9.2 │ │ Started │ odl-bgpcep-rsvp │ OpenDaylight :: RSVP
odl-bgpcep-bgp-l3vpn │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-l3vpn │ OpenDaylight :: BGP :: L3Vpn
odl-bgpcep-config-loader-impl │ 0.9.2 │ │ Started │ odl-bgpcep-config-loader-impl │ OpenDaylight :: BGPCEP :: Config Loader Impl
odl-bgpcep-bgp-parser │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-parser │ OpenDaylight :: BGP :: Parser
odl-bgpcep-bgp │ 0.9.2 │ x │ Started │ odl-bgpcep-bgp │ OpenDaylight :: BGP
odl-bgpcep-bgp-evpn │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-evpn │ OpenDaylight :: BGP :: Evpn
odl-bgpcep-protocols-config-loader │ 0.9.2 │ │ Started │ odl-bgpcep-protocols-config-loader │ OpenDaylight :: BGPCEP :: Protocols Config Loader
odl-bgpcep-bgp-linkstate │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-linkstate │ OpenDaylight :: BGP :: RIB Linkstate
odl-bgpcep-bgp-openconfig-state │ 0.9.2 │ │ Started │ odl-bgpcep-bgp-openconfig-state │ OpenDaylight :: BGP :: Config Loader
And the org.apache.karaf.features.cfg is configured as:
featuresBoot = b8b5047f-c696-4a9c-9c49-d21ea2c16986,odl-restconf-all,odl-netconf-all,odl-netconf-connector-all,odl-bgpcep-bgp,odl-bgpcep-pcep,odl-mdsal-apidocs
Could you please advise what I am doing wrong ?
PS. I am using this as a guide: https://github.com/opendaylight/docs/blob/master/docs/user-guide/bgpcep-guide/bgp/bgp-user-guide-running-bgp.rst
It seems that doing
odl-bgpcep-bgp-config-example solves the problem, by installing some dependencies.
Related
In the project I work on, I see this warning from yarn audit (version 1.22.19):
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate │ Got allows a redirect to a UNIX socket │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ got │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=11.8.5 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ #storybook/cli │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ #storybook/cli > update-notifier > latest-version > │
│ │ package-json > got │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1080920 │
└───────────────┴──────────────────────────────────────────────────────────────┘
Adding "#storybook/cli/**/got": "^11.8.5", to resolutions fixes it. So far so good. But I also have
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ glob-parent before 5.1.2 vulnerable to Regular Expression │
│ │ Denial of Service in enclosure regex │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ #storybook/cli │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ #storybook/cli > #storybook/core-common > webpack > │
│ │ watchpack > watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081884 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ glob-parent before 5.1.2 vulnerable to Regular Expression │
│ │ Denial of Service in enclosure regex │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ #storybook/cli │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ #storybook/cli > #storybook/telemetry > │
│ │ #storybook/core-common > webpack > watchpack > │
│ │ watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081884 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ glob-parent before 5.1.2 vulnerable to Regular Expression │
│ │ Denial of Service in enclosure regex │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ #storybook/react │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ #storybook/react > #storybook/core > #storybook/core-server │
│ │ > #storybook/core-common > webpack > watchpack > │
│ │ watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081884 │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high │ glob-parent before 5.1.2 vulnerable to Regular Expression │
│ │ Denial of Service in enclosure regex │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=5.1.2 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ #storybook/react │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ #storybook/react > #storybook/core > #storybook/core-server │
│ │ > #storybook/telemetry > #storybook/core-common > webpack > │
│ │ watchpack > watchpack-chokidar2 > chokidar > glob-parent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/1081884 │
└───────────────┴──────────────────────────────────────────────────────────────┘
and neither
"#storybook/cli/**/glob-parent": "^5.1.2",
"#storybook/react/**/glob-parent": "^5.1.2",
nor
"**/chokidar/glob-parent": "^5.1.2",
let me fix it. Actually, while writing the question, I found that adding all 3 does work. Is there a simple explanation why?
I would like to serve the results of the Webpack build of a ReactJS UI application from a Spring Boot server application.
As the Webpack build generates all the assets in a "dist" folder i.e. index.html, bundle.js, etc... Accessed as i.e. http://localhost/index.html
And the Spring Boot application serves the API URLs from i.e. http://localhost/api/xxx
create .env file in the root of react project (next to package.json)
put PUBLIC_URL=/nameContextRoot in .env file (name of context root typically is name of war file)
build react project npm run build
For me it generates its contents in build directory of react project
copy the contents of the build directory to the spring-boot apps static directory
static directory should be a normal folder in src/main/resources
clean and rebuild spring boot project and run it
Contents are now properly served
UPDATE
Spring Boot structure
D:.
├───.mvn
│ └───wrapper
├───.settings
├───src
│ ├───main
│ │ ├───java
│ │ │ └───my.java.stuff
│ │ ├───resources
│ │ │ └───static
│ │ │ └───static
│ │ │ ├───css
│ │ │ └───js
│ │ └───webapp
│ └───test
│ └───java
│ └───my.java.tests
├───target
│ ├───classes
│ │ ├───java.classes
│ │ └───static
│ │ ├───css
│ │ ├───js
│ │ └───static
│ │ ├───css
│ │ └───js
│ ├───generated-sources
│ │ └───annotations
│ ├───m2e-wtp
│ │ └───web-resources
│ │ └───META-INF
│ │ └───maven
│ │ └───java.stuff
│ ├───maven-archiver
│ ├───maven-status
│ │ └───maven-compiler-plugin
│ │ └───compile
│ │ └───default-compile
│ ├───rclient-0.0.1-SNAPSHOT
│ │ ├───META-INF
│ │ └───WEB-INF
│ │ ├───classes
│ │ │ ├───java stuff
│ │ │ └───static
│ │ └───lib
│ └───test-classes
└───WebContent
└───META-INF
ReactJS project structure
D:.
├───build
│ └───static
│ ├───css
│ └───js
├───node_modules
├───public
└───src
├───components
├───domain
└───util
Your api endpoints will be also served below the context root. They have nothing to do with React.
The hint of #Codo to use a reverse proxy to access the static content is still valid. But here you asked specifically for how to host the react app in a spring boot application.
I have exhausted any suggestions available online.
I have tried setting markingMode in the package.json
"android": {
"markingMode": "none"
}
I have tried several methods of loading the viewModels.
I have tried saving to physical files and reading from them.
I have tried loading the json data fore each view into the appSettings.
I have tried uninstalling sass plugin sidedrawer plugin.
I have updated all the plugins including the core components.
Here are the plugins/versions
nativescript-appversion │ ^1.4.1 │ │
nativescript-iqkeyboardmanager │ ^1.4.0 │ │
nativescript-keyboard-toolbar │ ^1.0.4 │ │
nativescript-local-notifications │ ^3.1.0 │ │
nativescript-orientation │ ^2.2.1 │ │
nativescript-pager │ ^9.3.14 │ │
nativescript-plugin-firebase │ ^8.0.0 │ │
nativescript-pulltorefresh │ ^2.2.0 │ │
nativescript-social-share │ ^1.5.1 │ │
nativescript-sound │ ^1.0.4 │ │
nativescript-ui-sidedrawer │ ^6.0.0 │ │
nativescript-windowed-modal │ ^5.0.6 │ │
rxjs │ ^6.3.3 │ │
tns-core-modules │ ^5.2.2
The application should be able to navigate different views without freezing or slowing down.
I was facing exact the same issue. Use the configuration below on /src/package.json, not in the main package.json.
{
"main": "main.js",
"android": {
"v8Flags": "--expose_gc",
"markingMode": "none"
}
}
More info here: https://www.nativescript.org/blog/markingmode-none-is-official-boost-android-performance-while-avoiding-memory-issues
I have the line
<script type="text/javascript">
<%#include file="/js/home.js" %>
Which gives the error in title. The JS files are in /src/main/resources/static/js. The error goes away if I create /src/main/webapp/js/home.js. This answer says webapp/ is not recommended. https://stackoverflow.com/a/28727189/148844. We are using JARs and we are uploading a WAR to AWS via the web console. Eclipse expects webapp/js/ and Spring Boot expects resources/static/js, so which should I use? How do I tell Eclipse how to find the JS file?
$ tree
├───src
│ ├───main
│ │ ├───java
│ │ ├───resources
│ │ │ └───static
│ │ │ ├───css
│ │ │ ├───fonts
│ │ │ ├───img
│ │ │ └───js
│ │ └───webapp
│ │ └───WEB-INF
│ │ └───jsp
We also have
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
Eclipse Version: Photon Release (4.8.0)
The Opendaylight TSDR User Guide (https://docs.opendaylight.org/en/stable-oxygen/user-guide/tsdr-user-guide.html#installing-tsdr-data-collectors) shows an sFlow Collector feature available for installing, but is not showed in the actual list of features of my Opendaylight controller.
opendaylight-user#root>feature:list|grep tsdr
odl-tsdr-openflow-statistics-collector │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: Openflow Statistics Colle
features-tsdr │ 1.5.1 │ │ Uninstalled │ features-tsdr │ ODL :: tsdr :: features-tsdr
odl-tsdr-hsqldb-all │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ ODL :: tsdr :: hsqldb all
odl-tsdr-cassandra │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: Cassandra Persistence
odl-tsdr-elasticsearch │ 1.5.1 │ │ Uninstalled │ odl-odl-sdni-aggregator-1.5.1 │ OpenDaylight :: TSDR :: ElasticSearch Persistence
odl-tsdr-hsqldb │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ ODL :: tsdr :: HSQLDB
odl-hbaseclient │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ ODL :: tsdr :: odl-hbaseclient
odl-tsdr-syslog-collector │ 1.5.1 │ │ Uninstalled │ odl-odl-sdni-aggregator-1.5.1 │ OpenDaylight :: TSDR :: Syslog Collector
odl-tsdr-netflow-statistics-collector │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: Netflow Statistics Collec
odl-tsdr-restconf-collector │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: Restconf Collector
odl-tsdr-hbase │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: HBase Persistence
odl-tsdr-core │ 1.5.1 │ │ Uninstalled │ odl-tsdr-1.5.1 │ OpenDaylight :: TSDR :: Core
I wonder if the collection of sFlow packets is supported by default, because its model still is in collectors folder (https://github.com/opendaylight/tsdr/tree/master/collectors), but not in features folder (https://github.com/opendaylight/tsdr/tree/master/features)
The sFlow collector is not installed by default. You made a good evaluation. I saw your post on the tsdr-dev#lists.opendaylight.org list. We will respond there with more detail if needed.
The TSDR sFlow collector feature was disabled and not migrated during a framework change due to some integration CSIT test failures. The code is there as you see (./tsdr/collectors/sflow-statistics-collector) and can be added to the (./tsdr/features/sflow-statistics-collector) directory like the rest of the TSDR features. It should work in a stand alone build, it was only failing the CSIT tests in the integration/release build. We did not have the cycles to fix the tests at that time. There are several folks who are interested in adding it back, so if you would like to attend the weekly ODL TSDR meeting and voice your interest we might be able to schedule it in the Flourine release or the next release cycle. [1] OpenDaylight weekly meeting calander [2]
[1] ODL TSDR Weekly meeting, 2-3pm PST Wednesday https://zoom.us/j/850334971
[2] https://calendar.google.com/calendar/embed?src=aDc5aGltYm9rcThhYXVyOWxlZDhvYzc5MGdAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ