The openstack eslint package is just really not needed at this
point. Use standardjs and run --fix on it.
Switch away from using node 8 to run linters and tests.
Change-Id: I51f68d4ec30c8da5d1601ef00045e53f90d0554b
Update to babel v7 and webpack v4
Remove runtime depend on corejs-2 which is
unsupported. Just switch to runtime which requires polyfills be
provided by the end user.
Remove NSP - the service is being shut down and the important bits
are built in to npm now.
istanbul has been replaced by the nyc runner. Update karma
to latest.
Update yaml-loader and json-loader
Disable browser testing for now - we'll bring it back in a followup.
Change-Id: I45d1f77bb43e5d67f4154c5149fac77b853e3686
This follows removal of jobs from project-config. [1]
New jobs use newer node versions and new Zuul v3 format,
reusing devstack for deployment of OpenStack for functional
testing of jslib.
Version tests have been adapted to follow support logic
already in place instead of hardcoded supported versions.
Includes workaround (fixup) of devstack's bug. [2]
Move the functional test to experimental for now, because version
discovery doesn't work right and Firefox is generally grumpy.
We want to get the structural stuff in first.
[1] https://review.opendev.org/702030
[2] https://bugs.launchpad.net/devstack/+bug/1860287
Depends-on: https://review.opendev.org/704882
Depends-on: https://review.opendev.org/726547
Co-authored-by: Monty Taylor <mordred@inaugust.com>
Change-Id: I197eb2b59be7a49d168edf09d554b444bbcc29b2
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.
This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.
This update should result in no functional change.
For more information see the thread at
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html
Change-Id: Iec8bb72bc9036beac9eea7f1c9dd686ddb0f5d02
This patch adds a more flexible selection of version in AbstractService.
A version will be selected if it's compatible with the 'supportedVersions'.
Example:
supportedVersions = ['v3.1'];
All minor versions above 3.1 will be compatible (3.1.2, 3.2, 3.3 etc)
However 4.x will not be compatible
Change-Id: Icd540449ebf6a09d9bb7e1d25a85e2dbe787c5a4
As we will upload documentation to developer.openstack.org, this
patch switch sphinx template from 'osloshpinx' to
'openstackdocstheme'
Change-Id: I8073e72c11117ec605dcc8441a0c091f030014f8
OpenStack wrapper will read the 'region_name' from config, and use
the correct endpoint matching this region
Change-Id: I01049f3bed227eb1e11f9a1f7d338177e95aef34
In Keystone API it's possible to provide both ids and names for
users, projects, user domains and project domains. This commit
adds support for this functionality.
Change-Id: I3268bd82cc92a150927c98e0827ebd105d91f5e3
This patch adds a readme introducing js-openstack-lib and it's purpose.
A simple example in ES6 was added.
Change-Id: I8c6cedd13b6bcd965b7c88c73c8499f53882c331
This patch adds the networkList() method to the OpenStack wrapper
class. This method will initialize `Neutron` instance if needed and
cache it. As neutron needs the URL, `Keystone` instance is also
initialize and cache if needed.
Change-Id: If12af29a86b9856a145c1f91de25eb3473938de5
In some unit tests mockOptions.name was used instead of
mockOptions.matcher, and it was always undefined - this stopped
working with fetch-mock 5.5.0. This commit replaces
mockOptions.name with mockOptions.matcher where it is needed.
Change-Id: I367e1d957ce206c20c6b9d15c9f5ff1a2b285e33
This neutron service follows the same pattern as the glance service,
and provides both version negotiation and endpoint discovery.
Change-Id: Ia2f59213eedf6d7acbb02789ee921c13ff391d09
New linting rule to disable spaces after functions, before parens
Fixed all new linting errors
I suppose I'd like this to eventually get landed in official
`eslint-config-openstack` project, but for now it is here
Change-Id: I6c77524c5679117ce3b211db0bd9943c5ad5e646
This is required to make services provided by library accessible
this way:
import {Keystone} from 'openstack-lib';
instead of
import Keystone from 'openstack-lib/dist/keystone';
Also, Test class and dummy functional and unit tests for it were
removed since they aren't needed anymore.
Change-Id: I6bf0b6eebab095d6585d19d8398d9f2ac119cacc
This patch cleans up our constructor exception tests, and removes
old versions(), version(), and serviceEndpoint() tests that are
now handled in the parent class. Service specific tests have been
kept, and several tests to assert correct API behavior for specific
implementations have been added.
Change-Id: Ib42d94033ebb5613ee7e5c96654ab22f31fe4feb
We have no guarantees that the keystone service catalog will have the
root resource of any given service registered. As most versioned API
endpoints require tokens, we can reasonably assume that a 401 will
be encountered. This patch adds an extra check against the response
from the provided URL, and should a 401 be encountered, attempts
to resolve the versions from the root resource of the provided URL.
Change-Id: I655409f0eb9bfbd3489827db46faef026ede82f9
This patch add _requestComponents and serviceEndpoint methods to
abstract service, as these methods ared used for both Keystone and
Glance services.
Change-Id: Iccc334c0bbd79c1207855260932dab984f2d9d6c
babel-plugin-transform-runtime allows to reduce size of the
resulting bundle dramatically (from 260kb to 24kb).
Change-Id: I3cceb1caddfb5b0b2048b7d4efc2cebfee26ab91