3 * Copyright 2016 RIFT.IO Inc
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 import React, {Component} from 'react';
19 import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx';
20 import {Panel, PanelWrapper} from 'widgets/panel/panel';
21 import InstantiateDescriptorPanel from './instantiateDescriptorPanel.jsx';
22 import InstantiateInputParams from './instantiateInputParams.jsx';
23 class Instantiate extends Component {
27 handleSelectVNFConfigAgent = (vnfid) => {
30 let configAgentRef = JSON.parse(e.target.value);
31 self.Store.updateSelectedVNFConfigAgent(vnfid, configAgentRef);
38 this.props.nsd[0] && this.props.nsd[0].descriptors && this.props.nsd[0].descriptors.map(function(d) {
39 if(self.props.params.nsd == d.id) {
45 <InstantiateDescriptorPanel descriptor={selectedNSD} />
46 <Panel title="Input Parameters">
47 <InstantiateInputParams
49 nsFn={this.props.nsFn()}
50 vnfFn={this.props.vnfFn()}
51 vldFn={this.props.vldFn()}
52 ipProfileFn={this.props.ipProfileFn()}
53 dnsFn={this.props.dnsFn()}
54 usersFn={this.props.usersFn()}
55 sshFn={this.props.sshFn()}
56 updateName={this.props.nameUpdated}
57 updateInputParam={this.props.updateInputParam}
60 selectedNSDid={this.props.selectedNSDid}
61 name={this.props.name}
63 cloudAccounts={this.props.cloudAccounts}
64 selectedCloudAccount={this.props.selectedCloudAccount}
65 vnfdCloudAccounts={this.props.vnfdCloudAccounts}
67 dataCenters={this.props.dataCenters}
68 configAgentAccounts={this.props.configAgentAccounts}
69 inputParameters={this.props['input-parameters']}
71 displayPlacementGroups={this.props.displayPlacementGroups}
74 nsPlacementGroups={this.props['ns-placement-groups']}
75 vnfPlacementGroups={this.props['vnf-placement-groups']}
79 ipProfileList={this.props.ipProfiles}
81 sshKeysList={this.props.sshKeysList}
82 sshKeysRef={this.props.sshKeysRef}
84 dnsServers={this.props.dnsServers}
86 usersList = {this.props.usersList}
87 selectedID={this.props.selectedNSDid}
88 selectedNSD={selectedNSD}
90 isOpenMano={this.props.isOpenMano}
98 Instantiate.defaultProps = {
102 export default SkyquakeComponent(Instantiate);
110 ipProfiles={this.state.ipProfiles}
111 dnsServers={this.state.dnsServers}
113 nsd={this.state.nsd[0]}
114 selectedID={this.state.selectedNSDid}
115 selectedNSD={this.state.selectedNSD}
117 vldFn={this.Store.vldFn()}
118 ipProfileFn={this.Store.ipProfileFn()}
119 dnsFn={this.Store.dnsFn()}
120 usersFn={this.Store.usersFn()}
121 sshFn={this.Store.sshFn()}