Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
803b2a8
Use stestr instead of testr
bobh66 Jun 11, 2018
c08022d
Fix error using get_attribute with HOST in case of setting host relat…
micafer Jul 2, 2018
5415ca4
Update the outdated URL
Sep 23, 2018
47e04a1
Use templates for cover and lower-constraints
ajaeger Sep 29, 2018
f231b27
Merge "Fix error using get_attribute with HOST in case of setting hos…
Nov 14, 2018
4bdad8e
Add py36 to tox.ini and setup.cfg
bobh66 Nov 14, 2018
f2ca5eb
Merge "Use stestr instead of testr"
Nov 14, 2018
0c77377
Move extension tests to where stestr can find them
bobh66 Nov 14, 2018
fd3c74b
Add reservation policy support
NirajSingh90 Aug 23, 2018
f90efb1
Change openstack-dev to openstack-discuss
Dec 4, 2018
466a489
Merge "Change openstack-dev to openstack-discuss"
Dec 5, 2018
bfed830
Merge "Add reservation policy support"
Dec 5, 2018
e0c67af
Merge "Add py36 to tox.ini and setup.cfg"
Dec 13, 2018
98fa01a
Remove support for py34
Dec 19, 2018
a004382
Update the bugs link to storyboard
weizj Dec 30, 2018
8627db6
Merge "Update the bugs link to storyboard"
Jan 1, 2019
8cd4546
Merge "Remove support for py34"
Jan 1, 2019
346950b
Merge upstream
micafer Jan 16, 2019
d2d01fe
Merge remote-tracking branch 'upstream/master' into devel
micafer Feb 11, 2019
dda2f7d
Fix package generator
micafer Feb 11, 2019
e93ee40
Add metadata
micafer Feb 11, 2019
816955d
Fix PortDef node
micafer Feb 14, 2019
273b6eb
Dropping the py35 testing
gmaanos Apr 14, 2019
88776a7
OpenDev Migration Patch
Apr 19, 2019
6f78538
Sync Sphinx requirement
Jun 4, 2019
912bfca
Replace git.openstack.org URLs with opendev.org URLs
Apr 23, 2019
048137e
Add Python 3 Train unit tests
Jun 24, 2019
076f095
Checks the type of the TopologyTemplate fields
micafer Jul 5, 2019
328cec6
Merge "Replace git.openstack.org URLs with opendev.org URLs"
Jul 23, 2019
72823d2
Fail to parse capabilities without properties
k-kuriu Jul 29, 2019
a9dd335
Blacklist sphinx 2.1.0 (autodoc bug)
Aug 2, 2019
d6a9db0
Bump the openstackdocstheme extension to 1.20
Aug 2, 2019
e5bc2b1
Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
Aug 16, 2019
c1ca5d1
Merge "Bump the openstackdocstheme extension to 1.20"
Aug 16, 2019
2e51d21
Fail to parse properties in substitution_mappings
k-kuriu Jul 30, 2019
8a18ca8
Add support for tosca definition version 1.2
NirajSingh90 May 15, 2019
bce42e9
Initialize CSAR main_template_file_name
bobh66 Oct 10, 2019
370856d
Fail to parse if relationship is not defined in requirements.
k-kuriu Oct 15, 2019
58ddb23
Switch to official Ussuri jobs
solotravler Nov 20, 2019
3242ea5
Merge "Fail to parse if relationship is not defined in requirements."
Jan 21, 2020
1abd376
[ussuri][goal] Drop python 2.7 support and testing
ajaeger Feb 4, 2020
f6abd61
Merge remote-tracking branch 'upstream/master' into devel
micafer Mar 26, 2020
38bd173
Add py36
micafer Mar 26, 2020
c41495f
Enable max_length and min_length constraints in lists
micafer Mar 27, 2020
4afdc0a
Update hacking for Python3
ajaeger Apr 7, 2020
3957724
Merge "Update hacking for Python3"
Apr 7, 2020
7885fe4
Fix hacking min version to 3.0.1
gmaanos May 12, 2020
b43f595
Switch to newer openstackdocstheme version
ajaeger May 30, 2020
1b5383d
Fix ResourceWarning for unclosed file
yasufum Jun 1, 2020
9b581e1
drop mock from lower-constraints
4383 Jun 9, 2020
2b71030
Merge "drop mock from lower-constraints"
Jun 19, 2020
9b42fa3
Merge "Fix hacking min version to 3.0.1"
Jun 19, 2020
d377abc
Fix deprecated yaml loader usage
yasufum Aug 11, 2020
9b9eba5
Add "state" to condition keyname
takahashi-tsc Aug 14, 2020
7f675de
Enable store multi flavour in nested topo template
Jun 12, 2020
5a430d8
Merge "Enable store multi flavour in nested topo template"
Sep 12, 2020
6b92c81
Merge "Add "state" to condition keyname"
Sep 12, 2020
b598d9c
Enable _get_explicit_relationship to maintain original relationship t…
micafer Sep 28, 2020
0653750
Fix error parsing scalar unit contraints
micafer Nov 18, 2020
00d3a39
Add validation for required property of policies
Nov 18, 2020
62f0d45
Add Python3 wallaby unit tests
yasufum Nov 27, 2020
998bb07
Merge "Fix error parsing scalar unit contraints"
Dec 24, 2020
c24ece0
Merge "Add validation for required property of policies"
Dec 24, 2020
b0c5c55
Drop Python 2 support
yasufum Nov 27, 2020
3c5d2b6
Merge "Drop Python 2 support"
Dec 26, 2020
df16f01
Support "Implementation" definition as Artifact Name
Aug 22, 2020
ce8fa0f
Move tosca-parser to new hacking 4.0.0
Jan 26, 2021
1f6f7a0
Update TOX_CONSTRAINTS_FILE
Jan 28, 2021
6f253c5
Dropping explicit unicode literal
Jan 30, 2021
d353bbc
Remove depreciated file babel.cfg
Feb 11, 2021
a1c2cbe
Merge "Remove depreciated file babel.cfg"
Feb 23, 2021
a13f875
Merge upstream
micafer Feb 25, 2021
2fb2841
Merge upstream
micafer Feb 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ pip-log.txt

# Unit test / coverage reports
.coverage
cover
.tox
nosetests.xml
.stestr/
.testrepository

# Translations
Expand Down Expand Up @@ -53,4 +55,4 @@ ChangeLog
*.iml

# OSX
.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion .gitreview
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gerrit]
host=review.openstack.org
host=review.opendev.org
port=29418
project=openstack/tosca-parser.git
4 changes: 4 additions & 0 deletions .stestr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[DEFAULT]
test_path=./toscaparser/tests/
top_dir=./

7 changes: 0 additions & 7 deletions .testr.conf

This file was deleted.

17 changes: 4 additions & 13 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
- project:
templates:
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
- publish-openstack-docs-pti
- check-requirements
check:
jobs:
- openstack-tox-lower-constraints
gate:
jobs:
- openstack-tox-lower-constraints
post:
jobs:
- openstack-tox-cover
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python3-wallaby-jobs
- publish-openstack-docs-pti
8 changes: 4 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:

http://docs.openstack.org/infra/manual/developers.html
https://docs.openstack.org/infra/manual/developers.html

Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:

http://docs.openstack.org/infra/manual/developers.html#development-workflow
https://docs.openstack.org/infra/manual/developers.html#development-workflow

Pull requests submitted through GitHub will be ignored.

Bugs should be filed on Launchpad, not GitHub:
Bugs should be filed on Storyboard, not GitHub:

https://bugs.launchpad.net/tosca-parser
https://storyboard.openstack.org/#!/project/998
4 changes: 2 additions & 2 deletions HACKING.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tosca-parser Style Commandments
===============================================
===============================

Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ Project Info
------------

* License: Apache License, Version 2.0
* Source: http://git.openstack.org/cgit/openstack/tosca-parser/
* Source: https://opendev.org/openstack/tosca-parser/

1 change: 0 additions & 1 deletion babel.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
14 changes: 9 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@
master_doc = 'index'

# General information about the project.
project = u'tosca-parser'
copyright = u'2013, OpenStack Foundation'
project = 'tosca-parser'
copyright = '2013, OpenStack Foundation'

# openstackdocstheme options
openstackdocs_repo_name = 'openstack/tosca-parser'
openstackdocs_use_storyboard = True

# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
Expand All @@ -46,7 +50,7 @@
add_module_names = True

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'

# -- Options for HTML output --------------------------------------------------

Expand All @@ -62,8 +66,8 @@
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
'%s Documentation' % project,
'OpenStack Foundation', 'manual'),
]

# Example configuration for intersphinx: refer to the Python standard library.
Expand Down
12 changes: 1 addition & 11 deletions lower-constraints.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
alabaster==0.7.10
appdirs==1.3.0
Babel==2.3.4
cliff==2.8.0
cmd2==0.8.0
coverage==4.0
docutils==0.11
extras==1.0.0
fixtures==3.0.0
flake8==2.5.5
hacking==0.12.0
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
mox3==0.20.0
openstackdocstheme==1.18.1
os-client-config==1.28.0
oslosphinx==4.7.0
oslotest==3.2.0
pbr==2.0.0
pep8==1.5.7
prettytable==0.7.2
pyflakes==0.8.1
Pygments==2.2.0
pyparsing==2.1.0
pyperclip==1.5.27
Expand All @@ -36,10 +28,8 @@ pytz==2013.6
PyYAML==3.12
requests==2.14.2
requestsexceptions==1.2.0
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stevedore==1.20.0
testrepository==0.0.18
testscenarios==0.4
Expand Down
3 changes: 2 additions & 1 deletion packages/generate_deb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

apt update
apt install -y python-stdeb
apt install -y python-stdeb python-pip
pip install pytz pbr
python setup.py --command-packages=stdeb.command sdist_dsc --depends "python-pbr, python-dateutil" bdist_deb
mkdir dist_pkg
cp deb_dist/*.deb dist_pkg
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ Babel>=2.5.0 # BSD
cliff>=2.10.0 # Apache-2.0
PyYAML>=3.12 # MIT
python-dateutil>=2.5.3 # BSD
six>=1.10.0 # MIT
stevedore>=1.20.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
27 changes: 7 additions & 20 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ summary = Parser for TOSCA Simple Profile in YAML.
description-file =
README.rst
author = OpenStack
author-email = openstack-dev@lists.openstack.org
home-page = http://docs.openstack.org/tosca-parser/
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/tosca-parser/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython

[files]
packages =
Expand All @@ -30,17 +31,3 @@ console_scripts =
toscaparser.extensions =
tosca_simple_profile_for_nfv_1_0_0 = toscaparser.extensions.nfv.tosca_simple_profile_for_nfv_1_0_0:NfvProfile_1_0_0
tosca_simple_profile_for_mec_1_0_0 = toscaparser.extensions.mec.tosca_simple_profile_for_mec_1_0_0:MecProfile_1_0_0

[compile_catalog]
directory = toscaparser/locale
domain = toscaparser

[update_catalog]
domain = toscaparser
output_dir = toscaparser/locale
input_file = toscaparser/locale/toscaparser.pot

[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = toscaparser/locale/toscaparser.pot
8 changes: 0 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools

# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass

setuptools.setup(
setup_requires=['pbr>=2.0.0', 'pytz'],
pbr=True)
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=4.0.0,<4.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
11 changes: 10 additions & 1 deletion toscaparser/elements/TOSCA_definition_1_0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
##########################################################################
tosca_definitions_version: tosca_simple_yaml_1_0

metadata:
template_author: OpenStack
template_name: normative-types
template_version: '1.0'

##########################################################################
# Node Type.
# A Node Type is a reusable entity that defines the type of one or more
Expand Down Expand Up @@ -807,7 +812,6 @@ data_types:
type: string

tosca.datatypes.network.PortDef:
derived_from: tosca.datatypes.Root
type: integer
constraints:
- in_range: [ 1, 65535 ]
Expand Down Expand Up @@ -953,6 +957,11 @@ policy_types:
description: The TOSCA Policy Type definition that is used to declare
performance requirements for TOSCA nodes or groups of nodes.

tosca.policies.Reservation:
derived_from: tosca.policies.Root
description: The TOSCA Policy Type definition that is used to create
TOSCA nodes or group of nodes based on the reservation.

##########################################################################
# Group Type.
# Group Type represents logical grouping of TOSCA nodes that have an
Expand Down
3 changes: 2 additions & 1 deletion toscaparser/elements/capabilitytype.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def get_properties_def_objects(self):
parent_properties = {}
if self.parent_capabilities:
for type, value in self.parent_capabilities.items():
parent_properties[type] = value.get('properties')
if self.PROPERTIES in value:
parent_properties[type] = value.get(self.PROPERTIES)
if self.properties:
for prop, schema in self.properties.items():
properties.append(PropertyDef(prop, None, schema))
Expand Down
14 changes: 7 additions & 7 deletions toscaparser/elements/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ def __init__(self, property_name, property_type, constraint):
'comparable values.')))

def _is_valid(self, value):
if toscaparser.functions.is_function(value) or \
value >= self.constraint_value:
if value is not None and (toscaparser.functions.is_function(value) or
value >= self.constraint_value):
return True
return False

Expand Down Expand Up @@ -503,7 +503,7 @@ class MinLength(Constraint):

valid_types = (int, )

valid_prop_types = (Schema.STRING, Schema.MAP)
valid_prop_types = (Schema.STRING, Schema.MAP, Schema.LIST)

def __init__(self, property_name, property_type, constraint):
super(MinLength, self).__init__(property_name, property_type,
Expand All @@ -514,7 +514,7 @@ def __init__(self, property_name, property_type, constraint):
'expects an integer.')))

def _is_valid(self, value):
if ((isinstance(value, str) or isinstance(value, dict)) and
if (isinstance(value, (str, dict, list)) and
len(value) >= self.constraint_value):
return True

Expand All @@ -538,7 +538,7 @@ class MaxLength(Constraint):

valid_types = (int, )

valid_prop_types = (Schema.STRING, Schema.MAP)
valid_prop_types = (Schema.STRING, Schema.MAP, Schema.LIST)

def __init__(self, property_name, property_type, constraint):
super(MaxLength, self).__init__(property_name, property_type,
Expand All @@ -549,7 +549,7 @@ def __init__(self, property_name, property_type, constraint):
'expects an integer.')))

def _is_valid(self, value):
if ((isinstance(value, str) or isinstance(value, dict)) and
if (isinstance(value, (str, dict, list)) and
len(value) <= self.constraint_value):
return True

Expand Down Expand Up @@ -608,7 +608,7 @@ def _err_msg(self, value):
Constraint.MIN_LENGTH: MinLength,
Constraint.MAX_LENGTH: MaxLength,
Constraint.PATTERN: Pattern
}
}


def get_constraint_class(type):
Expand Down
Loading