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.