/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
import AccountActions from './accountActions.js';
import AccountSource from './accountSource.js';
-
+var Utils = require('utils/utils.js');
var rw = require('utils/rw.js');
var altImage = rw.getSearchParams(window.location).alt_image;
label: 'Floating IP Pool',
ref: 'floating-ip-pool',
optional: true
- }],
- "openmano": [{
- label: "Host",
- ref: 'host'
}, {
- label: "Port",
- ref: 'port'
+ label: "User Domain",
+ ref: 'user-domain',
+ optional: true
+ }, {
+ label: "Project Domain",
+ ref: 'project-domain',
+ optional: true
}, {
- label: "Tenant ID",
- ref: 'tenant-id'
+ label: "Region",
+ ref: 'region',
+ optional: true
}],
"openvim": [{
label: "Host",
}, {
"name": "Cloudsim",
"account-type": "cloudsim_proxy"
- }, {
- "name": "Open Mano",
- "account-type": "openmano"
}, {
"name": "AWS",
"account-type": "aws"
},
image: {
"aws": require("../../images/aws.png"),
- "openmano": altImage || require("../../images/openmano.png"),
"openvim": require("../../images/openmano.png"),
"openstack": require("../../images/openstack.png"),
"cloudsim_proxy": require("../../images/riftio.png"),
},
labelByType: {
"aws": "AWS",
- "openmano": "OpenStack",
"openvim": "Open VIM",
"openstack": "OpenStack",
"cloudsim_proxy": "Cloudsim"
this.refreshingAll = false;
this.sdnOptions = [];
this.AccountMeta = AccountMeta;
+ this.showVIM = true;
this.bindActions(AccountActions(this.alt));
this.registerAsync(AccountSource);
this.exportPublicMethods({
}
refreshCloudAccountSuccess = () => {
+ }
+ getResourceOrchestratorSuccess = (data) => {
+ this.alt.actions.global.hideScreenLoader.defer();
+ if(data['rw-launchpad:resource-orchestrator'] && (data['rw-launchpad:resource-orchestrator']['account-type'] == 'openmano')) {
+ this.setState({
+ showVIM: false
+ })
+ }
}
deleteAccountSuccess = (response) => {
this.setState({
openAccountSocketSuccess = (connection) => {
let self = this;
let ws = window.multiplexer.channel(connection);
-
if (!connection) return;
this.setState({
socket: ws.ws,
ws.onmessage = (socket) => {
try {
var data = JSON.parse(socket.data);
+ Utils.checkAuthentication(data.statusCode, function() {
+ self.closeSocket();
+ });
let SdnOptions = [{
label: 'Select an SDN Account',
value: false
}
generateOptionsByName(data) {
let results = [];
- if (data.constructor.name == "Array") {
+ if (data && data.constructor.name == "Array") {
data.map(function(d) {
results.push({
label: d.name,
}
}
-
-/**
- *Cloud
- *
- * {"name":"eng2","account-type":"openstack","openstack":{"key":"lmaultsb","secret":"mypasswd","auth_url":"http://engstack.eng.riftio.com:5000/v3/","tenant":"lmaultsb","mgmt-network":"private"}}
-Name
-Path
-
-
-SDN
-
-
- *
- *
- */