
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
24 lines
580 B
JavaScript
24 lines
580 B
JavaScript
import config from "./helpers/cloudsConfig";
|
|
import OpenStack from "../../src/openstack";
|
|
import log from 'loglevel';
|
|
|
|
log.setLevel("DEBUG");
|
|
|
|
describe("OpenStack", () => {
|
|
let devstackConfig = config.clouds.devstack;
|
|
|
|
describe("networkList()", () => {
|
|
it("should return the networks as an array.", (done) => {
|
|
const openstack = new OpenStack(devstackConfig);
|
|
|
|
openstack.networkList()
|
|
.then((networks) => {
|
|
expect(networks.length > 0).toBeTruthy();
|
|
done();
|
|
})
|
|
.catch((error) => done.fail(error));
|
|
});
|
|
});
|
|
|
|
});
|