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
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
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
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 patch add _requestComponents and serviceEndpoint methods to
abstract service, as these methods ared used for both Keystone and
Glance services.
Change-Id: Iccc334c0bbd79c1207855260932dab984f2d9d6c
This patch updates common class named AbstractService to propose
common logic for multiple version negociation.
Change-Id: I999d95fca8ff01afea02ed9953c6b4a3828fa3eb
This patch creates a common class named AbstractService from which
all API classes can inherit common logic.
Change-Id: I18339ac19ed2b97a7b9b3d6a0f1e01292080c422
Tokens passed to token-requiring API methods may now also be promises,
permitting promise-based request chaining across API's. For example:
keystone
.issueToken()
.then((token) => glance.imageList(token));
...or:
const tokenPromise = keystone.issueToken();
Promise.all([
glance.imageList(tokenPromise),
neutron.networkList(tokenPromise),
nova.flavorList(tokenPromise)
]).then(([images, networks, flavors]) => {
return nova.instanceCreate( ... );
});
These updates have been wrapped into a private method, which can
be used for other API's as well. revokeToken is the noted exception,
as it may have to resolve TWO tokens (auth and subject).
Change-Id: I24e0a1e979d2aaedc6a25e378bd9d99f51ece595
This patch adds jsdoc3-generated documentation to our docs build.
It does so by using publicly available sphinx.rst templates, writing
them into a .gitignore'd folder in the docs directory, and providing
references to these autogenerated documents in our own site.
There are some notable bugs:
- jsdoc-sphinx templates do not honor @ignore and @private
- jsdoc-sphinx templates do not ignore private variables (listed under
members at the bottom).
- jsdoc-sphinx templates add superfluous 'Children' section to the
top as subsection navigation.
It would make quite a bit of sense for us to contribute to
jsdoc-sphinx so that the above mentioned bugs are resolved. However,
as some documentation is better than no documentation, right now this
is fine.
Change-Id: I2905358a6410d5dace96c25dc57dda100fae4b48
This method permits the revocation of an auth token, whether by
the auth token itself, or by an admin token.
Change-Id: Ia80fd70986410b364351bffeaa5823a36d25d2cc
This method handles sending an authorization request against the
keystone API, and returns the issued Authorization Token. At this
time it only supports the password authorization plugin. Additional
use cases should be provided by third-party developers.
It is the long term intent that this method will deprecate the
authorize() method, in order to provide a consistently idempotent
implementation.
Change-Id: If1368bcdae251606d2e03043345cd4fc6f0b8b80
Authenticate is now called against an endpoint whose version is
known, and thus can be more easily supported.
Change-Id: I6e5dd64ac7ccc91d0a35630335f301377d87079c
This resource will attempt to resolve a supported API version from
the versions available on the Keystone API.
Change-Id: Icca49d3c124fb9526aa4316290b475d95cfda2ce
This resource returns a (caching) promise, which will eventually
resolve to the list of versions published at the auth_url. It also
updates the unit tests to draw from a consolidated set of mock data.
Change-Id: I0d0de5b6ef6a1e3d1f5daa40a88ec3d799c43a64
This utility class provides an abstraction layer for HTTP calls via fetch(). Its purpose is
to provide common, SDK-wide behavior for all HTTP requests. Included are:
- Providing a common extension point for request and response manipulation.
- Access to default headers.
In the future, this class chould also be extended to provide:
- Some form of progress() support for large uploads and downloads (perhaps via introduction of Q)
- Convenience decoding of the response body, depending on Content-Type.
- Internal error handling (At this time, HTTP errors are passed to then() rather than catch()).
- Other features.
Change-Id: I8173554b1b7ef052e2a74504b98f4ec574ce6136
This patch modifies the keystone API constructor to accept only
one cloud config, rather than the entire cloud config object.
Change-Id: Ifc541aeff20e1a6b0e9815a91e93fc78989199de
authenticate() is called outside the constructor
so that the Keystone class plays nicely with
Promises. (It would be weird for the constructor
to return a Promise)
Change-Id: I3f9008d4d954c340178c77ec0433c5a1ddc971d2