After consolidating the input on this design review request, I ended up with two independent designs because the UUID won't be an image property. The two updated designs are below. Comments are still welcome, but I'm planning to move forward with implementing this.
856 Image Title With this issue, the intent is to be able to store some per-image property data, especially for user images. This data will be stored in the cfg_cache file in a new section: [property] name = "..." description = "..." The pkg command will be modified to support new subcommands: pkg set-property propname propvalue pkg unset-property propname pkg property [propname] The "pkg property" command is for printing out the values of image properties. These subcommands are intended to mimic the authority related subcommands. The image-create subcommand does not set any properties by default. The "name" property is for use by GUIs and other tools. To implement, the ImageConfig class would be modified to handle the new section. The Image class would be enhanced with the following methods: set_property(self, name, value) (this would write the cfg_cache file too via ImageConfig) get_property(self, name) The image.txt file will be updated to match this design. 1347 optional UUID per image A UUID is per-authority property. It is stored in the cfg_cache file in the appropriate authority section. [authority_updates.sfbay] origin = http://updates.sfbay.sun.com:10022 ssl_key = None prefix = updates.sfbay ssl_cert = None mirrors = [] uuid = 3eb59a8f-2842-11dd-b712-005056c00008 The pkg command will be modified to support new arguments to the set-authority subcommand. pkg set-authority --reset-uuid authority pkg set-authority --unset-uuid authority The --unset-uuid argument will cause the entry in cfg_cache to be: uuid = None The --reset-uuid argument will generate the UUID using the python uuid.uuid1() method which produces a UUID based on the host ID, sequence number and time. The image-create subcommand sets the UUID to None initially. There is no option for setting a UUID with the image-create subcommand. The uuid property, if set, would be included in the user-agent value of all requests to the repository for that authority. The format would be as follows: User-Agent: pkg/VERSION, (osname machine; osrelease version; imagetype; uuid) misc.versioned_urlopen would have another argument for the uuid. The default value will be None. Since the python uuid module is not included with python until version 2.5, it will be brought into the package module the same way that Queue.py was brought in as Queue25.py. The uuid.py file will be brought in as uuid25.py. Tom _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
