~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/interfaces/archive.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-23 22:27:37 UTC
  • mfrom: (13240.2.17 bug-776437)
  • Revision ID: launchpad@pqm.canonical.com-20110623222737-tk7fcrkbq2f2gsbn
[r=jcsackett][bug=776437] Export IProcessorFamily, et al, attributes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    'FULL_COMPONENT_SUPPORT',
24
24
    'IArchive',
25
25
    'IArchiveAppend',
 
26
    'IArchiveCommercial',
26
27
    'IArchiveEdit',
27
28
    'IArchiveView',
28
29
    'IArchiveEditDependenciesForm',
100
101
from lp.soyuz.enums import ArchivePurpose
101
102
from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
102
103
from lp.soyuz.interfaces.component import IComponent
103
 
from lp.soyuz.interfaces.processor import IProcessorFamily
104
104
 
105
105
 
106
106
@error_status(httplib.BAD_REQUEST)
433
433
            "context build.\n"
434
434
            "NOTE: This is for migration of OEM PPAs only!")))
435
435
 
436
 
    enabled_restricted_families = CollectionField(
 
436
    enabled_restricted_families = exported(
 
437
        CollectionField(
437
438
            title=_("Enabled restricted families"),
438
439
            description=_(
439
440
                "The restricted architecture families on which the archive "
440
441
                "can build."),
441
 
            value_type=Reference(schema=IProcessorFamily),
442
 
            readonly=False)
 
442
            value_type=Reference(schema=Interface),
 
443
            # Really IProcessorFamily.
 
444
            readonly=True),
 
445
        as_of='devel')
443
446
 
444
447
    commercial = exported(
445
448
        Bool(
1506
1509
        """
1507
1510
 
1508
1511
 
1509
 
class IArchive(IArchivePublic, IArchiveAppend, IArchiveEdit, IArchiveView):
 
1512
class IArchiveCommercial(Interface):
 
1513
    """Archive interface for operations restricted by commercial."""
 
1514
 
 
1515
    @operation_parameters(
 
1516
        family=Reference(schema=Interface, required=True),
 
1517
        # Really IProcessorFamily.
 
1518
    )
 
1519
    @export_write_operation()
 
1520
    @operation_for_version('devel')
 
1521
    def enableRestrictedFamily(family):
 
1522
        """Add the processor family to the set of enabled restricted families.
 
1523
 
 
1524
        :param family: is an `IProcessorFamily` object.
 
1525
        """
 
1526
 
 
1527
 
 
1528
class IArchive(IArchivePublic, IArchiveAppend, IArchiveEdit, IArchiveView,
 
1529
               IArchiveCommercial):
1510
1530
    """Main Archive interface."""
1511
1531
    export_as_webservice_entry()
1512
1532