api_common.py revision 3234
1638N/A# The contents of this file are subject to the terms of the 1638N/A# Common Development and Distribution License (the "License"). 1638N/A# You may not use this file except in compliance with the License. 1638N/A# See the License for the specific language governing permissions 1638N/A# and limitations under the License. 1638N/A# When distributing Covered Code, include this CDDL HEADER in each 1638N/A# If applicable, add the following below this CDDL HEADER, with the 1638N/A# fields enclosed by brackets "[]" replaced with your own identifying 1638N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3158N/A# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 1638N/A# Visible changes to classes here require an update to 1638N/A"""Contains API functions and classes common to both pkg.client.api and 1638N/A """A class representing the license information a package 1638N/A provides. Not intended for instantiation by API consumers.""" 1638N/A """Retrieves and returns the payload of the license (which 1638N/A should be text). This may require remote retrieval of 1638N/A resources and so this could raise a TransportError or other 1638N/A """The FMRI of the package this license is for.""" 1638N/A """The keyword identifying this license within its related 1638N/A """A boolean value indicating whether the license requires 1638N/A """A boolean value indicating whether the license must be 1638N/A displayed during install or update operations.""" 1638N/A """Represents the scheme and category of an info.classification entry 1638N/A """A class capturing the information about packages that a client 1638N/A could need. The fmri is guaranteed to be set. All other values may 1638N/A be None, depending on how the PackageInfo instance was created.""" 1970N/A # Possible package states; these constants should match the values used 1970N/A # by the Image class. Constants with negative values are not currently 2493N/A """Returns a list of the values of the package attribute 'name'. 2493N/A The 'modifiers' parameter, if present, is a dict containing 2493N/A order for the values to be returned. 2493N/A Returns an empty list if there are no values. 2493N/A # XXX should the modifiers parameter be allowed to be a subset 2493N/A # of an action's modifiers? 1638N/A """This is a private method and not intended for 1638N/A # XXX this doesn't handle locale. 1638N/A # Anything other than dependency data 1735N/A # Historical summary field.