Skip to content

New suggestion for /shells/2020.1.0/getting-information-from-cloudshell.html #281

@Cojacfar

Description

@Cojacfar

In this section:

Custom Attributes and the Shell’s data model

from data_model import *

class DataModelExampleDriver (ResourceDriverInterface):

    def custom_command(self, context):
      resource = DataModelExample.create_from_context(context)
      resource.vendor = 'specify the shell vendor'
      resource.model = 'specify the shell model'

The code example seems to indicate we can assign resource.vendor (the Vendor attribute on our shell) via a straight assignment instead of using the api to SetAttributeValue.

Metadata

Metadata

Assignees

No one assigned

    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