<!DOCTYPE HTML>

<html>

<head>
<title>ETSI CTI - TOSCA Tools</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>

<div class="container-fluid">

{% with messages = get_flashed_messages() %}
  {% if messages %}
   <div class="alert alert-warning" role="alert">
    <ul class=flashes>
    {% for message in messages %}
      <li>{{ message }}</li>
    {% endfor %}
    </ul>
   </div>
  {% endif %}
{% endwith %}

<center>
<h1>TOSCA import/export</h1>
<h5 style="margin-bottom: 50px">v {{ VERSION }}</h5>

<p>
The tools available on this page are provided with NO GUARANTEES and shall be used ONLY for validation of ETSI Specifications. 
<br/>
<br/>
To report bugs, questions or feature request, please use the <a href="https://forge.etsi.org/bugzilla/enter_bug.cgi?product=Forge">the issue tracker at ETSI Forge</a> and select "TOSCA tools" as component. 
<br/>
{% if last_rev %}
		Current revision is <a href="{{rev_link}}">{{last_rev}}</a>
{% endif %}
<br/>
For any other inquiry, contact <a href="mailto:cti_support@etsi.org">ETSI CTI</a></p>
</center>
<div class="row">
	<div class="col-sm" >
		<div class="jumbotron">
			<h2  class="display-4" style="text-align:center;">tosca2doc</h2>
			<p class="lead">Generate a Docx document from the set of TOSCA definitions in YAML.</p>
			<hr class="my-4">
				<ol>
						<li>Upload TOSCA definitions in YAML format. Filenames expected are:</li>
						<ul>
							<li>etsi_nfv_sol001_vnfd_types.yaml</li>
							<li>etsi_nfv_sol001_nsd_types.yaml</li>
							<li>etsi_nfv_sol001_pnfd_types.yaml</li>
						</ul>
						<li>Download a docx file containing all the definitions.</li>
					</ol>
				<center>
					<a href="tosca2doc-info">Details</a>
				</center>
				<form action="tosca2doc" method="post" enctype="multipart/form-data">
					Tosca YAML files:<br />
					<input type="file" name="file" multiple=""/><br /><br />
					<center>
						<input type="submit" class="btn btn-primary" value="Upload" />
					</center>
				</form>			
		</div>
	</div>

	<div class="col-sm">
		<div class="jumbotron">
		<h2 class="display-4"  style="text-align:center;">doc2tosca</h2>
		<p class="lead">Uploade a Docx document to get the TOSCA definitions in YAML files.</p>
		<hr class="my-4">
			<ol>
				<li>Load SOL 001 specification in docx format. </li>
				<li>Download a zip file containing TOSCA definitions in YAML.</li>
			</ol>
			<center>
				<a href="doc2tosca-info">Details</a>
			</center>
			<form action="doc2tosca" id="doc2tosca-form" name="doc2tosca-form" method="post" enctype="multipart/form-data">
			Docx file:<br />
			<input type="file" name="file" /></br></br>
			Version:  
			<select class="form-control form-control-sm" form="doc2tosca-form" name="doc-version">
			{% for version in doc_allowed_versions %}	
  				<option value="{{version}}">{{version}}</option>
			{% endfor %}
			</select>	
			<br />
			Custom version (overrides the selector):
			<input type="text" name="custom-doc-version">
			<br />
			Custom TOSCA version (default is <code>{{default_tosca_version}}</code>):
			<input type="text" name="custom-tosca-version">
			<br />
			Root of import statements:
			<select class="form-control form-control-sm" form="doc2tosca-form" name="yaml-root-path">
				<option value="uri">Forge URL</option>
				<option value="local">Local (no path)</option>
			</select>
			<br /><br />
			<center>
				<input type="submit" class="btn btn-primary" value="Upload" />
			</center>
		</form>
	</div>
</div>

</div>

<center>
	<p><a href="https://labs.etsi.org/rep/cti-tools/tosca2doc">Source code</a></p>
	<small>Copyright &copy; ETSI 2019. All rights reserved.</small>
</center>
</body>

</html>
