{"push_id":1198174776,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"c1c23a03bd3a3688f0cc5cbebf590cc6e8614624","before":"bf83542f64bb19612d6031a8f8a00dba20e2caf5","commits":[{"sha":"c1c23a03bd3a3688f0cc5cbebf590cc6e8614624","author":{"name":"Nir Soffer","email":"7cf8f3b76f384713d1505797627ca298fb418a16@redhat.com"},"message":"properties: Add properties module\n\nProperties are reusable objects similar to builtin property() function,\nadding input validation and initialization guarantees.\n\nExamples\n\n    class Foo(properties.Owner):\n\n        uuid = properties.UUID(required=True)\n        format = properties.Enum(values=(\"cow\", \"raw\"), required=True)\n        size = properties.Integer(minval=0)\n        name = properties.String()\n\n        def __init__(self, uuid, format, size=0):\n            self.uuid = uuid\n            self.format = format\n            self.size = size\n\nCreating an object with invalid properties or with uninitialized\nrequired properties would raise:\n\n    Foo(\"not-a-uuid\", \"raw\")\n    Foo(\"49d8842d-43e8-4c33-b588-b5538df4ed8a\", \"invalid format\")\n    Foo(\"49d8842d-43e8-4c33-b588-b5538df4ed8a\", \"raw\", size=-1)\n\nAttempting to set invalid value would raise:\n\n    foo = Foo(\"49d8842d-43e8-4c33-b588-b5538df4ed8a\", \"raw\")\n    foo.size = -1  # Raises ValueError\n\nAccessing uninitialized properties does not raise AttributeError.\nInstead, the default value is returned:\n\n    foo.name  # None\n\nChange-Id: I62175172dddce7f84319e3c8669747994e06a697\nSigned-off-by: Nir Soffer <nsoffer@redhat.com>\nReviewed-on: https://gerrit.ovirt.org/40822\nContinuous-Integration: Jenkins CI\nTested-by: Adam Litke <alitke@redhat.com>\nReviewed-by: Adam Litke <alitke@redhat.com>","distinct":true,"url":"https://api.github.com/repos/oVirt/vdsm/commits/c1c23a03bd3a3688f0cc5cbebf590cc6e8614624"}]}
{"actor":{"display_login":"gerrit-ovirt-org"}}