Exemplo n.º 1
0
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example

oci_account = {
    'type':
    'object',
    'properties': {
        'account_name': string_with_example('account1'),
        'bucket': string_with_example('image-bucket'),
        'region': string_with_example('us-phoenix-1'),
        'availability_domain': string_with_example('Omic:PHX-AD-1'),
        'compartment_id': string_with_example('ocid1.compartment.oc1..'),
        'oci_user_id': string_with_example('ocid1.user.oc1..'),
        'tenancy': string_with_example('ocid1.tenancy.oc1..')
    },
    'additionalProperties':
    False,
    'required': [
        'account_name', 'bucket', 'region', 'availability_domain',
        'compartment_id', 'oci_user_id', 'tenancy'
    ]
}
Exemplo n.º 2
0
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example

azure_account = {
    'type':
    'object',
    'properties': {
        'account_name': string_with_example('account1'),
        'region': string_with_example('westus'),
        'source_container': string_with_example('container1'),
        'source_resource_group': string_with_example('res_group1'),
        'source_storage_account': string_with_example('storage_account1')
    },
    'additionalProperties':
    False,
    'required': [
        'account_name', 'region', 'source_container', 'source_resource_group',
        'source_storage_account'
    ]
}

azure_credentials = {
    'type':
Exemplo n.º 3
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example
from mash.services.api.v1.schema.jobs import base_job_message

gce_job_message = copy.deepcopy(base_job_message)
gce_job_message['properties']['family'] = string_with_example(
    'opensuse-leap',
    description='Family to add the image to. Image families help group '
    'related images together and provide versioning of images.')
gce_job_message['properties']['months_to_deletion'] = {
    'type':
    'integer',
    'minimum':
    0,
    'example':
    6,
    'description':
    'When an image is deprecated it can be marked for '
    'deletion. The image is deleted after a certain number'
    'of months has passed. This is 6 months by default.'
}
gce_job_message['properties']['guest_os_features'] = {
    'type': 'array',
Exemplo n.º 4
0
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

from mash.services.api.v1.schema import (
    email,
    non_empty_string,
    string_with_example
)

image_condition = {
    'type': 'object',
    'properties': {
        'package_name': string_with_example(
            'kernel-default',
            description='The name of the package for this condition. '
                        'If no name is provided for a condition then the '
                        'condition is checked against the image itself.'
        ),
        'version': string_with_example(
            '4.13.1',
            description='The package or image version from the build service.'
                        ' If no package_name is provided with the condition '
                        'then the condition is against the image.'
        ),
        'release': string_with_example(
            '1.1',
            description='The build (release) number for the package or image.'
                        ' If no package_name is provided with the condition '
                        'then the condition is against the image.'
        ),
        'condition': {
Exemplo n.º 5
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example
from mash.services.api.v1.schema.jobs import base_job_message

oci_job_message = copy.deepcopy(base_job_message)
oci_job_message['properties']['cloud_account'] = string_with_example(
    'account1',
    description='The name of the cloud account credentials to use for image '
    'publishing.')
oci_job_message['properties']['bucket'] = string_with_example(
    'images',
    description='The name of the storage bucket to use for uploading the '
    'image tarball.')
oci_job_message['properties']['region'] = string_with_example(
    'us-phoenix-1',
    description='The region to use for launching and test an instance '
    'of the image.')
oci_job_message['properties']['availability_domain'] = string_with_example(
    'Omic:PHX-AD-1',
    description='The data center to use within the chosen region for '
    'launching and test the image.')
oci_job_message['properties']['compartment_id'] = string_with_example(
    'ocid1.compartment.oc1..',
Exemplo n.º 6
0
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example

additional_regions = {
    'type': 'array',
    'items': {
        'type': 'object',
        'properties': {
            'name': string_with_example('us-east-44'),
            'helper_image': string_with_example('ami-1234567890')
        },
        'required': ['name', 'helper_image'],
        'additionalProperties': False
    },
    'minItems': 1,
    'example': [{'name': 'us-east-44', 'helper_image': 'ami-1234567890'}]
}

partition = {
    'type': 'string',
    'enum': ['aws', 'aws-cn', 'aws-us-gov']
}

ec2_account = {
Exemplo n.º 7
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example
from mash.services.api.v1.schema.jobs import base_job_message

azure_job_message = copy.deepcopy(base_job_message)
azure_job_message['properties']['label'] = string_with_example(
    'openSUSE Leap 15',
    description='The title to be displayed in the marketplace.'
)
azure_job_message['properties']['offer_id'] = string_with_example(
    'leap',
    description='The name of a group of related images created by a '
                'publish.'
)
azure_job_message['properties']['publisher_id'] = string_with_example(
    'suse',
    description='The organization that created the image.'
)
azure_job_message['properties']['sku'] = string_with_example(
    '15',
    description='The instance of an offer, such as a major release of '
                'a distribution.'
)
Exemplo n.º 8
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example

aliyun_account = {
    'type': 'object',
    'properties': {
        'account_name': string_with_example('account1'),
        'bucket': string_with_example('image-bucket'),
        'region': string_with_example('cn-beijing'),
        'security_group_id': string_with_example('sg1'),
        'vswitch_id': string_with_example('vs1')
    },
    'additionalProperties': False,
    'required': ['account_name', 'bucket', 'region']
}

aliyun_credentials = {
    'type': 'object',
    'properties': {
        'access_key': string_with_example('123456789'),
        'access_secret': string_with_example('987654321')
    },
Exemplo n.º 9
0
# mash is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example
from mash.services.api.v1.schema.jobs import base_job_message

aliyun_job_message = copy.deepcopy(base_job_message)
aliyun_job_message['properties']['platform'] = string_with_example(
    'OpenSUSE', description='The distribution of the image operating system.')
aliyun_job_message['properties']['launch_permission'] = string_with_example(
    'EXAMPLE',
    description='The launch permission to set for the published image.')
aliyun_job_message['properties']['cloud_account'] = string_with_example(
    'account1',
    description='The name of the cloud account to use for image '
    'publishing.')
aliyun_job_message['properties']['bucket'] = string_with_example(
    'images',
    description='The name of the storage bucket to use for uploading the '
    'qcow2 image.')
aliyun_job_message['properties']['region'] = string_with_example(
    'cn-beijing',
    description='The region to use for launching and testing an instance '
    'of the image.')
Exemplo n.º 10
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example

gce_account = {
    'type': 'object',
    'properties': {
        'account_name': string_with_example('account1'),
        'bucket': string_with_example('image-bucket'),
        'testing_account': string_with_example('test-account1'),
        'region': string_with_example('us-west1-a'),
        'is_publishing_account': {
            'type': 'boolean'
        }
    },
    'additionalProperties': False,
    'required': ['account_name', 'bucket', 'region']
}

gce_credentials = {
    'type':
    'object',
    'properties': {
Exemplo n.º 11
0
# You should have received a copy of the GNU General Public License
# along with mash.  If not, see <http://www.gnu.org/licenses/>
#

import copy

from mash.services.api.v1.schema import string_with_example, non_empty_string
from mash.services.api.v1.schema.jobs import base_job_message

ec2_job_account = {
    'type':
    'object',
    'properties': {
        'name':
        string_with_example(
            'account1',
            description='Name of cloud account as associated with the mash '
            'user account.'),
        'region':
        string_with_example(
            'us-east-1',
            description='Region to use for initial image creation and '
            'test.'),
        'root_swap_ami':
        string_with_example(
            'ami-1234567890',
            description='The image AMI to use for the root swap image '
            'creation method.'),
        'subnet':
        string_with_example(
            'subnet-12345678',
            description='The subnet to use for image test and image '