Skip to content

Commit

Permalink
Addressed minor TODOs in mof_compiler.py
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Jan 15, 2018
1 parent 545aca8 commit 61a9e2b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pywbem/mof_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@ def p_assocDeclaration(p):
| '[' ASSOCIATION qualifierListEmpty ']' CLASS className alias superClass '{' associationFeatureList '}' ';'
""" # noqa: E501
aqual = CIMQualifier('ASSOCIATION', True, type='boolean')
# TODO flavor trash.
quals = [aqual] + p[3]
p[0] = _assoc_or_indic_decl(quals, p)

Expand All @@ -813,7 +812,6 @@ def p_indicDeclaration(p):
| '[' INDICATION qualifierListEmpty ']' CLASS className alias superClass '{' classFeatureList '}' ';'
""" # noqa: E501
iqual = CIMQualifier('INDICATION', True, type='boolean')
# TODO flavor trash.
quals = [iqual] + p[3]
p[0] = _assoc_or_indic_decl(quals, p)

Expand Down Expand Up @@ -964,7 +962,9 @@ def p_qualifier(p):
else:
qval = tocimobj(qualdecl.type, qval)
p[0] = CIMQualifier(qname, qval, type=qualdecl.type, **flavors)
# TODO propagated?

# Note: The propagated flag is not set because this is parsed MOF, which
# contains specified qualifiers and not propagated qualifiers.


def p_flavorList(p):
Expand All @@ -987,7 +987,8 @@ def p_qualifierParameter(p):
p[0] = p[2]


# TODO 8/16 ks Consider complete removed of TOINSTANCE from compiler
# Note: TOINSTANCE is deprecated in DSP0201 and is not specified in DSP004.
# Pywbem supports TOINSTANCE as deprecated, for historical reasons.
def p_flavor(p):
"""flavor : ENABLEOVERRIDE
| DISABLEOVERRIDE
Expand Down Expand Up @@ -1113,8 +1114,11 @@ def p_methodDeclaration(p):
quals = dict([(q.name, q) for q in quals])
p[0] = CIMMethod(mname, return_type=dt, parameters=params,
qualifiers=quals)
# note: class_origin is set when adding method to class.
# TODO what to do with propagated?

# Note: class_origin is set when adding method to class.

# Note: The propagated flag is not set because this is parsed MOF, which
# contains specified methods and not any inherited methods.


def p_propertyName(p):
Expand Down Expand Up @@ -2093,7 +2097,6 @@ def CreateClass(self, *args, **kwargs):
"""

cc = args[0] if args else kwargs['NewClass']
# TODO 2016/03 AM: Dubious stmt above.
if cc.superclass:
try:
_ = self.GetClass(cc.superclass, LocalOnly=True, # noqa: F841
Expand Down

0 comments on commit 61a9e2b

Please sign in to comment.