def _get_import_locations(self, context): import_locations = super(ToscaSimpleNfvPresenter1_0, self)._get_import_locations(context) if context.presentation.import_profile: return FrozenList([self.SIMPLE_PROFILE_FOR_NFV_LOCATION] + import_locations) return import_locations
def _get_import_locations(self, context): import_locations = [] if context.presentation.import_profile: import_locations.append(self.SIMPLE_PROFILE_LOCATION) imports = self._get('service_template', 'imports') if imports: import_locations += [self.SPECIAL_IMPORTS.get(i.file, i.file) for i in imports] return FrozenList(import_locations) if import_locations else EMPTY_READ_ONLY_LIST
def _get_import_locations(self, context): import_locations = [] if context.presentation.import_profile: import_locations += (self.SIMPLE_PROFILE_LOCATION, self.SIMPLE_PROFILE_FOR_NFV_LOCATION) imports = self._get('service_template', 'imports') if imports: import_locations += [i.file for i in imports] return FrozenList( import_locations) if import_locations else EMPTY_READ_ONLY_LIST
def __init__(self, context, presentation, argument): self.locator = presentation._locator if not isinstance(argument, list): raise InvalidValueError( 'function "concat" argument must be a list of string expressions: {0}' .format(safe_repr(argument)), locator=self.locator) string_expressions = [] for index, an_argument in enumerate(argument): string_expressions.append(parse_string_expression(context, presentation, 'concat', index, None, an_argument)) self.string_expressions = FrozenList(string_expressions)
def _get_import_locations(self, context): import_locations = [] if context.presentation.configuration.get('tosca.import_profile', True): import_locations.append(self.SIMPLE_PROFILE_LOCATION) imports = self._get('service_template', 'imports') if imports: for i in imports: if i.repository == self.PLUGIN_REPOSITORY: #Add plugin.yaml from plugin resource storage to import locations import_locations += [i.file + self.PLUGIN_IMPORT_FILE] else: import_locations += [ self.SPECIAL_IMPORTS.get(i.file, i.file) ] return FrozenList( import_locations) if import_locations else EMPTY_READ_ONLY_LIST
def _get_targets(self, context): node_templates, groups = get_policy_targets(context, self) return FrozenList(node_templates), FrozenList(groups)
def _get_requirements(self, context): return FrozenList(get_template_requirements(context, self))
def _get_targets(self, context): node_types, group_types = get_inherited_targets(context, self) return FrozenList(node_types), FrozenList(group_types)
def _get_requirements(self, context): return FrozenList(get_inherited_requirement_definitions(context, self))
def _get_members(self, context): node_types = get_inherited_members(context, self) return FrozenList(node_types)