コード例 #1
0
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities

ServiceSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    atapi.StringField(
        'description_internal',
        read_permission='View internals',
        write_permission='Modify internals',
        widget=atapi.StringWidget(
            label="Internal description",
            macro_view='trusted_string',
        ),
    ),
    ateapi.UrlField(
        'url',
        searchable=1,
    ),
    atapi.StringField(
        'service_area',
        searchable=1,
        widget=atapi.StringWidget(label="Service area", ),
    ),
    atapi.StringField(
        'service_type',
        searchable=1,
        widget=atapi.StringWidget(label="Service type"),
    ),
    atapi.StringField(
        'value_to_customer',
        searchable=1,
        widget=atapi.StringWidget(
コード例 #2
0
                                              description='When does the downtime end? In UTC!'),
                        ),

    atapi.ReferenceField('affected_registered_serivces',
                         relationship='affected_registered_services',
                         allowed_types=('RegisteredService', 'RegisteredServiceComponent',),
                         multiValued=True,
                         widget=ReferenceBrowserWidget(label='Affected registered services',
                                                       description='All registered services and components unavailable during downtime',
                                                       allow_browse=1,
                                                       startup_directory_method='getStartupDirectory',
                                                       ),
                         ),
    ateapi.UrlField('reason',
                    widget=ateapi.UrlWidget(label='Reason',
                                            description='Optional URL to the change management document providing the reason for this downtime.',
                                        ),
                ),
    atapi.StringField('severity',
                      searchable=1,
                      default='warning',
                      vocabulary=NamedVocabulary('severity_levels'),
                      widget=atapi.SelectionWidget(label='Severity',
                                                   ),
                      ),
    atapi.StringField('classification',
                      searchable=1,
                      default='scheduled',
                      vocabulary=NamedVocabulary('downtime_classes'),
                      widget=atapi.SelectionWidget(label='Classification',
                                                   ),
コード例 #3
0
from Products.ATContentTypes.content import schemata

from Products.ATExtensions import ateapi
from Products.ATBackRef import BackReferenceField
from Products.ATBackRef import BackReferenceWidget

from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget

from pcp.contenttypes.interfaces import IProject
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities


ProjectSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    ateapi.UrlField('website'),
    atapi.ReferenceField('community',
                         relationship='done_for',
                         allowed_types=('Community',),
                         widget=ReferenceBrowserWidget(label='Community',
                                                       allow_browse=1,
                                                       startup_directory='/communities',
                                                       ),
                         ),
    atapi.ReferenceField('community_contact',
                         relationship='community_contact',
                         allowed_types=('Person',),
                         widget=ReferenceBrowserWidget(label='Community contact',
                                                       allow_browse=1,
                                                       startup_directory='/people',
                                                       ),
コード例 #4
0
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from Products.ATExtensions import ateapi
from Products.ATBackRef import BackReferenceField
from Products.ATBackRef import BackReferenceWidget

from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget

from pcp.contenttypes.interfaces import ICommunity
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities

CommunitySchema = folder.ATFolderSchema.copy() + atapi.Schema((
    ateapi.UrlField('url'),
    ateapi.AddressField('address'),
    atapi.ReferenceField(
        'representative',
        relationship='representative',
        allowed_types=('Person', ),
        widget=ReferenceBrowserWidget(
            label='Representative',
            allow_browse=1,
            startup_directory='/people',
        ),
    ),
    atapi.ReferenceField(
        'admins',
        relationship='community_admins',
        multiValued=True,
コード例 #5
0
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from Products.ATExtensions import ateapi
from Products.ATBackRef import BackReferenceField
from Products.ATBackRef import BackReferenceWidget

from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget

from pcp.contenttypes.interfaces import IProvider
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities

ProviderSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    ateapi.UrlField('url'),
    ateapi.AddressField('address'),
    atapi.ReferenceField(
        'contact',
        relationship='contact',
        allowed_types=('Person', ),
        widget=ReferenceBrowserWidget(
            label='Contact',
            allow_browse=1,
            startup_directory='/people',
        ),
    ),
    atapi.ReferenceField(
        'admins',
        relationship='admin_of',
        multiValued=True,
コード例 #6
0
    atapi.ReferenceField('contact',
                         relationship='contact_for',
                         allowed_types=('Person',),
                         widget=ReferenceBrowserWidget(
                             allow_sorting=1,
                             allow_search=1,
                             allow_browse=1,
                             force_close_on_insert=1,
                             startup_directory='/people',
                             use_wildcard_search=True,
                         ),
                         ),
    atapi.TextField('account',
                    widget=atapi.TextAreaWidget(),
                    ),
    ateapi.UrlField('terms_of_use'),
    atapi.BooleanField('rootaccess'),
    atapi.TextField('setup_procedure',
                    widget=atapi.TextAreaWidget(),
                    ),
    atapi.TextField('firewall_policy',
                    widget=atapi.TextAreaWidget(),
                    ),
)) + CommonFields


schemata.finalizeATCTSchema(
    EnvironmentSchema,
    folderish=True,
    moveDiscussion=False
)
コード例 #7
0
     ),
 ),
 atapi.ReferenceField(
     'dependencies',
     relationship='depends_on',
     allowed_types=('Service', ),
     multiValued=True,
     widget=ReferenceBrowserWidget(
         label='Depends on',
         allow_browse=1,
         startup_directory='/catalog',
     ),
 ),
 ateapi.UrlField(
     'usage_policy_link',
     searchable=1,
     widget=ateapi.UrlWidget(label='Usage policy'),
 ),
 ateapi.UrlField(
     'user_documentation_link',
     searchable=1,
     widget=ateapi.UrlWidget(label='User documentation'),
 ),
 ateapi.UrlField(
     'operations_documentation_link',
     searchable=1,
     widget=ateapi.UrlWidget(label='Operations documentation'),
 ),
 ateapi.UrlField(
     'monitoring_link',
     searchable=1,
コード例 #8
0
from Products.ATVocabularyManager import NamedVocabulary

from Products.ATExtensions import ateapi
from Products.ATBackRef import BackReferenceField
from Products.ATBackRef import BackReferenceWidget

from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget

from pcp.contenttypes.interfaces import IProject
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities


ProjectSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    ateapi.UrlField('website'),
    atapi.ReferenceField('community',
                         read_permission='View internals',
                         write_permission='Modify internals',
                         relationship='done_for',
                         allowed_types=('Community',),
                         widget=ReferenceBrowserWidget(label='Customer',
                                                       description='Main customer '
                                                       'involved in this project',
                                                       allow_browse=1,
                                                       startup_directory='/customers',
                                                       ),
                         ),
    atapi.ReferenceField('community_contact',
                         read_permission='View internals',
                         write_permission='Modify internals',