npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

openstack.api.js

v0.1.1

Published

Implementation of the openstack api in a pure angularJS

Downloads

3

Readme

API.js Build Status Coverage Status

Pure angular implementation of the Openstack API clients.

Build

Requirements

In order to develop on this lib you need to have at least NodeJS installed.

Installation

  1. npm install -g gulp bower
  2. Use npm install && bower install inside project's folder to install all the required dependencies

Tasks

Usage: gulp (calls default task) or gulp [task_name]

Available tasks are:

  • clean : deletes the dist folder
  • jshint : runs jshint over the js files
  • test : runs the unit and e2e tests
  • test:unit : runs the unit tests once
  • test:unit:watch : runs the unit tests and then watch file changes of source and test them again everytime something change
  • test:unit:ci : runs the unit tests for travis ci (integration with coveralls)

e2e tests must have the api.json file set up, see the development section

  • test:e2e : runs the e2e tests once

  • test:e2e:watch : runs the e2e tests, watch for file changes, and test them again if something is different.

  • test:e2e:debug : allow the developer to debug e2e tests, to do that, you need to open a browser on localhost:9876/debug.html (port can vary if it is already used, look at the console output).

  • build : clean, checks source files with jshint, tests, and then build in the dist folder, the files openstack.api.js and openstack.api.min.js (default task)

Options

You can also specify on which module you want to run a task, by specifing its name with the --module=module1:module2 syntax.

All modules are listed in the modules section and in the config.json file in the modules section

For example to run tests over keystone.base module you just have to run (it works for all tasks except clean) gulp test:unit --modules="keystone.base"

Development

Run cp api.json.example api.json edit the api.json file, and replace the value of the URLs by the ones of your openstack config.

Then run the gulp e2e debug task: gulp test:e2e:debug.

For debugging, all the test files are available in your browser at the following address: http://localhost:9876/debug.html. You can now place a debugger statement wherever you want in order to debug your development.

Modules

Currently, the following modules are supported:

  • keystone.base: an implementation of keystone basic functionality, it allows you to ask for a token, and to list the tenants
  • heat: a quite finished implementation of the heat client, software configuration is not supported at this point.

Workflows

All modules have tests which can contact a real openstack service. These tests can be used to see a simple workflow on how you can use those services. Checks the documentation on each module test to see a description:

See it in action

For a quick start just to see the lib running you need

  1. git clone https://github.com/OpenstackJS/API.js && cd API.js

  2. follow the requirements and installation sections

  3. be sure to have a devstack or an openstack set up to interact, if not, please look at the local.conf file in the repo, for a default devstack

  4. cp api.json.example api.json then edit the file in order to provide informations for a devstack or an openstack instance

  5. checks the requirements of each worflows in order to have working tests

    IMPORTANT:

  6. gulp test:e2e:debug

  7. go to http://localhost:9876/debug.html and open the debugger (ctrl + alt + j for chrome on windows/linux, cmd + alt +j for macOS) of your browser to see if everything is working fine