-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
30 lines (23 loc) · 851 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var OpenstackClient = require('./');
var client = new OpenstackClient("http://10.0.0.10:5000", "admin","admin","ethode");
client.onReady(function(data){
client.get("http://172.18.0.2:8774/v2/8e0d77698aed41fcb6546bc6472af1fe/servers/detail", function(data){
console.log("Found " + data.servers.length + " servers!");
console.log("Success with simple authentication!");
//process.exit();
});
});
var client = new OpenstackClient("http://10.0.0.10:5000", {
"passwordCredentials": {
"username": "admin",
"password": "admin"
},
"tenantName": "ethode"
});
client.onReady(function(data){
client.get("http://172.18.0.2:8774/v2/8e0d77698aed41fcb6546bc6472af1fe/servers/detail", function(data){
console.log("Found " + data.servers.length + " servers!");
console.log("Success with Object Authentication!");
//process.exit();
});
});