Skip to content
Snippets Groups Projects
Commit feb2426a authored by Alberto Gonzalez Barneo's avatar Alberto Gonzalez Barneo
Browse files

Added qkd_app into blueprint, new line at the end of files and updated App by QKDApp

parent f77285eb
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!264Resolve "(OPT) UI Integration for QKD Management (WebUI)"
......@@ -124,4 +124,4 @@ def create_app(use_config=None, web_app_root=None):
if web_app_root is not None:
app.wsgi_app = SetSubAppMiddleware(app.wsgi_app, web_app_root)
return app
\ No newline at end of file
return app
......@@ -69,4 +69,5 @@ def main():
return 0
if __name__ == '__main__':
sys.exit(main())
\ No newline at end of file
sys.exit(main())
\ No newline at end of file
......@@ -21,13 +21,13 @@ from common.tools.context_queries.Context import get_context
from common.tools.context_queries.Device import get_device
from common.tools.context_queries.Topology import get_topology
from context.client.ContextClient import ContextClient
from app.client.AppClient import AppClient
from app.client.QKDAppClient import QKDAppClient
LOGGER = logging.getLogger(__name__)
app = Blueprint('app', __name__, url_prefix='/app')
app = Blueprint('qkd_app', __name__, url_prefix='/app')
app_client = AppClient()
qkd_app_client = QKDAppClient()
context_client = ContextClient()
@app.get('/')
......@@ -47,7 +47,7 @@ def home():
apps = list()
else:
try:
apps = app_client.ListApps(context_obj.context_id)
apps = qkd_app_client.ListApps(context_obj.context_id)
apps = apps.apps
except grpc.RpcError as e:
if e.code() != grpc.StatusCode.NOT_FOUND: raise
......
......@@ -57,4 +57,5 @@ class UpdateDeviceForm(FlaskForm):
coerce=int,
validators=[NumberRange(min=0)])
submit = SubmitField('Update')
\ No newline at end of file
submit = SubmitField('Update')
\ No newline at end of file
......@@ -262,4 +262,4 @@ def update(device_uuid):
return redirect(url_for('device.home'))
except Exception as e: # pylint: disable=broad-except
flash(f'Problem updating the device. {e.details()}', 'danger')
return render_template('device/update.html', device=response, form=form, submit_text='Update Device')
\ No newline at end of file
return render_template('device/update.html', device=response, form=form, submit_text='Update Device')
......@@ -12,3 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
......@@ -281,4 +281,5 @@ class AddServiceForm_L3VPN(FlaskForm):
Device_2_IF_mtu = IntegerField('Device_2 Interface MTU', validators=[Optional(), NumberRange(min=0, message="MTU value can't be negative")])
Device_2_IF_address_ip = StringField('Device_2 IP Address', validators=[CustomInputRequired(), validate_ipv4_address])
Device_2_IF_address_prefix = IntegerField('Device_2 IP Prefix length', validators=[CustomInputRequired(), validate_uint32])
Device_2_IF_description = StringField ('Device_2 SubIF Description', validators=[Optional()])
\ No newline at end of file
Device_2_IF_description = StringField ('Device_2 SubIF Description', validators=[Optional()])
\ No newline at end of file
......@@ -746,4 +746,4 @@ def get_device_params(form, device_num, form_type):
raise ValueError(f'Unsupported form type: {form_type}')
params_with_data = {k: v for k, v in device_params.items() if v is not None and str(v) != 'None' and v != ''}
return params_with_data
\ No newline at end of file
return params_with_data
......@@ -91,4 +91,4 @@
</tbody>
</table>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -184,4 +184,5 @@
</button>
</fieldset>
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment