Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@openstack ~]# more auth.js
- auth_username = 'admin';
- auth_password = 'ac1556ad87354740';
- auth_url = 'http://192.168.0.20:5000';
- project_name = 'admin';
- region_name = 'RegionOne';
- var conn = require('pkgcloud').compute.createClient({
- provider: 'openstack',
- username: auth_username,
- password: auth_password,
- authUrl: auth_url,
- region: region_name
- });
- conn.on('log::*', function(message, object) {
- if (object) {
- console.log(this.event.split('::')[1] + ' ' + message);
- console.dir(object);
- }
- else {
- console.log(this.event.split('::')[1] + ' ' + message);
- }
- });
- conn.getImages(function(err, images) {
- for (i =0; i<images.length; i++) {
- console.log("..................................");
- console.log("id: " + images[i].id);
- console.log("name: " + images[i].name);
- console.log("created: " + images[i].created);
- console.log("updated: " + images[i].updated);
- console.log("status: " + images[i].status + "\n");
- }});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement