Folks here are the API requirements for the PM/UM for 2009.04.
I have logged enhancement api-python bugs to track them all. The relevant bits have been cut and pasted into each bug. I have attached them as one doc here for ease of reference. Feel free to comment here or directly on the bugs. We need to get consensus on this as we are going for Feature Freeze start of February.
Authority API's (#5871), List API's (#5872), Search API (#5874) JR
API: Here is the list of requirements which are needed for the IPS GUI (Package Manager / Update Manager) from the api side together with performance criteria. All names are just suggestions of course. Rev 4: - Qualified the Performance criteria Rev 5: - Modified based on feedback from Brock and bugs logged for all API's Authority API's (#5871), List API's (#5872), Search API (#5874) Performance Criteria: --------------------- - Agree on a test machine spec: MacBook Pro 2 Gig Hz 2 Gig RAM machine, and Toshiba Tecra 1.2 GigHz 1 Gig RAM - Will have different performance criteria for each type. - Agree on number of registered repos for Authority operations, say 5. - Agree on repo size for per repo listing operation tests (we are currently working against opensolaris.org (~20k FMRI's and ~2k Unique Package Names). I would like to add in contrib and pending to get additional timing tests for different repo sizes. I would expect there to be different criteria based on repo size. - Agree on network speeds to test against (DSL line, a cable modem, and across a wired LAN) Authority API's (#5871): ----------------------- Function: api.get_authorities() - Return list of AuthorityInfo objects, one for each registered authority. Currently using img.gen_authorities() and img.get_default_authority() to get this info. Performance: - The maximum time of this call should be 0.1sec Object: AuthorityInfo() Fields: - authority: 'opensolaris.org' - origin: 'http://pkg.opensolaris.org/release' - ssl_key: None - ssl_cert: None - uuid: '2697f04c-c08d-11dd-a2d1-008027f49158' (optional) - mirrors[] - preferred: True/ False Function: api.set_authority(AuthorityInfo) - Add authority specified in the AuthorityInfo object, if preferred is set to True, set as preferred authority Performance: - Used when adding repo in Manage Repositories, so < 10 seconds is fine Function: api.unset_authority(authority) - Unset specified authority (string). Performance: - Used when removing repo in Manage Repositories, so < 10 seconds is fine List API's (#5872): ------------------- Function: api.get_all_categories([authority1, authority2]) - Param is list of authorities (strings) - Function to get all categories for specified authority/authorities. - Return list of category strings. Performance: - The maximum time of this call should be 0.5sec Issues: - The list of categories should be localized. How should this be handled? - Supporting arbitrary categorization schemes. If a category is of the form '/web/firefox/plugins/' then a simple list may not work but will probably go with this for 2009.04 Function: api.get_pkg_stem_list([list of authorities], [optional list of categories]) - Params, specify the list of authorities and optional list of categories for which the list of "unique package names" should be returned. - By "unique package name" we mean the name returned by the command "pkg list -a" not an unique FMRI. - Function to get list of "unique package names" - Returns list of PackageNameInfo objects or possibly just return a dictionary/list Object: PackageNameInfo() Fields: - Pkg authority - Pkg stem (which will be passed to the api.plan_* functions) - Localized display name - Localized short description for the installed package - Localized short description for the newest available package - Localized categories to which the package belongs - State, similar to what we have currently: {'frozen': False, 'upgradable': False, 'state': 'known', 'incorporated': False, 'excludes': False} Note: State - for a given unique package name like openoffice.org3.0 for example, we need to know if its: - Not installed - Installed - Installed with update available. Performance: - The maximum time of this call should be 5 sec in case of one authority passed. - Assuming repo of ~20k FRMI's and ~2k unique package names, on Toshiba Tecra test machine. Search API (#5874): -------------------- api.search([authority1, authority2], SearchCriteria) - Search function should consume the list of authorities on which to perform the search and SearchCriteria. - Search criteria - should this support a token based search and a more restricted search for a given index/action combo?? In PM we generally want a more restrictive search set than the CLI and would be nice to support this rather than having to post process the result set. - Returns a list of SearchInfo() objects - Not sure what's feasible here needs more discussion Object: SearchCriteria() We need to be able to search on: - token (same as CLI) - local True search performed against local repo cache - remote True search performed against remote repos - case-sensitive (supported for local only??) - pkg name - pkg description - pkg file - pkg directory - pkg category Object: SearchInfo() - index - action - value - package Notes: - Search should be cancelable if possible.
_______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
