{"body":"import resource\n\nfrom openstack import format\n\nfake_data = {'id': 123,\n             'enabled': True,\n             'name': 'foobar',\n             'attr1': 'value1',\n             'attr2': 'value2',\n             'status': None}\n\nclass FakeResource(resource.Resource):\n\n    resource_key = 'foobar'\n    resources_key = 'foobars'\n    base_path = '/foobar'\n\n    allow_create = allow_retrieve = allow_update = True\n    allow_delete = allow_list = allow_head = True\n\n    enabled = resource.prop('enabled', type=format.BoolStr)\n    name = resource.prop('name')\n    first = resource.prop('attr1')\n    second = resource.prop('attr2')\n    third = resource.prop('attr3', alias='attr_three')\n    status = resource.prop('status')\n\nfoobar1 = FakeResource(fake_data)\nfoobar2 = FakeResource(fake_data)\n\nprint(foobar1.first)\nprint(foobar2.first)\n\nfoobar1.first = 'new_value1'\n\nprint(foobar1.first)\nprint(foobar2.first)\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/Mz8QxHCW","modified":1429819226,"id":"Mz8QxHCW","size":899,"lines":37,"own_paste":false,"theme":"","date":1429819226}