├── .gitignore ├── .gitreview ├── .mailmap ├── .zuul.yaml ├── CONTRIBUTING.rst ├── HACKING.rst ├── LICENSE ├── MANIFEST.in ├── README.rst ├── babel-django.cfg ├── babel-djangojs.cfg ├── bindep.txt ├── doc ├── requirements.txt └── source │ ├── conf.py │ ├── configuration │ └── index.rst │ ├── contributor │ └── index.rst │ ├── index.rst │ ├── install │ └── index.rst │ └── user │ └── index.rst ├── manage.py ├── releasenotes └── notes │ ├── drop-py-2-7-55250f584936f88e.yaml │ └── support-nfv-orchestration-api-v2-a0ec6da7c67e6d4f.yaml ├── requirements.txt ├── setup.cfg ├── setup.py ├── tacker_horizon ├── __init__.py ├── enabled │ ├── _80_nfv.py │ └── __init__.py ├── openstack_dashboard │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ └── tacker.py │ └── dashboards │ │ ├── __init__.py │ │ └── nfv │ │ ├── __init__.py │ │ ├── dashboard.py │ │ ├── lccnsubscription │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── lccnsubscription │ │ │ │ ├── _create_lccn_subscription.html │ │ │ │ ├── create_lccn_subscription.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── lccnsubsc_detail.html │ │ ├── urls.py │ │ └── views.py │ │ ├── nscatalog │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── nscatalog │ │ │ │ ├── _onboardns.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── onboardns.html │ │ │ │ └── template.html │ │ ├── urls.py │ │ └── views.py │ │ ├── nsmanager │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── nsmanager │ │ │ │ ├── _deploy_ns.html │ │ │ │ ├── deploy_ns.html │ │ │ │ ├── detail.html │ │ │ │ └── index.html │ │ ├── urls.py │ │ └── views.py │ │ ├── static │ │ └── dashboard │ │ │ └── nfv │ │ │ ├── css │ │ │ └── nfv.css │ │ │ └── js │ │ │ ├── nfv.js │ │ │ └── nfv.vim.reg.js │ │ ├── templates │ │ └── nfv │ │ │ └── base.html │ │ ├── utils.py │ │ ├── vim │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vim │ │ │ │ ├── _registervim.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── registervim.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnfcatalog │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnfcatalog │ │ │ │ ├── _onboardvnf.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── onboardvnf.html │ │ │ │ └── template.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnffgcatalog │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnffgcatalog │ │ │ │ ├── _onboardvnffg.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── onboardvnffg.html │ │ │ │ └── template.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnffgmanager │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnffgmanager │ │ │ │ ├── _deploy_vnffg.html │ │ │ │ ├── deploy_vnffg.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── vdu_details.html │ │ │ │ └── vnffg_details.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnffmalarm │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnffmalarm │ │ │ │ ├── _update_alarm.html │ │ │ │ ├── alarm_detail.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── update_alarm.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnffmsubscription │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnffmsubscription │ │ │ │ ├── _create_subscription.html │ │ │ │ ├── create_subscription.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── subscription_detail.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnflcm │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnflcm │ │ │ │ ├── _change_connectivity.html │ │ │ │ ├── _change_vnfpkg.html │ │ │ │ ├── _create_vnf_identifier.html │ │ │ │ ├── _heal_vnf.html │ │ │ │ ├── _instantiate_vnf.html │ │ │ │ ├── _scale_vnf.html │ │ │ │ ├── _terminate_vnf.html │ │ │ │ ├── _update_vnf.html │ │ │ │ ├── change_connectivity.html │ │ │ │ ├── change_vnfpkg.html │ │ │ │ ├── create_vnf_identifier.html │ │ │ │ ├── detail.html │ │ │ │ ├── heal_vnf.html │ │ │ │ ├── index.html │ │ │ │ ├── instantiate_vnf.html │ │ │ │ ├── scale_vnf.html │ │ │ │ ├── terminate_vnf.html │ │ │ │ ├── update_vnf.html │ │ │ │ └── vnflcm_detail.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnflcmopocc │ │ ├── __init__.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnflcmopocc │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── vnflcmopocc_detail.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnfmanager │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnfmanager │ │ │ │ ├── _deploy_vnf.html │ │ │ │ ├── deploy_vnf.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ └── vdu_details.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnfpackages │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnfpackages │ │ │ │ ├── _update_vnfpkg.html │ │ │ │ ├── _upload_vnfpkg.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── update_vnfpkg.html │ │ │ │ ├── upload_vnfpkg.html │ │ │ │ └── vnfpkg_detail.html │ │ ├── urls.py │ │ └── views.py │ │ ├── vnfpmjob │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ │ └── vnfpmjob │ │ │ │ ├── _create_pmjob.html │ │ │ │ ├── _update_pmjob.html │ │ │ │ ├── create_pmjob.html │ │ │ │ ├── detail.html │ │ │ │ ├── index.html │ │ │ │ ├── pmjob_detail.html │ │ │ │ ├── report_detail.html │ │ │ │ └── update_pmjob.html │ │ ├── urls.py │ │ └── views.py │ │ └── vnfpmthreshold │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── panel.py │ │ ├── tables.py │ │ ├── tabs.py │ │ ├── templates │ │ └── vnfpmthreshold │ │ │ ├── _create_pmthreshold.html │ │ │ ├── _update_pmthreshold.html │ │ │ ├── create_pmthreshold.html │ │ │ ├── detail.html │ │ │ ├── index.html │ │ │ ├── pmthreshold_detail.html │ │ │ └── update_pmthreshold.html │ │ ├── urls.py │ │ └── views.py └── test │ ├── __init__.py │ ├── base.py │ ├── integration │ ├── __init__.py │ ├── horizon.conf │ ├── pages │ │ ├── __init__.py │ │ └── nfv │ │ │ ├── __init__.py │ │ │ ├── nfv_orchestration │ │ │ ├── __init__.py │ │ │ ├── nscatalogpage.py │ │ │ ├── nsmanagerpage.py │ │ │ ├── vimmanagementpage.py │ │ │ ├── vnffgcatalogpage.py │ │ │ └── vnffgmanagerpage.py │ │ │ ├── vnf_management │ │ │ ├── __init__.py │ │ │ ├── vnfcatalogpage.py │ │ │ └── vnfmanagerpage.py │ │ │ ├── vnffm │ │ │ ├── __init__.py │ │ │ ├── vnffmalarmpage.py │ │ │ └── vnffmsubscriptionpage.py │ │ │ ├── vnflcm │ │ │ ├── __init__.py │ │ │ ├── lccnsubscriptionpage.py │ │ │ ├── vnflcmopoccpage.py │ │ │ └── vnflcmpage.py │ │ │ ├── vnfpackages │ │ │ ├── __init__.py │ │ │ └── vnfpackagespage.py │ │ │ └── vnfpm │ │ │ ├── __init__.py │ │ │ ├── vnfpmjobpage.py │ │ │ └── vnfpmthresholdpage.py │ └── test_basic.py │ ├── settings.py │ └── urls.py ├── test-requirements.txt ├── test └── README.md ├── tools ├── executable_files.txt └── find_executables.sh └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | 3 | # Packages 4 | *.egg 5 | *.egg-info 6 | dist 7 | build 8 | eggs 9 | parts 10 | bin 11 | var 12 | sdist 13 | develop-eggs 14 | .installed.cfg 15 | 16 | # Installer logs 17 | pip-log.txt 18 | 19 | # Unit test / coverage reports 20 | .coverage 21 | .idea/ 22 | .tox 23 | .venv 24 | *.lock 25 | tacker_horizon/test/.secret_key_store 26 | 27 | #Translations 28 | *.mo 29 | 30 | #Mr Developer 31 | .mr.developer.cfg 32 | 33 | # Packaging output 34 | *.deb 35 | 36 | # pbr output 37 | AUTHORS 38 | ChangeLog 39 | 40 | test.conf 41 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.opendev.org 3 | port=29418 4 | project=openstack/tacker-horizon.git 5 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # Format is: 2 | # 3 | # 4 | -------------------------------------------------------------------------------- /.zuul.yaml: -------------------------------------------------------------------------------- 1 | - job: 2 | name: tacker-horizon-integration-tests 3 | parent: horizon-integration-tests 4 | required-projects: 5 | - name: openstack/horizon 6 | - name: openstack/tacker 7 | - name: openstack/python-tackerclient 8 | - name: openstack/tacker-horizon 9 | roles: 10 | - zuul: openstack-infra/devstack 11 | - zuul: openstack/horizon 12 | irrelevant-files: 13 | - ^.*\.rst$ 14 | - ^doc/.*$ 15 | - ^releasenotes/.*$ 16 | vars: 17 | devstack_plugins: 18 | tacker: https://git.openstack.org/openstack/tacker 19 | tacker-horizon: https://git.openstack.org/openstack/tacker-horizon 20 | devstack_services: 21 | horizon: true 22 | tox_envlist: integration 23 | 24 | - project: 25 | templates: 26 | - check-requirements 27 | - horizon-non-primary-django-jobs 28 | - openstack-python3-jobs-horizon 29 | - publish-openstack-docs-pti 30 | check: 31 | jobs: 32 | - tacker-horizon-integration-tests: 33 | voting: false 34 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | If you would like to contribute to the development of OpenStack, 2 | you must follow the steps in this page: 3 | 4 | https://docs.openstack.org/infra/manual/developers.html 5 | 6 | Once those steps have been completed, changes to OpenStack 7 | should be submitted for review via the Gerrit tool, following 8 | the workflow documented at: 9 | 10 | https://docs.openstack.org/infra/manual/developers.html#development-workflow 11 | 12 | Pull requests submitted through GitHub will be ignored. 13 | 14 | Bugs should be filed on Launchpad, not GitHub: 15 | 16 | https://bugs.launchpad.net/tacker 17 | -------------------------------------------------------------------------------- /HACKING.rst: -------------------------------------------------------------------------------- 1 | Tacker Style Commandments 2 | ========================= 3 | 4 | - Step 1: Read the OpenStack Style Commandments 5 | https://docs.openstack.org/hacking/latest/ 6 | - Step 2: Read on 7 | 8 | Tacker Specific Commandments 9 | ---------------------------- 10 | 11 | - [N320] Validate that LOG messages, except debug ones, have translations 12 | 13 | Creating Unit Tests 14 | ------------------- 15 | For every new feature, unit tests should be created that both test and 16 | (implicitly) document the usage of said feature. If submitting a patch for a 17 | bug that had no unit test, a new passing unit test should be added. If a 18 | submitted bug fix does have a unit test, be sure to add a new one that fails 19 | without the patch and passes with the patch. 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS 2 | include ChangeLog 3 | include LICENSE 4 | include manage.py 5 | include README.rst 6 | 7 | recursive-include tacker_horizon *.html *.css *.js 8 | 9 | exclude .gitignore 10 | exclude .gitreview 11 | 12 | global-exclude *.pyc 13 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Team and repository tags 3 | ======================== 4 | 5 | .. image:: https://governance.openstack.org/tc/badges/tacker-horizon.svg 6 | :target: https://governance.openstack.org/tc/reference/tags/index.html 7 | 8 | .. Change things from this point on 9 | 10 | Tacker Horizon UI 11 | ================= 12 | 13 | Horizon UI for Tacker VNF Manager 14 | 15 | * License: Apache license 16 | * Source: https://opendev.org/openstack/tacker-horizon 17 | * Bugs: https://bugs.launchpad.net/tacker 18 | * Tacker-horizon docs: https://docs.openstack.org/tacker-horizon/latest/ 19 | 20 | Installation 21 | ============ 22 | 23 | **Note:** The paths we are using for configuration files in these steps 24 | are with reference to Ubuntu Operating System. The paths may vary for 25 | other Operating Systems. 26 | 27 | The branch_name which is used in commands, specify the branch_name 28 | as stable/ for any stable branch installation. For eg: 29 | stable/queens, stable/pike. If unspecified the default will be 30 | master branch. The installation of tacker-horizon is as following 31 | steps. 32 | 33 | Clone tacker-horizon repository. 34 | :: 35 | 36 | cd ~/ 37 | git clone https://opendev.org/openstack/tacker-horizon -b 38 | 39 | Install horizon module. 40 | :: 41 | 42 | cd tacker-horizon 43 | sudo python setup.py install 44 | 45 | Enable tacker horizon in dashboard. 46 | :: 47 | 48 | sudo cp tacker_horizon/enabled/* \ 49 | /opt/stack/horizon/openstack_dashboard/enabled/ 50 | 51 | Collect and compress static files. 52 | :: 53 | 54 | ./manage.py collectstatic --noinput 55 | echo yes | ./manage.py compress 56 | 57 | Restart Apache server using Upstart. 58 | :: 59 | 60 | sudo service apache2 restart 61 | 62 | Or restart Apache server using Systemd. 63 | :: 64 | 65 | sudo systemctl restart apache2 66 | 67 | -------------------------------------------------------------------------------- /babel-django.cfg: -------------------------------------------------------------------------------- 1 | [python: **.py] 2 | [django: **/templates/**.html] 3 | -------------------------------------------------------------------------------- /babel-djangojs.cfg: -------------------------------------------------------------------------------- 1 | [javascript: **.js] 2 | [angular: **/static/**.html] 3 | -------------------------------------------------------------------------------- /bindep.txt: -------------------------------------------------------------------------------- 1 | # selenium tests 2 | ffmpeg [selenium] 3 | firefox [selenium platform:ubuntu] 4 | firefox-esr [selenium platform:debian] 5 | xvfb [selenium platform:dpkg] 6 | # already part of xorg-x11-server on openSUSE 7 | xorg-x11-server-Xvfb [selenium platform:redhat] -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | # The order of packages is significant, because pip processes them in the order 2 | # of appearance. Changing the order has an impact on the overall integration 3 | # process, which may cause wedges in the gate later. 4 | 5 | openstackdocstheme>=2.2.1 # Apache-2.0 6 | sphinx>=2.0.0,!=2.1.0 # BSD 7 | reno>=3.1.0 # Apache-2.0 8 | -------------------------------------------------------------------------------- /doc/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 11 | # implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import os 16 | import sys 17 | 18 | sys.path.insert(0, os.path.abspath('../..')) 19 | # -- General configuration ---------------------------------------------------- 20 | 21 | # Add any Sphinx extension module names here, as strings. They can be 22 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 23 | extensions = [ 24 | 'sphinx.ext.autodoc', 25 | 'openstackdocstheme', 26 | # 'sphinx.ext.intersphinx', 27 | ] 28 | 29 | # autodoc generation is a bit aggressive and a nuisance when doing heavy 30 | # text edit cycles. 31 | # execute "export SPHINX_DEBUG=1" in your terminal to disable 32 | 33 | # The suffix of source filenames. 34 | source_suffix = '.rst' 35 | 36 | # The master toctree document. 37 | master_doc = 'index' 38 | 39 | # General information about the project. 40 | copyright = '2018, OpenStack Developers' 41 | 42 | # openstackdocstheme options 43 | openstackdocs_repo_name = 'openstack/tacker-horizon' 44 | openstackdocs_pdf_link = True 45 | openstackdocs_bug_project = 'tacker' 46 | openstackdocs_bug_tag = '' 47 | 48 | # If true, '()' will be appended to :func: etc. cross-reference text. 49 | add_function_parentheses = True 50 | 51 | # If true, the current module name will be prepended to all description 52 | # unit titles (such as .. function::). 53 | add_module_names = True 54 | 55 | # The name of the Pygments (syntax highlighting) style to use. 56 | pygments_style = 'native' 57 | 58 | # -- Options for HTML output -------------------------------------------------- 59 | 60 | # The theme to use for HTML and HTML Help pages. Major themes that come with 61 | # Sphinx are currently 'default' and 'sphinxdoc'. 62 | # html_theme_path = ["."] 63 | # html_theme = '_theme' 64 | # html_static_path = ['static'] 65 | html_theme = 'openstackdocs' 66 | 67 | # Output file base name for HTML help builder. 68 | htmlhelp_basename = 'tacker-horizon' 69 | 70 | # Grouping the document tree into LaTeX files. List of tuples 71 | # (source start file, target name, title, author, documentclass 72 | # [howto/manual]). 73 | # NOTE(vishalmanchanda): Specify toctree_only=True for a better document 74 | # structure of the generated PDF file. 75 | latex_documents = [ 76 | ('index', 77 | 'doc-tacker-horizon.tex', 78 | 'Tacker-Horizon Documentation', 79 | 'OpenStack Developers', 'howto', True), 80 | ] 81 | 82 | man_pages = [ 83 | ('index', 'Tacker Horizon Documentation', 84 | 'Documentation for Tacker Horizon plugin to Openstack\ 85 | Dashboard (Horizon)', 86 | ['OpenStack'], 1) 87 | ] 88 | 89 | # Example configuration for intersphinx: refer to the Python standard library. 90 | # intersphinx_mapping = {'http://docs.python.org/': None} 91 | 92 | # Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 93 | latex_use_xindy = False 94 | 95 | latex_domain_indices = False 96 | 97 | latex_elements = { 98 | 'makeindex': '', 99 | 'printindex': '', 100 | 'preamble': r'\setcounter{tocdepth}{3}', 101 | } 102 | -------------------------------------------------------------------------------- /doc/source/configuration/index.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Configuration 3 | ============= 4 | 5 | Tacker-horizon does not need special configuration. 6 | 7 | For more configurations, see 8 | `Configuration Guide `_ 9 | in the Horizon documentation. 10 | -------------------------------------------------------------------------------- /doc/source/contributor/index.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Contributor Guide 3 | ================= 4 | 5 | Contributor License Agreement 6 | ----------------------------- 7 | 8 | .. index:: 9 | single: license; agreement 10 | 11 | In order to contribute to the Tacker-Horizon project, you need to have 12 | signed OpenStack's contributor's agreement. You can find the details 13 | of how to contribute as the link below. 14 | 15 | .. seealso:: 16 | 17 | * http://docs.openstack.org/infra/manual/developers.html 18 | * http://wiki.openstack.org/CLA 19 | 20 | LaunchPad Project 21 | ----------------- 22 | 23 | Most of the tools used for OpenStack depend on a launchpad.net ID for 24 | authentication. 25 | 26 | .. seealso:: 27 | 28 | * https://launchpad.net 29 | * https://launchpad.net/tacker 30 | 31 | Project Info 32 | ------------ 33 | 34 | * Free software: under the `Apache license `_ 35 | * Tacker service: https://opendev.org/openstack/tacker 36 | * Tacker-horizon library: https://opendev.org/openstack/tacker-horizon 37 | * Bugs tracker: https://bugs.launchpad.net/tacker 38 | * Blueprints: https://blueprints.launchpad.net/tacker 39 | * Code review: https://review.opendev.org/#/q/status:open+project:openstack/tacker-horizon,n,z 40 | -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Tacker Horizon 3 | ============== 4 | 5 | Horizon UI for NFV Orchestration (Tacker) 6 | 7 | * License: `Apache license `_ 8 | * Tacker-horizon docs: https://docs.openstack.org/tacker-horizon/latest 9 | * Source: https://opendev.org/openstack/tacker-horizon 10 | * Bugs: https://bugs.launchpad.net/tacker 11 | 12 | Contents 13 | -------- 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | install/index 19 | configuration/index 20 | user/index 21 | contributor/index 22 | 23 | 24 | Indices and tables 25 | ------------------ 26 | 27 | * :ref:`search` 28 | -------------------------------------------------------------------------------- /doc/source/install/index.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Installation Guide 3 | ================== 4 | 5 | Manual Installation 6 | ------------------- 7 | 8 | **Note:** The paths we are using for configuration files in these steps 9 | are with reference to Ubuntu Operating System. The paths may vary for 10 | other Operating Systems. 11 | 12 | The branch_name which is used in commands, specify the branch_name 13 | as stable/ for any stable branch installation. For eg: 14 | stable/queens. If unspecified the default will be master branch. 15 | 16 | 1. Clone tacker-horizon repository. 17 | 18 | :: 19 | 20 | cd ~/ 21 | git clone https://opendev.org/openstack/tacker-horizon -b 22 | 23 | 24 | 2. Install horizon module. 25 | 26 | :: 27 | 28 | cd tacker-horizon 29 | sudo python3 setup.py install 30 | 31 | 32 | 3. Enable tacker horizon in dashboard. 33 | 34 | :: 35 | 36 | sudo cp tacker_horizon/enabled/* \ 37 | /opt/stack/horizon/openstack_dashboard/enabled/ 38 | 39 | 40 | 4. Collect and compress static files. 41 | 42 | :: 43 | 44 | ./manage.py collectstatic --noinput 45 | echo yes | ./manage.py compress 46 | 47 | 48 | 5. Restart Apache server. 49 | 50 | :: 51 | 52 | sudo systemctl restart apache2 53 | 54 | 55 | Install via Devstack 56 | -------------------- 57 | 58 | The tacker-horizon is automatically enabled when tacker server 59 | is installed. 60 | 61 | .. seealso:: 62 | 63 | https://docs.openstack.org/tacker/latest/install/devstack.html 64 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | import os 16 | import sys 17 | 18 | from django.core.management import execute_from_command_line 19 | 20 | if __name__ == "__main__": 21 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", 22 | "openstack_dashboard.settings") 23 | execute_from_command_line(sys.argv) 24 | -------------------------------------------------------------------------------- /releasenotes/notes/drop-py-2-7-55250f584936f88e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Python 2.7 support has been dropped. Last release of tacker-horizon 5 | to support python 2.7 is OpenStack Train. The minimum version of Python now 6 | supported by tacker-horizon is Python 3.6. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/support-nfv-orchestration-api-v2-a0ec6da7c67e6d4f.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Support the latest NFV Orchestration API v2.0 listed below. 5 | 6 | * Virtualized Network Function Lifecycle Management Interface (VNF LCM) v2 7 | * Virtualized Network Function Fault Management Interface (VNF FM) v1 8 | * Virtualized Network Function Performance Management Interface (VNF PM) v2 9 | 10 | In addition, to manage VNF packages for testing purposes, also support 11 | Orchestration API v1.0 listed below. 12 | 13 | * Virtualized Network Function Packages (VNF packages) 14 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Requirements lower bounds listed here are our best effort to keep them up to 2 | # date but we do not test them so no guarantee of having them all correct. If 3 | # you find any incorrect lower bounds, let us know or propose a fix. 4 | # 5 | # The order of packages is significant, because pip processes them in the order 6 | # of appearance. Changing the order has an impact on the overall integration 7 | # process, which may cause wedges in the gate later. 8 | # Order matters to the pip dependency resolver, so sorting this file 9 | # changes how packages are installed. New dependencies should be 10 | # added in alphabetical order, however, some dependencies may need to 11 | # be installed in a specific order. 12 | # 13 | # PBR should always appear first 14 | Django>=2.2 # BSD 15 | oslo.log>=3.36.0 # Apache-2.0 16 | oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 17 | pbr>=5.5.0 # Apache-2.0 18 | python-tackerclient>=0.8.0 # Apache-2.0 19 | 20 | # This will be installed from git in OpenStack CI if the job setting 21 | # required-projects for horizon: 22 | horizon>=17.1.0 # Apache-2.0 23 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = tacker-horizon 3 | description = Tacker extension for Horizon 4 | long_description = file: README.rst 5 | author = OpenStack 6 | author_email = openstack-discuss@lists.openstack.org 7 | url = https://docs.openstack.org/tacker-horizon/latest/ 8 | classifiers = 9 | Environment :: OpenStack 10 | Intended Audience :: Developers 11 | Intended Audience :: Information Technology 12 | Intended Audience :: System Administrators 13 | License :: OSI Approved :: Apache Software License 14 | Operating System :: POSIX :: Linux 15 | Programming Language :: Python 16 | Programming Language :: Python :: 3 17 | Programming Language :: Python :: 3.6 18 | Programming Language :: Python :: 3.7 19 | Programming Language :: Python :: 3.8 20 | Programming Language :: Python :: 3.9 21 | Programming Language :: Python :: 3.10 22 | 23 | 24 | [files] 25 | packages = 26 | tacker_horizon 27 | namespace_packages = 28 | tacker_horizon 29 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import setuptools 17 | 18 | setuptools.setup( 19 | setup_requires=['pbr>=2.0.0'], 20 | pbr=True) 21 | -------------------------------------------------------------------------------- /tacker_horizon/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | __import__('pkg_resources').declare_namespace(__name__) 17 | -------------------------------------------------------------------------------- /tacker_horizon/enabled/_80_nfv.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 99Cloud Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | DASHBOARD = 'nfv' 16 | DISABLED = False 17 | AUTO_DISCOVER_STATIC_FILES = True 18 | ADD_INSTALLED_APPS = [ 19 | 'tacker_horizon.openstack_dashboard.dashboards.nfv', 20 | ] 21 | -------------------------------------------------------------------------------- /tacker_horizon/enabled/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/enabled/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/api/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | """ 15 | Methods and interface objects used to interact with external APIs. 16 | 17 | API method calls return objects that are in many cases objects with 18 | attributes that are direct maps to the data returned from the API http call. 19 | Unfortunately, these objects are also often constructed dynamically, making 20 | it difficult to know what data is available from the API object. Because of 21 | this, all API calls should wrap their returned object in one defined here, 22 | using only explicitly defined attributes and/or methods. 23 | 24 | In other words, Horizon developers not working on openstack_dashboard.api 25 | shouldn't need to understand the finer details of APIs for 26 | Keystone/Nova/Glance/Swift et. al. 27 | """ 28 | from tacker_horizon.openstack_dashboard.api import tacker 29 | 30 | 31 | __all__ = [ 32 | "tacker", 33 | ] 34 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/dashboard.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | import horizon 19 | 20 | 21 | class Vnfmgroup(horizon.PanelGroup): 22 | slug = "nfvgroup" 23 | name = _("(Legacy)VNF Management") 24 | panels = ('vnfcatalog', 'vnfmanager',) 25 | 26 | 27 | class Nfvogroup(horizon.PanelGroup): 28 | slug = "nfvogroup" 29 | name = _("(Legacy)NFV Orchestration") 30 | panels = ('vim', 'vnffgcatalog', 'vnffgmanager', 31 | 'nscatalog', 'nsmanager') 32 | 33 | 34 | class Vnfpkggroup(horizon.PanelGroup): 35 | slug = "vnfpkggroup" 36 | name = _("VNF Packages v1") 37 | panels = ('vnfpackages',) 38 | 39 | 40 | class Vnflcmgroup(horizon.PanelGroup): 41 | slug = "vnflcmgroup" 42 | name = _("VNF LCM v2") 43 | panels = ('vnflcm', 'vnflcmopocc', 'lccnsubscription',) 44 | 45 | 46 | class Vnffmgroup(horizon.PanelGroup): 47 | slug = "vnffmgroup" 48 | name = _("VNF FM v1") 49 | panels = ('vnffmalarm', 'vnffmsubscription',) 50 | 51 | 52 | class Vnfpmgroup(horizon.PanelGroup): 53 | slug = "vnfpmgroup" 54 | name = _("VNF PM v2") 55 | panels = ('vnfpmjob', 'vnfpmthreshold',) 56 | 57 | 58 | class Nfv(horizon.Dashboard): 59 | name = _("NFV") 60 | slug = "nfv" 61 | panels = (Vnfmgroup, Nfvogroup, Vnfpkggroup, Vnflcmgroup, Vnffmgroup, 62 | Vnfpmgroup,) # Add your panels here. 63 | default_panel = 'vnfcatalog' # Specify the slug of the dashboard's 64 | # default panel. 65 | 66 | 67 | horizon.register(Nfv) 68 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/forms.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | import json 17 | 18 | from django.utils.translation import gettext_lazy as _ 19 | 20 | from horizon import exceptions 21 | from horizon import forms 22 | from horizon import messages 23 | 24 | from tacker_horizon.openstack_dashboard import api 25 | 26 | 27 | class CreateLccnSubscription(forms.SelfHandlingForm): 28 | param_file = forms.FileField( 29 | label=_("Param File"), 30 | widget=forms.FileInput(attrs={ 31 | 'class': 'switched', 32 | 'data-switch-on': 'source', 33 | 'data-source-upload': _('Param File')})) 34 | 35 | def __init__(self, request, *args, **kwargs): 36 | super(CreateLccnSubscription, self).__init__(request, *args, **kwargs) 37 | 38 | def clean(self): 39 | data = super(CreateLccnSubscription, self).clean() 40 | 41 | try: 42 | param_str = self.files['param_file'].read() 43 | param = json.loads(param_str) 44 | data['param_data'] = param 45 | except Exception as e: 46 | msg = _('Failed to read file: %s.') % e 47 | raise forms.ValidationError(msg) 48 | 49 | return data 50 | 51 | def handle(self, request, data): 52 | try: 53 | param = data['param_data'] 54 | subsc = api.tacker.create_vnf_lcm_subscription(request, param) 55 | messages.success( 56 | request, 57 | _('Create LCCN Subscription. (id: %s)') % subsc['id']) 58 | 59 | except Exception: 60 | exceptions.handle( 61 | request, 62 | _('Failed to create LCCN Subscription.')) 63 | return False 64 | 65 | return True 66 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class LccnSubscription(horizon.Panel): 25 | name = _("LCCN Subscription") 26 | slug = "lccnsubscription" 27 | 28 | 29 | dashboard.Nfv.register(LccnSubscription) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | from django.utils.translation import ngettext_lazy 19 | 20 | from horizon import tables 21 | from openstack_dashboard import policy 22 | 23 | from tacker_horizon.openstack_dashboard import api 24 | 25 | 26 | class DeleteLccnSubscription(policy.PolicyTargetMixin, tables.DeleteAction): 27 | @staticmethod 28 | def action_present(count): 29 | return ngettext_lazy( 30 | "Delete Lccn Subscription", 31 | "Delete Lccn Subscriptions", 32 | count 33 | ) 34 | 35 | @staticmethod 36 | def action_past(count): 37 | return ngettext_lazy( 38 | "Delete Lccn Subscription", 39 | "Delete Lccn Subscriptions", 40 | count 41 | ) 42 | 43 | def action(self, request, obj_id): 44 | api.tacker.delete_vnf_lcm_subscription(request, obj_id) 45 | 46 | 47 | class CreateLccnSubscription(tables.LinkAction): 48 | name = "create_lccnsubsc" 49 | verbose_name = _("Create Lccn Subscription") 50 | classes = ("ajax-modal",) 51 | icon = "plus" 52 | url = "horizon:nfv:lccnsubscription:createlccnsubscription" 53 | 54 | 55 | class LccnSubscriptionTable(tables.DataTable): 56 | id = tables.Column('id', verbose_name=_("ID"), 57 | link="horizon:nfv:lccnsubscription:detail",) 58 | callback_uri = tables.Column('callback_uri', 59 | verbose_name=_("Callback URI")) 60 | 61 | class Meta(object): 62 | name = "lccnsubsc" 63 | verbose_name = _("LCCN Subscription") 64 | pagination_param = 'subsc_marker' 65 | prev_pagination_param = 'prev_subsc_marker' 66 | table_actions = (CreateLccnSubscription, DeleteLccnSubscription, 67 | tables.FilterAction) 68 | row_actions = (DeleteLccnSubscription,) 69 | multi_select = True 70 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/templates/lccnsubscription/_create_lccn_subscription.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Create a Lccn Subscription." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/templates/lccnsubscription/create_lccn_subscription.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "create_lccn_subscription" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("create_lccn_subscription") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/lccnsubscription/_create_lccn_subscription.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/templates/lccnsubscription/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Lccn Subscription Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/templates/lccnsubscription/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "LCCN Subscription" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("LCCN Subscription") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/templates/lccnsubscription/lccnsubsc_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "Callback URI" %}
6 |
{{ lccnsubscription.callbackUri }}
7 |
{% trans "Filter" %}
8 |
{{ lccnsubscription.filter }}
9 |
{% trans "ID" %}
10 |
{{ lccnsubscription.id }}
11 |
{% trans "Links" %}
12 |
{{ lccnsubscription.links }}
13 |
14 |
15 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.lccnsubscription \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 25 | name='detail'), 26 | re_path(r'^createlccnsubscription$', 27 | views.CreateLccnSubscriptionView.as_view(), 28 | name='createlccnsubscription'), 29 | ] 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/lccnsubscription/views.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import reverse 18 | from django.urls import reverse_lazy 19 | from django.utils.translation import gettext_lazy as _ 20 | 21 | from horizon import exceptions 22 | from horizon import forms 23 | from horizon import tabs 24 | from horizon.utils import memoized 25 | 26 | from tacker_horizon.openstack_dashboard import api as tacker_api 27 | from tacker_horizon.openstack_dashboard.dashboards.nfv.lccnsubscription \ 28 | import forms as project_forms 29 | from tacker_horizon.openstack_dashboard.dashboards.nfv.lccnsubscription \ 30 | import tabs as lccnsubsctabs 31 | 32 | 33 | class IndexView(tabs.TabbedTableView): 34 | tab_group_class = lccnsubsctabs.LccnSubscriptionTabs 35 | template_name = 'nfv/lccnsubscription/index.html' 36 | 37 | 38 | class CreateLccnSubscriptionView(forms.ModalFormView): 39 | form_class = project_forms.CreateLccnSubscription 40 | template_name = 'nfv/lccnsubscription/create_lccn_subscription.html' 41 | success_url = reverse_lazy("horizon:nfv:lccnsubscription:index") 42 | modal_id = "add_service_modal" 43 | modal_header = _("Create Lccn Subscription") 44 | submit_label = _("Create Lccn Subscription") 45 | submit_url = "horizon:nfv:lccnsubscription:createlccnsubscription" 46 | 47 | def get_context_data(self, **kwargs): 48 | context = super( 49 | CreateLccnSubscriptionView, self).get_context_data(**kwargs) 50 | context['submit_url'] = reverse(self.submit_url) 51 | return context 52 | 53 | 54 | class DetailView(tabs.TabView): 55 | tab_group_class = lccnsubsctabs.LccnSubscDetailTabs 56 | template_name = 'nfv/lccnsubscription/detail.html' 57 | redirect_url = 'horizon:nfv:lccnsubscription:index' 58 | page_title = _("LCCN Subscription Detail") 59 | 60 | def get_context_data(self, **kwargs): 61 | context = super(DetailView, self).get_context_data(**kwargs) 62 | lccnsubscription = self.get_data() 63 | context['lccnsubscription'] = lccnsubscription 64 | context['id'] = kwargs['id'] 65 | context['url'] = reverse(self.redirect_url) 66 | return context 67 | 68 | @memoized.memoized_method 69 | def get_data(self): 70 | subsc_id = self.kwargs.get('id', None) 71 | 72 | try: 73 | lccnsubscription = tacker_api.tacker.get_vnf_lcm_subscription( 74 | self.request, subsc_id) 75 | lccnsubscription['links'] = lccnsubscription.get('_links', '') 76 | return lccnsubscription 77 | except Exception as e: 78 | redirect = reverse(self.redirect_url) 79 | exceptions.handle( 80 | self.request, 81 | _('Failed to get LCCN Subscription. (id: %s)') % subsc_id, 82 | redirect=redirect) 83 | raise exceptions.Http302(redirect) from e 84 | 85 | def get_tabs(self, request, *args, **kwargs): 86 | lccnsubscription = self.get_data() 87 | return self.tab_group_class( 88 | request, lccnsubscription=lccnsubscription, **kwargs) 89 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/panel.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | 16 | import horizon 17 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 18 | 19 | 20 | class Nscatalog(horizon.Panel): 21 | name = _("NS Catalog") 22 | slug = "nscatalog" 23 | 24 | 25 | dashboard.Nfv.register(Nscatalog) 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/tables.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | from django.utils.translation import ngettext_lazy 16 | 17 | from horizon import tables 18 | 19 | from openstack_dashboard import policy 20 | from tacker_horizon.openstack_dashboard import api 21 | 22 | 23 | class MyFilterAction(tables.FilterAction): 24 | name = "myfilter" 25 | 26 | 27 | class DeleteNSD(policy.PolicyTargetMixin, tables.DeleteAction): 28 | @staticmethod 29 | def action_present(count): 30 | return ngettext_lazy( 31 | "Delete NS", 32 | "Delete NSs", 33 | count 34 | ) 35 | 36 | @staticmethod 37 | def action_past(count): 38 | return ngettext_lazy( 39 | "Delete NS", 40 | "Delete NSs", 41 | count 42 | ) 43 | 44 | def action(self, request, obj_id): 45 | api.tacker.delete_nsd(request, obj_id) 46 | 47 | 48 | class OnBoardNS(tables.LinkAction): 49 | name = "onboardns" 50 | verbose_name = _("Onboard NS") 51 | classes = ("ajax-modal",) 52 | icon = "plus" 53 | url = "horizon:nfv:nscatalog:onboardns" 54 | 55 | 56 | class NSCatalogTable(tables.DataTable): 57 | name = tables.Column('name', 58 | link="horizon:nfv:nscatalog:detail", 59 | verbose_name=_("Name")) 60 | description = tables.Column('description', 61 | verbose_name=_("Description")) 62 | id = tables.Column('id', 63 | verbose_name=_("Catalog Id")) 64 | 65 | class Meta(object): 66 | name = "nscatalog" 67 | verbose_name = _("NSCatalog") 68 | table_actions = (OnBoardNS, DeleteNSD, MyFilterAction,) 69 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/templates/nscatalog/_onboardns.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Onboards a NS." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/templates/nscatalog/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "NSD Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/templates/nscatalog/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "NS Catalog" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("NS Catalog") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/templates/nscatalog/onboardns.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Onboard NS" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Onboard a NS") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/nscatalog/_onboardns.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/templates/nscatalog/template.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% trans "NSD Template" %}

3 |
4 | {{ nsd.template }}
5 | 
6 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/urls.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.urls import re_path 15 | 16 | from tacker_horizon.openstack_dashboard.dashboards.nfv.nscatalog import views 17 | 18 | urlpatterns = [ 19 | re_path(r'^$', views.IndexView.as_view(), name='index'), 20 | re_path(r'^onboardns', views.OnBoardNSView.as_view(), name='onboardns'), 21 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 22 | name='detail'), 23 | ] 24 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/panel.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | 16 | import horizon 17 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 18 | 19 | 20 | class Nsmanager(horizon.Panel): 21 | name = _("NS Manager") 22 | slug = "nsmanager" 23 | 24 | 25 | dashboard.Nfv.register(Nsmanager) 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/templates/nsmanager/_deploy_ns.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% blocktrans %} Deploys a NS.
9 | If the NSD template is parameterized, 10 | upload a yaml file with values for those parameters.
11 | If the NSD template is not parameterized, any 12 | yaml file uploaded will be ignored.
13 | If a configuration yaml file is uploaded, it will be 14 | applied to the NS post its successful creation.{% endblocktrans %}

15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/templates/nsmanager/deploy_ns.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Deploy NS" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Deploy a NS") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/nsmanager/_deploy_ns.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/templates/nsmanager/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "NS Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/templates/nsmanager/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "NS Manager" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("NS Manager") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/urls.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.urls import re_path 15 | 16 | from tacker_horizon.openstack_dashboard.dashboards.nfv.nsmanager import views 17 | 18 | urlpatterns = [ 19 | re_path(r'^$', views.IndexView.as_view(), name='index'), 20 | re_path(r'^deployns$', views.DeployNSView.as_view(), name='deployns'), 21 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 22 | name='detail'), 23 | ] 24 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/static/dashboard/nfv/css/nfv.css: -------------------------------------------------------------------------------- 1 | /* Additional CSS for nfv. */ 2 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/static/dashboard/nfv/js/nfv.js: -------------------------------------------------------------------------------- 1 | /* Additional JavaScript for nfv. */ 2 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/static/dashboard/nfv/js/nfv.vim.reg.js: -------------------------------------------------------------------------------- 1 | $( document ).ready(function() { 2 | var vim_type = $("#id_vim_type").find(":selected").first().text(); 3 | toggle_vim_fields(vim_type); 4 | $("#id_vim_type").change(function(){ 5 | vim_type = $("#id_vim_type").find(":selected").first().text(); 6 | toggle_vim_fields(vim_type); 7 | }); 8 | }); 9 | 10 | function toggle_vim_fields(vim_type) { 11 | if (vim_type === 'OpenStack') { 12 | $("#id_username").closest(".form-group").show(); 13 | $("#id_password").closest(".form-group").show(); 14 | $("#id_password").val(""); 15 | $("#id_domain_name").closest(".form-group").show(); 16 | $("#id_ssl_ca_cert").closest(".form-group").hide(); 17 | $("#id_bearer_token").val("None"); 18 | $("#id_bearer_token").closest(".form-group").hide(); 19 | $("input[name='auth_method']").closest(".form-group").hide(); 20 | $("input[name='cert_verify']").closest(".form-group").show(); 21 | } else if (vim_type === 'Kubernetes') { 22 | $("#id_domain_name").closest(".form-group").hide(); 23 | $("input[name='cert_verify']").closest(".form-group").hide(); 24 | $("#id_ssl_ca_cert").closest(".form-group").show(); 25 | $("#id_bearer_token").closest(".form-group").show(); 26 | $("#id_bearer_token").val(""); 27 | $("input[name='auth_method']").closest(".form-group").show(); 28 | var auth_method = $("input[name='auth_method']:checked").val(); 29 | toggle_auth_fields(auth_method); 30 | $("input[name='auth_method']").change(function() { 31 | toggle_auth_fields(this.value); 32 | }); 33 | } 34 | } 35 | 36 | function toggle_auth_fields(auth_method) { 37 | if (auth_method === 'basic') { 38 | $("#id_username").closest(".form-group").show(); 39 | $("#id_password").closest(".form-group").show(); 40 | $("#id_password").val(""); 41 | $("#id_bearer_token").val("None"); 42 | $("#id_bearer_token").closest(".form-group").hide(); 43 | } else if (auth_method === 'bearer_token') { 44 | $("#id_bearer_token").closest(".form-group").show(); 45 | $("#id_bearer_token").val(""); 46 | $("#id_username").closest(".form-group").hide(); 47 | $("#id_password").val("None"); 48 | $("#id_password").closest(".form-group").hide(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/templates/nfv/base.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block sidebar %} 4 | {% include 'horizon/common/_sidebar.html' %} 5 | {% endblock %} 6 | 7 | {% block main %} 8 | {% include "horizon/_messages.html" %} 9 | {% block nfv_main %}{% endblock %} 10 | {% endblock %} 11 | 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | from horizon import tables 19 | 20 | 21 | class EventItem(object): 22 | def __init__(self, id, state, type, timestamp, details): 23 | self.id = id 24 | self.resource_state = state 25 | self.event_type = type 26 | self.timestamp = timestamp 27 | self.event_details = details 28 | 29 | 30 | class EventItemList(object): 31 | EVTLIST_P = [] 32 | 33 | @classmethod 34 | def add_item(cls, item): 35 | cls.EVTLIST_P.append(item) 36 | 37 | @classmethod 38 | def clear_list(cls): 39 | cls.EVTLIST_P = [] 40 | 41 | 42 | class EventsTable(tables.DataTable): 43 | 44 | id = tables.Column('id', verbose_name=_("Event ID")) 45 | resource_state = tables.Column('resource_state', 46 | verbose_name=_("Resource State")) 47 | timestamp = tables.Column('timestamp', 48 | verbose_name=_("Time Since Event")) 49 | event_type = tables.Column("event_type", verbose_name=_("Event Type")) 50 | event_details = tables.Column("event_details", 51 | verbose_name=_("Event Details")) 52 | 53 | class Meta(object): 54 | name = "events" 55 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | import horizon 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 20 | 21 | 22 | class Vimmanager(horizon.Panel): 23 | name = _("VIM Management") 24 | slug = "vim" 25 | 26 | 27 | dashboard.Nfv.register(Vimmanager) 28 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | from django.utils.translation import ngettext_lazy 18 | 19 | from horizon import tables 20 | 21 | from openstack_dashboard import policy 22 | from tacker_horizon.openstack_dashboard import api 23 | 24 | 25 | class MyFilterAction(tables.FilterAction): 26 | name = "myfilter" 27 | 28 | 29 | class DeleteVIMLink(policy.PolicyTargetMixin, tables.DeleteAction): 30 | @staticmethod 31 | def action_present(count): 32 | return ngettext_lazy( 33 | "Delete VIM", 34 | "Delete VIMs", 35 | count 36 | ) 37 | 38 | @staticmethod 39 | def action_past(count): 40 | return ngettext_lazy( 41 | "Delete VIM", 42 | "Delete VIMs", 43 | count 44 | ) 45 | 46 | def action(self, request, obj_id): 47 | api.tacker.delete_vim(request, obj_id) 48 | 49 | 50 | class RegisterVIMLink(tables.LinkAction): 51 | name = "registervim" 52 | verbose_name = _("Register VIM") 53 | classes = ("ajax-modal",) 54 | icon = "plus" 55 | url = "horizon:nfv:vim:registervim" 56 | 57 | 58 | class VIMTable(tables.DataTable): 59 | name = tables.Column('name', verbose_name=_("Name"), 60 | link="horizon:nfv:vim:detail",) 61 | description = tables.Column('description', verbose_name=_("Description")) 62 | id = tables.Column('id', verbose_name=_("VIM Id")) 63 | is_default = tables.Column('is_default', verbose_name=_("Default")) 64 | auth_url = tables.Column('auth_url', verbose_name=_("Auth URL")) 65 | regions = tables.Column('regions', verbose_name=_("Regions")) 66 | user = tables.Column('user', verbose_name=_("User")) 67 | project = tables.Column('project', verbose_name=_("Project")) 68 | status = tables.Column('status', verbose_name=_("Status")) 69 | type = tables.Column('type', verbose_name=_("VIM Type")) 70 | 71 | class Meta(object): 72 | name = "vim" 73 | verbose_name = _("VIM") 74 | table_actions = (RegisterVIMLink, DeleteVIMLink, MyFilterAction,) 75 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/templates/vim/_registervim.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Registers a VIM." %}

9 | {% endblock %} 10 | 11 | {% block modal-js %} 12 | 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/templates/vim/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VIM Event Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/templates/vim/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VIM" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VIM Management") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/templates/vim/registervim.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Register VIM" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Register VIM") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vim/_registervim.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.urls import re_path 17 | 18 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vim import views 19 | 20 | urlpatterns = [ 21 | re_path(r'^$', views.IndexView.as_view(), name='index'), 22 | re_path(r'^registervim$', views.RegisterVIMView.as_view(), 23 | name='registervim'), 24 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 25 | name='detail'), 26 | ] 27 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vim/views.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.urls import reverse 17 | from django.urls import reverse_lazy 18 | from django.utils.translation import gettext_lazy as _ 19 | 20 | from horizon import exceptions 21 | from horizon import forms 22 | from horizon import tabs 23 | from horizon.utils import memoized 24 | 25 | from tacker_horizon.openstack_dashboard import api as tacker_api 26 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vim \ 27 | import forms as project_forms 28 | 29 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vim \ 30 | import tabs as vim_tabs 31 | 32 | 33 | class IndexView(tabs.TabbedTableView): 34 | # A very simple class-based view... 35 | tab_group_class = vim_tabs.VIMTabs 36 | template_name = 'nfv/vim/index.html' 37 | 38 | def get_data(self, request, context, *args, **kwargs): 39 | # Add data to the context here... 40 | return context 41 | 42 | 43 | class RegisterVIMView(forms.ModalFormView): 44 | form_class = project_forms.RegisterVim 45 | template_name = 'nfv/vim/registervim.html' 46 | success_url = reverse_lazy("horizon:nfv:vim:index") 47 | modal_id = "add_service_modal" 48 | modal_header = _("Register VIM") 49 | submit_label = _("Register VIM") 50 | submit_url = "horizon:nfv:vim:registervim" 51 | 52 | def get_context_data(self, **kwargs): 53 | context = super(RegisterVIMView, self).get_context_data(**kwargs) 54 | context['submit_url'] = reverse(self.submit_url) 55 | return context 56 | 57 | 58 | class DetailView(tabs.TabView): 59 | tab_group_class = vim_tabs.VIMDetailsTabs 60 | template_name = 'nfv/vim/detail.html' 61 | redirect_url = 'horizon:nfv:vim:index' 62 | page_title = _("VIM Event Details: {{ vim_id }}") 63 | 64 | def get_context_data(self, **kwargs): 65 | context = super(DetailView, self).get_context_data(**kwargs) 66 | vim = self.get_data() 67 | context['vim'] = vim 68 | context['vim_id'] = kwargs['vim_id'] 69 | context['url'] = reverse(self.redirect_url) 70 | return context 71 | 72 | @memoized.memoized_method 73 | def get_data(self): 74 | vim_id = self.kwargs['vim_id'] 75 | 76 | try: 77 | vim = tacker_api.tacker.get_vim(self.request, vim_id) 78 | return vim 79 | except Exception: 80 | redirect = reverse(self.redirect_url) 81 | exceptions.handle(self.request, 82 | _('Unable to retrieve details for ' 83 | 'VIM "%s".') % vim_id, 84 | redirect=redirect) 85 | raise exceptions.Http302(redirect) 86 | 87 | def get_tabs(self, request, *args, **kwargs): 88 | vim = self.get_data() 89 | return self.tab_group_class(request, vim=vim, **kwargs) 90 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | import horizon 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 20 | 21 | 22 | class Vnfcatalog(horizon.Panel): 23 | name = _("VNF Catalog") 24 | slug = "vnfcatalog" 25 | 26 | 27 | dashboard.Nfv.register(Vnfcatalog) 28 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | from django.utils.translation import ngettext_lazy 18 | 19 | from horizon import tables 20 | 21 | from openstack_dashboard import policy 22 | from tacker_horizon.openstack_dashboard import api 23 | 24 | 25 | class MyFilterAction(tables.FilterAction): 26 | name = "myfilter" 27 | 28 | 29 | class DeleteVNFD(policy.PolicyTargetMixin, tables.DeleteAction): 30 | @staticmethod 31 | def action_present(count): 32 | return ngettext_lazy( 33 | "Delete VNF", 34 | "Delete VNFs", 35 | count 36 | ) 37 | 38 | @staticmethod 39 | def action_past(count): 40 | return ngettext_lazy( 41 | "Delete VNF", 42 | "Delete VNFs", 43 | count 44 | ) 45 | 46 | def action(self, request, obj_id): 47 | api.tacker.delete_vnfd(request, obj_id) 48 | 49 | 50 | class OnBoardVNF(tables.LinkAction): 51 | name = "onboardvnf" 52 | verbose_name = _("Onboard VNF") 53 | classes = ("ajax-modal",) 54 | icon = "plus" 55 | url = "horizon:nfv:vnfcatalog:onboardvnf" 56 | 57 | 58 | class VNFCatalogTable(tables.DataTable): 59 | name = tables.Column('name', 60 | link="horizon:nfv:vnfcatalog:detail", 61 | verbose_name=_("Name")) 62 | description = tables.Column('description', 63 | verbose_name=_("Description")) 64 | services = tables.Column('service_types', 65 | verbose_name=_("Service Types")) 66 | id = tables.Column('id', 67 | verbose_name=_("Catalog Id")) 68 | 69 | class Meta(object): 70 | name = "vnfcatalog" 71 | verbose_name = _("VNFCatalog") 72 | table_actions = (OnBoardVNF, DeleteVNFD, MyFilterAction,) 73 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/templates/vnfcatalog/_onboardvnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Onboards a VNF." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/templates/vnfcatalog/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNFD Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/templates/vnfcatalog/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF Catalog" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNF Catalog") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/templates/vnfcatalog/onboardvnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Onboard VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Onboard a VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfcatalog/_onboardvnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/templates/vnfcatalog/template.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% trans "VNFD Template" %}

3 |
4 | {{ vnfd.template }}
5 | 
6 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.urls import re_path 17 | 18 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog import views 19 | 20 | urlpatterns = [ 21 | re_path(r'^$', views.IndexView.as_view(), name='index'), 22 | re_path(r'^onboardvnf', views.OnBoardVNFView.as_view(), name='onboardvnf'), 23 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 24 | name='detail'), 25 | ] 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/panel.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | 16 | import horizon 17 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 18 | 19 | 20 | class Vnffgcatalog(horizon.Panel): 21 | name = _("VNFFG Catalog") 22 | slug = "vnffgcatalog" 23 | 24 | 25 | dashboard.Nfv.register(Vnffgcatalog) 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tables.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | from django.utils.translation import ngettext_lazy 16 | 17 | from horizon import tables 18 | 19 | from openstack_dashboard import policy 20 | from tacker_horizon.openstack_dashboard import api 21 | 22 | 23 | class MyFilterAction(tables.FilterAction): 24 | name = "myfilter" 25 | 26 | 27 | class DeleteVNFFGD(policy.PolicyTargetMixin, tables.DeleteAction): 28 | @staticmethod 29 | def action_present(count): 30 | return ngettext_lazy( 31 | "Delete VNFFG", 32 | "Delete VNFFGs", 33 | count 34 | ) 35 | 36 | @staticmethod 37 | def action_past(count): 38 | return ngettext_lazy( 39 | "Delete VNFFG", 40 | "Delete VNFFGs", 41 | count 42 | ) 43 | 44 | def action(self, request, obj_id): 45 | api.tacker.delete_vnffgd(request, obj_id) 46 | 47 | 48 | class OnBoardVNFFG(tables.LinkAction): 49 | name = "onboardvnffg" 50 | verbose_name = _("Onboard VNFFG") 51 | classes = ("ajax-modal",) 52 | icon = "plus" 53 | url = "horizon:nfv:vnffgcatalog:onboardvnffg" 54 | 55 | 56 | class VNFFGCatalogTable(tables.DataTable): 57 | name = tables.Column('name', 58 | link="horizon:nfv:vnffgcatalog:detail", 59 | verbose_name=_("Name")) 60 | description = tables.Column('description', 61 | verbose_name=_("Description")) 62 | id = tables.Column('id', 63 | verbose_name=_("Catalog Id")) 64 | 65 | class Meta(object): 66 | name = "vnffgcatalog" 67 | verbose_name = _("VNFFGCatalog") 68 | table_actions = (OnBoardVNFFG, DeleteVNFFGD, MyFilterAction,) 69 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tabs.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | import yaml 16 | 17 | from horizon import exceptions 18 | from horizon import tabs 19 | from horizon import utils as horizon_utils 20 | 21 | from tacker_horizon.openstack_dashboard import api 22 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgcatalog \ 23 | import tables 24 | 25 | 26 | class VNFFGCatalogItem(object): 27 | def __init__(self, name, description, vnffgd_id): 28 | self.id = vnffgd_id 29 | self.name = name 30 | self.description = description 31 | 32 | 33 | class VNFFGCatalogTab(tabs.TableTab): 34 | name = _("VNFFGCatalog Tab") 35 | slug = "vnffgcatalog_tab" 36 | table_classes = (tables.VNFFGCatalogTable,) 37 | template_name = ("horizon/common/_detail_table.html") 38 | preload = False 39 | 40 | def has_more_data(self, table): 41 | return self._has_more 42 | 43 | def get_vnffgcatalog_data(self): 44 | try: 45 | instances = [] 46 | vnffgds = api.tacker.vnffgd_list(self.request) 47 | 48 | if len(vnffgds) > horizon_utils.functions.get_page_size( 49 | self.request): 50 | self._has_more = True 51 | else: 52 | self._has_more = False 53 | 54 | for vnffgd in vnffgds: 55 | item = VNFFGCatalogItem(vnffgd['name'], 56 | vnffgd['description'], 57 | vnffgd['id']) 58 | instances.append(item) 59 | return instances 60 | except Exception: 61 | self._has_more = False 62 | error_message = _('Unable to get instances') 63 | exceptions.handle(self.request, error_message) 64 | return [] 65 | 66 | 67 | class VNFFGCatalogTabs(tabs.TabGroup): 68 | slug = "vnffgcatalog_tabs" 69 | tabs = (VNFFGCatalogTab,) 70 | sticky = True 71 | 72 | 73 | class TemplateTab(tabs.Tab): 74 | name = _("Template") 75 | slug = "template" 76 | template_name = ("nfv/vnffgcatalog/template.html") 77 | 78 | def get_context_data(self, request): 79 | vnffgd = self.tab_group.kwargs['vnffgd'] 80 | vnffgd['template'] = yaml.safe_dump(vnffgd['template'], 81 | default_flow_style=False) 82 | return {'vnffgd': self.tab_group.kwargs['vnffgd']} 83 | 84 | 85 | class VNFFGDDetailTabs(tabs.TabGroup): 86 | slug = "VNFFGD_details" 87 | tabs = (TemplateTab,) 88 | sticky = True 89 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/templates/vnffgcatalog/_onboardvnffg.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Onboards a VNFFG." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/templates/vnffgcatalog/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNFFGD Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/templates/vnffgcatalog/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNFFG Catalog" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNFFG Catalog") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/templates/vnffgcatalog/onboardvnffg.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Onboard VNFFG" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Onboard a VNFFG") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnffgcatalog/_onboardvnffg.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/templates/vnffgcatalog/template.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% trans "VNFFGD Template" %}

3 |
4 | {{ vnffgd.template }}
5 | 
6 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/urls.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.urls import re_path 15 | 16 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgcatalog \ 17 | import views 18 | 19 | urlpatterns = [ 20 | re_path(r'^$', views.IndexView.as_view(), name='index'), 21 | re_path(r'^onboardvnffg', views.OnBoardVNFFGView.as_view(), 22 | name='onboardvnffg'), 23 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 24 | name='detail'), 25 | ] 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/panel.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | 16 | import horizon 17 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 18 | 19 | 20 | class Vnffgmanager(horizon.Panel): 21 | name = _("VNFFG Manager") 22 | slug = "vnffgmanager" 23 | 24 | 25 | dashboard.Nfv.register(Vnffgmanager) 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/tabs.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.utils.translation import gettext_lazy as _ 15 | from horizon import exceptions 16 | from horizon import tabs 17 | from horizon import utils as horizon_utils 18 | 19 | from tacker_horizon.openstack_dashboard import api 20 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager \ 21 | import tables 22 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager.tables \ 23 | import VNFFGManagerItem 24 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager.tables \ 25 | import VNFFGManagerItemList 26 | 27 | 28 | class VNFFGManagerTab(tabs.TableTab): 29 | name = _("VNFFGManager Tab") 30 | slug = "vnffgmanager_tab" 31 | table_classes = (tables.VNFFGManagerTable,) 32 | template_name = ("horizon/common/_detail_table.html") 33 | preload = False 34 | 35 | def has_more_data(self, table): 36 | return self._has_more 37 | 38 | def get_vnffgmanager_data(self): 39 | try: 40 | VNFFGManagerItemList.clear_list() 41 | vnffgs = api.tacker.vnffg_list(self.request) 42 | 43 | if len(vnffgs) > horizon_utils.functions.get_page_size( 44 | self.request): 45 | self._has_more = True 46 | else: 47 | self._has_more = False 48 | 49 | for vnffg in vnffgs: 50 | try: 51 | vnffg_desc_str = vnffg['description'] 52 | except KeyError: 53 | vnffg_desc_str = "" 54 | 55 | obj = VNFFGManagerItem(vnffg['id'], 56 | vnffg['name'], 57 | vnffg_desc_str, 58 | vnffg['status']) 59 | VNFFGManagerItemList.add_item(obj) 60 | return VNFFGManagerItemList.VNFFGLIST_P 61 | except Exception: 62 | self._has_more = False 63 | error_message = _('Unable to get instances') 64 | exceptions.handle(self.request, error_message) 65 | 66 | return [] 67 | 68 | 69 | class VNFFGManagerTabs(tabs.TabGroup): 70 | slug = "vnffgmanager_tabs" 71 | tabs = (VNFFGManagerTab,) 72 | sticky = True 73 | 74 | 75 | class VNFFGDetailsTab(tabs.Tab): 76 | name = _("VNFFG Detail") 77 | slug = "VNFFG_Details" 78 | template_name = "nfv/vnffgmanager/vnffg_details.html" 79 | 80 | def get_context_data(self, request): 81 | return {'vnffg': self.tab_group.kwargs['vnffg']} 82 | 83 | 84 | class VNFFGDetailsTabs(tabs.TabGroup): 85 | slug = "VNFFG_details" 86 | tabs = (VNFFGDetailsTab,) 87 | sticky = True 88 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/_deploy_vnffg.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% blocktrans %} Deploys a VNFFG.
9 | VNF Mapping is a list of logical VNFD name to VNF instance name 10 | mapping. Example
11 | VNFD1:VNF1, VNFD2: VNF2
12 | {% endblocktrans %}

13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/deploy_vnffg.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Deploy VNFFG" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Deploy a VNFFG") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnffgmanager/_deploy_vnffg.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNFFG Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNFFG Manager" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNFFG Manager") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/vdu_details.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 14 | 15 | 16 |

{% trans "VNFFG information" %}

17 | 18 | 19 | 20 | 21 | 22 | {% for key, value in vnffg.vnffg.mgmt_ip_address.items %} 23 | 24 | 25 | 26 | {% endfor %} 27 |
{% trans "VDU" %}
{% trans "MGMT IP Address" %}
{{ key }} {{ value }}
28 | 29 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/templates/vnffgmanager/vnffg_details.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 14 | 15 | 16 |

{% trans "VNFFG information" %}

17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
{% trans "Id" %}
{% trans "Name" %}
{% trans "Description" %}
{% trans "Status" %}
{{ vnffg.vnffg.id }}{{ vnffg.vnffg.name }}{{ vnffg.vnffg.description }}{{ vnffg.vnffg.status }}
31 | 32 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/urls.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | 14 | from django.urls import re_path 15 | 16 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager \ 17 | import views 18 | 19 | urlpatterns = [ 20 | re_path(r'^$', views.IndexView.as_view(), name='index'), 21 | re_path(r'^deployvnffg$', views.DeployVNFFGView.as_view(), 22 | name='deployvnffg'), 23 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 24 | name='detail'), 25 | ] 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/forms.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | from horizon import exceptions 19 | from horizon import forms 20 | from horizon import messages 21 | 22 | from tacker_horizon.openstack_dashboard import api 23 | 24 | 25 | class UpdateVnfFmAlarm(forms.SelfHandlingForm): 26 | ack_state = forms.ChoiceField( 27 | label=_('ACK State'), 28 | choices=[('ACKNOWLEDGED', _('ACKNOWLEDGED')), 29 | ('UNACKNOWLEDGED', _('UNACKNOWLEDGED'))]) 30 | 31 | def __init__(self, request, *args, **kwargs): 32 | super(UpdateVnfFmAlarm, self).__init__(request, *args, **kwargs) 33 | 34 | def clean(self): 35 | data = super(UpdateVnfFmAlarm, self).clean() 36 | return data 37 | 38 | def handle(self, request, data): 39 | try: 40 | ack_state = data.get('ack_state', None) 41 | 42 | body = {} 43 | body['ackState'] = ack_state 44 | alarm_id = request.resolver_match.kwargs['id'] 45 | api.tacker.update_fm_alarm(request, alarm_id, body) 46 | messages.success(request, 47 | _('Update FM Alarm. (id: %s)') % alarm_id) 48 | return True 49 | except Exception: 50 | msg = _('Failed to update FM Alarm. (id: %s)') % alarm_id 51 | exceptions.handle(request, msg) 52 | return False 53 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfFmAlarm(horizon.Panel): 25 | name = _("Alarm") 26 | slug = "vnffmalarm" 27 | 28 | 29 | dashboard.Nfv.register(VnfFmAlarm) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | from horizon import tables 20 | 21 | 22 | class UpdateVnfFmAlarm(tables.LinkAction): 23 | name = "updatealarm" 24 | verbose_name = _("Update Alarm") 25 | url = "horizon:nfv:vnffmalarm:updatealarm" 26 | classes = ("ajax-modal",) 27 | 28 | 29 | class VnfFmAlarmTable(tables.DataTable): 30 | id = tables.Column('id', link="horizon:nfv:vnffmalarm:detail", 31 | verbose_name=_("ID")) 32 | 33 | managed_object_id = tables.Column('managed_object_id', 34 | verbose_name=_("Managed Object ID")) 35 | ack_state = tables.Column('ack_state', verbose_name=_("Ack State")) 36 | event_type = tables.Column('event_type', verbose_name=_("Event Type")) 37 | perceived_severity = tables.Column('perceived_severity', 38 | verbose_name=_("Perceived Severity")) 39 | probable_cause = tables.Column('probable_cause', 40 | verbose_name=_("Probable Cause")) 41 | 42 | class Meta(object): 43 | name = "alarm" 44 | verbose_name = _("Alarm") 45 | pagination_param = 'vnffmalarm_marker' 46 | prev_pagination_param = 'prev_vnffmalarm_marker' 47 | table_actions = (tables.FilterAction,) 48 | row_actions = (UpdateVnfFmAlarm,) 49 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/templates/vnffmalarm/_update_alarm.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Update a Alarm." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/templates/vnffmalarm/alarm_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "Ack State" %}
6 |
{{ alarm.ackState }}
7 |
{% trans "Alarm Acknowledged Time" %}
8 |
{{ alarm.alarmAcknowledgedTime }}
9 |
{% trans "Alarm Changed Time" %}
10 |
{{ alarm.alarmChangedTime }}
11 |
{% trans "Alarm Cleared Time" %}
12 |
{{ alarm.alarmClearedTime }}
13 |
{% trans "Alarm Raised Time" %}
14 |
{{ alarm.alarmRaisedTime }}
15 |
{% trans "Correlated Alarm IDs" %}
16 |
{{ alarm.correlatedAlarmIds }}
17 |
{% trans "Event Time" %}
18 |
{{ alarm.eventTime }}
19 |
{% trans "Event Type" %}
20 |
{{ alarm.eventType }}
21 |
{% trans "Fault Details" %}
22 |
{{ alarm.faultDetails }}
23 |
{% trans "Fault Type" %}
24 |
{{ alarm.faultType }}
25 |
{% trans "ID" %}
26 |
{{ alarm.id }}
27 |
{% trans "Is Root Cause" %}
28 |
{{ alarm.isRootCause }}
29 |
{% trans "Links" %}
30 |
{{ alarm.links }}
31 |
{% trans "Managed Object ID" %}
32 |
{{ alarm.managedObjectId }}
33 |
{% trans "Perceived Severity" %}
34 |
{{ alarm.perceivedSeverity }}
35 |
{% trans "Probable Cause" %}
36 |
{{ alarm.probableCause }}
37 |
{% trans "Root Cause Faulty Resource" %}
38 |
{{ alarm.rootCauseFaultyResource }}
39 |
{% trans "VNFC Instance IDs" %}
40 |
{{ alarm.vnfcInstanceIds }}
41 |
42 |
43 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/templates/vnffmalarm/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Alarm Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/templates/vnffmalarm/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Alarm" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Alarm") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/templates/vnffmalarm/update_alarm.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Update Alarm" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Update Alarm") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnffmalarm/_update_alarm.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffmalarm \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^(?P[^/]+)/updatealarm$', 25 | views.UpdateVnfFmAlarmView.as_view(), 26 | name='updatealarm'), 27 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 28 | name='detail'), 29 | ] 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmalarm/views.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import reverse 18 | from django.urls import reverse_lazy 19 | from django.utils.translation import gettext_lazy as _ 20 | 21 | from horizon import exceptions 22 | from horizon import forms 23 | from horizon import tabs 24 | from horizon.utils import memoized 25 | 26 | from tacker_horizon.openstack_dashboard import api as tacker_api 27 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffmalarm \ 28 | import forms as project_forms 29 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffmalarm \ 30 | import tabs as alarm_tabs 31 | 32 | 33 | class IndexView(tabs.TabbedTableView): 34 | # A very simple class-based view... 35 | tab_group_class = alarm_tabs.VnfFmAlarmTabs 36 | template_name = 'nfv/vnffmalarm/index.html' 37 | 38 | def get_data(self, request, context, *args, **kwargs): 39 | # Add data to the context here... 40 | return context 41 | 42 | 43 | class UpdateVnfFmAlarmView(forms.ModalFormView): 44 | form_class = project_forms.UpdateVnfFmAlarm 45 | template_name = 'nfv/vnffmalarm/update_alarm.html' 46 | success_url = reverse_lazy("horizon:nfv:vnffmalarm:index") 47 | modal_id = "update_alarm_modal" 48 | modal_header = _("Update Alarm") 49 | submit_label = _("Update Alarm") 50 | submit_url = "horizon:nfv:vnffmalarm:updatealarm" 51 | 52 | def get_context_data(self, **kwargs): 53 | context = super(UpdateVnfFmAlarmView, self).get_context_data(**kwargs) 54 | context['submit_url'] = reverse(self.submit_url, 55 | kwargs={'id': self.kwargs['id']}) 56 | return context 57 | 58 | 59 | class DetailView(tabs.TabView): 60 | tab_group_class = alarm_tabs.VnfFmAlarmDetailTabs 61 | template_name = 'nfv/vnffmalarm/detail.html' 62 | redirect_url = 'horizon:nfv:vnffmalarm:index' 63 | page_title = _("Alarm Detail: {{ id }}") 64 | 65 | def get_context_data(self, **kwargs): 66 | context = super(DetailView, self).get_context_data(**kwargs) 67 | alarm = self.get_data() 68 | context['alarm'] = alarm 69 | context['id'] = kwargs['id'] 70 | context['url'] = reverse(self.redirect_url) 71 | return context 72 | 73 | @memoized.memoized_method 74 | def get_data(self): 75 | alarm_id = self.kwargs['id'] 76 | 77 | try: 78 | alarm = tacker_api.tacker.get_fm_alarm(self.request, alarm_id) 79 | alarm['links'] = alarm.get('_links', '') 80 | return alarm 81 | except Exception: 82 | redirect = reverse(self.redirect_url) 83 | exceptions.handle(self.request, 84 | _('Failed to get FM Alarm. (id: %s)') % alarm_id, 85 | redirect=redirect) 86 | raise exceptions.Http302(redirect) 87 | 88 | def get_tabs(self, request, *args, **kwargs): 89 | alarm = self.get_data() 90 | return self.tab_group_class(request, alarm=alarm, **kwargs) 91 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/forms.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | import json 17 | 18 | from django.utils.translation import gettext_lazy as _ 19 | 20 | from horizon import exceptions 21 | from horizon import forms 22 | from horizon import messages 23 | 24 | from tacker_horizon.openstack_dashboard import api 25 | 26 | 27 | class CreateVnfFmSubscription(forms.SelfHandlingForm): 28 | param_file = forms.FileField( 29 | label=_("Param File"), 30 | help_text=_("parameter file to upload."), 31 | widget=forms.FileInput( 32 | attrs={'class': 'switched', 33 | 'data-switch-on': 'source', 34 | 'data-source-file': _('Param File')})) 35 | 36 | def __init__(self, request, *args, **kwargs): 37 | super(CreateVnfFmSubscription, self).__init__(request, *args, **kwargs) 38 | 39 | def clean(self): 40 | data = super(CreateVnfFmSubscription, self).clean() 41 | 42 | try: 43 | param_str = self.files['param_file'].read() 44 | param = json.loads(param_str) 45 | data['param'] = param 46 | except Exception as e: 47 | msg = _('Failed to read file: %s.') % e 48 | raise forms.ValidationError(msg) 49 | 50 | return data 51 | 52 | def handle(self, request, data): 53 | try: 54 | param = data['param'] 55 | subscription_instance = api.tacker.create_fm_subscription( 56 | request, param) 57 | messages.success(request, 58 | _('Create FM Subscription. (id: %s)') % 59 | subscription_instance['id']) 60 | return True 61 | except Exception: 62 | msg = _('Failed to create FM Subscription.') 63 | exceptions.handle(request, msg) 64 | return False 65 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfFmSubscription(horizon.Panel): 25 | name = _("Subscription") 26 | slug = "vnffmsubscription" 27 | 28 | 29 | dashboard.Nfv.register(VnfFmSubscription) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | from django.utils.translation import ngettext_lazy 19 | 20 | from horizon import tables 21 | from openstack_dashboard import policy 22 | 23 | from tacker_horizon.openstack_dashboard import api 24 | 25 | 26 | class DeleteVnfFmSubscription(policy.PolicyTargetMixin, tables.DeleteAction): 27 | @staticmethod 28 | def action_present(count): 29 | return ngettext_lazy( 30 | "Delete Subscription", 31 | "Delete Subscriptions", 32 | count 33 | ) 34 | 35 | @staticmethod 36 | def action_past(count): 37 | return ngettext_lazy( 38 | "Delete Subscription", 39 | "Delete Subscriptions", 40 | count 41 | ) 42 | 43 | def action(self, request, obj_id): 44 | api.tacker.delete_fm_subscription(request, obj_id) 45 | 46 | 47 | class CreateVnfFmSubscription(tables.LinkAction): 48 | name = "createsubscription" 49 | verbose_name = _("Create Subscription") 50 | classes = ("ajax-modal",) 51 | icon = "plus" 52 | url = "horizon:nfv:vnffmsubscription:createsubscription" 53 | 54 | 55 | class VnfFmSubscriptionTable(tables.DataTable): 56 | id = tables.Column('id', link="horizon:nfv:vnffmsubscription:detail", 57 | verbose_name=_("ID")) 58 | callback_uri = tables.Column('callback_uri', 59 | verbose_name=_("Callback Uri")) 60 | 61 | class Meta(object): 62 | name = "subscription" 63 | verbose_name = _("Subscription") 64 | pagination_param = 'vnffmsubscription_marker' 65 | prev_pagination_param = 'prev_vnffmsubscription_marker' 66 | table_actions = (CreateVnfFmSubscription, DeleteVnfFmSubscription, 67 | tables.FilterAction,) 68 | row_actions = (DeleteVnfFmSubscription,) 69 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/templates/vnffmsubscription/_create_subscription.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Create a Subscription." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/templates/vnffmsubscription/create_subscription.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Create Subscription" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Create Subscription") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnffmsubscription/_create_subscription.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/templates/vnffmsubscription/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Subscription Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/templates/vnffmsubscription/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Subscription" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Subscription") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/templates/vnffmsubscription/subscription_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "ID" %}
6 |
{{ subscription.id }}
7 |
{% trans "Links" %}
8 |
{{ subscription.links }}
9 |
{% trans "Callback Uri" %}
10 |
{{ subscription.callback_uri }}
11 |
{% trans "Filter" %}
12 |
{{ subscription.filter }}
13 |
14 |
15 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnffmsubscription/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffmsubscription \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^createsubscription', 25 | views.CreateVnfFmSubscriptionView.as_view(), 26 | name='createsubscription'), 27 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 28 | name='detail'), 29 | ] 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfLcm(horizon.Panel): 25 | name = _("VNF LCM") 26 | slug = "vnflcm" 27 | 28 | 29 | dashboard.Nfv.register(VnfLcm) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_change_connectivity.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Change a External VNF Connectivity." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_change_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Change a Current VNF Package." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_create_vnf_identifier.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Create a VNF Identifier." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_heal_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Heal a VNF instance." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_instantiate_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Instantiate a VNF instance." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_scale_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Scale a VNF instance." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_terminate_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Terminate a VNF instance." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/_update_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Update a VNF instance." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/change_connectivity.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Change External VNF Connectivity" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Change External VNF Connectivity") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_change_connectivity.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/change_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Change Current VNF Package" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Change Current VNF Package") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_change_vnfpkg.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/create_vnf_identifier.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "create_vnf_id" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Create VNF Identifier") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_create_vnf_identifier.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF LCM Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/heal_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Heal VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Heal VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_heal_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF LCM" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNF LCM") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/instantiate_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Instantiate VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Instantiate VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_instantiate_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/scale_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Scale VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Scale VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_scale_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/terminate_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Terminate VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Terminate VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_terminate_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/update_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Update VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Update VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnflcm/_update_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/templates/vnflcm/vnflcm_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "ID" %}
6 |
{{ vnflcm.id }}
7 |
{% trans "Instantiated Vnf Info" %}
8 |
{{ vnflcm.instantiatedVnfInfo }}
9 |
{% trans "Instantiation State" %}
10 |
{{ vnflcm.instantiationState }}
11 |
{% trans "Links" %}
12 |
{{ vnflcm.links }}
13 |
{% trans "VIM Connection Info" %}
14 |
{{ vnflcm.vimConnectionInfo }}
15 |
{% trans "VNF Instance Description" %}
16 |
{{ vnflcm.vnfInstanceDescription }}
17 |
{% trans "VNF Instance Name" %}
18 |
{{ vnflcm.vnfInstanceName }}
19 |
{% trans "VNF Product Name" %}
20 |
{{ vnflcm.vnfProductName }}
21 |
{% trans "VNF Provider" %}
22 |
{{ vnflcm.vnfProvider }}
23 |
{% trans "VNF Software Version" %}
24 |
{{ vnflcm.vnfSoftwareVersion }}
25 |
{% trans "VNFD ID" %}
26 |
{{ vnflcm.vnfdId }}
27 |
{% trans "VNFD Version" %}
28 |
{{ vnflcm.vnfdVersion }}
29 |
30 |
31 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcm/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnflcm \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), name='detail'), 25 | re_path(r'^createvnfidentifier$', views.CreateVnfIdentifierView.as_view(), 26 | name='createvnfidentifier'), 27 | re_path(r'^(?P[^/]+)/instantiatevnf/$', 28 | views.InstantiateVnfView.as_view(), 29 | name='instantiatevnf'), 30 | re_path(r'^(?P[^/]+)/terminatevnf/$', views.TerminateVnfView.as_view(), 31 | name='terminatevnf'), 32 | re_path(r'^(?P[^/]+)/healvnf/$', views.HealVnfView.as_view(), 33 | name='healvnf'), 34 | re_path(r'^(?P[^/]+)/updatevnf/$', views.UpdateVnfView.as_view(), 35 | name='updatevnf'), 36 | re_path(r'^(?P[^/]+)/scalevnf/$', views.ScaleVnfView.as_view(), 37 | name='scalevnf'), 38 | re_path(r'^(?P[^/]+)/changeconnectivity/$', 39 | views.ChangeExternalVnfConnectivityView.as_view(), 40 | name='changeconnectivity'), 41 | re_path(r'^(?P[^/]+)/changevnfpkg/$', 42 | views.ChangeCurrentVnfPackageView.as_view(), 43 | name='changevnfpkg'), 44 | ] 45 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfOpOcc(horizon.Panel): 25 | name = _("VNF OP OCC") 26 | slug = "vnflcmopocc" 27 | 28 | 29 | dashboard.Nfv.register(VnfOpOcc) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | from django.utils.translation import ngettext_lazy 19 | 20 | from horizon import tables 21 | 22 | from tacker_horizon.openstack_dashboard import api 23 | 24 | 25 | class VnfLcmRollback(tables.BatchAction): 26 | name = "vnflcmrollback" 27 | verbose_name = _("Rollback VNF Lifecycle Management Operation") 28 | 29 | @staticmethod 30 | def action_present(count): 31 | return ngettext_lazy( 32 | "Rollback VNF Lifecycle Management Operation", 33 | "Rollback VNF Lifecycle Management Operation", 34 | count 35 | ) 36 | 37 | @staticmethod 38 | def action_past(count): 39 | return ngettext_lazy( 40 | "Rollback VNF Lifecycle Management Operation", 41 | "Rollback VNF Lifecycle Management Operation", 42 | count 43 | ) 44 | 45 | def action(self, request, obj_id): 46 | api.tacker.rollback_vnf_lcm_op_occ(request, obj_id) 47 | 48 | 49 | class VnfLcmRetry(tables.BatchAction): 50 | name = "vnflcmretry" 51 | verbose_name = _("Retry") 52 | 53 | @staticmethod 54 | def action_present(count): 55 | return ngettext_lazy( 56 | "Retry", 57 | "Retry", 58 | count 59 | ) 60 | 61 | @staticmethod 62 | def action_past(count): 63 | return ngettext_lazy( 64 | "Retry", 65 | "Retry", 66 | count 67 | ) 68 | 69 | def action(self, request, obj_id): 70 | api.tacker.retry_vnf_lcm_op_occ(request, obj_id) 71 | 72 | 73 | class VnfLcmFail(tables.BatchAction): 74 | name = "vnflcmfail" 75 | verbose_name = _("Fail") 76 | 77 | @staticmethod 78 | def action_present(count): 79 | return ngettext_lazy( 80 | "Fail", 81 | "Fail", 82 | count 83 | ) 84 | 85 | @staticmethod 86 | def action_past(count): 87 | return ngettext_lazy( 88 | "Fail", 89 | "Fail", 90 | count 91 | ) 92 | 93 | def action(self, request, obj_id): 94 | api.tacker.fail_vnf_lcm_op_occ(request, obj_id) 95 | 96 | 97 | class VnfLcmOpOccTable(tables.DataTable): 98 | id = tables.Column('id', verbose_name=_("ID"), 99 | link="horizon:nfv:vnflcmopocc:detail",) 100 | operation_state = tables.Column('operation_state', 101 | verbose_name=_("OperationState")) 102 | vnf_instance_id = tables.Column('vnf_instance_id', 103 | verbose_name=_("VNFInstanceID")) 104 | operation = tables.Column('operation', verbose_name=_("Operation")) 105 | 106 | class Meta(object): 107 | name = "vnflcmopocc" 108 | verbose_name = _("VNF LCM OP OCC") 109 | pagination_param = 'opocc_marker' 110 | prev_pagination_param = 'prev_opocc_marker' 111 | table_actions = (VnfLcmRollback, VnfLcmRetry, VnfLcmFail, 112 | tables.FilterAction,) 113 | row_actions = (VnfLcmRollback, VnfLcmRetry, VnfLcmFail,) 114 | multi_select = True 115 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/templates/vnflcmopocc/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF LCM OP OCC" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/templates/vnflcmopocc/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF LCM OP OCC" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNF LCM OP OCC") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/templates/vnflcmopocc/vnflcmopocc_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "CancelMode" %}
6 |
{{ vnflcmopocc.cancelMode }}
7 |
{% trans "ChangedExtConnectivity" %}
8 |
{{ vnflcmopocc.changedExtConnectivity }}
9 |
{% trans "ChangedInfo" %}
10 |
{{ vnflcmopocc.changedInfo }}
11 |
{% trans "Error" %}
12 |
{{ vnflcmopocc.error }}
13 |
{% trans "GrantID" %}
14 |
{{ vnflcmopocc.grantId }}
15 |
{% trans "ID" %}
16 |
{{ vnflcmopocc.id }}
17 |
{% trans "IsAutomaticInvocation" %}
18 |
{{ vnflcmopocc.isAutomaticInvocation }}
19 |
{% trans "IsCancelPending" %}
20 |
{{ vnflcmopocc.isCancelPending }}
21 |
{% trans "Links" %}
22 |
{{ vnflcmopocc.links }}
23 |
{% trans "Operation" %}
24 |
{{ vnflcmopocc.operation }}
25 |
{% trans "OperationParams" %}
26 |
{{ vnflcmopocc.operationParams }}
27 |
{% trans "OperationState" %}
28 |
{{ vnflcmopocc.operationState }}
29 |
{% trans "ResourceChanges" %}
30 |
{{ vnflcmopocc.resourceChanges }}
31 |
{% trans "StartTime" %}
32 |
{{ vnflcmopocc.startTime }}
33 |
{% trans "StateEnteredTime" %}
34 |
{{ vnflcmopocc.stateEnteredTime }}
35 |
{% trans "VnfInstanceID" %}
36 |
{{ vnflcmopocc.vnfInstanceId }}
37 |
38 |
39 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnflcmopocc \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), name='detail'), 25 | ] 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnflcmopocc/views.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import reverse 18 | from django.utils.translation import gettext_lazy as _ 19 | 20 | from horizon import exceptions 21 | from horizon import tabs 22 | from horizon.utils import memoized 23 | 24 | from tacker_horizon.openstack_dashboard import api as tacker_api 25 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnflcmopocc \ 26 | import tabs as vnflcmopocc_tabs 27 | 28 | 29 | class IndexView(tabs.TabbedTableView): 30 | # A very simple class-based view... 31 | tab_group_class = vnflcmopocc_tabs.VnfLcmOpOccTabs 32 | template_name = 'nfv/vnflcmopocc/index.html' 33 | 34 | def get_data(self, request, context, *args, **kwargs): 35 | # Add data to the context here... 36 | return context 37 | 38 | 39 | class DetailView(tabs.TabView): 40 | tab_group_class = vnflcmopocc_tabs.VnfOpOccDetailTabs 41 | template_name = 'nfv/vnflcmopocc/detail.html' 42 | redirect_url = 'horizon:nfv:vnflcmopocc:index' 43 | page_title = _("LCM OP OCC Details: {{ id }}") 44 | 45 | def get_context_data(self, **kwargs): 46 | context = super(DetailView, self).get_context_data(**kwargs) 47 | vnflcmopocc = self.get_data() 48 | context['vnflcmopocc'] = vnflcmopocc 49 | context['id'] = kwargs['id'] 50 | context['url'] = reverse(self.redirect_url) 51 | return context 52 | 53 | @memoized.memoized_method 54 | def get_data(self): 55 | opocc_id = self.kwargs['id'] 56 | 57 | try: 58 | vnflcmopocc = tacker_api.tacker.get_vnf_lcm_op_occ(self.request, 59 | opocc_id) 60 | vnflcmopocc['links'] = vnflcmopocc.get('_links', '') 61 | return vnflcmopocc 62 | except Exception: 63 | redirect = reverse(self.redirect_url) 64 | exceptions.handle( 65 | self.request, 66 | _('Failed to get VNF LCM operation occurrence. (id: %s)') % 67 | opocc_id, 68 | redirect=redirect) 69 | raise exceptions.Http302(redirect) 70 | 71 | def get_tabs(self, request, *args, **kwargs): 72 | vnflcmopocc = self.get_data() 73 | return self.tab_group_class(request, vnflcmopocc=vnflcmopocc, **kwargs) 74 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.utils.translation import gettext_lazy as _ 17 | 18 | import horizon 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 20 | 21 | 22 | class Vnfmanager(horizon.Panel): 23 | name = _("VNF Manager") 24 | slug = "vnfmanager" 25 | 26 | 27 | dashboard.Nfv.register(Vnfmanager) 28 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/templates/vnfmanager/_deploy_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% blocktrans %} Deploys a VNF.
9 | If the VNFD template is parameterized, 10 | upload a yaml file with values for those parameters.
11 | If the VNFD template is not parameterized, any 12 | yaml file uploaded will be ignored.
13 | If a configuration yaml file is uploaded, it will be 14 | applied to the VNF post its successful creation.{% endblocktrans %}

15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/templates/vnfmanager/deploy_vnf.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Deploy VNF" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Deploy a VNF") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfmanager/_deploy_vnf.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/templates/vnfmanager/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/templates/vnfmanager/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF Manager" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNF Manager") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/templates/vnfmanager/vdu_details.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 4 | 5 |

{% trans "VNF information" %}

6 |
7 |
8 |
9 |
{% trans "Name" %}
10 |
{{ vnf.vnf.name }}
11 |
{% trans "ID" %}
12 |
{{ vnf.vnf.id }}
13 |
{% trans "Tenant ID" %}
14 |
{{ vnf.vnf.tenant_id }}
15 |
{% trans "Description" %}
16 |
{{ vnf.vnf.description }}
17 |
{% trans "Status" %}
18 |
{{ vnf.vnf.status|title }}
19 |
{% trans "Created" %}
20 |
{{ vnf.vnf.created_at|parse_isotime }}
21 |
{% trans "Updated" %}
22 |
{{ vnf.vnf.updated_at|parse_isotime }}
23 |
{% trans "Stack ID" %}
24 |
{{ vnf.vnf.instance_id }}
25 |
{% trans "VNFD ID" %}
26 |
{{ vnf.vnf.vnfd_id }}
27 |
{% trans "VIM ID" %}
28 |
{{ vnf.vnf.vim_id }}
29 |
{% trans "Error reason" %}
30 |
{{ vnf.vnf.error_reason }}
31 |
32 | 33 |

{% trans "Mgmt IP Addresses" %}

34 |
35 |
36 | {% for key, value in vnf.vnf.mgmt_ip_address.items %} 37 |
{{ key|title }}
38 |
{{ value }}
39 | {% endfor %} 40 |
41 | 42 |

{% trans "Placement Attributes" %}

43 |
44 |
45 | {% for key, value in vnf.vnf.placement_attr.items %} 46 |
{{ key|title }}
47 |
{{ value }}
48 | {% endfor %} 49 |
50 | 51 |

{% trans "Attributes" %}

52 |
53 |
54 |       {{ vnf.vnf.attributes }}
55 |     
56 | 57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Brocade Communications System, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | 16 | from django.urls import re_path 17 | 18 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager import views 19 | 20 | urlpatterns = [ 21 | re_path(r'^$', views.IndexView.as_view(), name='index'), 22 | re_path(r'^deployvnf$', views.DeployVNFView.as_view(), name='deployvnf'), 23 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 24 | name='detail'), 25 | ] 26 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfPackages(horizon.Panel): 25 | name = _("VNF Packages") 26 | slug = "vnfpackages" 27 | 28 | 29 | dashboard.Nfv.register(VnfPackages) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/_update_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Update a VNF Package information." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/_upload_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Upload a VNF Package." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF Package Details" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "VNF Packages" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("VNF Packages") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/update_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Update VNF Package" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Update VNF Package") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpackages/_update_vnfpkg.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/upload_vnfpkg.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Upload VNF Package" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Upload VNF Package") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpackages/_upload_vnfpkg.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/templates/vnfpackages/vnfpkg_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "Additional Artifacts" %}
6 |
{{ vnfpkg.additionalArtifacts }}
7 |
{% trans "Checksum" %}
8 |
{{ vnfpkg.checksum }}
9 |
{% trans "ID" %}
10 |
{{ vnfpkg.id }}
11 |
{% trans "Links" %}
12 |
{{ vnfpkg.links }}
13 |
{% trans "Onboarding State" %}
14 |
{{ vnfpkg.onboardingState }}
15 |
{% trans "Operational State" %}
16 |
{{ vnfpkg.operationalState }}
17 |
{% trans "Software Images" %}
18 |
{{ vnfpkg.softwareImages }}
19 |
{% trans "Usage State" %}
20 |
{{ vnfpkg.usageState }}
21 |
{% trans "User Defined Data" %}
22 |
{{ vnfpkg.userDefinedData }}
23 |
{% trans "VNF Product Name" %}
24 |
{{ vnfpkg.vnfProductName }}
25 |
{% trans "VNF Provider" %}
26 |
{{ vnfpkg.vnfProvider }}
27 |
{% trans "VNF Software Version" %}
28 |
{{ vnfpkg.vnfSoftwareVersion }}
29 |
{% trans "VNFD ID" %}
30 |
{{ vnfpkg.vnfdId }}
31 |
{% trans "VNFD Version" %}
32 |
{{ vnfpkg.vnfdVersion }}
33 |
34 |
35 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpackages/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfpackages \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^(?P[^/]+)/fetch/$', views.fetch_vnf_package, 25 | name='fetch'), 26 | re_path(r'^uploadvnfpkg$', views.UploadVnfPackageView.as_view(), 27 | name='uploadvnfpkg'), 28 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), name='detail'), 29 | re_path(r'^(?P[^/]+)/updatevnfpkg/$', 30 | views.UpdateVnfPackageView.as_view(), name='updatevnfpkg'), 31 | ] 32 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/forms.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | import json 17 | 18 | from django.utils.translation import gettext_lazy as _ 19 | 20 | from horizon import exceptions 21 | from horizon import forms 22 | from horizon import messages 23 | 24 | from tacker_horizon.openstack_dashboard import api 25 | 26 | 27 | class CreatePmJob(forms.SelfHandlingForm): 28 | param_file = forms.FileField( 29 | label=_("Param File"), 30 | help_text=_("parameter file to upload."), 31 | widget=forms.FileInput( 32 | attrs={'class': 'switched', 33 | 'data-switch-on': 'source', 34 | 'data-source-file': _('Param File')})) 35 | 36 | def __init__(self, request, *args, **kwargs): 37 | super(CreatePmJob, self).__init__(request, *args, **kwargs) 38 | 39 | def clean(self): 40 | data = super(CreatePmJob, self).clean() 41 | 42 | try: 43 | param_str = self.files['param_file'].read() 44 | param = json.loads(param_str) 45 | data['param'] = param 46 | except Exception as e: 47 | msg = _('Failed to read file: %s.') % e 48 | raise forms.ValidationError(msg) 49 | 50 | return data 51 | 52 | def handle(self, request, data): 53 | try: 54 | param = data['param'] 55 | pmjob = api.tacker.create_pm_job(request, param) 56 | messages.success(request, 57 | _('Create PM Job. (id: %s)') % 58 | pmjob['id']) 59 | return True 60 | except Exception: 61 | msg = _('Failed to create PM Job.') 62 | exceptions.handle(request, msg) 63 | return False 64 | 65 | 66 | class UpdatePmJob(forms.SelfHandlingForm): 67 | param_file = forms.FileField( 68 | label=_("Param File"), 69 | help_text=_("parameter file to upload."), 70 | widget=forms.FileInput( 71 | attrs={'class': 'switched', 72 | 'data-switch-on': 'source', 73 | 'data-source-file': _('Param File')})) 74 | 75 | def __init__(self, request, *args, **kwargs): 76 | super(UpdatePmJob, self).__init__(request, *args, **kwargs) 77 | 78 | def clean(self): 79 | data = super(UpdatePmJob, self).clean() 80 | 81 | try: 82 | param_str = self.files['param_file'].read() 83 | param = json.loads(param_str) 84 | data['param'] = param 85 | except Exception as e: 86 | msg = _('Failed to read file: %s.') % e 87 | raise forms.ValidationError(msg) 88 | 89 | return data 90 | 91 | def handle(self, request, data): 92 | try: 93 | param = data['param'] 94 | job_id = request.resolver_match.kwargs['id'] 95 | api.tacker.update_pm_job(request, job_id, param) 96 | messages.success(request, 97 | _('Update PM Job. (id: %s)') % job_id) 98 | return True 99 | except Exception: 100 | msg = _('Failed to update PM Job. (id: %s)') % job_id 101 | exceptions.handle(request, msg) 102 | return False 103 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfPmJob(horizon.Panel): 25 | name = _("PM Job") 26 | slug = "vnfpmjob" 27 | 28 | 29 | dashboard.Nfv.register(VnfPmJob) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | from django.utils.translation import ngettext_lazy 19 | 20 | from horizon import tables 21 | from openstack_dashboard import policy 22 | 23 | from tacker_horizon.openstack_dashboard import api 24 | 25 | 26 | class DeletePmJob(policy.PolicyTargetMixin, tables.DeleteAction): 27 | @staticmethod 28 | def action_present(count): 29 | return ngettext_lazy( 30 | "Delete PM Job", 31 | "Delete PM Jobs", 32 | count 33 | ) 34 | 35 | @staticmethod 36 | def action_past(count): 37 | return ngettext_lazy( 38 | "Delete PM Job", 39 | "Delete PM Jobs", 40 | count 41 | ) 42 | 43 | def action(self, request, obj_id): 44 | api.tacker.delete_pm_job(request, obj_id) 45 | 46 | 47 | class CreatePmJob(tables.LinkAction): 48 | name = "createpmjob" 49 | verbose_name = _("Create PM Job") 50 | classes = ("ajax-modal",) 51 | icon = "plus" 52 | url = "horizon:nfv:vnfpmjob:createpmjob" 53 | 54 | 55 | class UpdatePmJob(tables.LinkAction): 56 | name = "updatepmjob" 57 | verbose_name = _("Update PM Job") 58 | url = "horizon:nfv:vnfpmjob:updatepmjob" 59 | classes = ("ajax-modal",) 60 | 61 | 62 | class VnfPmJobTable(tables.DataTable): 63 | id = tables.Column('id', link="horizon:nfv:vnfpmjob:detail", 64 | verbose_name=_("ID")) 65 | object_type = tables.Column('object_type', verbose_name=_("Object Type")) 66 | links = tables.Column('links', verbose_name=_("Links")) 67 | 68 | class Meta(object): 69 | name = "pmjob" 70 | verbose_name = _("PM Job") 71 | pagination_param = 'vnfpmjob_marker' 72 | prev_pagination_param = 'prev_vnfpmjob_marker' 73 | table_actions = (CreatePmJob, DeletePmJob, tables.FilterAction,) 74 | row_actions = (UpdatePmJob, DeletePmJob,) 75 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/_create_pmjob.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Create a PM Job." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/_update_pmjob.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Update a PM Job." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/create_pmjob.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Create PM Job" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Create PM Job") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpmjob/_create_pmjob.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "PM Job Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "PM Job" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("PM Job") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/pmjob_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 14 | 15 |
16 |
17 |
{% trans "ID" %}
18 |
{{ pmjob.id }}
19 |
{% trans "Links" %}
20 |
{{ pmjob.links }}
21 |
{% trans "Callback Uri" %}
22 |
{{ pmjob.callback_uri }}
23 |
{% trans "Criteria" %}
24 |
{{ pmjob.criteria }}
25 |
{% trans "Object Instance IDs" %}
26 |
{{ pmjob.object_instance_ids }}
27 |
{% trans "Object Type" %}
28 |
{{ pmjob.object_type }}
29 |
{% trans "Sub Object Instance IDs" %}
30 |
{{ pmjob.sub_object_instance_ids }}
31 |
{% trans "Reports" %}
32 |
33 | 34 | 35 | 36 | 37 | 38 | {% for report in pmjob.reports %} 39 | 40 | 41 | 52 | 53 | {% endfor %} 54 |
{% trans "readyTime" %}
{% trans "href" %}
{{ report.readyTime }} 42 | {% if report.href %} 43 | {% if report.id and report.reportId %} 44 | {{ report.href }} 45 | {% else %} 46 | {% trans report.href %} 47 | {% endif %} 48 | {% else %} 49 | {% trans "-" %} 50 | {% endif %} 51 |
55 |
56 |
57 |
58 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/report_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 14 | 15 |
16 |
17 |
{% trans "Entries" %}
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {% for entrie in report.entries %} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {% endfor %} 36 |
{% trans "objectType" %}
{% trans "objectInstanceId" %}
{% trans "subObjectInstanceId" %}
{% trans "performanceMetric" %}
{% trans "performanceValues" %}
{{ entrie.objectType }}{{ entrie.objectInstanceId }}{{ entrie.subObjectInstanceId }}{{ entrie.performanceMetric }}{{ entrie.performanceValues }}
37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/templates/vnfpmjob/update_pmjob.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Update PM Job" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Update PM Job") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpmjob/_update_pmjob.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmjob/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfpmjob \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^createpmjob$', views.CreatePmJobView.as_view(), 25 | name='createpmjob'), 26 | re_path(r'^(?P[^/]+)/updatepmjob$', views.UpdatePmJobView.as_view(), 27 | name='updatepmjob'), 28 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 29 | name='detail'), 30 | re_path(r'^(?P[^/]+)/report/(?P[^/]+)/detail$', 31 | views.ReportDetailView.as_view(), 32 | name='reportdetail'), 33 | ] 34 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/panel.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | 19 | import horizon 20 | 21 | from tacker_horizon.openstack_dashboard.dashboards.nfv import dashboard 22 | 23 | 24 | class VnfPmThreshold(horizon.Panel): 25 | name = _("PM Threshold") 26 | slug = "vnfpmthreshold" 27 | 28 | 29 | dashboard.Nfv.register(VnfPmThreshold) 30 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/tables.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.utils.translation import gettext_lazy as _ 18 | from django.utils.translation import ngettext_lazy 19 | 20 | from horizon import tables 21 | from openstack_dashboard import policy 22 | 23 | from tacker_horizon.openstack_dashboard import api 24 | 25 | 26 | class DeletePmThreshold(policy.PolicyTargetMixin, tables.DeleteAction): 27 | @staticmethod 28 | def action_present(count): 29 | return ngettext_lazy( 30 | "Delete PM Threshold", 31 | "Delete PM Thresholds", 32 | count 33 | ) 34 | 35 | @staticmethod 36 | def action_past(count): 37 | return ngettext_lazy( 38 | "Delete PM Threshold", 39 | "Delete PM Thresholds", 40 | count 41 | ) 42 | 43 | def action(self, request, obj_id): 44 | api.tacker.delete_pm_threshold(request, obj_id) 45 | 46 | 47 | class CreatePmThreshold(tables.LinkAction): 48 | name = "createpmthreshold" 49 | verbose_name = _("Create PM Threshold") 50 | classes = ("ajax-modal",) 51 | icon = "plus" 52 | url = "horizon:nfv:vnfpmthreshold:createpmthreshold" 53 | 54 | 55 | class UpdatePmThreshold(tables.LinkAction): 56 | name = "updatepmthreshold" 57 | verbose_name = _("Update PM Threshold") 58 | url = "horizon:nfv:vnfpmthreshold:updatepmthreshold" 59 | classes = ("ajax-modal",) 60 | 61 | 62 | class VnfPmThresholdTable(tables.DataTable): 63 | id = tables.Column('id', link="horizon:nfv:vnfpmthreshold:detail", 64 | verbose_name=_("ID")) 65 | object_type = tables.Column('object_type', verbose_name=_("Object Type")) 66 | links = tables.Column('links', verbose_name=_("Links")) 67 | 68 | class Meta(object): 69 | name = "pmthreshold" 70 | verbose_name = _("PM Threshold") 71 | pagination_param = 'vnfpmthreshold_marker' 72 | prev_pagination_param = 'prev_vnfpmthreshold_marker' 73 | table_actions = (CreatePmThreshold, DeletePmThreshold, 74 | tables.FilterAction,) 75 | row_actions = (UpdatePmThreshold, DeletePmThreshold,) 76 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/_create_pmthreshold.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Create a PM Threshold." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/_update_pmthreshold.html: -------------------------------------------------------------------------------- 1 | {% extends "horizon/common/_modal_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_attrs %}enctype="multipart/form-data"{% endblock %} 5 | 6 | {% block modal-body-right %} 7 |

{% trans "Description:" %}

8 |

{% trans "Update a PM Threshold." %}

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/create_pmthreshold.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Create PM Threshold" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Create PM Threshold") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpmthreshold/_create_pmthreshold.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "PM Threshold Detail" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=page_title %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "PM Threshold" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("PM Threshold") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 |
11 |
12 | {{ tab_group.render }} 13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/pmthreshold_detail.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 |
5 |
{% trans "ID" %}
6 |
{{ pmthreshold.id }}
7 |
{% trans "Links" %}
8 |
{{ pmthreshold.links }}
9 |
{% trans "Callback Uri" %}
10 |
{{ pmthreshold.callback_uri }}
11 |
{% trans "Criteria" %}
12 |
{{ pmthreshold.criteria }}
13 |
{% trans "Object Instance ID" %}
14 |
{{ pmthreshold.object_instance_id }}
15 |
{% trans "Object Type" %}
16 |
{{ pmthreshold.object_type }}
17 |
{% trans "Sub Object Instance IDs" %}
18 |
{{ pmthreshold.sub_object_instance_ids }}
19 |
20 |
21 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/templates/vnfpmthreshold/update_pmthreshold.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% load i18n %} 3 | {% block title %}{% trans "Update PM Threshold" %}{% endblock %} 4 | 5 | {% block page_header %} 6 | {% include "horizon/common/_page_header.html" with title=_("Update PM Threshold") %} 7 | {% endblock page_header %} 8 | 9 | {% block main %} 10 | {% include 'nfv/vnfpmthreshold/_update_pmthreshold.html' %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /tacker_horizon/openstack_dashboard/dashboards/nfv/vnfpmthreshold/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | from django.urls import re_path 18 | 19 | from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfpmthreshold \ 20 | import views 21 | 22 | urlpatterns = [ 23 | re_path(r'^$', views.IndexView.as_view(), name='index'), 24 | re_path(r'^createpmthreshold', views.CreatePmThresholdView.as_view(), 25 | name='createpmthreshold'), 26 | re_path(r'^(?P[^/]+)/updatepmthreshold$', 27 | views.UpdatePmThresholdView.as_view(), 28 | name='updatepmthreshold'), 29 | re_path(r'^(?P[^/]+)/$', views.DetailView.as_view(), 30 | name='detail'), 31 | ] 32 | -------------------------------------------------------------------------------- /tacker_horizon/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/base.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 2 | # not use this file except in compliance with the License. You may obtain 3 | # a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 10 | # License for the specific language governing permissions and limitations 11 | # under the License. 12 | 13 | import unittest 14 | 15 | 16 | class TestCase(unittest.TestCase): 17 | 18 | """Test case base class for all unit tests.""" 19 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/horizon.conf: -------------------------------------------------------------------------------- 1 | [plugin] 2 | is_plugin=True 3 | plugin_page_path=tacker_horizon.test.integration.pages 4 | plugin_page_structure='{"NFV": {"(Legacy)VNF Management": {"_": ["VNF Catalog", "VNF Manager"]}, "(Legacy)NFV Orchestration": {"_": ["VIM Management", "VNFFG Catalog", "VNFFG Manager", "NS Catalog", "NS Manager"]}, "VNF Packages v1": {"_": ["VNF Packages"]}, "VNF LCM v2": {"_": ["VNF LCM", "VNF OP OCC", "LCCN Subscription"]}, "VNF FM v1": {"_": ["Alarm", "Subscription"]}, "VNF PM v2": {"_": ["PM Job", "PM Threshold"]}}}' 5 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/nfv_orchestration/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/nscatalogpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class NscatalogPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(NscatalogPage, self).__init__(driver, conf) 20 | self._page_title = "NS Catalog" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/nsmanagerpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class NsmanagerPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(NsmanagerPage, self).__init__(driver, conf) 20 | self._page_title = "NS Manager" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/vimmanagementpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class VimmanagementPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(VimmanagementPage, self).__init__(driver, conf) 20 | self._page_title = "VIM Management" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/vnffgcatalogpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class VnffgcatalogPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(VnffgcatalogPage, self).__init__(driver, conf) 20 | self._page_title = "VNFFG Catalog" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/nfv_orchestration/vnffgmanagerpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class VnffgmanagerPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(VnffgmanagerPage, self).__init__(driver, conf) 20 | self._page_title = "VNFFG Manager" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnf_management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/vnf_management/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnf_management/vnfcatalogpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class VnfcatalogPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(VnfcatalogPage, self).__init__(driver, conf) 20 | self._page_title = "VNF Catalog" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnf_management/vnfmanagerpage.py: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 3 | # not use this file except in compliance with the License. You may obtain 4 | # a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 11 | # License for the specific language governing permissions and limitations 12 | # under the License. 13 | 14 | from openstack_dashboard.test.integration_tests.pages import basepage 15 | 16 | 17 | class VnfmanagerPage(basepage.BaseNavigationPage): 18 | def __init__(self, driver, conf): 19 | super(VnfmanagerPage, self).__init__(driver, conf) 20 | self._page_title = "VNF Manager" 21 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnffm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/vnffm/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnffm/vnffmalarmpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfFmAlarmPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfFmAlarmPage, self).__init__(driver, conf) 22 | self._page_title = "Alarm" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnffm/vnffmsubscriptionpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfFmSubscriptionPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfFmSubscriptionPage, self).__init__(driver, conf) 22 | self._page_title = "Subscription" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnflcm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/vnflcm/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnflcm/lccnsubscriptionpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class LccnSubscriptionPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(LccnSubscriptionPage, self).__init__(driver, conf) 22 | self._page_title = "LCCN Subscription" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnflcm/vnflcmopoccpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfLcmOpOccPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfLcmOpOccPage, self).__init__(driver, conf) 22 | self._page_title = "VNF LCM OP OCC" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnflcm/vnflcmpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfLcmPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfLcmPage, self).__init__(driver, conf) 22 | self._page_title = "VNF LCM" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnfpackages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/vnfpackages/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnfpackages/vnfpackagespage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfPackagesPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfPackagesPage, self).__init__(driver, conf) 22 | self._page_title = "VNF Packages" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnfpm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/tacker_horizon/test/integration/pages/nfv/vnfpm/__init__.py -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnfpm/vnfpmjobpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfPmJobPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfPmJobPage, self).__init__(driver, conf) 22 | self._page_title = "PM Job" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/integration/pages/nfv/vnfpm/vnfpmthresholdpage.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Fujitsu 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from openstack_dashboard.test.integration_tests.pages import basepage 17 | 18 | 19 | class VnfPmThresholdPage(basepage.BaseNavigationPage): 20 | def __init__(self, driver, conf): 21 | super(VnfPmThresholdPage, self).__init__(driver, conf) 22 | self._page_title = "PM Threshold" 23 | -------------------------------------------------------------------------------- /tacker_horizon/test/settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | # Default to Horizons test settings to avoid any missing keys 16 | 17 | import openstack_dashboard.enabled # noqa: F811 18 | from openstack_dashboard.test.settings import * # noqa: F403,H303 19 | from openstack_dashboard.utils import settings 20 | 21 | import tacker_horizon.enabled 22 | 23 | # pop these keys to avoid log warnings about deprecation 24 | # update_dashboards will populate them anyway 25 | HORIZON_CONFIG.pop('dashboards', None) # noqa: F405 26 | HORIZON_CONFIG.pop('default_dashboard', None) # noqa: F405 27 | 28 | # Update the dashboards with nfv dashboard enabled files 29 | # and current INSTALLED_APPS 30 | settings.update_dashboards( 31 | [ 32 | openstack_dashboard.enabled, 33 | tacker_horizon.enabled, 34 | ], 35 | HORIZON_CONFIG, # noqa: F405 36 | INSTALLED_APPS # noqa: F405 37 | ) 38 | 39 | # Remove duplicated apps 40 | INSTALLED_APPS = list(set(INSTALLED_APPS)) # noqa: F405 41 | -------------------------------------------------------------------------------- /tacker_horizon/test/urls.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | from django.conf import urls 16 | 17 | import openstack_dashboard.urls 18 | 19 | urlpatterns = [ 20 | urls.url(r'', urls.include(openstack_dashboard.urls)) 21 | ] 22 | -------------------------------------------------------------------------------- /test-requirements.txt: -------------------------------------------------------------------------------- 1 | # The order of packages is significant, because pip processes them in the order 2 | # of appearance. Changing the order has an impact on the overall integration 3 | # process, which may cause wedges in the gate later. 4 | # Order matters to the pip dependency resolver, so sorting this file 5 | # changes how packages are installed. New dependencies should be 6 | # added in alphabetical order, however, some dependencies may need to 7 | # be installed in a specific order. 8 | # 9 | # Hacking should appear first in case something else depends on pep8 10 | hacking>=4.0.0,<4.1.0 # Apache-2.0 11 | # 12 | coverage!=4.4,>=4.0 # Apache-2.0 13 | nodeenv>=0.9.4 # BSD 14 | # Horizon integration tests requirements 15 | selenium>=2.50.1 # Apache-2.0 16 | testtools>=2.2.0 # MIT 17 | # This also needs xvfb library installed on your OS 18 | xvfbwrapper>=0.1.3 #license: MIT 19 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/tacker-horizon/b8220dd771aa9200a86e9eb4dfed2321f2bbc188/test/README.md -------------------------------------------------------------------------------- /tools/executable_files.txt: -------------------------------------------------------------------------------- 1 | ./manage.py 2 | -------------------------------------------------------------------------------- /tools/find_executables.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This shell script helps in finding executable files, as by default Nose 4 | # plugin ignores executable files. All the executable files need to be added 5 | # in tools/executable_files.txt. 6 | 7 | OUTPUT=`find . \( -name .tox -o -name .git \) -prune -o -type f -perm /a=x -print \ 8 | | grep -v -F -f ./tools/executable_files.txt` 9 | if [ -n "$OUTPUT" ]; then 10 | echo "Unexpected executable files are found:" 11 | for f in $OUTPUT; do 12 | echo $f 13 | done 14 | echo 15 | echo "If you really need to add an executable file, add it to tools/executable_files.txt" 16 | exit 1 17 | fi 18 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py39,py38,py36,pep8,docs 3 | minversion = 3.18.0 4 | ignore_basepython_conflict = True 5 | 6 | [testenv] 7 | basepython = python3 8 | usedevelop = True 9 | setenv = 10 | VIRTUAL_ENV={envdir} 11 | DJANGO_SETTINGS_MODULE=tacker_horizon.test.settings 12 | deps = 13 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 14 | -r{toxinidir}/requirements.txt 15 | -r{toxinidir}/test-requirements.txt 16 | commands = 17 | {envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings --exclude-tag integration {posargs} 18 | 19 | [testenv:integration] 20 | # Run integration tests only 21 | passenv = 22 | DISPLAY 23 | FFMPEG_INSTALLED 24 | setenv = 25 | PYTHONHASHSEED=0 26 | FFMPEG_INSTALLED=True 27 | INTEGRATION_TESTS=1 28 | SELENIUM_HEADLESS=False 29 | HORIZON_INTEGRATION_TESTS_CONFIG_FILE=tacker_horizon/test/integration/horizon.conf 30 | basepython = python3 31 | commands = {envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings --tag integration {posargs} 32 | 33 | [testenv:py36] 34 | basepython = python3.6 35 | commands = 36 | {envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings --exclude-tag integration {posargs} 37 | 38 | [testenv:py39] 39 | basepython = python3.9 40 | commands = 41 | {envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings --exclude-tag integration {posargs} 42 | 43 | [testenv:pep8] 44 | basepython = python3 45 | commands = flake8 46 | 47 | [testenv:docs] 48 | basepython = python3 49 | deps = 50 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 51 | -r{toxinidir}/doc/requirements.txt 52 | commands = sphinx-build -W -b html doc/source doc/build/html 53 | 54 | [testenv:pdf-docs] 55 | basepython = python3 56 | envdir = {toxworkdir}/docs 57 | deps = {[testenv:docs]deps} 58 | allowlist_externals = 59 | make 60 | commands = 61 | sphinx-build -W -b latex doc/source doc/build/pdf 62 | make -C doc/build/pdf 63 | 64 | [testenv:cover] 65 | basepython = python3 66 | commands = 67 | coverage erase 68 | coverage run {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings {posargs} 69 | coverage xml --omit '.tox/cover/*' -o 'cover/coverage.xml' 70 | coverage html --omit '.tox/cover/*' -d 'cover/htmlcov' 71 | 72 | [testenv:venv] 73 | basepython = python3 74 | commands = {posargs} 75 | 76 | [flake8] 77 | show-source = True 78 | max-complexity = 20 79 | 80 | [testenv:makemessages] 81 | commands = 82 | pybabel extract -F babel-django.cfg -o tacker_horizon/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 tacker_horizon 83 | pybabel extract -F babel-djangojs.cfg -o tacker_horizon/locale/djangojs.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 tacker_horizon 84 | 85 | --------------------------------------------------------------------------------