Skip to content

[SMN][SDK]: Please fix "delete_topic_attribute" function #630

@daniel-kovac

Description

@daniel-kovac

Please fix "delete_topic_attribute" as it is currently not working. With current implementation:

def delete_topic_attribute(self, topic, name=None):
        """Delete all attributes of a topic

        :param topic: Either the ID of a topic or a
            :class:`~otcextensions.sdk.smn.v2.topic.Topic`
            instance.
        :param name: Attribute Name.
        :returns: request_id.
        :rtype: :class:`~otcextensions.sdk.smn.v2.topic.TopicAttribute`
        :raises: :class:`~openstack.exceptions.ResourceNotFound`
            when no resource can be found.
        """
        topic = self._get_resource(_topic.Topic, topic)
        if name:
            **return self._delete(_topic.TopicAttribute,
                                id=name, topic_id=topic.id)**
        return self._delete(_topic.TopicAttribute,
                            topic_id=topic.id, requires_id=False)

When passing argument name (currently only possible is "access_policy") I am getting error :

return self._delete(_topic.TopicAttribute,", "TypeError: Proxy._delete() missing 1 required positional argument: 'value'"], "stdout": "", "stdout_lines": []}

I believe problem is how return.self is defined and specifically : it passes id=name instead of positional value.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions